From owner-svn-src-all@freebsd.org Sun Oct 2 00:35:02 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CCC6A9DB2A; Sun, 2 Oct 2016 00:35:02 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E49BB36A; Sun, 2 Oct 2016 00:35:01 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u920Z1jJ089940; Sun, 2 Oct 2016 00:35:01 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u920Z0YE089936; Sun, 2 Oct 2016 00:35:00 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201610020035.u920Z0YE089936@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 2 Oct 2016 00:35:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306570 - in head/sys/cddl/dev/fbt: . arm powerpc x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 00:35:02 -0000 Author: markj Date: Sun Oct 2 00:35:00 2016 New Revision: 306570 URL: https://svnweb.freebsd.org/changeset/base/306570 Log: Allow tracing of functions prefixed by "__". This restriction was inherited from upstream but is not relevant on FreeBSD. Furthermore, it hindered the tracing of locking primitive subroutines. MFC after: 1 week Modified: head/sys/cddl/dev/fbt/arm/fbt_isa.c head/sys/cddl/dev/fbt/fbt.c head/sys/cddl/dev/fbt/powerpc/fbt_isa.c head/sys/cddl/dev/fbt/x86/fbt_isa.c Modified: head/sys/cddl/dev/fbt/arm/fbt_isa.c ============================================================================== --- head/sys/cddl/dev/fbt/arm/fbt_isa.c Sat Oct 1 23:08:26 2016 (r306569) +++ head/sys/cddl/dev/fbt/arm/fbt_isa.c Sun Oct 2 00:35:00 2016 (r306570) @@ -106,9 +106,6 @@ fbt_provide_module_function(linker_file_ return (0); } - if (name[0] == '_' && name[1] == '_') - return (0); - instr = (uint32_t *)symval->value; limit = (uint32_t *)(symval->value + symval->size); Modified: head/sys/cddl/dev/fbt/fbt.c ============================================================================== --- head/sys/cddl/dev/fbt/fbt.c Sat Oct 1 23:08:26 2016 (r306569) +++ head/sys/cddl/dev/fbt/fbt.c Sun Oct 2 00:35:00 2016 (r306570) @@ -126,10 +126,6 @@ fbt_excluded(const char *name) return (1); } - /* Exclude some internal functions */ - if (name[0] == '_' && name[1] == '_') - return (1); - /* * When DTrace is built into the kernel we need to exclude * the FBT functions from instrumentation. Modified: head/sys/cddl/dev/fbt/powerpc/fbt_isa.c ============================================================================== --- head/sys/cddl/dev/fbt/powerpc/fbt_isa.c Sat Oct 1 23:08:26 2016 (r306569) +++ head/sys/cddl/dev/fbt/powerpc/fbt_isa.c Sun Oct 2 00:35:00 2016 (r306570) @@ -138,9 +138,6 @@ fbt_provide_module_function(linker_file_ return (0); } - if (name[0] == '_' && name[1] == '_') - return (0); - instr = (uint32_t *) symval->value; limit = (uint32_t *) (symval->value + symval->size); Modified: head/sys/cddl/dev/fbt/x86/fbt_isa.c ============================================================================== --- head/sys/cddl/dev/fbt/x86/fbt_isa.c Sat Oct 1 23:08:26 2016 (r306569) +++ head/sys/cddl/dev/fbt/x86/fbt_isa.c Sun Oct 2 00:35:00 2016 (r306570) @@ -174,9 +174,6 @@ fbt_provide_module_function(linker_file_ return (0); } - if (name[0] == '_' && name[1] == '_') - return (0); - size = symval->size; instr = (uint8_t *) symval->value; From owner-svn-src-all@freebsd.org Sun Oct 2 00:56:23 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 258F5A9DFDB; Sun, 2 Oct 2016 00:56:23 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E932FD12; Sun, 2 Oct 2016 00:56:22 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u920uM8v097306; Sun, 2 Oct 2016 00:56:22 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u920uM1C097305; Sun, 2 Oct 2016 00:56:22 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201610020056.u920uM1C097305@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 2 Oct 2016 00:56:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306571 - head/usr.sbin/rtsold X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 00:56:23 -0000 Author: markj Date: Sun Oct 2 00:56:21 2016 New Revision: 306571 URL: https://svnweb.freebsd.org/changeset/base/306571 Log: rtsold: Log messages about unexpected RAs at LOG_DEBUG. Because rtsold listens for RAs on a raw socket, it may receive RAs from interfaces that it does not manage. Such events can result in excessive logging. Submitted by: Franco Fichtner MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D8108 Modified: head/usr.sbin/rtsold/rtsol.c Modified: head/usr.sbin/rtsold/rtsol.c ============================================================================== --- head/usr.sbin/rtsold/rtsol.c Sun Oct 2 00:35:00 2016 (r306570) +++ head/usr.sbin/rtsold/rtsol.c Sun Oct 2 00:56:21 2016 (r306571) @@ -347,7 +347,7 @@ rtsol_input(int s) /* xxx: more validation? */ if ((ifi = find_ifinfo(pi->ipi6_ifindex)) == NULL) { - warnmsg(LOG_INFO, __func__, + warnmsg(LOG_DEBUG, __func__, "received RA from %s on an unexpected IF(%s)", inet_ntop(AF_INET6, &from.sin6_addr, ntopbuf, sizeof(ntopbuf)), From owner-svn-src-all@freebsd.org Sun Oct 2 01:14:28 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FC7CAC4867; Sun, 2 Oct 2016 01:14:28 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2BEA69D1; Sun, 2 Oct 2016 01:14:28 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u921ERD2004940; Sun, 2 Oct 2016 01:14:27 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u921EQwq004934; Sun, 2 Oct 2016 01:14:26 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201610020114.u921EQwq004934@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 2 Oct 2016 01:14:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306572 - in stable/11/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/intel/dtrace cddl/contrib/opensolaris/uts/powerpc/dtrace conf modules/o... X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 01:14:28 -0000 Author: markj Date: Sun Oct 2 01:14:26 2016 New Revision: 306572 URL: https://svnweb.freebsd.org/changeset/base/306572 Log: MFC r306304: Move implementations of uread() and uwrite() to the illumos compat layer. Added: stable/11/sys/cddl/compat/opensolaris/kern/opensolaris_proc.c - copied unchanged from r306304, head/sys/cddl/compat/opensolaris/kern/opensolaris_proc.c Modified: stable/11/sys/cddl/compat/opensolaris/sys/proc.h stable/11/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c stable/11/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c stable/11/sys/conf/files stable/11/sys/modules/opensolaris/Makefile Directory Properties: stable/11/ (props changed) Copied: stable/11/sys/cddl/compat/opensolaris/kern/opensolaris_proc.c (from r306304, head/sys/cddl/compat/opensolaris/kern/opensolaris_proc.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/sys/cddl/compat/opensolaris/kern/opensolaris_proc.c Sun Oct 2 01:14:26 2016 (r306572, copy of r306304, head/sys/cddl/compat/opensolaris/kern/opensolaris_proc.c) @@ -0,0 +1,57 @@ +/*- + * Copyright 2016 Mark Johnston + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +int +uread(proc_t *p, void *kaddr, size_t len, uintptr_t uaddr) +{ + ssize_t n; + + PHOLD(p); + n = proc_readmem(curthread, p, uaddr, kaddr, len); + PRELE(p); + if (n != len) + return (ENOMEM); + return (0); +} + +int +uwrite(proc_t *p, void *kaddr, size_t len, uintptr_t uaddr) +{ + ssize_t n; + + PHOLD(p); + n = proc_writemem(curthread, p, uaddr, kaddr, len); + PRELE(p); + if (n != len) + return (ENOMEM); + return (0); +} Modified: stable/11/sys/cddl/compat/opensolaris/sys/proc.h ============================================================================== --- stable/11/sys/cddl/compat/opensolaris/sys/proc.h Sun Oct 2 00:56:21 2016 (r306571) +++ stable/11/sys/cddl/compat/opensolaris/sys/proc.h Sun Oct 2 01:14:26 2016 (r306572) @@ -92,6 +92,9 @@ do_thread_create(caddr_t stk, size_t stk do_thread_create(stk, stksize, proc, arg, len, pp, state, pri) #define thread_exit() kthread_exit() +int uread(proc_t *, void *, size_t, uintptr_t); +int uwrite(proc_t *, void *, size_t, uintptr_t); + #endif /* _KERNEL */ #endif /* _OPENSOLARIS_SYS_PROC_H_ */ Modified: stable/11/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Sun Oct 2 00:56:21 2016 (r306571) +++ stable/11/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Sun Oct 2 01:14:26 2016 (r306572) @@ -59,34 +59,8 @@ #include #else #include - -static int -uread(proc_t *p, void *kaddr, size_t len, uintptr_t uaddr) -{ - ssize_t n; - - PHOLD(p); - n = proc_readmem(curthread, p, uaddr, kaddr, len); - PRELE(p); - if (n != len) - return (ENOMEM); - return (0); -} - -static int -uwrite(proc_t *p, void *kaddr, size_t len, uintptr_t uaddr) -{ - ssize_t n; - - PHOLD(p); - n = proc_writemem(curthread, p, uaddr, kaddr, len); - PRELE(p); - if (n != len) - return (ENOMEM); - return (0); -} - #endif /* illumos */ + #ifdef __i386__ #define r_rax r_eax #define r_rbx r_ebx Modified: stable/11/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c Sun Oct 2 00:56:21 2016 (r306571) +++ stable/11/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c Sun Oct 2 01:14:26 2016 (r306572) @@ -44,32 +44,6 @@ #define OP_RA(x) (((x) & 0x001F0000) >> 16) #define OP_RB(x) (((x) & 0x0000F100) >> 11) -static int -uread(proc_t *p, void *kaddr, size_t len, uintptr_t uaddr) -{ - ssize_t n; - - PHOLD(p); - n = proc_readmem(curthread, p, uaddr, kaddr, len); - PRELE(p); - if (n <= 0 || n < len) - return (ENOMEM); - return (0); -} - -static int -uwrite(proc_t *p, void *kaddr, size_t len, uintptr_t uaddr) -{ - ssize_t n; - - PHOLD(p); - n = proc_writemem(curthread, p, uaddr, kaddr, len); - PRELE(p); - if (n <= 0 || n < len) - return (ENOMEM); - return (0); -} - int fasttrap_tracepoint_install(proc_t *p, fasttrap_tracepoint_t *tp) { Modified: stable/11/sys/conf/files ============================================================================== --- stable/11/sys/conf/files Sun Oct 2 00:56:21 2016 (r306571) +++ stable/11/sys/conf/files Sun Oct 2 01:14:26 2016 (r306572) @@ -127,6 +127,7 @@ cddl/compat/opensolaris/kern/opensolaris cddl/compat/opensolaris/kern/opensolaris_cmn_err.c optional zfs | dtrace compile-with "${CDDL_C}" cddl/compat/opensolaris/kern/opensolaris_kmem.c optional zfs | dtrace compile-with "${CDDL_C}" cddl/compat/opensolaris/kern/opensolaris_misc.c optional zfs | dtrace compile-with "${CDDL_C}" +cddl/compat/opensolaris/kern/opensolaris_proc.c optional zfs | dtrace compile-with "${CDDL_C}" cddl/compat/opensolaris/kern/opensolaris_sunddi.c optional zfs | dtrace compile-with "${CDDL_C}" cddl/compat/opensolaris/kern/opensolaris_taskq.c optional zfs | dtrace compile-with "${CDDL_C}" # zfs specific Modified: stable/11/sys/modules/opensolaris/Makefile ============================================================================== --- stable/11/sys/modules/opensolaris/Makefile Sun Oct 2 00:56:21 2016 (r306571) +++ stable/11/sys/modules/opensolaris/Makefile Sun Oct 2 01:14:26 2016 (r306572) @@ -9,6 +9,7 @@ SRCS= opensolaris.c \ opensolaris_cmn_err.c \ opensolaris_kmem.c \ opensolaris_misc.c \ + opensolaris_proc.c \ opensolaris_sunddi.c _A=${SYSDIR}/cddl/contrib/opensolaris/common/atomic From owner-svn-src-all@freebsd.org Sun Oct 2 01:16:03 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B914DAC4A35; Sun, 2 Oct 2016 01:16:03 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9155CB88; Sun, 2 Oct 2016 01:16:03 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u921G2Qq005062; Sun, 2 Oct 2016 01:16:02 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u921G2GR005057; Sun, 2 Oct 2016 01:16:02 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201610020116.u921G2GR005057@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 2 Oct 2016 01:16:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306573 - stable/11/sys/netinet6 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 01:16:03 -0000 Author: markj Date: Sun Oct 2 01:16:02 2016 New Revision: 306573 URL: https://svnweb.freebsd.org/changeset/base/306573 Log: MFC r306285: Rename ndpr_refcnt to ndpr_addrcnt. Modified: stable/11/sys/netinet6/in6.c stable/11/sys/netinet6/nd6.c stable/11/sys/netinet6/nd6.h stable/11/sys/netinet6/nd6_rtr.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet6/in6.c ============================================================================== --- stable/11/sys/netinet6/in6.c Sun Oct 2 01:14:26 2016 (r306572) +++ stable/11/sys/netinet6/in6.c Sun Oct 2 01:16:02 2016 (r306573) @@ -630,7 +630,7 @@ in6_control(struct socket *so, u_long cm /* relate the address to the prefix */ if (ia->ia6_ndpr == NULL) { ia->ia6_ndpr = pr; - pr->ndpr_refcnt++; + pr->ndpr_addrcnt++; /* * If this is the first autoconf address from the @@ -638,7 +638,7 @@ in6_control(struct socket *so, u_long cm * (when required). */ if ((ia->ia6_flags & IN6_IFF_AUTOCONF) && - V_ip6_use_tempaddr && pr->ndpr_refcnt == 1) { + V_ip6_use_tempaddr && pr->ndpr_addrcnt == 1) { int e; if ((e = in6_tmpifadd(ia, 1, 0)) != 0) { log(LOG_NOTICE, "in6_control: failed " @@ -690,11 +690,11 @@ aifaddr_out: * and the prefix management. We do this, however, to provide * as much backward compatibility as possible in terms of * the ioctl operation. - * Note that in6_purgeaddr() will decrement ndpr_refcnt. + * Note that in6_purgeaddr() will decrement ndpr_addrcnt. */ pr = ia->ia6_ndpr; in6_purgeaddr(&ia->ia_ifa); - if (pr && pr->ndpr_refcnt == 0) + if (pr && pr->ndpr_addrcnt == 0) prelist_remove(pr); EVENTHANDLER_INVOKE(ifaddr_event, ifp); break; @@ -1305,9 +1305,9 @@ in6_unlink_ifa(struct in6_ifaddr *ia, st "in6_unlink_ifa: autoconf'ed address " "%s has no prefix\n", ip6_sprintf(ip6buf, IA6_IN6(ia)))); } else { - ia->ia6_ndpr->ndpr_refcnt--; + ia->ia6_ndpr->ndpr_addrcnt--; /* Do not delete lles within prefix if refcont != 0 */ - if (ia->ia6_ndpr->ndpr_refcnt == 0) + if (ia->ia6_ndpr->ndpr_addrcnt == 0) remove_lle = 1; ia->ia6_ndpr = NULL; } Modified: stable/11/sys/netinet6/nd6.c ============================================================================== --- stable/11/sys/netinet6/nd6.c Sun Oct 2 01:14:26 2016 (r306572) +++ stable/11/sys/netinet6/nd6.c Sun Oct 2 01:16:02 2016 (r306573) @@ -1159,7 +1159,7 @@ nd6_purge(struct ifnet *ifp) * still be above zero. We therefore reset it to * make sure that the prefix really gets purged. */ - pr->ndpr_refcnt = 0; + pr->ndpr_addrcnt = 0; prelist_remove(pr); } @@ -2674,7 +2674,7 @@ nd6_sysctl_prlist(SYSCTL_HANDLER_ARGS) else p.expire = maxexpire; } - p.refcnt = pr->ndpr_refcnt; + p.refcnt = pr->ndpr_addrcnt; p.flags = pr->ndpr_stateflags; p.advrtrs = 0; LIST_FOREACH(pfr, &pr->ndpr_advrtrs, pfr_entry) Modified: stable/11/sys/netinet6/nd6.h ============================================================================== --- stable/11/sys/netinet6/nd6.h Sun Oct 2 01:14:26 2016 (r306572) +++ stable/11/sys/netinet6/nd6.h Sun Oct 2 01:16:02 2016 (r306573) @@ -275,7 +275,7 @@ struct nd_prefix { /* list of routers that advertise the prefix: */ LIST_HEAD(pr_rtrhead, nd_pfxrouter) ndpr_advrtrs; u_char ndpr_plen; - int ndpr_refcnt; /* reference couter from addresses */ + int ndpr_addrcnt; /* count of derived addresses */ }; #define ndpr_raf ndpr_flags Modified: stable/11/sys/netinet6/nd6_rtr.c ============================================================================== --- stable/11/sys/netinet6/nd6_rtr.c Sun Oct 2 01:14:26 2016 (r306572) +++ stable/11/sys/netinet6/nd6_rtr.c Sun Oct 2 01:16:02 2016 (r306573) @@ -1053,7 +1053,7 @@ prelist_remove(struct nd_prefix *pr) /* what should we do? */ } - if (pr->ndpr_refcnt > 0) + if (pr->ndpr_addrcnt > 0) return; /* notice here? */ /* unlink ndpr_entry from nd_prefix list */ @@ -1356,7 +1356,7 @@ prelist_update(struct nd_prefixctl *new, /* * note that we should use pr (not new) for reference. */ - pr->ndpr_refcnt++; + pr->ndpr_addrcnt++; ia6->ia6_ndpr = pr; /* @@ -2114,7 +2114,7 @@ in6_tmpifadd(const struct in6_ifaddr *ia return (EINVAL); /* XXX */ } newia->ia6_ndpr = ia0->ia6_ndpr; - newia->ia6_ndpr->ndpr_refcnt++; + newia->ia6_ndpr->ndpr_addrcnt++; ifa_free(&newia->ia_ifa); /* From owner-svn-src-all@freebsd.org Sun Oct 2 01:18:36 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E1E3AC4BA7; Sun, 2 Oct 2016 01:18:36 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDA24D53; Sun, 2 Oct 2016 01:18:35 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u921IZxA005201; Sun, 2 Oct 2016 01:18:35 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u921IZMl005200; Sun, 2 Oct 2016 01:18:35 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201610020118.u921IZMl005200@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 2 Oct 2016 01:18:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306574 - stable/11/sys/cddl/dev/systrace X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 01:18:36 -0000 Author: markj Date: Sun Oct 2 01:18:34 2016 New Revision: 306574 URL: https://svnweb.freebsd.org/changeset/base/306574 Log: MFC r306220: Re-check the systrace probe ID before calling dtrace_probe(). Modified: stable/11/sys/cddl/dev/systrace/systrace.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/dev/systrace/systrace.c ============================================================================== --- stable/11/sys/cddl/dev/systrace/systrace.c Sun Oct 2 01:16:02 2016 (r306573) +++ stable/11/sys/cddl/dev/systrace/systrace.c Sun Oct 2 01:18:34 2016 (r306574) @@ -193,7 +193,8 @@ systrace_probe(struct syscall_args *sa, memset(uargs, 0, sizeof(uargs)); if (type == SYSTRACE_ENTRY) { - id = sa->callp->sy_entry; + if ((id = sa->callp->sy_entry) == DTRACE_IDNONE) + return; if (sa->callp->sy_systrace_args_func != NULL) /* @@ -215,7 +216,8 @@ systrace_probe(struct syscall_args *sa, */ curthread->t_dtrace_systrace_args = uargs; } else { - id = sa->callp->sy_return; + if ((id = sa->callp->sy_return) == DTRACE_IDNONE) + return; curthread->t_dtrace_systrace_args = NULL; /* Set arg0 and arg1 as the return value of this syscall. */ From owner-svn-src-all@freebsd.org Sun Oct 2 01:21:04 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26AE1AC4CA8; Sun, 2 Oct 2016 01:21:04 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 01D3528; Sun, 2 Oct 2016 01:21:03 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u921L3fg005370; Sun, 2 Oct 2016 01:21:03 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u921L3N1005368; Sun, 2 Oct 2016 01:21:03 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201610020121.u921L3N1005368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 2 Oct 2016 01:21:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306575 - stable/11/sys/vm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 01:21:04 -0000 Author: markj Date: Sun Oct 2 01:21:02 2016 New Revision: 306575 URL: https://svnweb.freebsd.org/changeset/base/306575 Log: MFC r305056, r305367: Restore swap pager readahead. Modified: stable/11/sys/vm/swap_pager.c stable/11/sys/vm/vm_page.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/swap_pager.c ============================================================================== --- stable/11/sys/vm/swap_pager.c Sun Oct 2 01:18:34 2016 (r306574) +++ stable/11/sys/vm/swap_pager.c Sun Oct 2 01:21:02 2016 (r306575) @@ -990,22 +990,21 @@ swap_pager_copy(vm_object_t srcobject, v * page and return TRUE if it does, FALSE if it doesn't. * * If TRUE, we also try to determine how much valid, contiguous backing - * store exists before and after the requested page within a reasonable - * distance. We do not try to restrict it to the swap device stripe - * (that is handled in getpages/putpages). It probably isn't worth - * doing here. + * store exists before and after the requested page. */ static boolean_t -swap_pager_haspage(vm_object_t object, vm_pindex_t pindex, int *before, int *after) +swap_pager_haspage(vm_object_t object, vm_pindex_t pindex, int *before, + int *after) { - daddr_t blk0; + daddr_t blk, blk0; + int i; VM_OBJECT_ASSERT_LOCKED(object); + /* * do we have good backing store at the requested index ? */ blk0 = swp_pager_meta_ctl(object, pindex, 0); - if (blk0 == SWAPBLK_NONE) { if (before) *before = 0; @@ -1018,34 +1017,26 @@ swap_pager_haspage(vm_object_t object, v * find backwards-looking contiguous good backing store */ if (before != NULL) { - int i; - - for (i = 1; i < (SWB_NPAGES/2); ++i) { - daddr_t blk; - + for (i = 1; i < SWB_NPAGES; i++) { if (i > pindex) break; blk = swp_pager_meta_ctl(object, pindex - i, 0); if (blk != blk0 - i) break; } - *before = (i - 1); + *before = i - 1; } /* * find forward-looking contiguous good backing store */ if (after != NULL) { - int i; - - for (i = 1; i < (SWB_NPAGES/2); ++i) { - daddr_t blk; - + for (i = 1; i < SWB_NPAGES; i++) { blk = swp_pager_meta_ctl(object, pindex + i, 0); if (blk != blk0 + i) break; } - *after = (i - 1); + *after = i - 1; } return (TRUE); } @@ -1077,62 +1068,108 @@ swap_pager_unswapped(vm_page_t m) } /* - * SWAP_PAGER_GETPAGES() - bring pages in from swap - * - * Attempt to retrieve (m, count) pages from backing store, but make - * sure we retrieve at least m[reqpage]. We try to load in as large - * a chunk surrounding m[reqpage] as is contiguous in swap and which - * belongs to the same object. - * - * The code is designed for asynchronous operation and - * immediate-notification of 'reqpage' but tends not to be - * used that way. Please do not optimize-out this algorithmic - * feature, I intend to improve on it in the future. + * swap_pager_getpages() - bring pages in from swap * - * The parent has a single vm_object_pip_add() reference prior to - * calling us and we should return with the same. + * Attempt to page in the pages in array "m" of length "count". The caller + * may optionally specify that additional pages preceding and succeeding + * the specified range be paged in. The number of such pages is returned + * in the "rbehind" and "rahead" parameters, and they will be in the + * inactive queue upon return. * - * The parent has BUSY'd the pages. We should return with 'm' - * left busy, but the others adjusted. + * The pages in "m" must be busied and will remain busied upon return. */ static int swap_pager_getpages(vm_object_t object, vm_page_t *m, int count, int *rbehind, int *rahead) { struct buf *bp; + vm_page_t mpred, msucc, p; + vm_pindex_t pindex; daddr_t blk; + int i, j, maxahead, maxbehind, reqcount, shift; - /* - * Calculate range to retrieve. The pages have already been assigned - * their swapblks. We require a *contiguous* range but we know it to - * not span devices. If we do not supply it, bad things - * happen. Note that blk, iblk & jblk can be SWAPBLK_NONE, but the - * loops are set up such that the case(s) are handled implicitly. - * - * The swp_*() calls must be made with the object locked. - */ - blk = swp_pager_meta_ctl(m[0]->object, m[0]->pindex, 0); + reqcount = count; - if (blk == SWAPBLK_NONE) - return (VM_PAGER_FAIL); + VM_OBJECT_WUNLOCK(object); + bp = getpbuf(&nsw_rcount); + VM_OBJECT_WLOCK(object); -#ifdef INVARIANTS - for (int i = 0; i < count; i++) - KASSERT(blk + i == - swp_pager_meta_ctl(m[i]->object, m[i]->pindex, 0), - ("%s: range is not contiguous", __func__)); -#endif + if (!swap_pager_haspage(object, m[0]->pindex, &maxbehind, &maxahead)) { + relpbuf(bp, &nsw_rcount); + return (VM_PAGER_FAIL); + } /* - * Getpbuf() can sleep. + * Clip the readahead and readbehind ranges to exclude resident pages. */ - VM_OBJECT_WUNLOCK(object); + if (rahead != NULL) { + KASSERT(reqcount - 1 <= maxahead, + ("page count %d extends beyond swap block", reqcount)); + *rahead = imin(*rahead, maxahead - (reqcount - 1)); + pindex = m[reqcount - 1]->pindex; + msucc = TAILQ_NEXT(m[reqcount - 1], listq); + if (msucc != NULL && msucc->pindex - pindex - 1 < *rahead) + *rahead = msucc->pindex - pindex - 1; + } + if (rbehind != NULL) { + *rbehind = imin(*rbehind, maxbehind); + pindex = m[0]->pindex; + mpred = TAILQ_PREV(m[0], pglist, listq); + if (mpred != NULL && pindex - mpred->pindex - 1 < *rbehind) + *rbehind = pindex - mpred->pindex - 1; + } + /* - * Get a swap buffer header to perform the IO - */ - bp = getpbuf(&nsw_rcount); - bp->b_flags |= B_PAGING; + * Allocate readahead and readbehind pages. + */ + shift = rbehind != NULL ? *rbehind : 0; + if (shift != 0) { + for (i = 1; i <= shift; i++) { + p = vm_page_alloc(object, m[0]->pindex - i, + VM_ALLOC_NORMAL | VM_ALLOC_IFNOTCACHED); + if (p == NULL) { + /* Shift allocated pages to the left. */ + for (j = 0; j < i - 1; j++) + bp->b_pages[j] = + bp->b_pages[j + shift - i + 1]; + break; + } + bp->b_pages[shift - i] = p; + } + shift = i - 1; + *rbehind = shift; + } + for (i = 0; i < reqcount; i++) + bp->b_pages[i + shift] = m[i]; + if (rahead != NULL) { + for (i = 0; i < *rahead; i++) { + p = vm_page_alloc(object, + m[reqcount - 1]->pindex + i + 1, + VM_ALLOC_NORMAL | VM_ALLOC_IFNOTCACHED); + if (p == NULL) + break; + bp->b_pages[shift + reqcount + i] = p; + } + *rahead = i; + } + if (rbehind != NULL) + count += *rbehind; + if (rahead != NULL) + count += *rahead; + + vm_object_pip_add(object, count); + + for (i = 0; i < count; i++) + bp->b_pages[i]->oflags |= VPO_SWAPINPROG; + + pindex = bp->b_pages[0]->pindex; + blk = swp_pager_meta_ctl(object, pindex, 0); + KASSERT(blk != SWAPBLK_NONE, + ("no swap blocking containing %p(%jx)", object, (uintmax_t)pindex)); + VM_OBJECT_WUNLOCK(object); + + bp->b_flags |= B_PAGING; bp->b_iocmd = BIO_READ; bp->b_iodone = swp_pager_async_iodone; bp->b_rcred = crhold(thread0.td_ucred); @@ -1141,22 +1178,11 @@ swap_pager_getpages(vm_object_t object, bp->b_bcount = PAGE_SIZE * count; bp->b_bufsize = PAGE_SIZE * count; bp->b_npages = count; - - VM_OBJECT_WLOCK(object); - for (int i = 0; i < count; i++) { - bp->b_pages[i] = m[i]; - m[i]->oflags |= VPO_SWAPINPROG; - } + bp->b_pgbefore = rbehind != NULL ? *rbehind : 0; + bp->b_pgafter = rahead != NULL ? *rahead : 0; PCPU_INC(cnt.v_swapin); - PCPU_ADD(cnt.v_swappgsin, bp->b_npages); - - /* - * We still hold the lock on mreq, and our automatic completion routine - * does not remove it. - */ - vm_object_pip_add(object, bp->b_npages); - VM_OBJECT_WUNLOCK(object); + PCPU_ADD(cnt.v_swappgsin, count); /* * perform the I/O. NOTE!!! bp cannot be considered valid after @@ -1173,9 +1199,9 @@ swap_pager_getpages(vm_object_t object, swp_pager_strategy(bp); /* - * wait for the page we want to complete. VPO_SWAPINPROG is always + * Wait for the pages we want to complete. VPO_SWAPINPROG is always * cleared on completion. If an I/O error occurs, SWAPBLK_NONE - * is set in the meta-data. + * is set in the metadata for each page in the request. */ VM_OBJECT_WLOCK(object); while ((m[0]->oflags & VPO_SWAPINPROG) != 0) { @@ -1192,15 +1218,10 @@ swap_pager_getpages(vm_object_t object, /* * If we had an unrecoverable read error pages will not be valid. */ - for (int i = 0; i < count; i++) + for (i = 0; i < reqcount; i++) if (m[i]->valid != VM_PAGE_BITS_ALL) return (VM_PAGER_ERROR); - if (rbehind) - *rbehind = 0; - if (rahead) - *rahead = 0; - return (VM_PAGER_OK); /* @@ -1518,7 +1539,11 @@ swp_pager_async_iodone(struct buf *bp) ("swp_pager_async_iodone: page %p is mapped", m)); KASSERT(m->dirty == 0, ("swp_pager_async_iodone: page %p is dirty", m)); + m->valid = VM_PAGE_BITS_ALL; + if (i < bp->b_pgbefore || + i >= bp->b_npages - bp->b_pgafter) + vm_page_readahead_finish(m); } else { /* * For write success, clear the dirty Modified: stable/11/sys/vm/vm_page.c ============================================================================== --- stable/11/sys/vm/vm_page.c Sun Oct 2 01:18:34 2016 (r306574) +++ stable/11/sys/vm/vm_page.c Sun Oct 2 01:21:02 2016 (r306575) @@ -1030,8 +1030,8 @@ vm_page_free_zero(vm_page_t m) } /* - * Unbusy and handle the page queueing for a page from the VOP_GETPAGES() - * array which was optionally read ahead or behind. + * Unbusy and handle the page queueing for a page from a getpages request that + * was optionally read ahead or behind. */ void vm_page_readahead_finish(vm_page_t m) From owner-svn-src-all@freebsd.org Sun Oct 2 01:22:39 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF919AC4E85; Sun, 2 Oct 2016 01:22:39 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2B3530C; Sun, 2 Oct 2016 01:22:39 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u921McnV008777; Sun, 2 Oct 2016 01:22:38 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u921Mcmb008776; Sun, 2 Oct 2016 01:22:38 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201610020122.u921Mcmb008776@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 2 Oct 2016 01:22:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306576 - stable/11/cddl/contrib/opensolaris/cmd/dtrace X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 01:22:40 -0000 Author: markj Date: Sun Oct 2 01:22:38 2016 New Revision: 306576 URL: https://svnweb.freebsd.org/changeset/base/306576 Log: MFC r304431: Add a SIGINFO handler for dtrace(1). Modified: stable/11/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c Sun Oct 2 01:21:02 2016 (r306575) +++ stable/11/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c Sun Oct 2 01:22:38 2016 (r306576) @@ -93,6 +93,9 @@ static int g_flowindent; static int g_intr; static int g_impatient; static int g_newline; +#ifdef __FreeBSD__ +static int g_siginfo; +#endif static int g_total; static int g_cflags; static int g_oflags; @@ -1260,6 +1263,16 @@ intr(int signo) g_impatient = 1; } +#ifdef __FreeBSD__ +static void +siginfo(int signo __unused) +{ + + g_siginfo++; + g_newline = 1; +} +#endif + static void installsighands(void) { @@ -1275,12 +1288,16 @@ installsighands(void) if (sigaction(SIGTERM, NULL, &oact) == 0 && oact.sa_handler != SIG_IGN) (void) sigaction(SIGTERM, &act, NULL); -#ifndef illumos +#ifdef __FreeBSD__ if (sigaction(SIGPIPE, NULL, &oact) == 0 && oact.sa_handler != SIG_IGN) (void) sigaction(SIGPIPE, &act, NULL); if (sigaction(SIGUSR1, NULL, &oact) == 0 && oact.sa_handler != SIG_IGN) (void) sigaction(SIGUSR1, &act, NULL); + + act.sa_handler = siginfo; + if (sigaction(SIGINFO, NULL, &oact) == 0 && oact.sa_handler != SIG_IGN) + (void) sigaction(SIGINFO, &act, NULL); #endif } @@ -1944,6 +1961,13 @@ main(int argc, char *argv[]) if (!g_intr && !done) dtrace_sleep(g_dtp); +#ifdef __FreeBSD__ + if (g_siginfo) { + (void)dtrace_aggregate_print(g_dtp, g_ofp, NULL); + g_siginfo = 0; + } +#endif + if (g_newline) { /* * Output a newline just to make the output look From owner-svn-src-all@freebsd.org Sun Oct 2 01:42:46 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CFE5AC6614; Sun, 2 Oct 2016 01:42:46 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F322DFD; Sun, 2 Oct 2016 01:42:46 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u921gjHZ016531; Sun, 2 Oct 2016 01:42:45 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u921gjsJ016528; Sun, 2 Oct 2016 01:42:45 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201610020142.u921gjsJ016528@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Sun, 2 Oct 2016 01:42:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306577 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 01:42:46 -0000 Author: vangyzen Date: Sun Oct 2 01:42:45 2016 New Revision: 306577 URL: https://svnweb.freebsd.org/changeset/base/306577 Log: Add GARP retransmit capability A single gratuitous ARP (GARP) is always transmitted when an IPv4 address is added to an interface, and that is usually sufficient. However, in some circumstances, such as when a shared address is passed between cluster nodes, this single GARP may occasionally be dropped or lost. This can lead to neighbors on the network link working with a stale ARP cache and sending packets destined for that address to the node that previously owned the address, which may not respond. To avoid this situation, GARP retransmissions can be enabled by setting the net.link.ether.inet.garp_rexmit_count sysctl to a value greater than zero. The setting represents the maximum number of retransmissions. The interval between retransmissions is calculated using an exponential backoff algorithm, doubling each time, so the retransmission intervals are: {1, 2, 4, 8, 16, ...} (seconds). Due to the exponential backoff algorithm used for the interval between GARP retransmissions, the maximum number of retransmissions is limited to 16 for sanity. This limit corresponds to a maximum interval between retransmissions of 2^16 seconds ~= 18 hours. Increasing this limit is possible, but sending out GARPs spaced days apart would be of little use. Submitted by: David A. Bright MFC after: 1 month Relnotes: yes Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D7695 Modified: head/sys/netinet/if_ether.c head/sys/netinet/in.c head/sys/netinet/in_var.h Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Sun Oct 2 01:22:38 2016 (r306576) +++ head/sys/netinet/if_ether.c Sun Oct 2 01:42:45 2016 (r306577) @@ -137,6 +137,28 @@ SYSCTL_INT(_net_link_ether_inet, OID_AUT "Maximum number of remotely triggered ARP messages that can be " "logged per second"); +/* + * Due to the exponential backoff algorithm used for the interval between GARP + * retransmissions, the maximum number of retransmissions is limited for + * sanity. This limit corresponds to a maximum interval between retransmissions + * of 2^16 seconds ~= 18 hours. + * + * Making this limit more dynamic is more complicated than worthwhile, + * especially since sending out GARPs spaced days apart would be of little + * use. A maximum dynamic limit would look something like: + * + * const int max = fls(INT_MAX / hz) - 1; + */ +#define MAX_GARP_RETRANSMITS 16 +static int sysctl_garp_rexmit(SYSCTL_HANDLER_ARGS); +static int garp_rexmit_count = 0; /* GARP retransmission setting. */ + +SYSCTL_PROC(_net_link_ether_inet, OID_AUTO, garp_rexmit_count, + CTLTYPE_INT|CTLFLAG_RW|CTLFLAG_MPSAFE, + &garp_rexmit_count, 0, sysctl_garp_rexmit, "I", + "Number of times to retransmit GARP packets;" + " 0 to disable, maximum of 16"); + #define ARP_LOG(pri, ...) do { \ if (ppsratecheck(&arp_lastlog, &arp_curpps, arp_maxpps)) \ log((pri), "arp: " __VA_ARGS__); \ @@ -1287,6 +1309,109 @@ arp_add_ifa_lle(struct ifnet *ifp, const lltable_free_entry(LLTABLE(ifp), lle_tmp); } +/* + * Handle the garp_rexmit_count. Like sysctl_handle_int(), but limits the range + * of valid values. + */ +static int +sysctl_garp_rexmit(SYSCTL_HANDLER_ARGS) +{ + int error; + int rexmit_count = *(int *)arg1; + + error = sysctl_handle_int(oidp, &rexmit_count, 0, req); + + /* Enforce limits on any new value that may have been set. */ + if (!error && req->newptr) { + /* A new value was set. */ + if (rexmit_count < 0) { + rexmit_count = 0; + } else if (rexmit_count > MAX_GARP_RETRANSMITS) { + rexmit_count = MAX_GARP_RETRANSMITS; + } + *(int *)arg1 = rexmit_count; + } + + return (error); +} + +/* + * Retransmit a Gratuitous ARP (GARP) and, if necessary, schedule a callout to + * retransmit it again. A pending callout owns a reference to the ifa. + */ +static void +garp_rexmit(void *arg) +{ + struct in_ifaddr *ia = arg; + + if (callout_pending(&ia->ia_garp_timer) || + !callout_active(&ia->ia_garp_timer)) { + IF_ADDR_WUNLOCK(ia->ia_ifa.ifa_ifp); + ifa_free(&ia->ia_ifa); + return; + } + + /* + * Drop lock while the ARP request is generated. + */ + IF_ADDR_WUNLOCK(ia->ia_ifa.ifa_ifp); + + arprequest(ia->ia_ifa.ifa_ifp, &IA_SIN(ia)->sin_addr, + &IA_SIN(ia)->sin_addr, IF_LLADDR(ia->ia_ifa.ifa_ifp)); + + /* + * Increment the count of retransmissions. If the count has reached the + * maximum value, stop sending the GARP packets. Otherwise, schedule + * the callout to retransmit another GARP packet. + */ + ++ia->ia_garp_count; + if (ia->ia_garp_count >= garp_rexmit_count) { + ifa_free(&ia->ia_ifa); + } else { + int rescheduled; + IF_ADDR_WLOCK(ia->ia_ifa.ifa_ifp); + rescheduled = callout_reset(&ia->ia_garp_timer, + (1 << ia->ia_garp_count) * hz, + garp_rexmit, ia); + IF_ADDR_WUNLOCK(ia->ia_ifa.ifa_ifp); + if (rescheduled) { + ifa_free(&ia->ia_ifa); + } + } +} + +/* + * Start the GARP retransmit timer. + * + * A single GARP is always transmitted when an IPv4 address is added + * to an interface and that is usually sufficient. However, in some + * circumstances, such as when a shared address is passed between + * cluster nodes, this single GARP may occasionally be dropped or + * lost. This can lead to neighbors on the network link working with a + * stale ARP cache and sending packets destined for that address to + * the node that previously owned the address, which may not respond. + * + * To avoid this situation, GARP retransmits can be enabled by setting + * the net.link.ether.inet.garp_rexmit_count sysctl to a value greater + * than zero. The setting represents the maximum number of + * retransmissions. The interval between retransmissions is calculated + * using an exponential backoff algorithm, doubling each time, so the + * retransmission intervals are: {1, 2, 4, 8, 16, ...} (seconds). + */ +static void +garp_timer_start(struct ifaddr *ifa) +{ + struct in_ifaddr *ia = (struct in_ifaddr *) ifa; + + IF_ADDR_WLOCK(ia->ia_ifa.ifa_ifp); + ia->ia_garp_count = 0; + if (callout_reset(&ia->ia_garp_timer, (1 << ia->ia_garp_count) * hz, + garp_rexmit, ia) == 0) { + ifa_ref(ifa); + } + IF_ADDR_WUNLOCK(ia->ia_ifa.ifa_ifp); +} + void arp_ifinit(struct ifnet *ifp, struct ifaddr *ifa) { @@ -1302,6 +1427,9 @@ arp_ifinit(struct ifnet *ifp, struct ifa if (ntohl(dst_in->sin_addr.s_addr) == INADDR_ANY) return; arp_announce_ifaddr(ifp, dst_in->sin_addr, IF_LLADDR(ifp)); + if (garp_rexmit_count > 0) { + garp_timer_start(ifa); + } arp_add_ifa_lle(ifp, dst); } Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Sun Oct 2 01:22:38 2016 (r306576) +++ head/sys/netinet/in.c Sun Oct 2 01:42:45 2016 (r306577) @@ -397,6 +397,8 @@ in_aifaddr_ioctl(u_long cmd, caddr_t dat ifa->ifa_addr = (struct sockaddr *)&ia->ia_addr; ifa->ifa_dstaddr = (struct sockaddr *)&ia->ia_dstaddr; ifa->ifa_netmask = (struct sockaddr *)&ia->ia_sockmask; + callout_init_rw(&ia->ia_garp_timer, &ifp->if_addr_lock, + CALLOUT_RETURNUNLOCKED); ia->ia_ifp = ifp; ia->ia_addr = *addr; @@ -635,6 +637,12 @@ in_difaddr_ioctl(caddr_t data, struct if IN_MULTI_UNLOCK(); } + IF_ADDR_WLOCK(ifp); + if (callout_stop(&ia->ia_garp_timer) == 1) { + ifa_free(&ia->ia_ifa); + } + IF_ADDR_WUNLOCK(ifp); + EVENTHANDLER_INVOKE(ifaddr_event, ifp); ifa_free(&ia->ia_ifa); /* in_ifaddrhead */ Modified: head/sys/netinet/in_var.h ============================================================================== --- head/sys/netinet/in_var.h Sun Oct 2 01:22:38 2016 (r306576) +++ head/sys/netinet/in_var.h Sun Oct 2 01:42:45 2016 (r306577) @@ -82,6 +82,8 @@ struct in_ifaddr { struct sockaddr_in ia_dstaddr; /* reserve space for broadcast addr */ #define ia_broadaddr ia_dstaddr struct sockaddr_in ia_sockmask; /* reserve space for general netmask */ + struct callout ia_garp_timer; /* timer for retransmitting GARPs */ + int ia_garp_count; /* count of retransmitted GARPs */ }; /* From owner-svn-src-all@freebsd.org Sun Oct 2 03:07:00 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00C04AC4125; Sun, 2 Oct 2016 03:07:00 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7E74BAE; Sun, 2 Oct 2016 03:06:59 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9236xxQ047358; Sun, 2 Oct 2016 03:06:59 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9236xTc047357; Sun, 2 Oct 2016 03:06:59 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201610020306.u9236xTc047357@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 2 Oct 2016 03:06:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306578 - head/sys/dev/evdev X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 03:07:00 -0000 Author: gonzo Date: Sun Oct 2 03:06:58 2016 New Revision: 306578 URL: https://svnweb.freebsd.org/changeset/base/306578 Log: Fix gcc compilation error input_absinfo.code is unsigned so condition is always false Modified: head/sys/dev/evdev/uinput.c Modified: head/sys/dev/evdev/uinput.c ============================================================================== --- head/sys/dev/evdev/uinput.c Sun Oct 2 01:42:45 2016 (r306577) +++ head/sys/dev/evdev/uinput.c Sun Oct 2 03:06:58 2016 (r306578) @@ -527,7 +527,7 @@ uinput_ioctl_sub(struct uinput_cdev_stat return (EINVAL); uabs = (struct uinput_abs_setup *)data; - if (uabs->code > ABS_MAX || uabs->code < 0) + if (uabs->code > ABS_MAX) return (EINVAL); evdev_support_abs(state->ucs_evdev, uabs->code, From owner-svn-src-all@freebsd.org Sun Oct 2 03:20:33 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A41B8AC4601; Sun, 2 Oct 2016 03:20:33 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6FF202F5; Sun, 2 Oct 2016 03:20:33 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u923KWDf051359; Sun, 2 Oct 2016 03:20:32 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u923KV5r051346; Sun, 2 Oct 2016 03:20:31 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201610020320.u923KV5r051346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 2 Oct 2016 03:20:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306579 - in head/sys: arm/conf arm/ti conf dev/evdev dev/usb/input modules modules/evdev modules/uinput X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 03:20:33 -0000 Author: gonzo Date: Sun Oct 2 03:20:31 2016 New Revision: 306579 URL: https://svnweb.freebsd.org/changeset/base/306579 Log: Modularize evdev - Convert "options EVDEV" to "device evdev" and "device uinput", add modules for both new devices. They are isolated subsystems and do not require any compile-time changes to general kernel subsytems - For hybrid drivers that have evdev as an optional way to deliver input events add option EVDEV_SUPPORT. Update all existing hybrid drivers to use it instead of EVDEV - Remove no-op DECLARE_MODULE in evdev, it's not required, MODULE_VERSION is enough - Add evdev module dependency to uinput Submitted by: Vladimir Kondratiev Added: head/sys/modules/evdev/ head/sys/modules/evdev/Makefile (contents, props changed) head/sys/modules/uinput/ head/sys/modules/uinput/Makefile (contents, props changed) Modified: head/sys/arm/conf/BEAGLEBONE head/sys/arm/ti/ti_adc.c head/sys/arm/ti/ti_adcvar.h head/sys/conf/NOTES head/sys/conf/options head/sys/dev/evdev/evdev.c head/sys/dev/evdev/uinput.c head/sys/dev/usb/input/ukbd.c head/sys/dev/usb/input/ums.c head/sys/modules/Makefile Modified: head/sys/arm/conf/BEAGLEBONE ============================================================================== --- head/sys/arm/conf/BEAGLEBONE Sun Oct 2 03:06:58 2016 (r306578) +++ head/sys/arm/conf/BEAGLEBONE Sun Oct 2 03:20:31 2016 (r306579) @@ -133,4 +133,4 @@ device ukbd device kbdmux # Uncomment to enable evdev support for ti_adc -# options EVDEV +# options EVDEV_SUPPORT Modified: head/sys/arm/ti/ti_adc.c ============================================================================== --- head/sys/arm/ti/ti_adc.c Sun Oct 2 03:06:58 2016 (r306578) +++ head/sys/arm/ti/ti_adc.c Sun Oct 2 03:20:31 2016 (r306579) @@ -54,7 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef EVDEV +#ifdef EVDEV_SUPPORT #include #include #endif @@ -89,7 +89,7 @@ static int ti_adc_samples[5] = { 0, 2, 4 static int ti_adc_detach(device_t dev); -#ifdef EVDEV +#ifdef EVDEV_SUPPORT static void ti_adc_ev_report(struct ti_adc_softc *sc) { @@ -472,7 +472,7 @@ ti_adc_tsc_read_data(struct ti_adc_softc device_printf(sc->sc_dev, "touchscreen x: %d, y: %d\n", x, y); #endif -#ifdef EVDEV +#ifdef EVDEV_SUPPORT if ((sc->sc_x != x) || (sc->sc_y != y)) { sc->sc_x = x; sc->sc_y = y; @@ -516,7 +516,7 @@ ti_adc_intr(void *arg) status |= ADC_IRQ_HW_PEN_ASYNC; ADC_WRITE4(sc, ADC_IRQENABLE_CLR, ADC_IRQ_HW_PEN_ASYNC); -#ifdef EVDEV +#ifdef EVDEV_SUPPORT ti_adc_ev_report(sc); #endif } @@ -524,7 +524,7 @@ ti_adc_intr(void *arg) if (rawstatus & ADC_IRQ_PEN_UP) { sc->sc_pen_down = 0; status |= ADC_IRQ_PEN_UP; -#ifdef EVDEV +#ifdef EVDEV_SUPPORT ti_adc_ev_report(sc); #endif } @@ -874,7 +874,7 @@ ti_adc_attach(device_t dev) ti_adc_setup(sc); TI_ADC_UNLOCK(sc); -#ifdef EVDEV +#ifdef EVDEV_SUPPORT if (sc->sc_tsc_wires > 0) { sc->sc_evdev = evdev_alloc(); evdev_set_name(sc->sc_evdev, device_get_desc(dev)); @@ -921,7 +921,7 @@ ti_adc_detach(device_t dev) ti_adc_reset(sc); ti_adc_setup(sc); -#ifdef EVDEV +#ifdef EVDEV_SUPPORT evdev_free(sc->sc_evdev); #endif @@ -958,6 +958,6 @@ static devclass_t ti_adc_devclass; DRIVER_MODULE(ti_adc, simplebus, ti_adc_driver, ti_adc_devclass, 0, 0); MODULE_VERSION(ti_adc, 1); MODULE_DEPEND(ti_adc, simplebus, 1, 1, 1); -#ifdef EVDEV +#ifdef EVDEV_SUPPORT MODULE_DEPEND(ti_adc, evdev, 1, 1, 1); #endif Modified: head/sys/arm/ti/ti_adcvar.h ============================================================================== --- head/sys/arm/ti/ti_adcvar.h Sun Oct 2 03:06:58 2016 (r306578) +++ head/sys/arm/ti/ti_adcvar.h Sun Oct 2 03:20:31 2016 (r306579) @@ -55,7 +55,7 @@ struct ti_adc_softc { int sc_yn_bit, sc_yn_inp; uint32_t sc_tsc_enabled; int sc_pen_down; -#ifdef EVDEV +#ifdef EVDEV_SUPPORT int sc_x; int sc_y; struct evdev_dev *sc_evdev; Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Sun Oct 2 03:06:58 2016 (r306578) +++ head/sys/conf/NOTES Sun Oct 2 03:20:31 2016 (r306579) @@ -3054,6 +3054,8 @@ options GZIO options BHND_LOGLEVEL # Logging threshold level # evdev interface -options EVDEV -options EVDEV_DEBUG -options UINPUT_DEBUG +device evdev # input event device support +options EVDEV_SUPPORT # evdev support in legacy drivers +options EVDEV_DEBUG # enable event debug msgs +device uinput # install /dev/uinput cdev +options UINPUT_DEBUG # enable uinput debug msgs Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Sun Oct 2 03:06:58 2016 (r306578) +++ head/sys/conf/options Sun Oct 2 03:20:31 2016 (r306579) @@ -989,6 +989,6 @@ BHND_LOGLEVEL opt_global.h GPIO_SPI_DEBUG opt_gpio.h # evdev protocol support -EVDEV opt_evdev.h +EVDEV_SUPPORT opt_evdev.h EVDEV_DEBUG opt_evdev.h UINPUT_DEBUG opt_evdev.h Modified: head/sys/dev/evdev/evdev.c ============================================================================== --- head/sys/dev/evdev/evdev.c Sun Oct 2 03:06:58 2016 (r306578) +++ head/sys/dev/evdev/evdev.c Sun Oct 2 03:20:31 2016 (r306579) @@ -918,22 +918,4 @@ evdev_stop_repeat(struct evdev_dev *evde } } -static int -evdev_modevent(module_t mod, int type, void *unused) -{ - switch (type) { - case MOD_LOAD: - return 0; - case MOD_UNLOAD: - return 0; - } - return EINVAL; -} - -static moduledata_t evdev_mod = { - "evdev", - evdev_modevent, - 0 -}; -DECLARE_MODULE(evdev, evdev_mod, SI_SUB_DRIVERS, SI_ORDER_ANY); MODULE_VERSION(evdev, 1); Modified: head/sys/dev/evdev/uinput.c ============================================================================== --- head/sys/dev/evdev/uinput.c Sun Oct 2 03:06:58 2016 (r306578) +++ head/sys/dev/evdev/uinput.c Sun Oct 2 03:20:31 2016 (r306579) @@ -708,3 +708,5 @@ uinput_modevent(module_t mod __unused, i } DEV_MODULE(uinput, uinput_modevent, NULL); +MODULE_VERSION(uinput, 1); +MODULE_DEPEND(uinput, evdev, 1, 1, 1); Modified: head/sys/dev/usb/input/ukbd.c ============================================================================== --- head/sys/dev/usb/input/ukbd.c Sun Oct 2 03:06:58 2016 (r306578) +++ head/sys/dev/usb/input/ukbd.c Sun Oct 2 03:20:31 2016 (r306579) @@ -72,7 +72,7 @@ __FBSDID("$FreeBSD$"); #include -#ifdef EVDEV +#ifdef EVDEV_SUPPORT #include #include #endif @@ -166,7 +166,7 @@ struct ukbd_softc { struct usb_device *sc_udev; struct usb_interface *sc_iface; struct usb_xfer *sc_xfer[UKBD_N_TRANSFER]; -#ifdef EVDEV +#ifdef EVDEV_SUPPORT struct evdev_dev *sc_evdev; #endif @@ -363,7 +363,7 @@ static device_attach_t ukbd_attach; static device_detach_t ukbd_detach; static device_resume_t ukbd_resume; -#ifdef EVDEV +#ifdef EVDEV_SUPPORT static struct evdev_methods ukbd_evdev_methods = { .ev_event = evdev_ev_kbd_event, }; @@ -403,7 +403,7 @@ ukbd_put_key(struct ukbd_softc *sc, uint DPRINTF("0x%02x (%d) %s\n", key, key, (key & KEY_RELEASE) ? "released" : "pressed"); -#ifdef EVDEV +#ifdef EVDEV_SUPPORT if (evdev_rcpt_mask & EVDEV_RCPT_HW_KBD && sc->sc_evdev != NULL) { evdev_push_event(sc->sc_evdev, EV_KEY, evdev_hid2key(KEY_INDEX(key)), !(key & KEY_RELEASE)); @@ -931,7 +931,7 @@ ukbd_set_leds_callback(struct usb_xfer * if (!any) break; -#ifdef EVDEV +#ifdef EVDEV_SUPPORT if (sc->sc_evdev != NULL) evdev_push_leds(sc->sc_evdev, sc->sc_leds); #endif @@ -1211,7 +1211,7 @@ ukbd_attach(device_t dev) usb_error_t err; uint16_t n; uint16_t hid_len; -#ifdef EVDEV +#ifdef EVDEV_SUPPORT struct evdev_dev *evdev; int i; #endif @@ -1330,7 +1330,7 @@ ukbd_attach(device_t dev) } #endif -#ifdef EVDEV +#ifdef EVDEV_SUPPORT evdev = evdev_alloc(); evdev_set_name(evdev, device_get_desc(dev)); evdev_set_phys(evdev, device_get_nameunit(dev)); @@ -1431,7 +1431,7 @@ ukbd_detach(device_t dev) } #endif -#ifdef EVDEV +#ifdef EVDEV_SUPPORT evdev_free(sc->sc_evdev); #endif @@ -1952,7 +1952,7 @@ ukbd_ioctl_locked(keyboard_t *kbd, u_lon */ kbd->kb_delay1 = imax(((int *)arg)[0], 250); kbd->kb_delay2 = imax(((int *)arg)[1], 34); -#ifdef EVDEV +#ifdef EVDEV_SUPPORT if (sc->sc_evdev != NULL) evdev_push_repeats(sc->sc_evdev, kbd); #endif @@ -2104,7 +2104,7 @@ ukbd_set_leds(struct ukbd_softc *sc, uin static int ukbd_set_typematic(keyboard_t *kbd, int code) { -#ifdef EVDEV +#ifdef EVDEV_SUPPORT struct ukbd_softc *sc = kbd->kb_data; #endif static const int delays[] = {250, 500, 750, 1000}; @@ -2118,7 +2118,7 @@ ukbd_set_typematic(keyboard_t *kbd, int } kbd->kb_delay1 = delays[(code >> 5) & 3]; kbd->kb_delay2 = rates[code & 0x1f]; -#ifdef EVDEV +#ifdef EVDEV_SUPPORT if (sc->sc_evdev != NULL) evdev_push_repeats(sc->sc_evdev, kbd); #endif @@ -2300,7 +2300,7 @@ static driver_t ukbd_driver = { DRIVER_MODULE(ukbd, uhub, ukbd_driver, ukbd_devclass, ukbd_driver_load, 0); MODULE_DEPEND(ukbd, usb, 1, 1, 1); -#ifdef EVDEV +#ifdef EVDEV_SUPPORT MODULE_DEPEND(ukbd, evdev, 1, 1, 1); #endif MODULE_VERSION(ukbd, 1); Modified: head/sys/dev/usb/input/ums.c ============================================================================== --- head/sys/dev/usb/input/ums.c Sun Oct 2 03:06:58 2016 (r306578) +++ head/sys/dev/usb/input/ums.c Sun Oct 2 03:20:31 2016 (r306579) @@ -70,7 +70,7 @@ __FBSDID("$FreeBSD$"); #include -#ifdef EVDEV +#ifdef EVDEV_SUPPORT #include #include #endif @@ -142,7 +142,7 @@ struct ums_softc { int sc_pollrate; int sc_fflags; -#ifdef EVDEV +#ifdef EVDEV_SUPPORT int sc_evflags; #define UMS_EVDEV_OPENED 1 #endif @@ -151,7 +151,7 @@ struct ums_softc { uint8_t sc_iid; uint8_t sc_temp[64]; -#ifdef EVDEV +#ifdef EVDEV_SUPPORT struct evdev_dev *sc_evdev; #endif }; @@ -170,7 +170,7 @@ static usb_fifo_open_t ums_fifo_open; static usb_fifo_close_t ums_fifo_close; static usb_fifo_ioctl_t ums_fifo_ioctl; -#ifdef EVDEV +#ifdef EVDEV_SUPPORT static evdev_open_t ums_ev_open; static evdev_close_t ums_ev_close; #endif @@ -190,7 +190,7 @@ static struct usb_fifo_methods ums_fifo_ .basename[0] = "ums", }; -#ifdef EVDEV +#ifdef EVDEV_SUPPORT static struct evdev_methods ums_evdev_methods = { .ev_open = &ums_ev_open, .ev_close = &ums_ev_close, @@ -357,7 +357,7 @@ ums_intr_callback(struct usb_xfer *xfer, tr_setup: /* check if we can put more data into the FIFO */ if (usb_fifo_put_bytes_max(sc->sc_fifo.fp[USB_FIFO_RX]) == 0) { -#ifdef EVDEV +#ifdef EVDEV_SUPPORT if (sc->sc_evflags == 0) break; #else @@ -690,7 +690,7 @@ ums_attach(device_t dev) if (err) goto detach; -#ifdef EVDEV +#ifdef EVDEV_SUPPORT sc->sc_evdev = evdev_alloc(); evdev_set_name(sc->sc_evdev, device_get_desc(dev)); evdev_set_phys(sc->sc_evdev, device_get_nameunit(dev)); @@ -750,7 +750,7 @@ ums_detach(device_t self) usb_fifo_detach(&sc->sc_fifo); -#ifdef EVDEV +#ifdef EVDEV_SUPPORT evdev_free(sc->sc_evdev); #endif @@ -892,7 +892,7 @@ ums_put_queue(struct ums_softc *sc, int3 usb_fifo_put_data_linear(sc->sc_fifo.fp[USB_FIFO_RX], buf, sc->sc_mode.packetsize, 1); -#ifdef EVDEV +#ifdef EVDEV_SUPPORT if (evdev_rcpt_mask & EVDEV_RCPT_HW_MOUSE) { /* Push evdev event */ evdev_push_event(sc->sc_evdev, EV_REL, REL_X, dx); @@ -919,7 +919,7 @@ ums_reset_buf(struct ums_softc *sc) usb_fifo_reset(sc->sc_fifo.fp[USB_FIFO_RX]); } -#ifdef EVDEV +#ifdef EVDEV_SUPPORT static int ums_ev_open(struct evdev_dev *evdev, void *ev_softc) { @@ -967,7 +967,7 @@ ums_fifo_open(struct usb_fifo *fifo, int return (EBUSY); /* check for first open */ -#ifdef EVDEV +#ifdef EVDEV_SUPPORT if (sc->sc_fflags == 0 && sc->sc_evflags == 0) ums_reset(sc); #else @@ -1199,7 +1199,7 @@ static driver_t ums_driver = { DRIVER_MODULE(ums, uhub, ums_driver, ums_devclass, NULL, 0); MODULE_DEPEND(ums, usb, 1, 1, 1); -#ifdef EVDEV +#ifdef EVDEV_SUPPORT MODULE_DEPEND(ums, evdev, 1, 1, 1); #endif MODULE_VERSION(ums, 1); Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Sun Oct 2 03:06:58 2016 (r306578) +++ head/sys/modules/Makefile Sun Oct 2 03:20:31 2016 (r306579) @@ -111,6 +111,7 @@ SUBDIR= \ ${_epic} \ esp \ ${_et} \ + evdev \ ${_ex} \ ${_exca} \ ext2fs \ @@ -371,6 +372,7 @@ SUBDIR= \ udf \ udf_iconv \ ufs \ + uinput \ unionfs \ urtwn \ ${_urtwnfw} \ Added: head/sys/modules/evdev/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/evdev/Makefile Sun Oct 2 03:20:31 2016 (r306579) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../dev/evdev + +KMOD= evdev +SRCS= cdev.c evdev.c evdev_mt.c evdev_utils.c +SRCS+= opt_evdev.h bus_if.h device_if.h + +.include Added: head/sys/modules/uinput/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/uinput/Makefile Sun Oct 2 03:20:31 2016 (r306579) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../dev/evdev + +KMOD= uinput +SRCS= uinput.c +SRCS+= opt_evdev.h + +.include From owner-svn-src-all@freebsd.org Sun Oct 2 11:56:19 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B0FDADAF23; Sun, 2 Oct 2016 11:56:19 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D19571B5; Sun, 2 Oct 2016 11:56:18 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u92BuH7r046177; Sun, 2 Oct 2016 11:56:17 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u92BuHso046176; Sun, 2 Oct 2016 11:56:17 GMT (envelope-from br@FreeBSD.org) Message-Id: <201610021156.u92BuHso046176@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Sun, 2 Oct 2016 11:56:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306580 - head/lib/libjail X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 11:56:19 -0000 Author: br Date: Sun Oct 2 11:56:17 2016 New Revision: 306580 URL: https://svnweb.freebsd.org/changeset/base/306580 Log: Fix libjail reached latest sysctl entry. Reviewed by: jamie Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Differential Revision: https://reviews.freebsd.org/D8096 Modified: head/lib/libjail/jail.c Modified: head/lib/libjail/jail.c ============================================================================== --- head/lib/libjail/jail.c Sun Oct 2 03:20:31 2016 (r306579) +++ head/lib/libjail/jail.c Sun Oct 2 11:56:17 2016 (r306580) @@ -223,11 +223,16 @@ jailparam_all(struct jailparam **jpp) /* Get the next parameter. */ mlen2 = sizeof(mib2); if (sysctl(mib1, mlen1 + 2, mib2, &mlen2, NULL, 0) < 0) { + if (errno == ENOENT) { + /* No more entries. */ + break; + } snprintf(jail_errmsg, JAIL_ERRMSGLEN, "sysctl(0.2): %s", strerror(errno)); goto error; } - if (mib2[0] != mib1[2] || mib2[1] != mib1[3] || + if (mib2[0] != mib1[2] || + mib2[1] != mib1[3] || mib2[2] != mib1[4]) break; /* Convert it to an ascii name. */ From owner-svn-src-all@freebsd.org Sun Oct 2 14:22:10 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A9FAAEF163; Sun, 2 Oct 2016 14:22:10 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28555FBC; Sun, 2 Oct 2016 14:22:10 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u92EM97T000741; Sun, 2 Oct 2016 14:22:09 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u92EM9iQ000740; Sun, 2 Oct 2016 14:22:09 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610021422.u92EM9iQ000740@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sun, 2 Oct 2016 14:22:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306581 - head/bin/ed X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 14:22:10 -0000 Author: sevan (doc committer) Date: Sun Oct 2 14:22:09 2016 New Revision: 306581 URL: https://svnweb.freebsd.org/changeset/base/306581 Log: Use .At macro instead of specifying AT&T UNIX literaly. PR: 212034 Approved by: bcr (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D8114 Modified: head/bin/ed/ed.1 Modified: head/bin/ed/ed.1 ============================================================================== --- head/bin/ed/ed.1 Sun Oct 2 11:56:17 2016 (r306580) +++ head/bin/ed/ed.1 Sun Oct 2 14:22:09 2016 (r306581) @@ -1,5 +1,5 @@ .\" $FreeBSD$ -.Dd July 3, 2004 +.Dd October 2, 2016 .Dt ED 1 .Os .Sh NAME @@ -998,7 +998,7 @@ per line overhead: 4 ints An .Nm command appeared in -Version 1 AT&T UNIX. +.At v1 . .Sh BUGS The .Nm From owner-svn-src-all@freebsd.org Sun Oct 2 14:27:19 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED087AEF2AB; Sun, 2 Oct 2016 14:27:19 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFE4636B; Sun, 2 Oct 2016 14:27:19 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u92ERJ7i002996; Sun, 2 Oct 2016 14:27:19 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u92ERJkm002995; Sun, 2 Oct 2016 14:27:19 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610021427.u92ERJkm002995@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sun, 2 Oct 2016 14:27:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306582 - head/bin/chmod X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 14:27:20 -0000 Author: sevan (doc committer) Date: Sun Oct 2 14:27:18 2016 New Revision: 306582 URL: https://svnweb.freebsd.org/changeset/base/306582 Log: "POSIX doesn't specify -h." - r1.27 from NetBSD http://man.openbsd.org/?query=chmod&apropos=0&sec=0&arch=default&manpath=POSIX-2013 PR: 212337 Approved by: bcr (mentor) Obtained from: NetBSD MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D8118 Modified: head/bin/chmod/chmod.c Modified: head/bin/chmod/chmod.c ============================================================================== --- head/bin/chmod/chmod.c Sun Oct 2 14:22:09 2016 (r306581) +++ head/bin/chmod/chmod.c Sun Oct 2 14:27:18 2016 (r306582) @@ -91,12 +91,11 @@ main(int argc, char *argv[]) break; case 'h': /* - * In System V (and probably POSIX.2) the -h option - * causes chmod to change the mode of the symbolic - * link. 4.4BSD's symbolic links didn't have modes, - * so it was an undocumented noop. In FreeBSD 3.0, - * lchmod(2) is introduced and this option does real - * work. + * In System V the -h option causes chmod to change + * the mode of the symbolic link. 4.4BSD's symbolic + * links didn't have modes, so it was an undocumented + * noop. In FreeBSD 3.0, lchmod(2) is introduced and + * this option does real work. */ hflag = 1; break; From owner-svn-src-all@freebsd.org Sun Oct 2 14:32:05 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E43D9AEF4B7; Sun, 2 Oct 2016 14:32:05 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B39F7B20; Sun, 2 Oct 2016 14:32:05 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u92EW4va006728; Sun, 2 Oct 2016 14:32:04 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u92EW4k4006727; Sun, 2 Oct 2016 14:32:04 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610021432.u92EW4k4006727@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sun, 2 Oct 2016 14:32:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306583 - head/sbin/etherswitchcfg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 14:32:06 -0000 Author: sevan (doc committer) Date: Sun Oct 2 14:32:04 2016 New Revision: 306583 URL: https://svnweb.freebsd.org/changeset/base/306583 Log: Igor suggested moving sentence to new line. Zap traililng whitespace. PR: 212447 Approved by: bcr (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D8116 Modified: head/sbin/etherswitchcfg/etherswitchcfg.8 Modified: head/sbin/etherswitchcfg/etherswitchcfg.8 ============================================================================== --- head/sbin/etherswitchcfg/etherswitchcfg.8 Sun Oct 2 14:27:18 2016 (r306582) +++ head/sbin/etherswitchcfg/etherswitchcfg.8 Sun Oct 2 14:32:04 2016 (r306583) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 20, 2013 +.Dd October 2, 2016 .Dt ETHERSWITCHCFG 8 .Os .Sh NAME @@ -116,12 +116,13 @@ for details on and .Cm mediaopt . .It Cm led Ar number style -Sets the display style for a given LED. Available styles are: -.Cm default +Sets the display style for a given LED. +Available styles are: +.Cm default (usually flash on activity), -.Cm on , -.Cm off , -and +.Cm on , +.Cm off , +and .Cm blink . Not all switches will support all styles. .El From owner-svn-src-all@freebsd.org Sun Oct 2 14:42:47 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B07DCAEF8DE; Sun, 2 Oct 2016 14:42:47 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E132FD; Sun, 2 Oct 2016 14:42:47 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u92EgkxX011094; Sun, 2 Oct 2016 14:42:46 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u92Egkpc011093; Sun, 2 Oct 2016 14:42:46 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610021442.u92Egkpc011093@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sun, 2 Oct 2016 14:42:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306584 - head/bin/chio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 14:42:47 -0000 Author: sevan (doc committer) Date: Sun Oct 2 14:42:46 2016 New Revision: 306584 URL: https://svnweb.freebsd.org/changeset/base/306584 Log: Move the description of CHANGER variable to ENVIRONMENT section rather than in the DESCRIPTION section. From OpenBSD src/bin/chio/chio.1 r1.23 PR: 212158 Approved by: bjk Obtained from: OpenBSD MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D8117 Modified: head/bin/chio/chio.1 Modified: head/bin/chio/chio.1 ============================================================================== --- head/bin/chio/chio.1 Sun Oct 2 14:32:04 2016 (r306583) +++ head/bin/chio/chio.1 Sun Oct 2 14:42:46 2016 (r306584) @@ -32,7 +32,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 14, 1998 +.Dd October 2, 2016 .Dt CHIO 1 .Os .Sh NAME @@ -61,10 +61,6 @@ rather than the default device .Pa /dev/ch0 . .El .Pp -The default changer may be overridden by setting the environment variable -.Ev CHANGER -to the desired changer device. -.Pp A medium changer apparatus is made up of .Em elements . There are five element types: @@ -265,6 +261,12 @@ Element supports passing media (exportin .It INENAB Element supports receiving media (importing) from an outside human operator. .El +.Sh ENVIRONMENT +.Bl -tag -width CHANGER +.It Ev CHANGER +The default changer may be overridden by setting this environmental +variable to the desired changer device. +.El .Sh FILES .Bl -tag -width /dev/ch0 -compact .It Pa /dev/ch0 From owner-svn-src-all@freebsd.org Sun Oct 2 15:01:32 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B436AEFCFC; Sun, 2 Oct 2016 15:01:32 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E16DBB2; Sun, 2 Oct 2016 15:01:31 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u92F1VbY016492; Sun, 2 Oct 2016 15:01:31 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u92F1VoG016491; Sun, 2 Oct 2016 15:01:31 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201610021501.u92F1VoG016491@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 2 Oct 2016 15:01:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306585 - head/sbin/swapon X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 15:01:32 -0000 Author: jilles Date: Sun Oct 2 15:01:31 2016 New Revision: 306585 URL: https://svnweb.freebsd.org/changeset/base/306585 Log: swapon(8): Update to reality: swapoff ignores -L and the late option in fstab. MFC after: 1 week Modified: head/sbin/swapon/swapon.8 Modified: head/sbin/swapon/swapon.8 ============================================================================== --- head/sbin/swapon/swapon.8 Sun Oct 2 14:42:46 2016 (r306584) +++ head/sbin/swapon/swapon.8 Sun Oct 2 15:01:31 2016 (r306585) @@ -28,7 +28,7 @@ .\" @(#)swapon.8 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd November 22, 2013 +.Dd October 2, 2016 .Dt SWAPON 8 .Os .Sh NAME @@ -96,16 +96,8 @@ option is used, all swap devices in .Pa /etc/fstab will be removed, unless their .Dq noauto -or -.Dq late option is also set. If the -.Fl L -option is specified, -swap devices with the -.Dq late -option will be removed as well as ones with no option. -If the .Fl q option is used, informational messages will not be From owner-svn-src-all@freebsd.org Sun Oct 2 16:13:20 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2815CAF06F6; Sun, 2 Oct 2016 16:13:20 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05E1E83D; Sun, 2 Oct 2016 16:13:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u92GDJCT045826; Sun, 2 Oct 2016 16:13:19 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u92GDIba045822; Sun, 2 Oct 2016 16:13:18 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201610021613.u92GDIba045822@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 2 Oct 2016 16:13:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306586 - stable/11/sys/compat/freebsd32 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 16:13:20 -0000 Author: kib Date: Sun Oct 2 16:13:18 2016 New Revision: 306586 URL: https://svnweb.freebsd.org/changeset/base/306586 Log: MFC r305954: Add compat32 support for capsicum. Added: stable/11/sys/compat/freebsd32/capabilities.conf - copied unchanged from r305954, head/sys/compat/freebsd32/capabilities.conf Modified: stable/11/sys/compat/freebsd32/Makefile stable/11/sys/compat/freebsd32/freebsd32_capability.c stable/11/sys/compat/freebsd32/syscalls.master Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/freebsd32/Makefile ============================================================================== --- stable/11/sys/compat/freebsd32/Makefile Sun Oct 2 15:01:31 2016 (r306585) +++ stable/11/sys/compat/freebsd32/Makefile Sun Oct 2 16:13:18 2016 (r306586) @@ -8,7 +8,7 @@ all: sysent: freebsd32_sysent.c freebsd32_syscall.h freebsd32_proto.h freebsd32_systrace_args.c freebsd32_sysent.c freebsd32_syscalls.c freebsd32_syscall.h freebsd32_proto.h freebsd32_systrace_args.c : \ - ../../kern/makesyscalls.sh syscalls.master syscalls.conf + ../../kern/makesyscalls.sh syscalls.master syscalls.conf capabilities.conf -mv -f freebsd32_sysent.c freebsd32_sysent.c.bak -mv -f freebsd32_syscalls.c freebsd32_syscalls.c.bak -mv -f freebsd32_syscall.h freebsd32_syscall.h.bak Copied: stable/11/sys/compat/freebsd32/capabilities.conf (from r305954, head/sys/compat/freebsd32/capabilities.conf) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/sys/compat/freebsd32/capabilities.conf Sun Oct 2 16:13:18 2016 (r306586, copy of r305954, head/sys/compat/freebsd32/capabilities.conf) @@ -0,0 +1,284 @@ +## +## Copyright (c) 2008-2010 Robert N. M. Watson +## Copyright (c) 2016 The FreeBSD Foundation +## All rights reserved. +## +## This software was developed at the University of Cambridge Computer +## Laboratory with support from a grant from Google, Inc. +## +## Portions of this software were developed by Konstantin Belousov +## under sponsorship from the FreeBSD Foundation. +## +## Redistribution and use in source and binary forms, with or without +## modification, are permitted provided that the following conditions +## are met: +## 1. Redistributions of source code must retain the above copyright +## notice, this list of conditions and the following disclaimer. +## 2. Redistributions in binary form must reproduce the above copyright +## notice, this list of conditions and the following disclaimer in the +## documentation and/or other materials provided with the distribution. +## +## THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +## ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +## ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +## FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +## DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +## OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +## HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +## LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +## OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +## SUCH DAMAGE. +## +## List of system calls enabled in freebsd32 capability mode, one name +## per line. See the original list in the sys/kern/capabilities.conf. +## Position of the compat syscall in this file must be identical to +## the master, to facilitate comparision and diagnostic. +## +## $FreeBSD$ +## + +__acl_aclcheck_fd +__acl_delete_fd +__acl_get_fd +__acl_set_fd +__mac_get_fd +#__mac_get_pid +__mac_get_proc +__mac_set_fd +__mac_set_proc +freebsd32_sysctl +freebsd32_umtx_op +abort2 +accept +accept4 +aio_cancel +freebsd32_aio_error +aio_fsync +freebsd32_aio_read +freebsd32_aio_return +freebsd32_aio_suspend +freebsd32_aio_waitcomplete +freebsd32_aio_write +#audit +bindat +cap_enter +cap_fcntls_get +cap_fcntls_limit +cap_getmode +freebsd32_cap_ioctls_get +freebsd32_cap_ioctls_limit +__cap_rights_get +cap_rights_limit +freebsd32_clock_getres +freebsd32_clock_gettime +close +closefrom +connectat +#cpuset +#freebsd32_cpuset_getaffinity +#freebsd32_cpuset_getid +#freebsd32_cpuset_setaffinity +#freebsd32_cpuset_setid +dup +dup2 +extattr_delete_fd +extattr_get_fd +extattr_list_fd +extattr_set_fd +fchflags +fchmod +fchown +freebsd32_fcntl +freebsd32_fexecve +flock +fork +fpathconf +freebsd6_freebsd32_ftruncate +freebsd6_freebsd32_lseek +freebsd6_freebsd32_mmap +freebsd6_freebsd32_pread +freebsd6_freebsd32_pwrite +freebsd32_fstat +fstatfs +fsync +ftruncate +freebsd32_futimens +freebsd32_futimes +getaudit +getaudit_addr +getauid +freebsd32_getcontext +getdents +freebsd32_getdirentries +getdomainname +getdtablesize +getegid +geteuid +gethostid +gethostname +freebsd32_getitimer +getgid +getgroups +getlogin +freebsd32_getpagesize +getpeername +getpgid +getpgrp +getpid +getppid +getpriority +getresgid +getresuid +getrlimit +freebsd32_getrusage +getsid +getsockname +getsockopt +freebsd32_gettimeofday +getuid +freebsd32_ioctl +issetugid +freebsd32_kevent +kill +freebsd32_kmq_notify +freebsd32_kmq_setattr +freebsd32_kmq_timedreceive +freebsd32_kmq_timedsend +kqueue +freebsd32_ktimer_create +ktimer_delete +ktimer_getoverrun +freebsd32_ktimer_gettime +freebsd32_ktimer_settime +#ktrace +freebsd32_lio_listio +listen +freebsd32_lseek +madvise +mincore +minherit +mlock +mlockall +freebsd32_mmap +freebsd32_mprotect +msync +munlock +munlockall +munmap +freebsd32_nanosleep +ntp_gettime +freebsd6_freebsd32_aio_read +freebsd6_freebsd32_aio_write +obreak +freebsd6_freebsd32_lio_listio +chflagsat +faccessat +fchmodat +fchownat +freebsd32_fstatat +freebsd32_futimesat +linkat +mkdirat +mkfifoat +mknodat +openat +readlinkat +renameat +symlinkat +unlinkat +freebsd32_utimensat +open +pdfork +pdgetpid +pdkill +#pdwait4 # not yet implemented +freebsd32_pipe +pipe2 +poll +freebsd32_pread +freebsd32_preadv +profil +#ptrace +freebsd32_pwrite +freebsd32_pwritev +read +freebsd32_readv +freebsd6_freebsd32_recv +freebsd32_recvfrom +freebsd32_recvmsg +rtprio +rtprio_thread +sbrk +sched_get_priority_max +sched_get_priority_min +sched_getparam +sched_getscheduler +sched_rr_get_interval +sched_setparam +sched_setscheduler +sched_yield +sctp_generic_recvmsg +sctp_generic_sendmsg +sctp_generic_sendmsg_iov +sctp_peeloff +freebsd32_pselect +freebsd32_select +freebsd6_freebsd32_send +freebsd32_sendfile +freebsd32_sendmsg +sendto +setaudit +setaudit_addr +setauid +freebsd32_setcontext +setegid +seteuid +setgid +freebsd32_setitimer +setpriority +setregid +setresgid +setresuid +setreuid +setrlimit +setsid +setsockopt +setuid +shm_open +shutdown +freebsd32_sigaction +freebsd32_sigaltstack +freebsd32_sigblock +freebsd32_sigpending +sigprocmask +sigqueue +freebsd32_sigreturn +freebsd32_sigsetmask +ofreebsd32_sigstack +sigsuspend +freebsd32_sigtimedwait +freebsd32_sigvec +freebsd32_sigwaitinfo +sigwait +socket +socketpair +sstk +sync +sys_exit +freebsd32_sysarch +thr_create +thr_exit +thr_kill +#thr_kill2 +freebsd32_thr_new +thr_self +thr_set_name +freebsd32_thr_suspend +thr_wake +umask +utrace +uuidgen +write +freebsd32_writev +yield Modified: stable/11/sys/compat/freebsd32/freebsd32_capability.c ============================================================================== --- stable/11/sys/compat/freebsd32/freebsd32_capability.c Sun Oct 2 15:01:31 2016 (r306585) +++ stable/11/sys/compat/freebsd32/freebsd32_capability.c Sun Oct 2 16:13:18 2016 (r306586) @@ -49,18 +49,6 @@ __FBSDID("$FreeBSD$"); MALLOC_DECLARE(M_FILECAPS); int -freebsd32_cap_enter(struct thread *td, - struct freebsd32_cap_enter_args *uap) -{ - - /* - * We do not have an equivalent of capabilities.conf for freebsd32 - * compatibility, so do not allow capability mode for now. - */ - return (ENOSYS); -} - -int freebsd32_cap_ioctls_limit(struct thread *td, struct freebsd32_cap_ioctls_limit_args *uap) { @@ -148,14 +136,6 @@ out: #else /* !CAPABILITIES */ int -freebsd32_cap_enter(struct thread *td, - struct freebsd32_cap_enter_args *uap) -{ - - return (ENOSYS); -} - -int freebsd32_cap_ioctls_limit(struct thread *td, struct freebsd32_cap_ioctls_limit_args *uap) { Modified: stable/11/sys/compat/freebsd32/syscalls.master ============================================================================== --- stable/11/sys/compat/freebsd32/syscalls.master Sun Oct 2 15:01:31 2016 (r306585) +++ stable/11/sys/compat/freebsd32/syscalls.master Sun Oct 2 16:13:18 2016 (r306586) @@ -975,7 +975,7 @@ 514 AUE_NULL OBSOL cap_new 515 AUE_CAP_RIGHTS_GET NOPROTO { int __cap_rights_get(int version, \ int fd, cap_rights_t *rightsp); } -516 AUE_CAP_ENTER STD { int freebsd32_cap_enter(void); } +516 AUE_CAP_ENTER NOPROTO { int cap_enter(void); } 517 AUE_CAP_GETMODE NOPROTO { int cap_getmode(u_int *modep); } 518 AUE_PDFORK NOPROTO { int pdfork(int *fdp, int flags); } 519 AUE_PDKILL NOPROTO { int pdkill(int fd, int signum); } From owner-svn-src-all@freebsd.org Sun Oct 2 16:14:04 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E86A7AF0759; Sun, 2 Oct 2016 16:14:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 90F2E995; Sun, 2 Oct 2016 16:14:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u92GE3gC045902; Sun, 2 Oct 2016 16:14:03 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u92GE3YO045897; Sun, 2 Oct 2016 16:14:03 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201610021614.u92GE3YO045897@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 2 Oct 2016 16:14:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306587 - stable/11/sys/compat/freebsd32 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 16:14:05 -0000 Author: kib Date: Sun Oct 2 16:14:03 2016 New Revision: 306587 URL: https://svnweb.freebsd.org/changeset/base/306587 Log: Regen. Modified: stable/11/sys/compat/freebsd32/freebsd32_proto.h stable/11/sys/compat/freebsd32/freebsd32_syscall.h stable/11/sys/compat/freebsd32/freebsd32_syscalls.c stable/11/sys/compat/freebsd32/freebsd32_sysent.c stable/11/sys/compat/freebsd32/freebsd32_systrace_args.c Modified: stable/11/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- stable/11/sys/compat/freebsd32/freebsd32_proto.h Sun Oct 2 16:13:18 2016 (r306586) +++ stable/11/sys/compat/freebsd32/freebsd32_proto.h Sun Oct 2 16:14:03 2016 (r306587) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/11/sys/compat/freebsd32/syscalls.master 304977 2016-08-29 05:15:43Z kib + * created from FreeBSD: stable/11/sys/compat/freebsd32/syscalls.master 306586 2016-10-02 16:13:18Z kib */ #ifndef _FREEBSD32_SYSPROTO_H_ @@ -578,9 +578,6 @@ struct freebsd32_shmctl_args { char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; char buf_l_[PADL_(struct shmid_ds32 *)]; struct shmid_ds32 * buf; char buf_r_[PADR_(struct shmid_ds32 *)]; }; -struct freebsd32_cap_enter_args { - register_t dummy; -}; struct freebsd32_pselect_args { char nd_l_[PADL_(int)]; int nd; char nd_r_[PADR_(int)]; char in_l_[PADL_(fd_set *)]; fd_set * in; char in_r_[PADR_(fd_set *)]; @@ -798,7 +795,6 @@ int freebsd32_jail_set(struct thread *, int freebsd32_semctl(struct thread *, struct freebsd32_semctl_args *); int freebsd32_msgctl(struct thread *, struct freebsd32_msgctl_args *); int freebsd32_shmctl(struct thread *, struct freebsd32_shmctl_args *); -int freebsd32_cap_enter(struct thread *, struct freebsd32_cap_enter_args *); int freebsd32_pselect(struct thread *, struct freebsd32_pselect_args *); #ifdef PAD64_REQUIRED int freebsd32_posix_fallocate(struct thread *, struct freebsd32_posix_fallocate_args *); @@ -1258,7 +1254,6 @@ int freebsd10_freebsd32_pipe(struct thre #define FREEBSD32_SYS_AUE_freebsd32_semctl AUE_SEMCTL #define FREEBSD32_SYS_AUE_freebsd32_msgctl AUE_MSGCTL #define FREEBSD32_SYS_AUE_freebsd32_shmctl AUE_SHMCTL -#define FREEBSD32_SYS_AUE_freebsd32_cap_enter AUE_CAP_ENTER #define FREEBSD32_SYS_AUE_freebsd32_pselect AUE_SELECT #define FREEBSD32_SYS_AUE_freebsd32_posix_fallocate AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_posix_fadvise AUE_NULL Modified: stable/11/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- stable/11/sys/compat/freebsd32/freebsd32_syscall.h Sun Oct 2 16:13:18 2016 (r306586) +++ stable/11/sys/compat/freebsd32/freebsd32_syscall.h Sun Oct 2 16:14:03 2016 (r306587) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/11/sys/compat/freebsd32/syscalls.master 304977 2016-08-29 05:15:43Z kib + * created from FreeBSD: stable/11/sys/compat/freebsd32/syscalls.master 306586 2016-10-02 16:13:18Z kib */ #define FREEBSD32_SYS_syscall 0 @@ -420,7 +420,7 @@ #define FREEBSD32_SYS_lpathconf 513 /* 514 is obsolete cap_new */ #define FREEBSD32_SYS___cap_rights_get 515 -#define FREEBSD32_SYS_freebsd32_cap_enter 516 +#define FREEBSD32_SYS_cap_enter 516 #define FREEBSD32_SYS_cap_getmode 517 #define FREEBSD32_SYS_pdfork 518 #define FREEBSD32_SYS_pdkill 519 Modified: stable/11/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- stable/11/sys/compat/freebsd32/freebsd32_syscalls.c Sun Oct 2 16:13:18 2016 (r306586) +++ stable/11/sys/compat/freebsd32/freebsd32_syscalls.c Sun Oct 2 16:14:03 2016 (r306587) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/11/sys/compat/freebsd32/syscalls.master 304977 2016-08-29 05:15:43Z kib + * created from FreeBSD: stable/11/sys/compat/freebsd32/syscalls.master 306586 2016-10-02 16:13:18Z kib */ const char *freebsd32_syscallnames[] = { @@ -539,7 +539,7 @@ const char *freebsd32_syscallnames[] = { "lpathconf", /* 513 = lpathconf */ "obs_cap_new", /* 514 = obsolete cap_new */ "__cap_rights_get", /* 515 = __cap_rights_get */ - "freebsd32_cap_enter", /* 516 = freebsd32_cap_enter */ + "cap_enter", /* 516 = cap_enter */ "cap_getmode", /* 517 = cap_getmode */ "pdfork", /* 518 = pdfork */ "pdkill", /* 519 = pdkill */ Modified: stable/11/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- stable/11/sys/compat/freebsd32/freebsd32_sysent.c Sun Oct 2 16:13:18 2016 (r306586) +++ stable/11/sys/compat/freebsd32/freebsd32_sysent.c Sun Oct 2 16:14:03 2016 (r306587) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/11/sys/compat/freebsd32/syscalls.master 304977 2016-08-29 05:15:43Z kib + * created from FreeBSD: stable/11/sys/compat/freebsd32/syscalls.master 306586 2016-10-02 16:13:18Z kib */ #include "opt_compat.h" @@ -54,12 +54,12 @@ struct sysent freebsd32_sysent[] = { #define PAD64_REQUIRED #endif { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 0 = syscall */ - { AS(sys_exit_args), (sy_call_t *)sys_sys_exit, AUE_EXIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 1 = exit */ - { 0, (sy_call_t *)sys_fork, AUE_FORK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 2 = fork */ - { AS(read_args), (sy_call_t *)sys_read, AUE_READ, NULL, 0, 0, 0, SY_THR_STATIC }, /* 3 = read */ - { AS(write_args), (sy_call_t *)sys_write, AUE_WRITE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 4 = write */ - { AS(open_args), (sy_call_t *)sys_open, AUE_OPEN_RWTC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 5 = open */ - { AS(close_args), (sy_call_t *)sys_close, AUE_CLOSE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 6 = close */ + { AS(sys_exit_args), (sy_call_t *)sys_sys_exit, AUE_EXIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 1 = exit */ + { 0, (sy_call_t *)sys_fork, AUE_FORK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 2 = fork */ + { AS(read_args), (sy_call_t *)sys_read, AUE_READ, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 3 = read */ + { AS(write_args), (sy_call_t *)sys_write, AUE_WRITE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 4 = write */ + { AS(open_args), (sy_call_t *)sys_open, AUE_OPEN_RWTC, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 5 = open */ + { AS(close_args), (sy_call_t *)sys_close, AUE_CLOSE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 6 = close */ { AS(freebsd32_wait4_args), (sy_call_t *)freebsd32_wait4, AUE_WAIT4, NULL, 0, 0, 0, SY_THR_STATIC }, /* 7 = freebsd32_wait4 */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 8 = obsolete old creat */ { AS(link_args), (sy_call_t *)sys_link, AUE_LINK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 9 = link */ @@ -70,125 +70,125 @@ struct sysent freebsd32_sysent[] = { { AS(mknod_args), (sy_call_t *)sys_mknod, AUE_MKNOD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 14 = mknod */ { AS(chmod_args), (sy_call_t *)sys_chmod, AUE_CHMOD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 15 = chmod */ { AS(chown_args), (sy_call_t *)sys_chown, AUE_CHOWN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 16 = chown */ - { AS(obreak_args), (sy_call_t *)sys_obreak, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 17 = break */ + { AS(obreak_args), (sy_call_t *)sys_obreak, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 17 = break */ { compat4(AS(freebsd4_freebsd32_getfsstat_args),freebsd32_getfsstat), AUE_GETFSSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 18 = freebsd4 freebsd32_getfsstat */ - { compat(AS(ofreebsd32_lseek_args),freebsd32_lseek), AUE_LSEEK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 19 = old freebsd32_lseek */ - { 0, (sy_call_t *)sys_getpid, AUE_GETPID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 20 = getpid */ + { compat(AS(ofreebsd32_lseek_args),freebsd32_lseek), AUE_LSEEK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 19 = old freebsd32_lseek */ + { 0, (sy_call_t *)sys_getpid, AUE_GETPID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 20 = getpid */ { AS(mount_args), (sy_call_t *)sys_mount, AUE_MOUNT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 21 = mount */ { AS(unmount_args), (sy_call_t *)sys_unmount, AUE_UMOUNT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 22 = unmount */ - { AS(setuid_args), (sy_call_t *)sys_setuid, AUE_SETUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 23 = setuid */ - { 0, (sy_call_t *)sys_getuid, AUE_GETUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 24 = getuid */ - { 0, (sy_call_t *)sys_geteuid, AUE_GETEUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 25 = geteuid */ + { AS(setuid_args), (sy_call_t *)sys_setuid, AUE_SETUID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 23 = setuid */ + { 0, (sy_call_t *)sys_getuid, AUE_GETUID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 24 = getuid */ + { 0, (sy_call_t *)sys_geteuid, AUE_GETEUID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 25 = geteuid */ { AS(ptrace_args), (sy_call_t *)sys_ptrace, AUE_PTRACE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 26 = ptrace */ - { AS(freebsd32_recvmsg_args), (sy_call_t *)freebsd32_recvmsg, AUE_RECVMSG, NULL, 0, 0, 0, SY_THR_STATIC }, /* 27 = freebsd32_recvmsg */ - { AS(freebsd32_sendmsg_args), (sy_call_t *)freebsd32_sendmsg, AUE_SENDMSG, NULL, 0, 0, 0, SY_THR_STATIC }, /* 28 = freebsd32_sendmsg */ - { AS(freebsd32_recvfrom_args), (sy_call_t *)freebsd32_recvfrom, AUE_RECVFROM, NULL, 0, 0, 0, SY_THR_STATIC }, /* 29 = freebsd32_recvfrom */ - { AS(accept_args), (sy_call_t *)sys_accept, AUE_ACCEPT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 30 = accept */ - { AS(getpeername_args), (sy_call_t *)sys_getpeername, AUE_GETPEERNAME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 31 = getpeername */ - { AS(getsockname_args), (sy_call_t *)sys_getsockname, AUE_GETSOCKNAME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 32 = getsockname */ + { AS(freebsd32_recvmsg_args), (sy_call_t *)freebsd32_recvmsg, AUE_RECVMSG, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 27 = freebsd32_recvmsg */ + { AS(freebsd32_sendmsg_args), (sy_call_t *)freebsd32_sendmsg, AUE_SENDMSG, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 28 = freebsd32_sendmsg */ + { AS(freebsd32_recvfrom_args), (sy_call_t *)freebsd32_recvfrom, AUE_RECVFROM, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 29 = freebsd32_recvfrom */ + { AS(accept_args), (sy_call_t *)sys_accept, AUE_ACCEPT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 30 = accept */ + { AS(getpeername_args), (sy_call_t *)sys_getpeername, AUE_GETPEERNAME, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 31 = getpeername */ + { AS(getsockname_args), (sy_call_t *)sys_getsockname, AUE_GETSOCKNAME, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 32 = getsockname */ { AS(access_args), (sy_call_t *)sys_access, AUE_ACCESS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 33 = access */ { AS(chflags_args), (sy_call_t *)sys_chflags, AUE_CHFLAGS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 34 = chflags */ - { AS(fchflags_args), (sy_call_t *)sys_fchflags, AUE_FCHFLAGS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 35 = fchflags */ - { 0, (sy_call_t *)sys_sync, AUE_SYNC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 36 = sync */ - { AS(kill_args), (sy_call_t *)sys_kill, AUE_KILL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 37 = kill */ + { AS(fchflags_args), (sy_call_t *)sys_fchflags, AUE_FCHFLAGS, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 35 = fchflags */ + { 0, (sy_call_t *)sys_sync, AUE_SYNC, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 36 = sync */ + { AS(kill_args), (sy_call_t *)sys_kill, AUE_KILL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 37 = kill */ { compat(AS(ofreebsd32_stat_args),freebsd32_stat), AUE_STAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 38 = old freebsd32_stat */ - { 0, (sy_call_t *)sys_getppid, AUE_GETPPID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 39 = getppid */ + { 0, (sy_call_t *)sys_getppid, AUE_GETPPID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 39 = getppid */ { compat(AS(ofreebsd32_lstat_args),freebsd32_lstat), AUE_LSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 40 = old freebsd32_lstat */ - { AS(dup_args), (sy_call_t *)sys_dup, AUE_DUP, NULL, 0, 0, 0, SY_THR_STATIC }, /* 41 = dup */ - { compat10(0,freebsd32_pipe), AUE_PIPE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 42 = freebsd10 freebsd32_pipe */ - { 0, (sy_call_t *)sys_getegid, AUE_GETEGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 43 = getegid */ - { AS(profil_args), (sy_call_t *)sys_profil, AUE_PROFILE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 44 = profil */ + { AS(dup_args), (sy_call_t *)sys_dup, AUE_DUP, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 41 = dup */ + { compat10(0,freebsd32_pipe), AUE_PIPE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 42 = freebsd10 freebsd32_pipe */ + { 0, (sy_call_t *)sys_getegid, AUE_GETEGID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 43 = getegid */ + { AS(profil_args), (sy_call_t *)sys_profil, AUE_PROFILE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 44 = profil */ { AS(ktrace_args), (sy_call_t *)sys_ktrace, AUE_KTRACE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 45 = ktrace */ - { compat(AS(ofreebsd32_sigaction_args),freebsd32_sigaction), AUE_SIGACTION, NULL, 0, 0, 0, SY_THR_STATIC }, /* 46 = old freebsd32_sigaction */ - { 0, (sy_call_t *)sys_getgid, AUE_GETGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 47 = getgid */ + { compat(AS(ofreebsd32_sigaction_args),freebsd32_sigaction), AUE_SIGACTION, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 46 = old freebsd32_sigaction */ + { 0, (sy_call_t *)sys_getgid, AUE_GETGID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 47 = getgid */ { compat(AS(ofreebsd32_sigprocmask_args),freebsd32_sigprocmask), AUE_SIGPROCMASK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 48 = old freebsd32_sigprocmask */ - { AS(getlogin_args), (sy_call_t *)sys_getlogin, AUE_GETLOGIN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 49 = getlogin */ + { AS(getlogin_args), (sy_call_t *)sys_getlogin, AUE_GETLOGIN, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 49 = getlogin */ { AS(setlogin_args), (sy_call_t *)sys_setlogin, AUE_SETLOGIN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 50 = setlogin */ { AS(acct_args), (sy_call_t *)sys_acct, AUE_ACCT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 51 = acct */ - { compat(0,freebsd32_sigpending), AUE_SIGPENDING, NULL, 0, 0, 0, SY_THR_STATIC }, /* 52 = old freebsd32_sigpending */ - { AS(freebsd32_sigaltstack_args), (sy_call_t *)freebsd32_sigaltstack, AUE_SIGALTSTACK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 53 = freebsd32_sigaltstack */ - { AS(freebsd32_ioctl_args), (sy_call_t *)freebsd32_ioctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 54 = freebsd32_ioctl */ + { compat(0,freebsd32_sigpending), AUE_SIGPENDING, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 52 = old freebsd32_sigpending */ + { AS(freebsd32_sigaltstack_args), (sy_call_t *)freebsd32_sigaltstack, AUE_SIGALTSTACK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 53 = freebsd32_sigaltstack */ + { AS(freebsd32_ioctl_args), (sy_call_t *)freebsd32_ioctl, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 54 = freebsd32_ioctl */ { AS(reboot_args), (sy_call_t *)sys_reboot, AUE_REBOOT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 55 = reboot */ { AS(revoke_args), (sy_call_t *)sys_revoke, AUE_REVOKE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 56 = revoke */ { AS(symlink_args), (sy_call_t *)sys_symlink, AUE_SYMLINK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 57 = symlink */ { AS(readlink_args), (sy_call_t *)sys_readlink, AUE_READLINK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 58 = readlink */ { AS(freebsd32_execve_args), (sy_call_t *)freebsd32_execve, AUE_EXECVE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 59 = freebsd32_execve */ - { AS(umask_args), (sy_call_t *)sys_umask, AUE_UMASK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 60 = umask */ + { AS(umask_args), (sy_call_t *)sys_umask, AUE_UMASK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 60 = umask */ { AS(chroot_args), (sy_call_t *)sys_chroot, AUE_CHROOT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 61 = chroot */ - { compat(AS(ofreebsd32_fstat_args),freebsd32_fstat), AUE_FSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 62 = old freebsd32_fstat */ + { compat(AS(ofreebsd32_fstat_args),freebsd32_fstat), AUE_FSTAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 62 = old freebsd32_fstat */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 63 = obsolete ogetkerninfo */ - { compat(AS(ofreebsd32_getpagesize_args),freebsd32_getpagesize), AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 64 = old freebsd32_getpagesize */ - { AS(msync_args), (sy_call_t *)sys_msync, AUE_MSYNC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 65 = msync */ + { compat(AS(ofreebsd32_getpagesize_args),freebsd32_getpagesize), AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 64 = old freebsd32_getpagesize */ + { AS(msync_args), (sy_call_t *)sys_msync, AUE_MSYNC, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 65 = msync */ { 0, (sy_call_t *)sys_vfork, AUE_VFORK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 66 = vfork */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 67 = obsolete vread */ { 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 */ + { AS(sbrk_args), (sy_call_t *)sys_sbrk, AUE_SBRK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 69 = sbrk */ + { AS(sstk_args), (sy_call_t *)sys_sstk, AUE_SSTK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 70 = sstk */ { 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 */ - { AS(madvise_args), (sy_call_t *)sys_madvise, AUE_MADVISE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 75 = madvise */ + { AS(munmap_args), (sy_call_t *)sys_munmap, AUE_MUNMAP, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 73 = munmap */ + { AS(freebsd32_mprotect_args), (sy_call_t *)freebsd32_mprotect, AUE_MPROTECT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 74 = freebsd32_mprotect */ + { AS(madvise_args), (sy_call_t *)sys_madvise, AUE_MADVISE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 75 = madvise */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 76 = obsolete vhangup */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 77 = obsolete vlimit */ - { AS(mincore_args), (sy_call_t *)sys_mincore, AUE_MINCORE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 78 = mincore */ - { AS(getgroups_args), (sy_call_t *)sys_getgroups, AUE_GETGROUPS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 79 = getgroups */ + { AS(mincore_args), (sy_call_t *)sys_mincore, AUE_MINCORE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 78 = mincore */ + { AS(getgroups_args), (sy_call_t *)sys_getgroups, AUE_GETGROUPS, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 79 = getgroups */ { AS(setgroups_args), (sy_call_t *)sys_setgroups, AUE_SETGROUPS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 80 = setgroups */ - { 0, (sy_call_t *)sys_getpgrp, AUE_GETPGRP, NULL, 0, 0, 0, SY_THR_STATIC }, /* 81 = getpgrp */ + { 0, (sy_call_t *)sys_getpgrp, AUE_GETPGRP, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 81 = getpgrp */ { AS(setpgid_args), (sy_call_t *)sys_setpgid, AUE_SETPGRP, NULL, 0, 0, 0, SY_THR_STATIC }, /* 82 = setpgid */ - { AS(freebsd32_setitimer_args), (sy_call_t *)freebsd32_setitimer, AUE_SETITIMER, NULL, 0, 0, 0, SY_THR_STATIC }, /* 83 = freebsd32_setitimer */ + { AS(freebsd32_setitimer_args), (sy_call_t *)freebsd32_setitimer, AUE_SETITIMER, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 83 = freebsd32_setitimer */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 84 = obsolete owait */ { AS(swapon_args), (sy_call_t *)sys_swapon, AUE_SWAPON, NULL, 0, 0, 0, SY_THR_STATIC }, /* 85 = swapon */ - { AS(freebsd32_getitimer_args), (sy_call_t *)freebsd32_getitimer, AUE_GETITIMER, NULL, 0, 0, 0, SY_THR_STATIC }, /* 86 = freebsd32_getitimer */ + { AS(freebsd32_getitimer_args), (sy_call_t *)freebsd32_getitimer, AUE_GETITIMER, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 86 = freebsd32_getitimer */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 87 = obsolete ogethostname */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 88 = obsolete osethostname */ - { 0, (sy_call_t *)sys_getdtablesize, AUE_GETDTABLESIZE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 89 = getdtablesize */ - { AS(dup2_args), (sy_call_t *)sys_dup2, AUE_DUP2, NULL, 0, 0, 0, SY_THR_STATIC }, /* 90 = dup2 */ + { 0, (sy_call_t *)sys_getdtablesize, AUE_GETDTABLESIZE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 89 = getdtablesize */ + { AS(dup2_args), (sy_call_t *)sys_dup2, AUE_DUP2, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 90 = dup2 */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 91 = getdopt */ - { AS(freebsd32_fcntl_args), (sy_call_t *)freebsd32_fcntl, AUE_FCNTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 92 = freebsd32_fcntl */ - { AS(freebsd32_select_args), (sy_call_t *)freebsd32_select, AUE_SELECT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 93 = freebsd32_select */ + { AS(freebsd32_fcntl_args), (sy_call_t *)freebsd32_fcntl, AUE_FCNTL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 92 = freebsd32_fcntl */ + { AS(freebsd32_select_args), (sy_call_t *)freebsd32_select, AUE_SELECT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 93 = freebsd32_select */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 94 = setdopt */ - { AS(fsync_args), (sy_call_t *)sys_fsync, AUE_FSYNC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 95 = fsync */ - { AS(setpriority_args), (sy_call_t *)sys_setpriority, AUE_SETPRIORITY, NULL, 0, 0, 0, SY_THR_STATIC }, /* 96 = setpriority */ - { AS(socket_args), (sy_call_t *)sys_socket, AUE_SOCKET, NULL, 0, 0, 0, SY_THR_STATIC }, /* 97 = socket */ + { AS(fsync_args), (sy_call_t *)sys_fsync, AUE_FSYNC, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 95 = fsync */ + { AS(setpriority_args), (sy_call_t *)sys_setpriority, AUE_SETPRIORITY, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 96 = setpriority */ + { AS(socket_args), (sy_call_t *)sys_socket, AUE_SOCKET, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 97 = socket */ { AS(connect_args), (sy_call_t *)sys_connect, AUE_CONNECT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 98 = connect */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 99 = obsolete oaccept */ - { AS(getpriority_args), (sy_call_t *)sys_getpriority, AUE_GETPRIORITY, NULL, 0, 0, 0, SY_THR_STATIC }, /* 100 = getpriority */ + { AS(getpriority_args), (sy_call_t *)sys_getpriority, AUE_GETPRIORITY, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 100 = getpriority */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 101 = obsolete osend */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 102 = obsolete orecv */ - { compat(AS(ofreebsd32_sigreturn_args),freebsd32_sigreturn), AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 103 = old freebsd32_sigreturn */ + { compat(AS(ofreebsd32_sigreturn_args),freebsd32_sigreturn), AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 103 = old freebsd32_sigreturn */ { AS(bind_args), (sy_call_t *)sys_bind, AUE_BIND, NULL, 0, 0, 0, SY_THR_STATIC }, /* 104 = bind */ - { AS(setsockopt_args), (sy_call_t *)sys_setsockopt, AUE_SETSOCKOPT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 105 = setsockopt */ - { AS(listen_args), (sy_call_t *)sys_listen, AUE_LISTEN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 106 = listen */ + { AS(setsockopt_args), (sy_call_t *)sys_setsockopt, AUE_SETSOCKOPT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 105 = setsockopt */ + { AS(listen_args), (sy_call_t *)sys_listen, AUE_LISTEN, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 106 = listen */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 107 = obsolete vtimes */ - { compat(AS(ofreebsd32_sigvec_args),freebsd32_sigvec), AUE_O_SIGVEC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 108 = old freebsd32_sigvec */ - { compat(AS(ofreebsd32_sigblock_args),freebsd32_sigblock), AUE_O_SIGBLOCK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 109 = old freebsd32_sigblock */ - { compat(AS(ofreebsd32_sigsetmask_args),freebsd32_sigsetmask), AUE_O_SIGSETMASK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 110 = old freebsd32_sigsetmask */ + { compat(AS(ofreebsd32_sigvec_args),freebsd32_sigvec), AUE_O_SIGVEC, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 108 = old freebsd32_sigvec */ + { compat(AS(ofreebsd32_sigblock_args),freebsd32_sigblock), AUE_O_SIGBLOCK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 109 = old freebsd32_sigblock */ + { compat(AS(ofreebsd32_sigsetmask_args),freebsd32_sigsetmask), AUE_O_SIGSETMASK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 110 = old freebsd32_sigsetmask */ { compat(AS(ofreebsd32_sigsuspend_args),freebsd32_sigsuspend), AUE_SIGSUSPEND, NULL, 0, 0, 0, SY_THR_STATIC }, /* 111 = old freebsd32_sigsuspend */ { compat(AS(ofreebsd32_sigstack_args),freebsd32_sigstack), AUE_O_SIGSTACK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 112 = old freebsd32_sigstack */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 113 = obsolete orecvmsg */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 114 = obsolete osendmsg */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 115 = obsolete vtrace */ - { AS(freebsd32_gettimeofday_args), (sy_call_t *)freebsd32_gettimeofday, AUE_GETTIMEOFDAY, NULL, 0, 0, 0, SY_THR_STATIC }, /* 116 = freebsd32_gettimeofday */ - { AS(freebsd32_getrusage_args), (sy_call_t *)freebsd32_getrusage, AUE_GETRUSAGE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 117 = freebsd32_getrusage */ - { AS(getsockopt_args), (sy_call_t *)sys_getsockopt, AUE_GETSOCKOPT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 118 = getsockopt */ + { AS(freebsd32_gettimeofday_args), (sy_call_t *)freebsd32_gettimeofday, AUE_GETTIMEOFDAY, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 116 = freebsd32_gettimeofday */ + { AS(freebsd32_getrusage_args), (sy_call_t *)freebsd32_getrusage, AUE_GETRUSAGE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 117 = freebsd32_getrusage */ + { AS(getsockopt_args), (sy_call_t *)sys_getsockopt, AUE_GETSOCKOPT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 118 = getsockopt */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 119 = resuba */ - { AS(freebsd32_readv_args), (sy_call_t *)freebsd32_readv, AUE_READV, NULL, 0, 0, 0, SY_THR_STATIC }, /* 120 = freebsd32_readv */ - { AS(freebsd32_writev_args), (sy_call_t *)freebsd32_writev, AUE_WRITEV, NULL, 0, 0, 0, SY_THR_STATIC }, /* 121 = freebsd32_writev */ + { AS(freebsd32_readv_args), (sy_call_t *)freebsd32_readv, AUE_READV, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 120 = freebsd32_readv */ + { AS(freebsd32_writev_args), (sy_call_t *)freebsd32_writev, AUE_WRITEV, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 121 = freebsd32_writev */ { AS(freebsd32_settimeofday_args), (sy_call_t *)freebsd32_settimeofday, AUE_SETTIMEOFDAY, NULL, 0, 0, 0, SY_THR_STATIC }, /* 122 = freebsd32_settimeofday */ - { AS(fchown_args), (sy_call_t *)sys_fchown, AUE_FCHOWN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 123 = fchown */ - { AS(fchmod_args), (sy_call_t *)sys_fchmod, AUE_FCHMOD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 124 = fchmod */ + { AS(fchown_args), (sy_call_t *)sys_fchown, AUE_FCHOWN, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 123 = fchown */ + { AS(fchmod_args), (sy_call_t *)sys_fchmod, AUE_FCHMOD, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 124 = fchmod */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 125 = obsolete orecvfrom */ - { 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(setreuid_args), (sy_call_t *)sys_setreuid, AUE_SETREUID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 126 = setreuid */ + { AS(setregid_args), (sy_call_t *)sys_setregid, AUE_SETREGID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 127 = setregid */ { AS(rename_args), (sy_call_t *)sys_rename, AUE_RENAME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 128 = rename */ { 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 */ + { compat(AS(oftruncate_args),ftruncate), AUE_FTRUNCATE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 130 = old ftruncate */ + { AS(flock_args), (sy_call_t *)sys_flock, AUE_FLOCK, NULL, 0, 0, SYF_CAPENABLED, 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 */ - { AS(shutdown_args), (sy_call_t *)sys_shutdown, AUE_SHUTDOWN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 134 = shutdown */ - { AS(socketpair_args), (sy_call_t *)sys_socketpair, AUE_SOCKETPAIR, NULL, 0, 0, 0, SY_THR_STATIC }, /* 135 = socketpair */ + { AS(sendto_args), (sy_call_t *)sys_sendto, AUE_SENDTO, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 133 = sendto */ + { AS(shutdown_args), (sy_call_t *)sys_shutdown, AUE_SHUTDOWN, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 134 = shutdown */ + { AS(socketpair_args), (sy_call_t *)sys_socketpair, AUE_SOCKETPAIR, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 135 = socketpair */ { AS(mkdir_args), (sy_call_t *)sys_mkdir, AUE_MKDIR, NULL, 0, 0, 0, SY_THR_STATIC }, /* 136 = mkdir */ { AS(rmdir_args), (sy_call_t *)sys_rmdir, AUE_RMDIR, NULL, 0, 0, 0, SY_THR_STATIC }, /* 137 = rmdir */ { AS(freebsd32_utimes_args), (sy_call_t *)freebsd32_utimes, AUE_UTIMES, NULL, 0, 0, 0, SY_THR_STATIC }, /* 138 = freebsd32_utimes */ @@ -200,7 +200,7 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 144 = obsolete getrlimit */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 145 = obsolete setrlimit */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 146 = obsolete killpg */ - { 0, (sy_call_t *)sys_setsid, AUE_SETSID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 147 = setsid */ + { 0, (sy_call_t *)sys_setsid, AUE_SETSID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 147 = setsid */ { AS(quotactl_args), (sy_call_t *)sys_quotactl, AUE_QUOTACTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 148 = quotactl */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 149 = obsolete oquota */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 150 = obsolete ogetsockname */ @@ -209,7 +209,7 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 153 = asyncdaemon */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 154 = nlm_syscall */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 155 = nfssvc */ - { compat(AS(ofreebsd32_getdirentries_args),freebsd32_getdirentries), AUE_GETDIRENTRIES, NULL, 0, 0, 0, SY_THR_STATIC }, /* 156 = old freebsd32_getdirentries */ + { compat(AS(ofreebsd32_getdirentries_args),freebsd32_getdirentries), AUE_GETDIRENTRIES, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 156 = old freebsd32_getdirentries */ { compat4(AS(freebsd4_freebsd32_statfs_args),freebsd32_statfs), AUE_STATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 157 = freebsd4 freebsd32_statfs */ { compat4(AS(freebsd4_freebsd32_fstatfs_args),freebsd32_fstatfs), AUE_FSTATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 158 = freebsd4 freebsd32_fstatfs */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 159 = nosys */ @@ -218,51 +218,51 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 162 = obsolete getdomainname */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 163 = obsolete setdomainname */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 164 = obsolete uname */ - { AS(freebsd32_sysarch_args), (sy_call_t *)freebsd32_sysarch, AUE_SYSARCH, NULL, 0, 0, 0, SY_THR_STATIC }, /* 165 = freebsd32_sysarch */ - { AS(rtprio_args), (sy_call_t *)sys_rtprio, AUE_RTPRIO, NULL, 0, 0, 0, SY_THR_STATIC }, /* 166 = rtprio */ + { AS(freebsd32_sysarch_args), (sy_call_t *)freebsd32_sysarch, AUE_SYSARCH, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 165 = freebsd32_sysarch */ + { AS(rtprio_args), (sy_call_t *)sys_rtprio, AUE_RTPRIO, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 166 = rtprio */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 167 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 168 = nosys */ { AS(freebsd32_semsys_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 169 = freebsd32_semsys */ { AS(freebsd32_msgsys_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 170 = freebsd32_msgsys */ { AS(freebsd32_shmsys_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 171 = freebsd32_shmsys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 172 = nosys */ - { compat6(AS(freebsd6_freebsd32_pread_args),freebsd32_pread), AUE_PREAD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 173 = freebsd6 freebsd32_pread */ - { compat6(AS(freebsd6_freebsd32_pwrite_args),freebsd32_pwrite), AUE_PWRITE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 174 = freebsd6 freebsd32_pwrite */ + { compat6(AS(freebsd6_freebsd32_pread_args),freebsd32_pread), AUE_PREAD, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 173 = freebsd6 freebsd32_pread */ + { compat6(AS(freebsd6_freebsd32_pwrite_args),freebsd32_pwrite), AUE_PWRITE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 174 = freebsd6 freebsd32_pwrite */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 175 = nosys */ { AS(ntp_adjtime_args), (sy_call_t *)sys_ntp_adjtime, AUE_NTP_ADJTIME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 176 = ntp_adjtime */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 177 = sfork */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 178 = getdescriptor */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 179 = setdescriptor */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 180 = nosys */ - { AS(setgid_args), (sy_call_t *)sys_setgid, AUE_SETGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 181 = setgid */ - { AS(setegid_args), (sy_call_t *)sys_setegid, AUE_SETEGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 182 = setegid */ - { AS(seteuid_args), (sy_call_t *)sys_seteuid, AUE_SETEUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 183 = seteuid */ + { AS(setgid_args), (sy_call_t *)sys_setgid, AUE_SETGID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 181 = setgid */ + { AS(setegid_args), (sy_call_t *)sys_setegid, AUE_SETEGID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 182 = setegid */ + { AS(seteuid_args), (sy_call_t *)sys_seteuid, AUE_SETEUID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 183 = seteuid */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 184 = lfs_bmapv */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 185 = lfs_markv */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 186 = lfs_segclean */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 187 = lfs_segwait */ { AS(freebsd32_stat_args), (sy_call_t *)freebsd32_stat, AUE_STAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 188 = freebsd32_stat */ - { AS(freebsd32_fstat_args), (sy_call_t *)freebsd32_fstat, AUE_FSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 189 = freebsd32_fstat */ + { AS(freebsd32_fstat_args), (sy_call_t *)freebsd32_fstat, AUE_FSTAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 189 = freebsd32_fstat */ { AS(freebsd32_lstat_args), (sy_call_t *)freebsd32_lstat, AUE_LSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 190 = freebsd32_lstat */ { AS(pathconf_args), (sy_call_t *)sys_pathconf, AUE_PATHCONF, NULL, 0, 0, 0, SY_THR_STATIC }, /* 191 = pathconf */ - { AS(fpathconf_args), (sy_call_t *)sys_fpathconf, AUE_FPATHCONF, NULL, 0, 0, 0, SY_THR_STATIC }, /* 192 = fpathconf */ + { AS(fpathconf_args), (sy_call_t *)sys_fpathconf, AUE_FPATHCONF, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 192 = fpathconf */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 193 = nosys */ - { AS(__getrlimit_args), (sy_call_t *)sys_getrlimit, AUE_GETRLIMIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 194 = getrlimit */ - { AS(__setrlimit_args), (sy_call_t *)sys_setrlimit, AUE_SETRLIMIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 195 = setrlimit */ - { AS(freebsd32_getdirentries_args), (sy_call_t *)freebsd32_getdirentries, AUE_GETDIRENTRIES, NULL, 0, 0, 0, SY_THR_STATIC }, /* 196 = freebsd32_getdirentries */ - { compat6(AS(freebsd6_freebsd32_mmap_args),freebsd32_mmap), AUE_MMAP, NULL, 0, 0, 0, SY_THR_STATIC }, /* 197 = freebsd6 freebsd32_mmap */ + { AS(__getrlimit_args), (sy_call_t *)sys_getrlimit, AUE_GETRLIMIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 194 = getrlimit */ + { AS(__setrlimit_args), (sy_call_t *)sys_setrlimit, AUE_SETRLIMIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 195 = setrlimit */ + { AS(freebsd32_getdirentries_args), (sy_call_t *)freebsd32_getdirentries, AUE_GETDIRENTRIES, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 196 = freebsd32_getdirentries */ + { compat6(AS(freebsd6_freebsd32_mmap_args),freebsd32_mmap), AUE_MMAP, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 197 = freebsd6 freebsd32_mmap */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 198 = __syscall */ - { compat6(AS(freebsd6_freebsd32_lseek_args),freebsd32_lseek), AUE_LSEEK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 199 = freebsd6 freebsd32_lseek */ + { compat6(AS(freebsd6_freebsd32_lseek_args),freebsd32_lseek), AUE_LSEEK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 199 = freebsd6 freebsd32_lseek */ { compat6(AS(freebsd6_freebsd32_truncate_args),freebsd32_truncate), AUE_TRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 200 = freebsd6 freebsd32_truncate */ { compat6(AS(freebsd6_freebsd32_ftruncate_args),freebsd32_ftruncate), AUE_FTRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 201 = freebsd6 freebsd32_ftruncate */ - { AS(freebsd32_sysctl_args), (sy_call_t *)freebsd32_sysctl, AUE_SYSCTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 202 = freebsd32_sysctl */ - { AS(mlock_args), (sy_call_t *)sys_mlock, AUE_MLOCK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 203 = mlock */ - { AS(munlock_args), (sy_call_t *)sys_munlock, AUE_MUNLOCK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 204 = munlock */ + { AS(freebsd32_sysctl_args), (sy_call_t *)freebsd32_sysctl, AUE_SYSCTL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 202 = freebsd32_sysctl */ + { AS(mlock_args), (sy_call_t *)sys_mlock, AUE_MLOCK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 203 = mlock */ + { AS(munlock_args), (sy_call_t *)sys_munlock, AUE_MUNLOCK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 204 = munlock */ { AS(undelete_args), (sy_call_t *)sys_undelete, AUE_UNDELETE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 205 = undelete */ - { AS(freebsd32_futimes_args), (sy_call_t *)freebsd32_futimes, AUE_FUTIMES, NULL, 0, 0, 0, SY_THR_STATIC }, /* 206 = freebsd32_futimes */ - { AS(getpgid_args), (sy_call_t *)sys_getpgid, AUE_GETPGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 207 = getpgid */ + { AS(freebsd32_futimes_args), (sy_call_t *)freebsd32_futimes, AUE_FUTIMES, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 206 = freebsd32_futimes */ + { AS(getpgid_args), (sy_call_t *)sys_getpgid, AUE_GETPGID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 207 = getpgid */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 208 = newreboot */ - { AS(poll_args), (sy_call_t *)sys_poll, AUE_POLL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 209 = poll */ + { AS(poll_args), (sy_call_t *)sys_poll, AUE_POLL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 209 = poll */ { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 210 = lkmnosys */ { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 211 = lkmnosys */ { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 212 = lkmnosys */ @@ -285,15 +285,15 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 229 = freebsd7 freebsd32_shmctl */ { AS(shmdt_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 230 = shmdt */ { AS(shmget_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 231 = shmget */ - { AS(freebsd32_clock_gettime_args), (sy_call_t *)freebsd32_clock_gettime, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 232 = freebsd32_clock_gettime */ + { AS(freebsd32_clock_gettime_args), (sy_call_t *)freebsd32_clock_gettime, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 232 = freebsd32_clock_gettime */ { AS(freebsd32_clock_settime_args), (sy_call_t *)freebsd32_clock_settime, AUE_CLOCK_SETTIME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 233 = freebsd32_clock_settime */ - { AS(freebsd32_clock_getres_args), (sy_call_t *)freebsd32_clock_getres, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 234 = freebsd32_clock_getres */ - { AS(freebsd32_ktimer_create_args), (sy_call_t *)freebsd32_ktimer_create, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 235 = freebsd32_ktimer_create */ - { AS(ktimer_delete_args), (sy_call_t *)sys_ktimer_delete, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 236 = ktimer_delete */ - { AS(freebsd32_ktimer_settime_args), (sy_call_t *)freebsd32_ktimer_settime, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 237 = freebsd32_ktimer_settime */ - { AS(freebsd32_ktimer_gettime_args), (sy_call_t *)freebsd32_ktimer_gettime, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 238 = freebsd32_ktimer_gettime */ - { AS(ktimer_getoverrun_args), (sy_call_t *)sys_ktimer_getoverrun, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 239 = ktimer_getoverrun */ - { AS(freebsd32_nanosleep_args), (sy_call_t *)freebsd32_nanosleep, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 240 = freebsd32_nanosleep */ + { AS(freebsd32_clock_getres_args), (sy_call_t *)freebsd32_clock_getres, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 234 = freebsd32_clock_getres */ + { AS(freebsd32_ktimer_create_args), (sy_call_t *)freebsd32_ktimer_create, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 235 = freebsd32_ktimer_create */ + { AS(ktimer_delete_args), (sy_call_t *)sys_ktimer_delete, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 236 = ktimer_delete */ + { AS(freebsd32_ktimer_settime_args), (sy_call_t *)freebsd32_ktimer_settime, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 237 = freebsd32_ktimer_settime */ + { AS(freebsd32_ktimer_gettime_args), (sy_call_t *)freebsd32_ktimer_gettime, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 238 = freebsd32_ktimer_gettime */ + { AS(ktimer_getoverrun_args), (sy_call_t *)sys_ktimer_getoverrun, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 239 = ktimer_getoverrun */ + { AS(freebsd32_nanosleep_args), (sy_call_t *)freebsd32_nanosleep, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 240 = freebsd32_nanosleep */ { AS(ffclock_getcounter_args), (sy_call_t *)sys_ffclock_getcounter, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 241 = ffclock_getcounter */ { AS(ffclock_setestimate_args), (sy_call_t *)sys_ffclock_setestimate, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 242 = ffclock_setestimate */ { AS(ffclock_getestimate_args), (sy_call_t *)sys_ffclock_getestimate, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 243 = ffclock_getestimate */ @@ -303,14 +303,14 @@ struct sysent freebsd32_sysent[] = { { AS(freebsd32_clock_getcpuclockid2_args), (sy_call_t *)freebsd32_clock_getcpuclockid2, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 247 = freebsd32_clock_getcpuclockid2 */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 248 = ntp_gettime */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 249 = nosys */ - { AS(minherit_args), (sy_call_t *)sys_minherit, AUE_MINHERIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 250 = minherit */ + { AS(minherit_args), (sy_call_t *)sys_minherit, AUE_MINHERIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 250 = minherit */ { AS(rfork_args), (sy_call_t *)sys_rfork, AUE_RFORK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 251 = rfork */ { AS(openbsd_poll_args), (sy_call_t *)sys_openbsd_poll, AUE_POLL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 252 = openbsd_poll */ - { 0, (sy_call_t *)sys_issetugid, AUE_ISSETUGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 253 = issetugid */ + { 0, (sy_call_t *)sys_issetugid, AUE_ISSETUGID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 253 = issetugid */ { AS(lchown_args), (sy_call_t *)sys_lchown, AUE_LCHOWN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 254 = lchown */ - { AS(freebsd32_aio_read_args), (sy_call_t *)freebsd32_aio_read, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 255 = freebsd32_aio_read */ - { AS(freebsd32_aio_write_args), (sy_call_t *)freebsd32_aio_write, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 256 = freebsd32_aio_write */ - { AS(freebsd32_lio_listio_args), (sy_call_t *)freebsd32_lio_listio, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 257 = freebsd32_lio_listio */ + { AS(freebsd32_aio_read_args), (sy_call_t *)freebsd32_aio_read, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 255 = freebsd32_aio_read */ + { AS(freebsd32_aio_write_args), (sy_call_t *)freebsd32_aio_write, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 256 = freebsd32_aio_write */ + { AS(freebsd32_lio_listio_args), (sy_call_t *)freebsd32_lio_listio, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 257 = freebsd32_lio_listio */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 258 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 259 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 260 = nosys */ @@ -325,12 +325,12 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 269 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 270 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 271 = nosys */ - { AS(getdents_args), (sy_call_t *)sys_getdents, AUE_O_GETDENTS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 272 = getdents */ + { AS(getdents_args), (sy_call_t *)sys_getdents, AUE_O_GETDENTS, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 272 = getdents */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 273 = nosys */ { AS(lchmod_args), (sy_call_t *)sys_lchmod, AUE_LCHMOD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 274 = lchmod */ { AS(lchown_args), (sy_call_t *)sys_lchown, AUE_LCHOWN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 275 = netbsd_lchown */ { AS(freebsd32_lutimes_args), (sy_call_t *)freebsd32_lutimes, AUE_LUTIMES, NULL, 0, 0, 0, SY_THR_STATIC }, /* 276 = freebsd32_lutimes */ - { AS(msync_args), (sy_call_t *)sys_msync, AUE_MSYNC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 277 = netbsd_msync */ + { AS(msync_args), (sy_call_t *)sys_msync, AUE_MSYNC, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 277 = netbsd_msync */ { AS(nstat_args), (sy_call_t *)sys_nstat, AUE_STAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 278 = nstat */ { AS(nfstat_args), (sy_call_t *)sys_nfstat, AUE_FSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 279 = nfstat */ { AS(nlstat_args), (sy_call_t *)sys_nlstat, AUE_LSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 280 = nlstat */ @@ -342,8 +342,8 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 286 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 287 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 288 = nosys */ - { AS(freebsd32_preadv_args), (sy_call_t *)freebsd32_preadv, AUE_PREADV, NULL, 0, 0, 0, SY_THR_STATIC }, /* 289 = freebsd32_preadv */ - { AS(freebsd32_pwritev_args), (sy_call_t *)freebsd32_pwritev, AUE_PWRITEV, NULL, 0, 0, 0, SY_THR_STATIC }, /* 290 = freebsd32_pwritev */ + { AS(freebsd32_preadv_args), (sy_call_t *)freebsd32_preadv, AUE_PREADV, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 289 = freebsd32_preadv */ + { AS(freebsd32_pwritev_args), (sy_call_t *)freebsd32_pwritev, AUE_PWRITEV, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 290 = freebsd32_pwritev */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 291 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 292 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 293 = nosys */ @@ -363,60 +363,60 @@ struct sysent freebsd32_sysent[] = { { AS(kldnext_args), (sy_call_t *)sys_kldnext, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 307 = kldnext */ { AS(freebsd32_kldstat_args), (sy_call_t *)freebsd32_kldstat, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 308 = freebsd32_kldstat */ { AS(kldfirstmod_args), (sy_call_t *)sys_kldfirstmod, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 309 = kldfirstmod */ - { AS(getsid_args), (sy_call_t *)sys_getsid, AUE_GETSID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 310 = getsid */ - { AS(setresuid_args), (sy_call_t *)sys_setresuid, AUE_SETRESUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 311 = setresuid */ - { AS(setresgid_args), (sy_call_t *)sys_setresgid, AUE_SETRESGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 312 = setresgid */ + { AS(getsid_args), (sy_call_t *)sys_getsid, AUE_GETSID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 310 = getsid */ + { AS(setresuid_args), (sy_call_t *)sys_setresuid, AUE_SETRESUID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 311 = setresuid */ + { AS(setresgid_args), (sy_call_t *)sys_setresgid, AUE_SETRESGID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 312 = setresgid */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 313 = obsolete signanosleep */ - { AS(freebsd32_aio_return_args), (sy_call_t *)freebsd32_aio_return, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 314 = freebsd32_aio_return */ - { AS(freebsd32_aio_suspend_args), (sy_call_t *)freebsd32_aio_suspend, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 315 = freebsd32_aio_suspend */ - { AS(aio_cancel_args), (sy_call_t *)sys_aio_cancel, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 316 = aio_cancel */ - { AS(freebsd32_aio_error_args), (sy_call_t *)freebsd32_aio_error, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 317 = freebsd32_aio_error */ - { compat6(AS(freebsd6_freebsd32_aio_read_args),freebsd32_aio_read), AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 318 = freebsd6 freebsd32_aio_read */ - { compat6(AS(freebsd6_freebsd32_aio_write_args),freebsd32_aio_write), AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 319 = freebsd6 freebsd32_aio_write */ - { compat6(AS(freebsd6_freebsd32_lio_listio_args),freebsd32_lio_listio), AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 320 = freebsd6 freebsd32_lio_listio */ - { 0, (sy_call_t *)sys_yield, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 321 = yield */ + { AS(freebsd32_aio_return_args), (sy_call_t *)freebsd32_aio_return, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 314 = freebsd32_aio_return */ + { AS(freebsd32_aio_suspend_args), (sy_call_t *)freebsd32_aio_suspend, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 315 = freebsd32_aio_suspend */ + { AS(aio_cancel_args), (sy_call_t *)sys_aio_cancel, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 316 = aio_cancel */ + { AS(freebsd32_aio_error_args), (sy_call_t *)freebsd32_aio_error, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 317 = freebsd32_aio_error */ + { compat6(AS(freebsd6_freebsd32_aio_read_args),freebsd32_aio_read), AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 318 = freebsd6 freebsd32_aio_read */ + { compat6(AS(freebsd6_freebsd32_aio_write_args),freebsd32_aio_write), AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 319 = freebsd6 freebsd32_aio_write */ + { compat6(AS(freebsd6_freebsd32_lio_listio_args),freebsd32_lio_listio), AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 320 = freebsd6 freebsd32_lio_listio */ + { 0, (sy_call_t *)sys_yield, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 321 = yield */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 322 = obsolete thr_sleep */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 323 = obsolete thr_wakeup */ - { AS(mlockall_args), (sy_call_t *)sys_mlockall, AUE_MLOCKALL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 324 = mlockall */ - { 0, (sy_call_t *)sys_munlockall, AUE_MUNLOCKALL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 325 = munlockall */ + { AS(mlockall_args), (sy_call_t *)sys_mlockall, AUE_MLOCKALL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 324 = mlockall */ + { 0, (sy_call_t *)sys_munlockall, AUE_MUNLOCKALL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 325 = munlockall */ { AS(__getcwd_args), (sy_call_t *)sys___getcwd, AUE_GETCWD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 326 = __getcwd */ - { AS(sched_setparam_args), (sy_call_t *)sys_sched_setparam, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 327 = sched_setparam */ - { AS(sched_getparam_args), (sy_call_t *)sys_sched_getparam, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 328 = sched_getparam */ - { AS(sched_setscheduler_args), (sy_call_t *)sys_sched_setscheduler, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 329 = sched_setscheduler */ - { AS(sched_getscheduler_args), (sy_call_t *)sys_sched_getscheduler, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 330 = sched_getscheduler */ - { 0, (sy_call_t *)sys_sched_yield, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 331 = sched_yield */ - { AS(sched_get_priority_max_args), (sy_call_t *)sys_sched_get_priority_max, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 332 = sched_get_priority_max */ - { AS(sched_get_priority_min_args), (sy_call_t *)sys_sched_get_priority_min, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 333 = sched_get_priority_min */ - { AS(sched_rr_get_interval_args), (sy_call_t *)sys_sched_rr_get_interval, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 334 = sched_rr_get_interval */ - { AS(utrace_args), (sy_call_t *)sys_utrace, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 335 = utrace */ - { compat4(AS(freebsd4_freebsd32_sendfile_args),freebsd32_sendfile), AUE_SENDFILE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 336 = freebsd4 freebsd32_sendfile */ + { AS(sched_setparam_args), (sy_call_t *)sys_sched_setparam, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 327 = sched_setparam */ + { AS(sched_getparam_args), (sy_call_t *)sys_sched_getparam, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 328 = sched_getparam */ + { AS(sched_setscheduler_args), (sy_call_t *)sys_sched_setscheduler, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 329 = sched_setscheduler */ + { AS(sched_getscheduler_args), (sy_call_t *)sys_sched_getscheduler, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 330 = sched_getscheduler */ + { 0, (sy_call_t *)sys_sched_yield, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 331 = sched_yield */ + { AS(sched_get_priority_max_args), (sy_call_t *)sys_sched_get_priority_max, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 332 = sched_get_priority_max */ + { AS(sched_get_priority_min_args), (sy_call_t *)sys_sched_get_priority_min, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 333 = sched_get_priority_min */ + { AS(sched_rr_get_interval_args), (sy_call_t *)sys_sched_rr_get_interval, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 334 = sched_rr_get_interval */ + { AS(utrace_args), (sy_call_t *)sys_utrace, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 335 = utrace */ + { compat4(AS(freebsd4_freebsd32_sendfile_args),freebsd32_sendfile), AUE_SENDFILE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 336 = freebsd4 freebsd32_sendfile */ { AS(kldsym_args), (sy_call_t *)sys_kldsym, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 337 = kldsym */ { AS(freebsd32_jail_args), (sy_call_t *)freebsd32_jail, AUE_JAIL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 338 = freebsd32_jail */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 339 = pioctl */ - { AS(sigprocmask_args), (sy_call_t *)sys_sigprocmask, AUE_SIGPROCMASK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 340 = sigprocmask */ - { AS(sigsuspend_args), (sy_call_t *)sys_sigsuspend, AUE_SIGSUSPEND, NULL, 0, 0, 0, SY_THR_STATIC }, /* 341 = sigsuspend */ - { compat4(AS(freebsd4_freebsd32_sigaction_args),freebsd32_sigaction), AUE_SIGACTION, NULL, 0, 0, 0, SY_THR_STATIC }, /* 342 = freebsd4 freebsd32_sigaction */ + { AS(sigprocmask_args), (sy_call_t *)sys_sigprocmask, AUE_SIGPROCMASK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 340 = sigprocmask */ + { AS(sigsuspend_args), (sy_call_t *)sys_sigsuspend, AUE_SIGSUSPEND, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 341 = sigsuspend */ + { compat4(AS(freebsd4_freebsd32_sigaction_args),freebsd32_sigaction), AUE_SIGACTION, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 342 = freebsd4 freebsd32_sigaction */ { AS(sigpending_args), (sy_call_t *)sys_sigpending, AUE_SIGPENDING, NULL, 0, 0, 0, SY_THR_STATIC }, /* 343 = sigpending */ - { compat4(AS(freebsd4_freebsd32_sigreturn_args),freebsd32_sigreturn), AUE_SIGRETURN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 344 = freebsd4 freebsd32_sigreturn */ - { AS(freebsd32_sigtimedwait_args), (sy_call_t *)freebsd32_sigtimedwait, AUE_SIGWAIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 345 = freebsd32_sigtimedwait */ - { AS(freebsd32_sigwaitinfo_args), (sy_call_t *)freebsd32_sigwaitinfo, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 346 = freebsd32_sigwaitinfo */ + { compat4(AS(freebsd4_freebsd32_sigreturn_args),freebsd32_sigreturn), AUE_SIGRETURN, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 344 = freebsd4 freebsd32_sigreturn */ + { AS(freebsd32_sigtimedwait_args), (sy_call_t *)freebsd32_sigtimedwait, AUE_SIGWAIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 345 = freebsd32_sigtimedwait */ + { AS(freebsd32_sigwaitinfo_args), (sy_call_t *)freebsd32_sigwaitinfo, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 346 = freebsd32_sigwaitinfo */ { AS(__acl_get_file_args), (sy_call_t *)sys___acl_get_file, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 347 = __acl_get_file */ { AS(__acl_set_file_args), (sy_call_t *)sys___acl_set_file, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 348 = __acl_set_file */ - { AS(__acl_get_fd_args), (sy_call_t *)sys___acl_get_fd, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 349 = __acl_get_fd */ - { AS(__acl_set_fd_args), (sy_call_t *)sys___acl_set_fd, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 350 = __acl_set_fd */ + { AS(__acl_get_fd_args), (sy_call_t *)sys___acl_get_fd, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 349 = __acl_get_fd */ + { AS(__acl_set_fd_args), (sy_call_t *)sys___acl_set_fd, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 350 = __acl_set_fd */ { AS(__acl_delete_file_args), (sy_call_t *)sys___acl_delete_file, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 351 = __acl_delete_file */ - { AS(__acl_delete_fd_args), (sy_call_t *)sys___acl_delete_fd, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 352 = __acl_delete_fd */ + { AS(__acl_delete_fd_args), (sy_call_t *)sys___acl_delete_fd, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 352 = __acl_delete_fd */ { AS(__acl_aclcheck_file_args), (sy_call_t *)sys___acl_aclcheck_file, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 353 = __acl_aclcheck_file */ - { AS(__acl_aclcheck_fd_args), (sy_call_t *)sys___acl_aclcheck_fd, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 354 = __acl_aclcheck_fd */ + { AS(__acl_aclcheck_fd_args), (sy_call_t *)sys___acl_aclcheck_fd, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 354 = __acl_aclcheck_fd */ { AS(extattrctl_args), (sy_call_t *)sys_extattrctl, AUE_EXTATTRCTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 355 = extattrctl */ { AS(extattr_set_file_args), (sy_call_t *)sys_extattr_set_file, AUE_EXTATTR_SET_FILE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 356 = extattr_set_file */ { AS(extattr_get_file_args), (sy_call_t *)sys_extattr_get_file, AUE_EXTATTR_GET_FILE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 357 = extattr_get_file */ { AS(extattr_delete_file_args), (sy_call_t *)sys_extattr_delete_file, AUE_EXTATTR_DELETE_FILE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 358 = extattr_delete_file */ - { AS(freebsd32_aio_waitcomplete_args), (sy_call_t *)freebsd32_aio_waitcomplete, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 359 = freebsd32_aio_waitcomplete */ - { AS(getresuid_args), (sy_call_t *)sys_getresuid, AUE_GETRESUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 360 = getresuid */ - { AS(getresgid_args), (sy_call_t *)sys_getresgid, AUE_GETRESGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 361 = getresgid */ - { 0, (sy_call_t *)sys_kqueue, AUE_KQUEUE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 362 = kqueue */ - { AS(freebsd32_kevent_args), (sy_call_t *)freebsd32_kevent, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 363 = freebsd32_kevent */ + { AS(freebsd32_aio_waitcomplete_args), (sy_call_t *)freebsd32_aio_waitcomplete, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 359 = freebsd32_aio_waitcomplete */ + { AS(getresuid_args), (sy_call_t *)sys_getresuid, AUE_GETRESUID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 360 = getresuid */ + { AS(getresgid_args), (sy_call_t *)sys_getresgid, AUE_GETRESGID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 361 = getresgid */ + { 0, (sy_call_t *)sys_kqueue, AUE_KQUEUE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 362 = kqueue */ + { AS(freebsd32_kevent_args), (sy_call_t *)freebsd32_kevent, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 363 = freebsd32_kevent */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 364 = __cap_get_proc */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 365 = __cap_set_proc */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 366 = __cap_get_fd */ @@ -424,9 +424,9 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 368 = __cap_set_fd */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 369 = __cap_set_file */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 370 = nosys */ - { AS(extattr_set_fd_args), (sy_call_t *)sys_extattr_set_fd, AUE_EXTATTR_SET_FD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 371 = extattr_set_fd */ - { AS(extattr_get_fd_args), (sy_call_t *)sys_extattr_get_fd, AUE_EXTATTR_GET_FD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 372 = extattr_get_fd */ - { AS(extattr_delete_fd_args), (sy_call_t *)sys_extattr_delete_fd, AUE_EXTATTR_DELETE_FD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 373 = extattr_delete_fd */ + { AS(extattr_set_fd_args), (sy_call_t *)sys_extattr_set_fd, AUE_EXTATTR_SET_FD, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 371 = extattr_set_fd */ + { AS(extattr_get_fd_args), (sy_call_t *)sys_extattr_get_fd, AUE_EXTATTR_GET_FD, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 372 = extattr_get_fd */ + { AS(extattr_delete_fd_args), (sy_call_t *)sys_extattr_delete_fd, AUE_EXTATTR_DELETE_FD, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 373 = extattr_delete_fd */ { AS(__setugid_args), (sy_call_t *)sys___setugid, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 374 = __setugid */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 375 = nfsclnt */ { AS(eaccess_args), (sy_call_t *)sys_eaccess, AUE_EACCESS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 376 = eaccess */ @@ -445,12 +445,12 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 389 = __mac_set_file */ { AS(kenv_args), (sy_call_t *)sys_kenv, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 390 = kenv */ { AS(lchflags_args), (sy_call_t *)sys_lchflags, AUE_LCHFLAGS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 391 = lchflags */ - { AS(uuidgen_args), (sy_call_t *)sys_uuidgen, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 392 = uuidgen */ - { AS(freebsd32_sendfile_args), (sy_call_t *)freebsd32_sendfile, AUE_SENDFILE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 393 = freebsd32_sendfile */ + { AS(uuidgen_args), (sy_call_t *)sys_uuidgen, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 392 = uuidgen */ + { AS(freebsd32_sendfile_args), (sy_call_t *)freebsd32_sendfile, AUE_SENDFILE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 393 = freebsd32_sendfile */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 394 = mac_syscall */ { AS(getfsstat_args), (sy_call_t *)sys_getfsstat, AUE_GETFSSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 395 = getfsstat */ { AS(statfs_args), (sy_call_t *)sys_statfs, AUE_STATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 396 = statfs */ - { AS(fstatfs_args), (sy_call_t *)sys_fstatfs, AUE_FSTATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 397 = fstatfs */ + { AS(fstatfs_args), (sy_call_t *)sys_fstatfs, AUE_FSTATFS, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 397 = fstatfs */ { AS(fhstatfs_args), (sy_call_t *)sys_fhstatfs, AUE_FHSTATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 398 = fhstatfs */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 399 = nosys */ { AS(ksem_close_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 400 = ksem_close */ @@ -469,82 +469,82 @@ struct sysent freebsd32_sysent[] = { { AS(extattr_get_link_args), (sy_call_t *)sys_extattr_get_link, AUE_EXTATTR_GET_LINK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 413 = extattr_get_link */ { AS(extattr_delete_link_args), (sy_call_t *)sys_extattr_delete_link, AUE_EXTATTR_DELETE_LINK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 414 = extattr_delete_link */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 415 = __mac_execve */ - { AS(freebsd32_sigaction_args), (sy_call_t *)freebsd32_sigaction, AUE_SIGACTION, NULL, 0, 0, 0, SY_THR_STATIC }, /* 416 = freebsd32_sigaction */ - { AS(freebsd32_sigreturn_args), (sy_call_t *)freebsd32_sigreturn, AUE_SIGRETURN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 417 = freebsd32_sigreturn */ + { AS(freebsd32_sigaction_args), (sy_call_t *)freebsd32_sigaction, AUE_SIGACTION, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 416 = freebsd32_sigaction */ + { AS(freebsd32_sigreturn_args), (sy_call_t *)freebsd32_sigreturn, AUE_SIGRETURN, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 417 = freebsd32_sigreturn */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 418 = __xstat */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 419 = __xfstat */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 420 = __xlstat */ - { AS(freebsd32_getcontext_args), (sy_call_t *)freebsd32_getcontext, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 421 = freebsd32_getcontext */ - { AS(freebsd32_setcontext_args), (sy_call_t *)freebsd32_setcontext, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 422 = freebsd32_setcontext */ + { AS(freebsd32_getcontext_args), (sy_call_t *)freebsd32_getcontext, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 421 = freebsd32_getcontext */ + { AS(freebsd32_setcontext_args), (sy_call_t *)freebsd32_setcontext, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 422 = freebsd32_setcontext */ { AS(freebsd32_swapcontext_args), (sy_call_t *)freebsd32_swapcontext, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 423 = freebsd32_swapcontext */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 424 = swapoff */ { AS(__acl_get_link_args), (sy_call_t *)sys___acl_get_link, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 425 = __acl_get_link */ { AS(__acl_set_link_args), (sy_call_t *)sys___acl_set_link, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 426 = __acl_set_link */ { AS(__acl_delete_link_args), (sy_call_t *)sys___acl_delete_link, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 427 = __acl_delete_link */ { AS(__acl_aclcheck_link_args), (sy_call_t *)sys___acl_aclcheck_link, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 428 = __acl_aclcheck_link */ - { AS(sigwait_args), (sy_call_t *)sys_sigwait, AUE_SIGWAIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 429 = sigwait */ + { AS(sigwait_args), (sy_call_t *)sys_sigwait, AUE_SIGWAIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 429 = sigwait */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 430 = thr_create; */ - { AS(thr_exit_args), (sy_call_t *)sys_thr_exit, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 431 = thr_exit */ - { AS(thr_self_args), (sy_call_t *)sys_thr_self, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 432 = thr_self */ - { AS(thr_kill_args), (sy_call_t *)sys_thr_kill, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 433 = thr_kill */ + { AS(thr_exit_args), (sy_call_t *)sys_thr_exit, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 431 = thr_exit */ + { AS(thr_self_args), (sy_call_t *)sys_thr_self, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 432 = thr_self */ + { AS(thr_kill_args), (sy_call_t *)sys_thr_kill, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 433 = thr_kill */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 434 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 435 = nosys */ { AS(jail_attach_args), (sy_call_t *)sys_jail_attach, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 436 = jail_attach */ - { AS(extattr_list_fd_args), (sy_call_t *)sys_extattr_list_fd, AUE_EXTATTR_LIST_FD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 437 = extattr_list_fd */ + { AS(extattr_list_fd_args), (sy_call_t *)sys_extattr_list_fd, AUE_EXTATTR_LIST_FD, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 437 = extattr_list_fd */ { AS(extattr_list_file_args), (sy_call_t *)sys_extattr_list_file, AUE_EXTATTR_LIST_FILE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 438 = extattr_list_file */ { AS(extattr_list_link_args), (sy_call_t *)sys_extattr_list_link, AUE_EXTATTR_LIST_LINK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 439 = extattr_list_link */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 440 = kse_switchin */ { AS(freebsd32_ksem_timedwait_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 441 = freebsd32_ksem_timedwait */ - { AS(freebsd32_thr_suspend_args), (sy_call_t *)freebsd32_thr_suspend, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 442 = freebsd32_thr_suspend */ - { AS(thr_wake_args), (sy_call_t *)sys_thr_wake, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 443 = thr_wake */ + { AS(freebsd32_thr_suspend_args), (sy_call_t *)freebsd32_thr_suspend, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 442 = freebsd32_thr_suspend */ + { AS(thr_wake_args), (sy_call_t *)sys_thr_wake, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 443 = thr_wake */ { AS(kldunloadf_args), (sy_call_t *)sys_kldunloadf, AUE_MODUNLOAD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 444 = kldunloadf */ { AS(audit_args), (sy_call_t *)sys_audit, AUE_AUDIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 445 = audit */ { AS(auditon_args), (sy_call_t *)sys_auditon, AUE_AUDITON, NULL, 0, 0, 0, SY_THR_STATIC }, /* 446 = auditon */ - { AS(getauid_args), (sy_call_t *)sys_getauid, AUE_GETAUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 447 = getauid */ - { AS(setauid_args), (sy_call_t *)sys_setauid, AUE_SETAUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 448 = setauid */ - { AS(getaudit_args), (sy_call_t *)sys_getaudit, AUE_GETAUDIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 449 = getaudit */ - { AS(setaudit_args), (sy_call_t *)sys_setaudit, AUE_SETAUDIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 450 = setaudit */ - { AS(getaudit_addr_args), (sy_call_t *)sys_getaudit_addr, AUE_GETAUDIT_ADDR, NULL, 0, 0, 0, SY_THR_STATIC }, /* 451 = getaudit_addr */ - { AS(setaudit_addr_args), (sy_call_t *)sys_setaudit_addr, AUE_SETAUDIT_ADDR, NULL, 0, 0, 0, SY_THR_STATIC }, /* 452 = setaudit_addr */ + { AS(getauid_args), (sy_call_t *)sys_getauid, AUE_GETAUID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 447 = getauid */ + { AS(setauid_args), (sy_call_t *)sys_setauid, AUE_SETAUID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 448 = setauid */ + { AS(getaudit_args), (sy_call_t *)sys_getaudit, AUE_GETAUDIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 449 = getaudit */ + { AS(setaudit_args), (sy_call_t *)sys_setaudit, AUE_SETAUDIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 450 = setaudit */ + { AS(getaudit_addr_args), (sy_call_t *)sys_getaudit_addr, AUE_GETAUDIT_ADDR, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 451 = getaudit_addr */ + { AS(setaudit_addr_args), (sy_call_t *)sys_setaudit_addr, AUE_SETAUDIT_ADDR, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 452 = setaudit_addr */ { AS(auditctl_args), (sy_call_t *)sys_auditctl, AUE_AUDITCTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 453 = auditctl */ - { AS(freebsd32_umtx_op_args), (sy_call_t *)freebsd32_umtx_op, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 454 = freebsd32_umtx_op */ - { AS(freebsd32_thr_new_args), (sy_call_t *)freebsd32_thr_new, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 455 = freebsd32_thr_new */ - { AS(sigqueue_args), (sy_call_t *)sys_sigqueue, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 456 = sigqueue */ + { AS(freebsd32_umtx_op_args), (sy_call_t *)freebsd32_umtx_op, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 454 = freebsd32_umtx_op */ + { AS(freebsd32_thr_new_args), (sy_call_t *)freebsd32_thr_new, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 455 = freebsd32_thr_new */ + { AS(sigqueue_args), (sy_call_t *)sys_sigqueue, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 456 = sigqueue */ { AS(freebsd32_kmq_open_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 457 = freebsd32_kmq_open */ - { AS(freebsd32_kmq_setattr_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 458 = freebsd32_kmq_setattr */ - { AS(freebsd32_kmq_timedreceive_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 459 = freebsd32_kmq_timedreceive */ - { AS(freebsd32_kmq_timedsend_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 460 = freebsd32_kmq_timedsend */ - { AS(freebsd32_kmq_notify_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 461 = freebsd32_kmq_notify */ + { AS(freebsd32_kmq_setattr_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 458 = freebsd32_kmq_setattr */ + { AS(freebsd32_kmq_timedreceive_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 459 = freebsd32_kmq_timedreceive */ + { AS(freebsd32_kmq_timedsend_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 460 = freebsd32_kmq_timedsend */ + { AS(freebsd32_kmq_notify_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 461 = freebsd32_kmq_notify */ { AS(kmq_unlink_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 462 = kmq_unlink */ - { AS(abort2_args), (sy_call_t *)sys_abort2, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 463 = abort2 */ - { AS(thr_set_name_args), (sy_call_t *)sys_thr_set_name, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 464 = thr_set_name */ + { AS(abort2_args), (sy_call_t *)sys_abort2, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 463 = abort2 */ + { AS(thr_set_name_args), (sy_call_t *)sys_thr_set_name, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 464 = thr_set_name */ { AS(freebsd32_aio_fsync_args), (sy_call_t *)freebsd32_aio_fsync, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 465 = freebsd32_aio_fsync */ - { AS(rtprio_thread_args), (sy_call_t *)sys_rtprio_thread, AUE_RTPRIO, NULL, 0, 0, 0, SY_THR_STATIC }, /* 466 = rtprio_thread */ + { AS(rtprio_thread_args), (sy_call_t *)sys_rtprio_thread, AUE_RTPRIO, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 466 = rtprio_thread */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 467 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 468 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 469 = __getpath_fromfd */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 470 = __getpath_fromaddr */ - { AS(sctp_peeloff_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 471 = sctp_peeloff */ - { AS(sctp_generic_sendmsg_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 472 = sctp_generic_sendmsg */ - { AS(sctp_generic_sendmsg_iov_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 473 = sctp_generic_sendmsg_iov */ - { AS(sctp_generic_recvmsg_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 474 = sctp_generic_recvmsg */ + { AS(sctp_peeloff_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 471 = sctp_peeloff */ + { AS(sctp_generic_sendmsg_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 472 = sctp_generic_sendmsg */ + { AS(sctp_generic_sendmsg_iov_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 473 = sctp_generic_sendmsg_iov */ + { AS(sctp_generic_recvmsg_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 474 = sctp_generic_recvmsg */ #ifdef PAD64_REQUIRED - { AS(freebsd32_pread_args), (sy_call_t *)freebsd32_pread, AUE_PREAD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 475 = freebsd32_pread */ - { AS(freebsd32_pwrite_args), (sy_call_t *)freebsd32_pwrite, AUE_PWRITE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 476 = freebsd32_pwrite */ - { AS(freebsd32_mmap_args), (sy_call_t *)freebsd32_mmap, AUE_MMAP, NULL, 0, 0, 0, SY_THR_STATIC }, /* 477 = freebsd32_mmap */ - { AS(freebsd32_lseek_args), (sy_call_t *)freebsd32_lseek, AUE_LSEEK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 478 = freebsd32_lseek */ + { AS(freebsd32_pread_args), (sy_call_t *)freebsd32_pread, AUE_PREAD, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 475 = freebsd32_pread */ + { AS(freebsd32_pwrite_args), (sy_call_t *)freebsd32_pwrite, AUE_PWRITE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 476 = freebsd32_pwrite */ + { AS(freebsd32_mmap_args), (sy_call_t *)freebsd32_mmap, AUE_MMAP, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 477 = freebsd32_mmap */ + { AS(freebsd32_lseek_args), (sy_call_t *)freebsd32_lseek, AUE_LSEEK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 478 = freebsd32_lseek */ { AS(freebsd32_truncate_args), (sy_call_t *)freebsd32_truncate, AUE_TRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 479 = freebsd32_truncate */ { AS(freebsd32_ftruncate_args), (sy_call_t *)freebsd32_ftruncate, AUE_FTRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 480 = freebsd32_ftruncate */ #else - { AS(freebsd32_pread_args), (sy_call_t *)freebsd32_pread, AUE_PREAD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 475 = freebsd32_pread */ - { AS(freebsd32_pwrite_args), (sy_call_t *)freebsd32_pwrite, AUE_PWRITE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 476 = freebsd32_pwrite */ - { AS(freebsd32_mmap_args), (sy_call_t *)freebsd32_mmap, AUE_MMAP, NULL, 0, 0, 0, SY_THR_STATIC }, /* 477 = freebsd32_mmap */ - { AS(freebsd32_lseek_args), (sy_call_t *)freebsd32_lseek, AUE_LSEEK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 478 = freebsd32_lseek */ + { AS(freebsd32_pread_args), (sy_call_t *)freebsd32_pread, AUE_PREAD, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 475 = freebsd32_pread */ + { AS(freebsd32_pwrite_args), (sy_call_t *)freebsd32_pwrite, AUE_PWRITE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 476 = freebsd32_pwrite */ + { AS(freebsd32_mmap_args), (sy_call_t *)freebsd32_mmap, AUE_MMAP, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 477 = freebsd32_mmap */ + { AS(freebsd32_lseek_args), (sy_call_t *)freebsd32_lseek, AUE_LSEEK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 478 = freebsd32_lseek */ { AS(freebsd32_truncate_args), (sy_call_t *)freebsd32_truncate, AUE_TRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 479 = freebsd32_truncate */ { AS(freebsd32_ftruncate_args), (sy_call_t *)freebsd32_ftruncate, AUE_FTRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 480 = freebsd32_ftruncate */ #endif { AS(thr_kill2_args), (sy_call_t *)sys_thr_kill2, AUE_KILL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 481 = thr_kill2 */ - { AS(shm_open_args), (sy_call_t *)sys_shm_open, AUE_SHMOPEN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 482 = shm_open */ + { AS(shm_open_args), (sy_call_t *)sys_shm_open, AUE_SHMOPEN, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 482 = shm_open */ { AS(shm_unlink_args), (sy_call_t *)sys_shm_unlink, AUE_SHMUNLINK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 483 = shm_unlink */ { AS(cpuset_args), (sy_call_t *)sys_cpuset, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 484 = cpuset */ #ifdef PAD64_REQUIRED @@ -555,40 +555,40 @@ struct sysent freebsd32_sysent[] = { { AS(freebsd32_cpuset_getid_args), (sy_call_t *)freebsd32_cpuset_getid, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 486 = freebsd32_cpuset_getid */ { AS(freebsd32_cpuset_getaffinity_args), (sy_call_t *)freebsd32_cpuset_getaffinity, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 487 = freebsd32_cpuset_getaffinity */ { AS(freebsd32_cpuset_setaffinity_args), (sy_call_t *)freebsd32_cpuset_setaffinity, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 488 = freebsd32_cpuset_setaffinity */ - { AS(faccessat_args), (sy_call_t *)sys_faccessat, AUE_FACCESSAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 489 = faccessat */ - { AS(fchmodat_args), (sy_call_t *)sys_fchmodat, AUE_FCHMODAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 490 = fchmodat */ - { AS(fchownat_args), (sy_call_t *)sys_fchownat, AUE_FCHOWNAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 491 = fchownat */ - { AS(freebsd32_fexecve_args), (sy_call_t *)freebsd32_fexecve, AUE_FEXECVE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 492 = freebsd32_fexecve */ - { AS(freebsd32_fstatat_args), (sy_call_t *)freebsd32_fstatat, AUE_FSTATAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 493 = freebsd32_fstatat */ - { AS(freebsd32_futimesat_args), (sy_call_t *)freebsd32_futimesat, AUE_FUTIMESAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 494 = freebsd32_futimesat */ - { AS(linkat_args), (sy_call_t *)sys_linkat, AUE_LINKAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 495 = linkat */ - { AS(mkdirat_args), (sy_call_t *)sys_mkdirat, AUE_MKDIRAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 496 = mkdirat */ - { AS(mkfifoat_args), (sy_call_t *)sys_mkfifoat, AUE_MKFIFOAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 497 = mkfifoat */ - { AS(mknodat_args), (sy_call_t *)sys_mknodat, AUE_MKNODAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 498 = mknodat */ - { AS(openat_args), (sy_call_t *)sys_openat, AUE_OPENAT_RWTC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 499 = openat */ - { AS(readlinkat_args), (sy_call_t *)sys_readlinkat, AUE_READLINKAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 500 = readlinkat */ - { AS(renameat_args), (sy_call_t *)sys_renameat, AUE_RENAMEAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 501 = renameat */ - { AS(symlinkat_args), (sy_call_t *)sys_symlinkat, AUE_SYMLINKAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 502 = symlinkat */ - { AS(unlinkat_args), (sy_call_t *)sys_unlinkat, AUE_UNLINKAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 503 = unlinkat */ + { AS(faccessat_args), (sy_call_t *)sys_faccessat, AUE_FACCESSAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 489 = faccessat */ + { AS(fchmodat_args), (sy_call_t *)sys_fchmodat, AUE_FCHMODAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 490 = fchmodat */ + { AS(fchownat_args), (sy_call_t *)sys_fchownat, AUE_FCHOWNAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 491 = fchownat */ + { AS(freebsd32_fexecve_args), (sy_call_t *)freebsd32_fexecve, AUE_FEXECVE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 492 = freebsd32_fexecve */ + { AS(freebsd32_fstatat_args), (sy_call_t *)freebsd32_fstatat, AUE_FSTATAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 493 = freebsd32_fstatat */ + { AS(freebsd32_futimesat_args), (sy_call_t *)freebsd32_futimesat, AUE_FUTIMESAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 494 = freebsd32_futimesat */ + { AS(linkat_args), (sy_call_t *)sys_linkat, AUE_LINKAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 495 = linkat */ + { AS(mkdirat_args), (sy_call_t *)sys_mkdirat, AUE_MKDIRAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 496 = mkdirat */ + { AS(mkfifoat_args), (sy_call_t *)sys_mkfifoat, AUE_MKFIFOAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 497 = mkfifoat */ + { AS(mknodat_args), (sy_call_t *)sys_mknodat, AUE_MKNODAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 498 = mknodat */ + { AS(openat_args), (sy_call_t *)sys_openat, AUE_OPENAT_RWTC, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 499 = openat */ + { AS(readlinkat_args), (sy_call_t *)sys_readlinkat, AUE_READLINKAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 500 = readlinkat */ + { AS(renameat_args), (sy_call_t *)sys_renameat, AUE_RENAMEAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 501 = renameat */ + { AS(symlinkat_args), (sy_call_t *)sys_symlinkat, AUE_SYMLINKAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 502 = symlinkat */ + { AS(unlinkat_args), (sy_call_t *)sys_unlinkat, AUE_UNLINKAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 503 = unlinkat */ { AS(posix_openpt_args), (sy_call_t *)sys_posix_openpt, AUE_POSIX_OPENPT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 504 = posix_openpt */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 505 = gssd_syscall */ { AS(freebsd32_jail_get_args), (sy_call_t *)freebsd32_jail_get, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 506 = freebsd32_jail_get */ { AS(freebsd32_jail_set_args), (sy_call_t *)freebsd32_jail_set, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 507 = freebsd32_jail_set */ { AS(jail_remove_args), (sy_call_t *)sys_jail_remove, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 508 = jail_remove */ - { AS(closefrom_args), (sy_call_t *)sys_closefrom, AUE_CLOSEFROM, NULL, 0, 0, 0, SY_THR_STATIC }, /* 509 = closefrom */ + { AS(closefrom_args), (sy_call_t *)sys_closefrom, AUE_CLOSEFROM, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 509 = closefrom */ { AS(freebsd32_semctl_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 510 = freebsd32_semctl */ { AS(freebsd32_msgctl_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 511 = freebsd32_msgctl */ { AS(freebsd32_shmctl_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 512 = freebsd32_shmctl */ { AS(lpathconf_args), (sy_call_t *)sys_lpathconf, AUE_LPATHCONF, NULL, 0, 0, 0, SY_THR_STATIC }, /* 513 = lpathconf */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 514 = obsolete cap_new */ - { AS(__cap_rights_get_args), (sy_call_t *)sys___cap_rights_get, AUE_CAP_RIGHTS_GET, NULL, 0, 0, 0, SY_THR_STATIC }, /* 515 = __cap_rights_get */ - { 0, (sy_call_t *)freebsd32_cap_enter, AUE_CAP_ENTER, NULL, 0, 0, 0, SY_THR_STATIC }, /* 516 = freebsd32_cap_enter */ - { AS(cap_getmode_args), (sy_call_t *)sys_cap_getmode, AUE_CAP_GETMODE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 517 = cap_getmode */ - { AS(pdfork_args), (sy_call_t *)sys_pdfork, AUE_PDFORK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 518 = pdfork */ - { AS(pdkill_args), (sy_call_t *)sys_pdkill, AUE_PDKILL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 519 = pdkill */ - { AS(pdgetpid_args), (sy_call_t *)sys_pdgetpid, AUE_PDGETPID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 520 = pdgetpid */ + { AS(__cap_rights_get_args), (sy_call_t *)sys___cap_rights_get, AUE_CAP_RIGHTS_GET, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 515 = __cap_rights_get */ + { 0, (sy_call_t *)sys_cap_enter, AUE_CAP_ENTER, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 516 = cap_enter */ + { AS(cap_getmode_args), (sy_call_t *)sys_cap_getmode, AUE_CAP_GETMODE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 517 = cap_getmode */ + { AS(pdfork_args), (sy_call_t *)sys_pdfork, AUE_PDFORK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 518 = pdfork */ + { AS(pdkill_args), (sy_call_t *)sys_pdkill, AUE_PDKILL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 519 = pdkill */ + { AS(pdgetpid_args), (sy_call_t *)sys_pdgetpid, AUE_PDGETPID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 520 = pdgetpid */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 521 = pdwait4 */ - { AS(freebsd32_pselect_args), (sy_call_t *)freebsd32_pselect, AUE_SELECT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 522 = freebsd32_pselect */ + { AS(freebsd32_pselect_args), (sy_call_t *)freebsd32_pselect, AUE_SELECT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 522 = freebsd32_pselect */ { AS(getloginclass_args), (sy_call_t *)sys_getloginclass, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 523 = getloginclass */ { AS(setloginclass_args), (sy_call_t *)sys_setloginclass, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 524 = setloginclass */ { AS(rctl_get_racct_args), (sy_call_t *)sys_rctl_get_racct, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 525 = rctl_get_racct */ @@ -605,16 +605,16 @@ struct sysent freebsd32_sysent[] = { { AS(freebsd32_posix_fadvise_args), (sy_call_t *)freebsd32_posix_fadvise, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 531 = freebsd32_posix_fadvise */ { AS(freebsd32_wait6_args), (sy_call_t *)freebsd32_wait6, AUE_WAIT6, NULL, 0, 0, 0, SY_THR_STATIC }, /* 532 = freebsd32_wait6 */ #endif - { AS(cap_rights_limit_args), (sy_call_t *)sys_cap_rights_limit, AUE_CAP_RIGHTS_LIMIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 533 = cap_rights_limit */ - { AS(freebsd32_cap_ioctls_limit_args), (sy_call_t *)freebsd32_cap_ioctls_limit, AUE_CAP_IOCTLS_LIMIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 534 = freebsd32_cap_ioctls_limit */ - { AS(freebsd32_cap_ioctls_get_args), (sy_call_t *)freebsd32_cap_ioctls_get, AUE_CAP_IOCTLS_GET, NULL, 0, 0, 0, SY_THR_STATIC }, /* 535 = freebsd32_cap_ioctls_get */ - { AS(cap_fcntls_limit_args), (sy_call_t *)sys_cap_fcntls_limit, AUE_CAP_FCNTLS_LIMIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 536 = cap_fcntls_limit */ - { AS(cap_fcntls_get_args), (sy_call_t *)sys_cap_fcntls_get, AUE_CAP_FCNTLS_GET, NULL, 0, 0, 0, SY_THR_STATIC }, /* 537 = cap_fcntls_get */ - { AS(bindat_args), (sy_call_t *)sys_bindat, AUE_BINDAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 538 = bindat */ - { AS(connectat_args), (sy_call_t *)sys_connectat, AUE_CONNECTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 539 = connectat */ - { AS(chflagsat_args), (sy_call_t *)sys_chflagsat, AUE_CHFLAGSAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 540 = chflagsat */ - { AS(accept4_args), (sy_call_t *)sys_accept4, AUE_ACCEPT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 541 = accept4 */ - { AS(pipe2_args), (sy_call_t *)sys_pipe2, AUE_PIPE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 542 = pipe2 */ + { AS(cap_rights_limit_args), (sy_call_t *)sys_cap_rights_limit, AUE_CAP_RIGHTS_LIMIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 533 = cap_rights_limit */ + { AS(freebsd32_cap_ioctls_limit_args), (sy_call_t *)freebsd32_cap_ioctls_limit, AUE_CAP_IOCTLS_LIMIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 534 = freebsd32_cap_ioctls_limit */ + { AS(freebsd32_cap_ioctls_get_args), (sy_call_t *)freebsd32_cap_ioctls_get, AUE_CAP_IOCTLS_GET, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 535 = freebsd32_cap_ioctls_get */ + { AS(cap_fcntls_limit_args), (sy_call_t *)sys_cap_fcntls_limit, AUE_CAP_FCNTLS_LIMIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 536 = cap_fcntls_limit */ + { AS(cap_fcntls_get_args), (sy_call_t *)sys_cap_fcntls_get, AUE_CAP_FCNTLS_GET, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 537 = cap_fcntls_get */ + { AS(bindat_args), (sy_call_t *)sys_bindat, AUE_BINDAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 538 = bindat */ + { AS(connectat_args), (sy_call_t *)sys_connectat, AUE_CONNECTAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 539 = connectat */ + { AS(chflagsat_args), (sy_call_t *)sys_chflagsat, AUE_CHFLAGSAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 540 = chflagsat */ + { AS(accept4_args), (sy_call_t *)sys_accept4, AUE_ACCEPT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 541 = accept4 */ + { AS(pipe2_args), (sy_call_t *)sys_pipe2, AUE_PIPE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 542 = pipe2 */ { AS(freebsd32_aio_mlock_args), (sy_call_t *)freebsd32_aio_mlock, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 543 = freebsd32_aio_mlock */ #ifdef PAD64_REQUIRED { AS(freebsd32_procctl_args), (sy_call_t *)freebsd32_procctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 544 = freebsd32_procctl */ @@ -622,8 +622,8 @@ struct sysent freebsd32_sysent[] = { { AS(freebsd32_procctl_args), (sy_call_t *)freebsd32_procctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 544 = freebsd32_procctl */ #endif { AS(freebsd32_ppoll_args), (sy_call_t *)freebsd32_ppoll, AUE_POLL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 545 = freebsd32_ppoll */ - { AS(freebsd32_futimens_args), (sy_call_t *)freebsd32_futimens, AUE_FUTIMES, NULL, 0, 0, 0, SY_THR_STATIC }, /* 546 = freebsd32_futimens */ - { AS(freebsd32_utimensat_args), (sy_call_t *)freebsd32_utimensat, AUE_FUTIMESAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 547 = freebsd32_utimensat */ + { AS(freebsd32_futimens_args), (sy_call_t *)freebsd32_futimens, AUE_FUTIMES, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 546 = freebsd32_futimens */ + { AS(freebsd32_utimensat_args), (sy_call_t *)freebsd32_utimensat, AUE_FUTIMESAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 547 = freebsd32_utimensat */ { AS(numa_getaffinity_args), (sy_call_t *)sys_numa_getaffinity, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 548 = numa_getaffinity */ { AS(numa_setaffinity_args), (sy_call_t *)sys_numa_setaffinity, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 549 = numa_setaffinity */ { AS(fdatasync_args), (sy_call_t *)sys_fdatasync, AUE_FSYNC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 550 = fdatasync */ Modified: stable/11/sys/compat/freebsd32/freebsd32_systrace_args.c ============================================================================== --- stable/11/sys/compat/freebsd32/freebsd32_systrace_args.c Sun Oct 2 16:13:18 2016 (r306586) +++ stable/11/sys/compat/freebsd32/freebsd32_systrace_args.c Sun Oct 2 16:14:03 2016 (r306587) @@ -2956,7 +2956,7 @@ systrace_args(int sysnum, void *params, *n_args = 3; break; } - /* freebsd32_cap_enter */ + /* cap_enter */ case 516: { *n_args = 0; break; @@ -8249,7 +8249,7 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; - /* freebsd32_cap_enter */ + /* cap_enter */ case 516: break; /* cap_getmode */ @@ -10612,7 +10612,7 @@ systrace_return_setargdesc(int sysnum, i if (ndx == 0 || ndx == 1) p = "int"; break; - /* freebsd32_cap_enter */ + /* cap_enter */ case 516: /* cap_getmode */ case 517: From owner-svn-src-all@freebsd.org Sun Oct 2 17:03:01 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6563BAF12DF; Sun, 2 Oct 2016 17:03:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2776CEF1; Sun, 2 Oct 2016 17:03:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u92H30IW064674; Sun, 2 Oct 2016 17:03:00 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u92H2xg7064662; Sun, 2 Oct 2016 17:02:59 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201610021702.u92H2xg7064662@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 2 Oct 2016 17:02:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306588 - in head: include lib/librt tests/sys/mqueue X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 17:03:01 -0000 Author: kib Date: Sun Oct 2 17:02:59 2016 New Revision: 306588 URL: https://svnweb.freebsd.org/changeset/base/306588 Log: Export the mq_getfd_np() symbol from librt.so, which allows to get file descriptor for the given posix mqueue. Export the timer_oshandle_np() symbol to get ktimer id for the given posix timer. Requested by: Lewis Donzis Reviewed by: jilles Discussed with: kan Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/include/mqueue.h head/include/time.h head/lib/librt/Symbol.map head/lib/librt/mq.c head/lib/librt/timer.c head/tests/sys/mqueue/Makefile head/tests/sys/mqueue/mqtest3.c head/tests/sys/mqueue/mqtest4.c Modified: head/include/mqueue.h ============================================================================== --- head/include/mqueue.h Sun Oct 2 16:14:03 2016 (r306587) +++ head/include/mqueue.h Sun Oct 2 17:02:59 2016 (r306588) @@ -50,7 +50,9 @@ ssize_t mq_timedreceive(mqd_t, char *__r int mq_timedsend(mqd_t, const char *, size_t, unsigned, const struct timespec *); int mq_unlink(const char *); -int __mq_oshandle(mqd_t mqd); +#if __BSD_VISIBLE +int mq_getfd_np(mqd_t mqd); +#endif /* __BSD_VISIBLE */ __END_DECLS #endif Modified: head/include/time.h ============================================================================== --- head/include/time.h Sun Oct 2 16:14:03 2016 (r306587) +++ head/include/time.h Sun Oct 2 17:02:59 2016 (r306588) @@ -194,6 +194,7 @@ char *timezone(int, int); /* XXX XSI con void tzsetwall(void); time_t timelocal(struct tm * const); time_t timegm(struct tm * const); +int timer_oshandle_np(timer_t timerid); #endif /* __BSD_VISIBLE */ #if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) Modified: head/lib/librt/Symbol.map ============================================================================== --- head/lib/librt/Symbol.map Sun Oct 2 16:14:03 2016 (r306587) +++ head/lib/librt/Symbol.map Sun Oct 2 17:02:59 2016 (r306588) @@ -25,6 +25,11 @@ FBSD_1.0 { timer_getoverrun; }; +FBSD_1.5 { + mq_getfd_np; + timer_oshandle_np; +}; + FBSDprivate_1.0 { _aio_read; _aio_write; Modified: head/lib/librt/mq.c ============================================================================== --- head/lib/librt/mq.c Sun Oct 2 16:14:03 2016 (r306587) +++ head/lib/librt/mq.c Sun Oct 2 17:02:59 2016 (r306588) @@ -272,8 +272,9 @@ __mq_unlink(const char *path) return __sys_kmq_unlink(path); } +#pragma weak mq_getfd_np int -__mq_oshandle(mqd_t mqd) +mq_getfd_np(mqd_t mqd) { return (mqd->oshandle); Modified: head/lib/librt/timer.c ============================================================================== --- head/lib/librt/timer.c Sun Oct 2 16:14:03 2016 (r306587) +++ head/lib/librt/timer.c Sun Oct 2 17:02:59 2016 (r306588) @@ -175,8 +175,9 @@ __timer_settime(timer_t timerid, int fla flags, value, ovalue); } +#pragma weak timer_oshandle_np int -__timer_oshandle(timer_t timerid) +timer_oshandle_np(timer_t timerid) { return (timerid->oshandle); Modified: head/tests/sys/mqueue/Makefile ============================================================================== --- head/tests/sys/mqueue/Makefile Sun Oct 2 16:14:03 2016 (r306587) +++ head/tests/sys/mqueue/Makefile Sun Oct 2 17:02:59 2016 (r306588) @@ -10,8 +10,8 @@ CFLAGS+= -I${SRCTOP}/tests PROGS+= mqtest1 PROGS+= mqtest2 -#PROGS+= mqtest3 -#PROGS+= mqtest4 +PROGS+= mqtest3 +PROGS+= mqtest4 PROGS+= mqtest5 LIBADD+= rt Modified: head/tests/sys/mqueue/mqtest3.c ============================================================================== --- head/tests/sys/mqueue/mqtest3.c Sun Oct 2 16:14:03 2016 (r306587) +++ head/tests/sys/mqueue/mqtest3.c Sun Oct 2 17:02:59 2016 (r306588) @@ -62,9 +62,10 @@ main(void) buf = malloc(attr.mq_msgsize); for (j = 0; j < LOOPS; ++j) { FD_ZERO(&set); - FD_SET(__mq_oshandle(mq), &set); + FD_SET(mq_getfd_np(mq), &set); alarm(3); - status = select(__mq_oshandle(mq)+1, &set, NULL, NULL, NULL); + status = select(mq_getfd_np(mq) + 1, &set, NULL, + NULL, NULL); if (status != 1) err(1, "child process: select()"); status = mq_receive(mq, buf, attr.mq_msgsize, &prio); @@ -94,8 +95,9 @@ main(void) } alarm(3); FD_ZERO(&set); - FD_SET(__mq_oshandle(mq), &set); - status = select(__mq_oshandle(mq)+1, NULL, &set, NULL, NULL); + FD_SET(mq_getfd_np(mq), &set); + status = select(mq_getfd_np(mq) + 1, NULL, &set, + NULL, NULL); if (status != 1) err(1, "select()"); status = mq_send(mq, buf, attr.mq_msgsize, PRIO); Modified: head/tests/sys/mqueue/mqtest4.c ============================================================================== --- head/tests/sys/mqueue/mqtest4.c Sun Oct 2 16:14:03 2016 (r306587) +++ head/tests/sys/mqueue/mqtest4.c Sun Oct 2 17:02:59 2016 (r306588) @@ -57,7 +57,7 @@ main(void) mq = mq_open(MQNAME, O_RDWR); if (mq == (mqd_t)-1) err(1, "child: mq_open"); - EV_SET(&kev, __mq_oshandle(mq), EVFILT_READ, EV_ADD, 0, 0, 0); + EV_SET(&kev, mq_getfd_np(mq), EVFILT_READ, EV_ADD, 0, 0, 0); status = kevent(kq, &kev, 1, NULL, 0, NULL); if (status == -1) err(1, "child: kevent"); @@ -89,7 +89,7 @@ main(void) signal(SIGALRM, sighandler); kq = kqueue(); - EV_SET(&kev, __mq_oshandle(mq), EVFILT_WRITE, EV_ADD, 0, 0, 0); + EV_SET(&kev, mq_getfd_np(mq), EVFILT_WRITE, EV_ADD, 0, 0, 0); status = kevent(kq, &kev, 1, NULL, 0, NULL); if (status == -1) err(1, "kevent"); From owner-svn-src-all@freebsd.org Sun Oct 2 17:36:56 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8759BAF1A0D; Sun, 2 Oct 2016 17:36:56 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56D12F15; Sun, 2 Oct 2016 17:36:56 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u92HatuQ076441; Sun, 2 Oct 2016 17:36:55 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u92HatIu076440; Sun, 2 Oct 2016 17:36:55 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201610021736.u92HatIu076440@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 2 Oct 2016 17:36:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306589 - head/sys/dev/iicbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 17:36:56 -0000 Author: imp Date: Sun Oct 2 17:36:55 2016 New Revision: 306589 URL: https://svnweb.freebsd.org/changeset/base/306589 Log: Implement iicbus_write_ivar and impelemnt the NOSTOP ivar in both read and write. Modified: head/sys/dev/iicbus/iicbus.c Modified: head/sys/dev/iicbus/iicbus.c ============================================================================== --- head/sys/dev/iicbus/iicbus.c Sun Oct 2 17:02:59 2016 (r306588) +++ head/sys/dev/iicbus/iicbus.c Sun Oct 2 17:36:55 2016 (r306589) @@ -192,6 +192,26 @@ iicbus_read_ivar(device_t bus, device_t case IICBUS_IVAR_ADDR: *result = devi->addr; break; + case IICBUS_IVAR_NOSTOP: + *result = devi->nostop; + break; + } + return (0); +} + +static int +iicbus_write_ivar(device_t bus, device_t child, int which, uintptr_t value) +{ + struct iicbus_ivar *devi = IICBUS_IVAR(child); + + switch (which) { + default: + return (EINVAL); + case IICBUS_IVAR_ADDR: + return (EINVAL); + case IICBUS_IVAR_NOSTOP: + devi->nostop = value; + break; } return (0); } @@ -328,6 +348,7 @@ static device_method_t iicbus_methods[] DEVMETHOD(bus_print_child, iicbus_print_child), DEVMETHOD(bus_probe_nomatch, iicbus_probe_nomatch), DEVMETHOD(bus_read_ivar, iicbus_read_ivar), + DEVMETHOD(bus_write_ivar, iicbus_write_ivar), DEVMETHOD(bus_child_pnpinfo_str, iicbus_child_pnpinfo_str), DEVMETHOD(bus_child_location_str, iicbus_child_location_str), DEVMETHOD(bus_hinted_child, iicbus_hinted_child), From owner-svn-src-all@freebsd.org Sun Oct 2 19:39:24 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE7FEAF227A; Sun, 2 Oct 2016 19:39:24 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9B656D0; Sun, 2 Oct 2016 19:39:24 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u92JdNq2022462; Sun, 2 Oct 2016 19:39:23 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u92JdNeb022460; Sun, 2 Oct 2016 19:39:23 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201610021939.u92JdNeb022460@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sun, 2 Oct 2016 19:39:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306590 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 19:39:25 -0000 Author: avos Date: Sun Oct 2 19:39:23 2016 New Revision: 306590 URL: https://svnweb.freebsd.org/changeset/base/306590 Log: net80211: add one-vap version of ieee80211_iterate_nodes() - Add a counter into 'struct ieee80211_node_table' to save current number of allocated nodes. (allows to remove array overflow checking in ieee80211_iterate_nodes()). - Add ieee80211_iterate_nodes_vap() function; unlike non-vap version, it iterates on nodes for specified vap only. In addition to the above: - Remove ieee80211_iterate_nt(); it is not used by drivers / net80211 outside ieee80211_iterate_nodes() function + cannot be separated due to structural changes in code. Since size of 'struct ieee80211_node_table' (part of ieee80211com, which is a part of driver's softc) is changed all wireless drivers / kernel need to be recompiled. Tested with wpi(4), STA mode. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D7996 Modified: head/sys/net80211/ieee80211_node.c head/sys/net80211/ieee80211_node.h Modified: head/sys/net80211/ieee80211_node.c ============================================================================== --- head/sys/net80211/ieee80211_node.c Sun Oct 2 17:36:55 2016 (r306589) +++ head/sys/net80211/ieee80211_node.c Sun Oct 2 19:39:23 2016 (r306590) @@ -1214,13 +1214,44 @@ node_getmimoinfo(const struct ieee80211_ /* XXX EVM? */ } +static void +ieee80211_add_node_nt(struct ieee80211_node_table *nt, + struct ieee80211_node *ni) +{ + struct ieee80211com *ic = nt->nt_ic; + int hash; + + IEEE80211_NODE_LOCK_ASSERT(nt); + + hash = IEEE80211_NODE_HASH(ic, ni->ni_macaddr); + (void) ic; /* XXX IEEE80211_NODE_HASH */ + TAILQ_INSERT_TAIL(&nt->nt_node, ni, ni_list); + LIST_INSERT_HEAD(&nt->nt_hash[hash], ni, ni_hash); + nt->nt_count++; + ni->ni_table = nt; +} + +static void +ieee80211_del_node_nt(struct ieee80211_node_table *nt, + struct ieee80211_node *ni) +{ + + IEEE80211_NODE_LOCK_ASSERT(nt); + + TAILQ_REMOVE(&nt->nt_node, ni, ni_list); + LIST_REMOVE(ni, ni_hash); + nt->nt_count--; + KASSERT(nt->nt_count >= 0, + ("nt_count is negative (%d)!\n", nt->nt_count)); + ni->ni_table = NULL; +} + struct ieee80211_node * ieee80211_alloc_node(struct ieee80211_node_table *nt, struct ieee80211vap *vap, const uint8_t macaddr[IEEE80211_ADDR_LEN]) { struct ieee80211com *ic = nt->nt_ic; struct ieee80211_node *ni; - int hash; ni = ic->ic_node_alloc(vap, macaddr); if (ni == NULL) { @@ -1233,7 +1264,6 @@ ieee80211_alloc_node(struct ieee80211_no ether_sprintf(macaddr), nt->nt_name); IEEE80211_ADDR_COPY(ni->ni_macaddr, macaddr); - hash = IEEE80211_NODE_HASH(ic, macaddr); ieee80211_node_initref(ni); /* mark referenced */ ni->ni_chan = IEEE80211_CHAN_ANYC; ni->ni_authmode = IEEE80211_AUTH_OPEN; @@ -1250,9 +1280,7 @@ ieee80211_alloc_node(struct ieee80211_no ieee80211_mesh_node_init(vap, ni); #endif IEEE80211_NODE_LOCK(nt); - TAILQ_INSERT_TAIL(&nt->nt_node, ni, ni_list); - LIST_INSERT_HEAD(&nt->nt_hash[hash], ni, ni_hash); - ni->ni_table = nt; + ieee80211_add_node_nt(nt, ni); ni->ni_vap = vap; ni->ni_ic = ic; IEEE80211_NODE_UNLOCK(nt); @@ -1815,10 +1843,8 @@ _ieee80211_free_node(struct ieee80211_no if (vap->iv_aid_bitmap != NULL) IEEE80211_AID_CLR(vap, ni->ni_associd); } - if (nt != NULL) { - TAILQ_REMOVE(&nt->nt_node, ni, ni_list); - LIST_REMOVE(ni, ni_hash); - } + if (nt != NULL) + ieee80211_del_node_nt(nt, ni); ni->ni_ic->ic_node_free(ni); } @@ -1957,9 +1983,7 @@ node_reclaim(struct ieee80211_node_table * the references are dropped storage will be * reclaimed. */ - TAILQ_REMOVE(&nt->nt_node, ni, ni_list); - LIST_REMOVE(ni, ni_hash); - ni->ni_table = NULL; /* clear reference */ + ieee80211_del_node_nt(nt, ni); } else _ieee80211_free_node(ni); } @@ -1977,6 +2001,7 @@ ieee80211_node_table_init(struct ieee802 nt->nt_ic = ic; IEEE80211_NODE_LOCK_INIT(nt, ic->ic_name); TAILQ_INIT(&nt->nt_node); + nt->nt_count = 0; nt->nt_name = name; nt->nt_inact_init = inact; nt->nt_keyixmax = keyixmax; @@ -2261,117 +2286,68 @@ ieee80211_node_timeout(void *arg) } /* - * Iterate over the node table and return an array of ref'ed nodes. - * - * This is separated out from calling the actual node function so that - * no LORs will occur. - * - * If there are too many nodes (ie, the number of nodes doesn't fit - * within 'max_aid' entries) then the node references will be freed - * and an error will be returned. - * - * The responsibility of allocating and freeing "ni_arr" is up to - * the caller. + * The same as ieee80211_iterate_nodes(), but for one vap only. */ int -ieee80211_iterate_nt(struct ieee80211_node_table *nt, - struct ieee80211_node **ni_arr, uint16_t max_aid) +ieee80211_iterate_nodes_vap(struct ieee80211_node_table *nt, + struct ieee80211vap *vap, ieee80211_iter_func *f, void *arg) { - int i, j, ret; + struct ieee80211_node **ni_arr; struct ieee80211_node *ni; + size_t size; + int count, i; + /* + * Iterate over the node table and save an array of ref'ed nodes. + * + * This is separated out from calling the actual node function so that + * no LORs will occur. + */ IEEE80211_NODE_LOCK(nt); + count = nt->nt_count; + size = count * sizeof(struct ieee80211_node *); + ni_arr = (struct ieee80211_node **) IEEE80211_MALLOC(size, M_80211_NODE, + IEEE80211_M_NOWAIT | IEEE80211_M_ZERO); + if (ni_arr == NULL) { + IEEE80211_NODE_UNLOCK(nt); + return (ENOMEM); + } - i = ret = 0; + i = 0; TAILQ_FOREACH(ni, &nt->nt_node, ni_list) { - if (i >= max_aid) { - ret = E2BIG; - ic_printf(nt->nt_ic, "Node array overflow: max=%u", - max_aid); - break; - } + if (vap != NULL && ni->ni_vap != vap) + continue; + KASSERT(i < count, + ("node array overflow (vap %p, i %d, count %d)\n", + vap, i, count)); ni_arr[i] = ieee80211_ref_node(ni); i++; } - - /* - * It's safe to unlock here. - * - * If we're successful, the list is returned. - * If we're unsuccessful, the list is ignored - * and we remove our references. - * - * This avoids any potential LOR with - * ieee80211_free_node(). - */ IEEE80211_NODE_UNLOCK(nt); - /* - * If ret is non-zero, we hit some kind of error. - * Rather than walking some nodes, we'll walk none - * of them. - */ - if (ret) { - for (j = 0; j < i; j++) { - /* ieee80211_free_node() locks by itself */ - ieee80211_free_node(ni_arr[j]); - } + for (i = 0; i < count; i++) { + if (ni_arr[i] == NULL) /* end of the list */ + break; + (*f)(arg, ni_arr[i]); + /* ieee80211_free_node() locks by itself */ + ieee80211_free_node(ni_arr[i]); } - return (ret); + IEEE80211_FREE(ni_arr, M_80211_NODE); + + return (0); } /* * Just a wrapper, so we don't have to change every ieee80211_iterate_nodes() * reference in the source. - * - * Note that this fetches 'max_aid' from the first VAP, rather than finding - * the largest max_aid from all VAPs. */ void ieee80211_iterate_nodes(struct ieee80211_node_table *nt, ieee80211_iter_func *f, void *arg) { - struct ieee80211_node **ni_arr; - size_t size; - int i; - uint16_t max_aid; - struct ieee80211vap *vap; - - /* Overdoing it default */ - max_aid = IEEE80211_AID_MAX; - - /* Handle the case of there being no vaps just yet */ - vap = TAILQ_FIRST(&nt->nt_ic->ic_vaps); - if (vap != NULL) - max_aid = vap->iv_max_aid; - - size = max_aid * sizeof(struct ieee80211_node *); - ni_arr = (struct ieee80211_node **) IEEE80211_MALLOC(size, M_80211_NODE, - IEEE80211_M_NOWAIT | IEEE80211_M_ZERO); - if (ni_arr == NULL) - return; - - /* - * If this fails, the node table won't have any - * valid entries - ieee80211_iterate_nt() frees - * the references to them. So don't try walking - * the table; just skip to the end and free the - * temporary memory. - */ - if (ieee80211_iterate_nt(nt, ni_arr, max_aid) != 0) - goto done; - - for (i = 0; i < max_aid; i++) { - if (ni_arr[i] == NULL) /* end of the list */ - break; - (*f)(arg, ni_arr[i]); - /* ieee80211_free_node() locks by itself */ - ieee80211_free_node(ni_arr[i]); - } - -done: - IEEE80211_FREE(ni_arr, M_80211_NODE); + /* XXX no way to pass error to the caller. */ + (void) ieee80211_iterate_nodes_vap(nt, NULL, f, arg); } void Modified: head/sys/net80211/ieee80211_node.h ============================================================================== --- head/sys/net80211/ieee80211_node.h Sun Oct 2 17:36:55 2016 (r306589) +++ head/sys/net80211/ieee80211_node.h Sun Oct 2 19:39:23 2016 (r306590) @@ -359,6 +359,7 @@ struct ieee80211_node_table { ieee80211_node_lock_t nt_nodelock; /* on node table */ TAILQ_HEAD(, ieee80211_node) nt_node; /* information of all nodes */ LIST_HEAD(, ieee80211_node) nt_hash[IEEE80211_NODE_HASHSIZE]; + int nt_count; /* number of nodes */ struct ieee80211_node **nt_keyixmap; /* key ix -> node map */ int nt_keyixmax; /* keyixmap size */ const char *nt_name; /* table name for debug msgs */ @@ -444,8 +445,8 @@ int ieee80211_node_delucastkey(struct ie void ieee80211_node_timeout(void *arg); typedef void ieee80211_iter_func(void *, struct ieee80211_node *); -int ieee80211_iterate_nt(struct ieee80211_node_table *, - struct ieee80211_node **, uint16_t); +int ieee80211_iterate_nodes_vap(struct ieee80211_node_table *, + struct ieee80211vap *, ieee80211_iter_func *, void *); void ieee80211_iterate_nodes(struct ieee80211_node_table *, ieee80211_iter_func *, void *); From owner-svn-src-all@freebsd.org Sun Oct 2 20:35:59 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 208B0AF14C5; Sun, 2 Oct 2016 20:35:59 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E37ACA8F; Sun, 2 Oct 2016 20:35:58 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u92KZwqX045362; Sun, 2 Oct 2016 20:35:58 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u92KZtV2045334; Sun, 2 Oct 2016 20:35:55 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201610022035.u92KZtV2045334@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sun, 2 Oct 2016 20:35:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306591 - in head/sys: dev/bwi dev/bwn dev/iwm dev/iwn dev/otus dev/ral dev/urtwn dev/usb/wlan dev/wpi net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 20:35:59 -0000 Author: avos Date: Sun Oct 2 20:35:55 2016 New Revision: 306591 URL: https://svnweb.freebsd.org/changeset/base/306591 Log: net80211: ieee80211_ratectl*: switch to reusable KPI Replace various void * / int argument combinations with common structures: - ieee80211_ratectl_tx_status for *_tx_complete(); - ieee80211_ratectl_tx_stats for *_tx_update(); While here, improve amrr_tx_update() for a bit: 1. In case, if receiver is not known (typical for Ralink USB drivers), refresh Tx rate for all nodes on the interface. 2. There was a misuse: - otus(4) sends non-decreasing counters (as originally intended); - but ural(4), rum(4) and run(4) are using 'read & clear' registers to obtain statistics for some period of time (and those 'last period' values are used as arguments for tx_update()). If arguments are not big enough, they are just discarded after the next call. Fix: move counting into *_tx_update() (now otus(4) will zero out all node counters after every tx_update() call) Tested with: - Intel 3945BG (wpi(4)), STA mode. - WUSB54GC (rum(4)), STA / HOSTAP mode. - RTL8188EU (urtwn(4)), STA mode. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D8037 Modified: head/sys/dev/bwi/if_bwi.c head/sys/dev/bwn/if_bwn.c head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwmvar.h head/sys/dev/iwn/if_iwn.c head/sys/dev/iwn/if_iwnvar.h head/sys/dev/otus/if_otus.c head/sys/dev/otus/if_otusreg.h head/sys/dev/ral/if_ral_pci.c head/sys/dev/ral/rt2560.c head/sys/dev/ral/rt2560var.h head/sys/dev/ral/rt2661.c head/sys/dev/ral/rt2661var.h head/sys/dev/ral/rt2860.c head/sys/dev/ral/rt2860var.h head/sys/dev/urtwn/if_urtwn.c head/sys/dev/urtwn/if_urtwnreg.h head/sys/dev/urtwn/if_urtwnvar.h head/sys/dev/usb/wlan/if_rum.c head/sys/dev/usb/wlan/if_rumvar.h head/sys/dev/usb/wlan/if_run.c head/sys/dev/usb/wlan/if_runvar.h head/sys/dev/usb/wlan/if_ural.c head/sys/dev/usb/wlan/if_uralvar.h head/sys/dev/usb/wlan/if_zyd.c head/sys/dev/usb/wlan/if_zydreg.h head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpivar.h head/sys/net80211/ieee80211_amrr.c head/sys/net80211/ieee80211_ratectl.h head/sys/net80211/ieee80211_ratectl_none.c head/sys/net80211/ieee80211_rssadapt.c Modified: head/sys/dev/bwi/if_bwi.c ============================================================================== --- head/sys/dev/bwi/if_bwi.c Sun Oct 2 19:39:23 2016 (r306590) +++ head/sys/dev/bwi/if_bwi.c Sun Oct 2 20:35:55 2016 (r306591) @@ -3321,7 +3321,6 @@ _bwi_txeof(struct bwi_softc *sc, uint16_ struct bwi_txbuf *tb; int ring_idx, buf_idx; struct ieee80211_node *ni; - struct ieee80211vap *vap; if (tx_id == 0) { device_printf(sc->sc_dev, "%s: zero tx id\n", __func__); @@ -3348,7 +3347,7 @@ _bwi_txeof(struct bwi_softc *sc, uint16_ if ((ni = tb->tb_ni) != NULL) { const struct bwi_txbuf_hdr *hdr = mtod(tb->tb_mbuf, const struct bwi_txbuf_hdr *); - vap = ni->ni_vap; + struct ieee80211_ratectl_tx_status txs; /* NB: update rate control only for unicast frames */ if (hdr->txh_mac_ctrl & htole32(BWI_TXH_MAC_C_ACK)) { @@ -3359,9 +3358,15 @@ _bwi_txeof(struct bwi_softc *sc, uint16_ * well so to avoid over-aggressive downshifting we * treat any number of retries as "1". */ - ieee80211_ratectl_tx_complete(vap, ni, - (data_txcnt > 1) ? IEEE80211_RATECTL_TX_SUCCESS : - IEEE80211_RATECTL_TX_FAILURE, &acked, NULL); + txs.flags = IEEE80211_RATECTL_STATUS_LONG_RETRY; + txs.long_retries = acked; + if (data_txcnt > 1) + txs.status = IEEE80211_RATECTL_TX_SUCCESS; + else { + txs.status = + IEEE80211_RATECTL_TX_FAIL_UNSPECIFIED; + } + ieee80211_ratectl_tx_complete(ni, &txs); } ieee80211_tx_complete(ni, tb->tb_mbuf, !acked); tb->tb_ni = NULL; Modified: head/sys/dev/bwn/if_bwn.c ============================================================================== --- head/sys/dev/bwn/if_bwn.c Sun Oct 2 19:39:23 2016 (r306590) +++ head/sys/dev/bwn/if_bwn.c Sun Oct 2 20:35:55 2016 (r306591) @@ -258,6 +258,8 @@ static int bwn_dma_newbuf(struct bwn_dma static void bwn_dma_buf_addr(void *, bus_dma_segment_t *, int, bus_size_t, int); static uint8_t bwn_dma_check_redzone(struct bwn_dma_ring *, struct mbuf *); +static void bwn_ratectl_tx_complete(const struct ieee80211_node *, + const struct bwn_txstatus *); static void bwn_dma_handle_txeof(struct bwn_mac *, const struct bwn_txstatus *); static int bwn_dma_tx_start(struct bwn_mac *, struct ieee80211_node *, @@ -5891,6 +5893,33 @@ drop: } static void +bwn_ratectl_tx_complete(const struct ieee80211_node *ni, + const struct bwn_txstatus *status) +{ + struct ieee80211_ratectl_tx_status txs; + int retrycnt = 0; + + /* + * If we don't get an ACK, then we should log the + * full framecnt. That may be 0 if it's a PHY + * failure, so ensure that gets logged as some + * retry attempt. + */ + txs.flags = IEEE80211_RATECTL_STATUS_LONG_RETRY; + if (status->ack) { + txs.status = IEEE80211_RATECTL_TX_SUCCESS; + retrycnt = status->framecnt - 1; + } else { + txs.status = IEEE80211_RATECTL_TX_FAIL_UNSPECIFIED; + retrycnt = status->framecnt; + if (retrycnt == 0) + retrycnt = 1; + } + txs.long_retries = retrycnt; + ieee80211_ratectl_tx_complete(ni, &txs); +} + +static void bwn_dma_handle_txeof(struct bwn_mac *mac, const struct bwn_txstatus *status) { @@ -5900,7 +5929,6 @@ bwn_dma_handle_txeof(struct bwn_mac *mac struct bwn_dmadesc_meta *meta; struct bwn_softc *sc = mac->mac_sc; int slot; - int retrycnt = 0; BWN_ASSERT_LOCKED(sc); @@ -5925,24 +5953,7 @@ bwn_dma_handle_txeof(struct bwn_mac *mac KASSERT(meta->mt_m != NULL, ("%s:%d: fail", __func__, __LINE__)); - /* - * If we don't get an ACK, then we should log the - * full framecnt. That may be 0 if it's a PHY - * failure, so ensure that gets logged as some - * retry attempt. - */ - if (status->ack) { - retrycnt = status->framecnt - 1; - } else { - retrycnt = status->framecnt; - if (retrycnt == 0) - retrycnt = 1; - } - ieee80211_ratectl_tx_complete(meta->mt_ni->ni_vap, meta->mt_ni, - status->ack ? - IEEE80211_RATECTL_TX_SUCCESS : - IEEE80211_RATECTL_TX_FAILURE, - &retrycnt, 0); + bwn_ratectl_tx_complete(meta->mt_ni, status); ieee80211_tx_complete(meta->mt_ni, meta->mt_m, 0); meta->mt_ni = NULL; meta->mt_m = NULL; @@ -5970,7 +5981,6 @@ bwn_pio_handle_txeof(struct bwn_mac *mac struct bwn_pio_txqueue *tq; struct bwn_pio_txpkt *tp = NULL; struct bwn_softc *sc = mac->mac_sc; - int retrycnt = 0; BWN_ASSERT_LOCKED(sc); @@ -5981,31 +5991,14 @@ bwn_pio_handle_txeof(struct bwn_mac *mac tq->tq_used -= roundup(tp->tp_m->m_pkthdr.len + BWN_HDRSIZE(mac), 4); tq->tq_free++; + /* XXX ieee80211_tx_complete()? */ if (tp->tp_ni != NULL) { /* * Do any tx complete callback. Note this must * be done before releasing the node reference. */ - /* - * If we don't get an ACK, then we should log the - * full framecnt. That may be 0 if it's a PHY - * failure, so ensure that gets logged as some - * retry attempt. - */ - if (status->ack) { - retrycnt = status->framecnt - 1; - } else { - retrycnt = status->framecnt; - if (retrycnt == 0) - retrycnt = 1; - } - ieee80211_ratectl_tx_complete(tp->tp_ni->ni_vap, tp->tp_ni, - status->ack ? - IEEE80211_RATECTL_TX_SUCCESS : - IEEE80211_RATECTL_TX_FAILURE, - &retrycnt, 0); - + bwn_ratectl_tx_complete(tp->tp_ni, status); if (tp->tp_m->m_flags & M_TXCB) ieee80211_process_callback(tp->tp_ni, tp->tp_m, 0); ieee80211_free_node(tp->tp_ni); Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Sun Oct 2 19:39:23 2016 (r306590) +++ head/sys/dev/iwm/if_iwm.c Sun Oct 2 20:35:55 2016 (r306591) @@ -3027,10 +3027,9 @@ iwm_mvm_rx_tx_cmd_single(struct iwm_soft struct iwm_node *in) { struct iwm_mvm_tx_resp *tx_resp = (void *)pkt->data; + struct ieee80211_ratectl_tx_status *txs = &sc->sc_txs; struct ieee80211_node *ni = &in->in_ni; - struct ieee80211vap *vap = ni->ni_vap; int status = le16toh(tx_resp->status.status) & IWM_TX_STATUS_MSK; - int failack = tx_resp->failure_frame; KASSERT(tx_resp->frame_count == 1, ("too many frames")); @@ -3046,16 +3045,32 @@ iwm_mvm_rx_tx_cmd_single(struct iwm_soft le32toh(tx_resp->initial_rate), (int) le16toh(tx_resp->wireless_media_time)); + txs->flags = IEEE80211_RATECTL_STATUS_SHORT_RETRY | + IEEE80211_RATECTL_STATUS_LONG_RETRY; + txs->short_retries = tx_resp->failure_rts; + txs->long_retries = tx_resp->failure_frame; if (status != IWM_TX_STATUS_SUCCESS && status != IWM_TX_STATUS_DIRECT_DONE) { - ieee80211_ratectl_tx_complete(vap, ni, - IEEE80211_RATECTL_TX_FAILURE, &failack, NULL); - return (1); + switch (status) { + case IWM_TX_STATUS_FAIL_SHORT_LIMIT: + txs->status = IEEE80211_RATECTL_TX_FAIL_SHORT; + break; + case IWM_TX_STATUS_FAIL_LONG_LIMIT: + txs->status = IEEE80211_RATECTL_TX_FAIL_LONG; + break; + case IWM_TX_STATUS_FAIL_LIFE_EXPIRE: + txs->status = IEEE80211_RATECTL_TX_FAIL_EXPIRED; + break; + default: + txs->status = IEEE80211_RATECTL_TX_FAIL_UNSPECIFIED; + break; + } } else { - ieee80211_ratectl_tx_complete(vap, ni, - IEEE80211_RATECTL_TX_SUCCESS, &failack, NULL); - return (0); + txs->status = IEEE80211_RATECTL_TX_SUCCESS; } + ieee80211_ratectl_tx_complete(ni, txs); + + return (txs->status != IEEE80211_RATECTL_TX_SUCCESS); } static void Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Sun Oct 2 19:39:23 2016 (r306590) +++ head/sys/dev/iwm/if_iwmvar.h Sun Oct 2 20:35:55 2016 (r306591) @@ -392,6 +392,7 @@ struct iwm_softc { struct mtx sc_mtx; struct mbufq sc_snd; struct ieee80211com sc_ic; + struct ieee80211_ratectl_tx_status sc_txs; int sc_flags; #define IWM_FLAG_USE_ICT (1 << 0) Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Sun Oct 2 19:39:23 2016 (r306590) +++ head/sys/dev/iwn/if_iwn.c Sun Oct 2 20:35:55 2016 (r306591) @@ -210,9 +210,10 @@ static void iwn4965_tx_done(struct iwn_s struct iwn_rx_data *); static void iwn5000_tx_done(struct iwn_softc *, struct iwn_rx_desc *, struct iwn_rx_data *); -static void iwn_tx_done(struct iwn_softc *, struct iwn_rx_desc *, int, +static void iwn_tx_done(struct iwn_softc *, struct iwn_rx_desc *, int, int, uint8_t); -static void iwn_ampdu_tx_done(struct iwn_softc *, int, int, int, int, void *); +static void iwn_ampdu_tx_done(struct iwn_softc *, int, int, int, int, int, + void *); static void iwn_cmd_done(struct iwn_softc *, struct iwn_rx_desc *); static void iwn_notif_intr(struct iwn_softc *); static void iwn_wakeup_intr(struct iwn_softc *); @@ -3147,6 +3148,7 @@ static void iwn_rx_compressed_ba(struct iwn_softc *sc, struct iwn_rx_desc *desc, struct iwn_rx_data *data) { + struct ieee80211_ratectl_tx_status *txs = &sc->sc_txs; struct iwn_ops *ops = &sc->ops; struct iwn_node *wn; struct ieee80211_node *ni; @@ -3158,7 +3160,7 @@ iwn_rx_compressed_ba(struct iwn_softc *s uint64_t bitmap; uint16_t ssn; uint8_t tid; - int ackfailcnt = 0, i, lastidx, qid, *res, shift; + int i, lastidx, qid, *res, shift; int tx_ok = 0, tx_err = 0; DPRINTF(sc, IWN_DEBUG_TRACE | IWN_DEBUG_XMIT, "->%s begin\n", __func__); @@ -3227,15 +3229,15 @@ iwn_rx_compressed_ba(struct iwn_softc *s ni = tap->txa_ni; bitmap = (le64toh(ba->bitmap) >> shift) & wn->agg[tid].bitmap; for (i = 0; bitmap; i++) { + txs->flags = 0; /* XXX TODO */ if ((bitmap & 1) == 0) { tx_err ++; - ieee80211_ratectl_tx_complete(ni->ni_vap, ni, - IEEE80211_RATECTL_TX_FAILURE, &ackfailcnt, NULL); + txs->status = IEEE80211_RATECTL_TX_FAIL_UNSPECIFIED; } else { tx_ok ++; - ieee80211_ratectl_tx_complete(ni->ni_vap, ni, - IEEE80211_RATECTL_TX_SUCCESS, &ackfailcnt, NULL); + txs->status = IEEE80211_RATECTL_TX_SUCCESS; } + ieee80211_ratectl_tx_complete(ni, txs); bitmap >>= 1; } @@ -3501,9 +3503,9 @@ iwn4965_tx_done(struct iwn_softc *sc, st bus_dmamap_sync(ring->data_dmat, data->map, BUS_DMASYNC_POSTREAD); if (qid >= sc->firstaggqueue) { iwn_ampdu_tx_done(sc, qid, desc->idx, stat->nframes, - stat->ackfailcnt, &stat->status); + stat->rtsfailcnt, stat->ackfailcnt, &stat->status); } else { - iwn_tx_done(sc, desc, stat->ackfailcnt, + iwn_tx_done(sc, desc, stat->rtsfailcnt, stat->ackfailcnt, le32toh(stat->status) & 0xff); } } @@ -3536,9 +3538,9 @@ iwn5000_tx_done(struct iwn_softc *sc, st bus_dmamap_sync(ring->data_dmat, data->map, BUS_DMASYNC_POSTREAD); if (qid >= sc->firstaggqueue) { iwn_ampdu_tx_done(sc, qid, desc->idx, stat->nframes, - stat->ackfailcnt, &stat->status); + stat->rtsfailcnt, stat->ackfailcnt, &stat->status); } else { - iwn_tx_done(sc, desc, stat->ackfailcnt, + iwn_tx_done(sc, desc, stat->rtsfailcnt, stat->ackfailcnt, le16toh(stat->status) & 0xff); } } @@ -3547,14 +3549,14 @@ iwn5000_tx_done(struct iwn_softc *sc, st * Adapter-independent backend for TX_DONE firmware notifications. */ static void -iwn_tx_done(struct iwn_softc *sc, struct iwn_rx_desc *desc, int ackfailcnt, - uint8_t status) +iwn_tx_done(struct iwn_softc *sc, struct iwn_rx_desc *desc, int rtsfailcnt, + int ackfailcnt, uint8_t status) { + struct ieee80211_ratectl_tx_status *txs = &sc->sc_txs; struct iwn_tx_ring *ring = &sc->txq[desc->qid & 0xf]; struct iwn_tx_data *data = &ring->data[desc->idx]; struct mbuf *m; struct ieee80211_node *ni; - struct ieee80211vap *vap; KASSERT(data->ni != NULL, ("no node")); @@ -3565,17 +3567,33 @@ iwn_tx_done(struct iwn_softc *sc, struct bus_dmamap_unload(ring->data_dmat, data->map); m = data->m, data->m = NULL; ni = data->ni, data->ni = NULL; - vap = ni->ni_vap; /* * Update rate control statistics for the node. */ - if (status & IWN_TX_FAIL) - ieee80211_ratectl_tx_complete(vap, ni, - IEEE80211_RATECTL_TX_FAILURE, &ackfailcnt, NULL); - else - ieee80211_ratectl_tx_complete(vap, ni, - IEEE80211_RATECTL_TX_SUCCESS, &ackfailcnt, NULL); + txs->flags = IEEE80211_RATECTL_STATUS_SHORT_RETRY | + IEEE80211_RATECTL_STATUS_LONG_RETRY; + txs->short_retries = rtsfailcnt; + txs->long_retries = ackfailcnt; + if (!(status & IWN_TX_FAIL)) + txs->status = IEEE80211_RATECTL_TX_SUCCESS; + else { + switch (status) { + case IWN_TX_FAIL_SHORT_LIMIT: + txs->status = IEEE80211_RATECTL_TX_FAIL_SHORT; + break; + case IWN_TX_FAIL_LONG_LIMIT: + txs->status = IEEE80211_RATECTL_TX_FAIL_LONG; + break; + case IWN_TX_STATUS_FAIL_LIFE_EXPIRE: + txs->status = IEEE80211_RATECTL_TX_FAIL_EXPIRED; + break; + default: + txs->status = IEEE80211_RATECTL_TX_FAIL_UNSPECIFIED; + break; + } + } + ieee80211_ratectl_tx_complete(ni, txs); /* * Channels marked for "radar" require traffic to be received @@ -3640,10 +3658,11 @@ iwn_cmd_done(struct iwn_softc *sc, struc static void iwn_ampdu_tx_done(struct iwn_softc *sc, int qid, int idx, int nframes, - int ackfailcnt, void *stat) + int rtsfailcnt, int ackfailcnt, void *stat) { struct iwn_ops *ops = &sc->ops; struct iwn_tx_ring *ring = &sc->txq[qid]; + struct ieee80211_ratectl_tx_status *txs = &sc->sc_txs; struct iwn_tx_data *data; struct mbuf *m; struct iwn_node *wn; @@ -3682,6 +3701,10 @@ iwn_ampdu_tx_done(struct iwn_softc *sc, * handled differently. */ if (nframes == 1) { + txs->flags = IEEE80211_RATECTL_STATUS_SHORT_RETRY | + IEEE80211_RATECTL_STATUS_LONG_RETRY; + txs->short_retries = rtsfailcnt; + txs->long_retries = ackfailcnt; if ((*status & 0xff) != 1 && (*status & 0xff) != 2) { #ifdef NOT_YET printf("ieee80211_send_bar()\n"); @@ -3691,11 +3714,8 @@ iwn_ampdu_tx_done(struct iwn_softc *sc, * notification is pushed up to the rate control * layer. */ - ieee80211_ratectl_tx_complete(ni->ni_vap, - ni, - IEEE80211_RATECTL_TX_FAILURE, - &ackfailcnt, - NULL); + /* XXX */ + txs->status = IEEE80211_RATECTL_TX_FAIL_UNSPECIFIED; } else { /* * If nframes=1, then we won't be getting a BA for @@ -3703,12 +3723,9 @@ iwn_ampdu_tx_done(struct iwn_softc *sc, * rate control code with how many retries were * needed to send it. */ - ieee80211_ratectl_tx_complete(ni->ni_vap, - ni, - IEEE80211_RATECTL_TX_SUCCESS, - &ackfailcnt, - NULL); + txs->status = IEEE80211_RATECTL_TX_SUCCESS; } + ieee80211_ratectl_tx_complete(ni, txs); } bitmap = 0; Modified: head/sys/dev/iwn/if_iwnvar.h ============================================================================== --- head/sys/dev/iwn/if_iwnvar.h Sun Oct 2 19:39:23 2016 (r306590) +++ head/sys/dev/iwn/if_iwnvar.h Sun Oct 2 20:35:55 2016 (r306591) @@ -238,6 +238,7 @@ struct iwn_softc { struct cdev *sc_cdev; struct mtx sc_mtx; struct ieee80211com sc_ic; + struct ieee80211_ratectl_tx_status sc_txs; u_int sc_flags; #define IWN_FLAG_HAS_OTPROM (1 << 1) Modified: head/sys/dev/otus/if_otus.c ============================================================================== --- head/sys/dev/otus/if_otus.c Sun Oct 2 19:39:23 2016 (r306590) +++ head/sys/dev/otus/if_otus.c Sun Oct 2 20:35:55 2016 (r306591) @@ -2148,14 +2148,18 @@ otus_hw_rate_is_ofdm(struct otus_softc * static void otus_tx_update_ratectl(struct otus_softc *sc, struct ieee80211_node *ni) { - int tx, tx_success, tx_retry; + struct ieee80211_ratectl_tx_stats *txs = &sc->sc_txs; + struct otus_node *on = OTUS_NODE(ni); - tx = OTUS_NODE(ni)->tx_done; - tx_success = OTUS_NODE(ni)->tx_done - OTUS_NODE(ni)->tx_err; - tx_retry = OTUS_NODE(ni)->tx_retries; + txs->flags = IEEE80211_RATECTL_TX_STATS_NODE | + IEEE80211_RATECTL_TX_STATS_RETRIES; + txs->ni = ni; + txs->nframes = on->tx_done; + txs->nsuccess = on->tx_done - on->tx_err; + txs->nretries = on->tx_retries; - ieee80211_ratectl_tx_update(ni->ni_vap, ni, &tx, &tx_success, - &tx_retry); + ieee80211_ratectl_tx_update(ni->ni_vap, txs); + on->tx_done = on->tx_err = on->tx_retries = 0; } /* Modified: head/sys/dev/otus/if_otusreg.h ============================================================================== --- head/sys/dev/otus/if_otusreg.h Sun Oct 2 19:39:23 2016 (r306590) +++ head/sys/dev/otus/if_otusreg.h Sun Oct 2 20:35:55 2016 (r306591) @@ -997,6 +997,7 @@ struct otus_vap { struct otus_softc { struct ieee80211com sc_ic; + struct ieee80211_ratectl_tx_stats sc_txs; struct mbufq sc_snd; device_t sc_dev; struct usb_device *sc_udev; Modified: head/sys/dev/ral/if_ral_pci.c ============================================================================== --- head/sys/dev/ral/if_ral_pci.c Sun Oct 2 19:39:23 2016 (r306590) +++ head/sys/dev/ral/if_ral_pci.c Sun Oct 2 20:35:55 2016 (r306591) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: head/sys/dev/ral/rt2560.c ============================================================================== --- head/sys/dev/ral/rt2560.c Sun Oct 2 19:39:23 2016 (r306590) +++ head/sys/dev/ral/rt2560.c Sun Oct 2 20:35:55 2016 (r306591) @@ -911,17 +911,18 @@ rt2560_encryption_intr(struct rt2560_sof static void rt2560_tx_intr(struct rt2560_softc *sc) { + struct ieee80211_ratectl_tx_status *txs = &sc->sc_txs; struct rt2560_tx_desc *desc; struct rt2560_tx_data *data; struct mbuf *m; - struct ieee80211vap *vap; struct ieee80211_node *ni; uint32_t flags; - int retrycnt, status; + int status; bus_dmamap_sync(sc->txq.desc_dmat, sc->txq.desc_map, BUS_DMASYNC_POSTREAD); + txs->flags = IEEE80211_RATECTL_STATUS_LONG_RETRY; for (;;) { desc = &sc->txq.desc[sc->txq.next]; data = &sc->txq.data[sc->txq.next]; @@ -934,41 +935,37 @@ rt2560_tx_intr(struct rt2560_softc *sc) m = data->m; ni = data->ni; - vap = ni->ni_vap; switch (flags & RT2560_TX_RESULT_MASK) { case RT2560_TX_SUCCESS: - retrycnt = 0; + txs->status = IEEE80211_RATECTL_TX_SUCCESS; + txs->long_retries = 0; DPRINTFN(sc, 10, "%s\n", "data frame sent successfully"); if (data->rix != IEEE80211_FIXED_RATE_NONE) - ieee80211_ratectl_tx_complete(vap, ni, - IEEE80211_RATECTL_TX_SUCCESS, - &retrycnt, NULL); + ieee80211_ratectl_tx_complete(ni, txs); status = 0; break; case RT2560_TX_SUCCESS_RETRY: - retrycnt = RT2560_TX_RETRYCNT(flags); + txs->status = IEEE80211_RATECTL_TX_SUCCESS; + txs->long_retries = RT2560_TX_RETRYCNT(flags); DPRINTFN(sc, 9, "data frame sent after %u retries\n", - retrycnt); + txs->long_retries); if (data->rix != IEEE80211_FIXED_RATE_NONE) - ieee80211_ratectl_tx_complete(vap, ni, - IEEE80211_RATECTL_TX_SUCCESS, - &retrycnt, NULL); + ieee80211_ratectl_tx_complete(ni, txs); status = 0; break; case RT2560_TX_FAIL_RETRY: - retrycnt = RT2560_TX_RETRYCNT(flags); + txs->status = IEEE80211_RATECTL_TX_FAIL_LONG; + txs->long_retries = RT2560_TX_RETRYCNT(flags); DPRINTFN(sc, 9, "data frame failed after %d retries\n", - retrycnt); + txs->long_retries); if (data->rix != IEEE80211_FIXED_RATE_NONE) - ieee80211_ratectl_tx_complete(vap, ni, - IEEE80211_RATECTL_TX_FAILURE, - &retrycnt, NULL); + ieee80211_ratectl_tx_complete(ni, txs); status = 1; break; Modified: head/sys/dev/ral/rt2560var.h ============================================================================== --- head/sys/dev/ral/rt2560var.h Sun Oct 2 19:39:23 2016 (r306590) +++ head/sys/dev/ral/rt2560var.h Sun Oct 2 20:35:55 2016 (r306591) @@ -105,6 +105,7 @@ struct rt2560_vap { struct rt2560_softc { struct ieee80211com sc_ic; + struct ieee80211_ratectl_tx_status sc_txs; struct mtx sc_mtx; struct mbufq sc_snd; device_t sc_dev; Modified: head/sys/dev/ral/rt2661.c ============================================================================== --- head/sys/dev/ral/rt2661.c Sun Oct 2 19:39:23 2016 (r306590) +++ head/sys/dev/ral/rt2661.c Sun Oct 2 20:35:55 2016 (r306591) @@ -851,12 +851,13 @@ rt2661_eeprom_read(struct rt2661_softc * static void rt2661_tx_intr(struct rt2661_softc *sc) { + struct ieee80211_ratectl_tx_status *txs = &sc->sc_txs; struct rt2661_tx_ring *txq; struct rt2661_tx_data *data; uint32_t val; - int error, qid, retrycnt; - struct ieee80211vap *vap; + int error, qid; + txs->flags = IEEE80211_RATECTL_TX_FAIL_LONG; for (;;) { struct ieee80211_node *ni; struct mbuf *m; @@ -879,31 +880,27 @@ rt2661_tx_intr(struct rt2661_softc *sc) /* if no frame has been sent, ignore */ if (ni == NULL) continue; - else - vap = ni->ni_vap; switch (RT2661_TX_RESULT(val)) { case RT2661_TX_SUCCESS: - retrycnt = RT2661_TX_RETRYCNT(val); + txs->status = IEEE80211_RATECTL_TX_SUCCESS; + txs->long_retries = RT2661_TX_RETRYCNT(val); DPRINTFN(sc, 10, "data frame sent successfully after " - "%d retries\n", retrycnt); + "%d retries\n", txs->long_retries); if (data->rix != IEEE80211_FIXED_RATE_NONE) - ieee80211_ratectl_tx_complete(vap, ni, - IEEE80211_RATECTL_TX_SUCCESS, - &retrycnt, NULL); + ieee80211_ratectl_tx_complete(ni, txs); error = 0; break; case RT2661_TX_RETRY_FAIL: - retrycnt = RT2661_TX_RETRYCNT(val); + txs->status = IEEE80211_RATECTL_TX_FAIL_LONG; + txs->long_retries = RT2661_TX_RETRYCNT(val); DPRINTFN(sc, 9, "%s\n", "sending data frame failed (too much retries)"); if (data->rix != IEEE80211_FIXED_RATE_NONE) - ieee80211_ratectl_tx_complete(vap, ni, - IEEE80211_RATECTL_TX_FAILURE, - &retrycnt, NULL); + ieee80211_ratectl_tx_complete(ni, txs); error = 1; break; Modified: head/sys/dev/ral/rt2661var.h ============================================================================== --- head/sys/dev/ral/rt2661var.h Sun Oct 2 19:39:23 2016 (r306590) +++ head/sys/dev/ral/rt2661var.h Sun Oct 2 20:35:55 2016 (r306591) @@ -98,6 +98,7 @@ struct rt2661_vap { struct rt2661_softc { struct ieee80211com sc_ic; + struct ieee80211_ratectl_tx_status sc_txs; struct mtx sc_mtx; struct mbufq sc_snd; device_t sc_dev; Modified: head/sys/dev/ral/rt2860.c ============================================================================== --- head/sys/dev/ral/rt2860.c Sun Oct 2 19:39:23 2016 (r306590) +++ head/sys/dev/ral/rt2860.c Sun Oct 2 20:35:55 2016 (r306591) @@ -1083,12 +1083,13 @@ rt2860_intr_coherent(struct rt2860_softc static void rt2860_drain_stats_fifo(struct rt2860_softc *sc) { + struct ieee80211_ratectl_tx_status *txs = &sc->sc_txs; struct ieee80211_node *ni; uint32_t stat; - int retrycnt; uint8_t wcid, mcs, pid; /* drain Tx status FIFO (maxsize = 16) */ + txs->flags = IEEE80211_RATECTL_STATUS_LONG_RETRY; while ((stat = RAL_READ(sc, RT2860_TX_STAT_FIFO)) & RT2860_TXQ_VLD) { DPRINTFN(4, ("tx stat 0x%08x\n", stat)); @@ -1110,14 +1111,15 @@ rt2860_drain_stats_fifo(struct rt2860_so mcs = (stat >> RT2860_TXQ_MCS_SHIFT) & 0x7f; pid = (stat >> RT2860_TXQ_PID_SHIFT) & 0xf; if (mcs + 1 != pid) - retrycnt = 1; + txs->long_retries = 1; else - retrycnt = 0; - ieee80211_ratectl_tx_complete(ni->ni_vap, ni, - IEEE80211_RATECTL_TX_SUCCESS, &retrycnt, NULL); + txs->long_retries = 0; + txs->status = IEEE80211_RATECTL_TX_SUCCESS; + ieee80211_ratectl_tx_complete(ni, txs); } else { - ieee80211_ratectl_tx_complete(ni->ni_vap, ni, - IEEE80211_RATECTL_TX_FAILURE, &retrycnt, NULL); + txs->status = IEEE80211_RATECTL_TX_FAIL_UNSPECIFIED; + txs->long_retries = 1; /* XXX */ + ieee80211_ratectl_tx_complete(ni, txs); if_inc_counter(ni->ni_vap->iv_ifp, IFCOUNTER_OERRORS, 1); } Modified: head/sys/dev/ral/rt2860var.h ============================================================================== --- head/sys/dev/ral/rt2860var.h Sun Oct 2 19:39:23 2016 (r306590) +++ head/sys/dev/ral/rt2860var.h Sun Oct 2 20:35:55 2016 (r306591) @@ -116,6 +116,7 @@ struct rt2860_vap { struct rt2860_softc { struct ieee80211com sc_ic; + struct ieee80211_ratectl_tx_status sc_txs; struct mbufq sc_snd; struct mtx sc_mtx; device_t sc_dev; Modified: head/sys/dev/urtwn/if_urtwn.c ============================================================================== --- head/sys/dev/urtwn/if_urtwn.c Sun Oct 2 19:39:23 2016 (r306590) +++ head/sys/dev/urtwn/if_urtwn.c Sun Oct 2 20:35:55 2016 (r306591) @@ -1016,7 +1016,7 @@ static void urtwn_r88e_ratectl_tx_complete(struct urtwn_softc *sc, void *arg) { struct r88e_tx_rpt_ccx *rpt = arg; - struct ieee80211vap *vap; + struct ieee80211_ratectl_tx_status *txs = &sc->sc_txs; struct ieee80211_node *ni; uint8_t macid; int ntries; @@ -1027,19 +1027,28 @@ urtwn_r88e_ratectl_tx_complete(struct ur URTWN_NT_LOCK(sc); ni = sc->node_list[macid]; if (ni != NULL) { - vap = ni->ni_vap; URTWN_DPRINTF(sc, URTWN_DEBUG_INTR, "%s: frame for macid %d was" "%s sent (%d retries)\n", __func__, macid, (rpt->rptb1 & R88E_RPTB1_PKT_OK) ? "" : " not", ntries); - if (rpt->rptb1 & R88E_RPTB1_PKT_OK) { - ieee80211_ratectl_tx_complete(vap, ni, - IEEE80211_RATECTL_TX_SUCCESS, &ntries, NULL); - } else { - ieee80211_ratectl_tx_complete(vap, ni, - IEEE80211_RATECTL_TX_FAILURE, &ntries, NULL); - } + txs->flags = IEEE80211_RATECTL_STATUS_LONG_RETRY | + IEEE80211_RATECTL_STATUS_FINAL_RATE; + txs->long_retries = ntries; + if (rpt->final_rate > URTWN_RIDX_OFDM54) { /* MCS */ + txs->final_rate = + (rpt->final_rate - 12) | IEEE80211_RATE_MCS; + } else + txs->final_rate = ridx2rate[rpt->final_rate]; + if (rpt->rptb1 & R88E_RPTB1_PKT_OK) + txs->status = IEEE80211_RATECTL_TX_SUCCESS; + else if (rpt->rptb2 & R88E_RPTB2_RETRY_OVER) + txs->status = IEEE80211_RATECTL_TX_FAIL_LONG; + else if (rpt->rptb2 & R88E_RPTB2_LIFE_EXPIRE) + txs->status = IEEE80211_RATECTL_TX_FAIL_EXPIRED; + else + txs->status = IEEE80211_RATECTL_TX_FAIL_UNSPECIFIED; + ieee80211_ratectl_tx_complete(ni, txs); } else { URTWN_DPRINTF(sc, URTWN_DEBUG_INTR, "%s: macid %d, ni is NULL\n", __func__, macid); Modified: head/sys/dev/urtwn/if_urtwnreg.h ============================================================================== --- head/sys/dev/urtwn/if_urtwnreg.h Sun Oct 2 19:39:23 2016 (r306590) +++ head/sys/dev/urtwn/if_urtwnreg.h Sun Oct 2 20:35:55 2016 (r306591) @@ -1227,9 +1227,8 @@ struct r88e_tx_rpt_ccx { #define R88E_RPTB2_LIFE_EXPIRE 0x40 #define R88E_RPTB2_RETRY_OVER 0x80 - uint8_t rptb3; - uint8_t rptb4; - uint8_t rptb5; + uint16_t ccx_qtime; + uint8_t final_rate; uint8_t rptb6; #define R88E_RPTB6_QSEL_M 0xf0 #define R88E_RPTB6_QSEL_S 4 Modified: head/sys/dev/urtwn/if_urtwnvar.h ============================================================================== --- head/sys/dev/urtwn/if_urtwnvar.h Sun Oct 2 19:39:23 2016 (r306590) +++ head/sys/dev/urtwn/if_urtwnvar.h Sun Oct 2 20:35:55 2016 (r306591) @@ -136,6 +136,7 @@ union urtwn_rom { struct urtwn_softc { struct ieee80211com sc_ic; + struct ieee80211_ratectl_tx_status sc_txs; struct mbufq sc_snd; device_t sc_dev; struct usb_device *sc_udev; Modified: head/sys/dev/usb/wlan/if_rum.c ============================================================================== --- head/sys/dev/usb/wlan/if_rum.c Sun Oct 2 19:39:23 2016 (r306590) +++ head/sys/dev/usb/wlan/if_rum.c Sun Oct 2 20:35:55 2016 (r306591) @@ -1668,8 +1668,10 @@ rum_tx_data(struct rum_softc *sc, struct rate = tp->ucastrate; else if (m0->m_flags & M_EAPOL) rate = tp->mgmtrate; - else + else { + (void) ieee80211_ratectl_rate(ni, NULL, 0); rate = ni->ni_txrate; + } if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { k = ieee80211_crypto_get_txkey(ni, m0); @@ -3154,9 +3156,8 @@ rum_ratectl_task(void *arg, int pending) struct rum_vap *rvp = arg; struct ieee80211vap *vap = &rvp->vap; struct rum_softc *sc = vap->iv_ic->ic_softc; - struct ieee80211_node *ni; + struct ieee80211_ratectl_tx_stats *txs = &sc->sc_txs; int ok[3], fail; - int sum, success, retrycnt; RUM_LOCK(sc); /* read and clear statistic registers (STA_CSR0 to STA_CSR5) */ @@ -3167,17 +3168,14 @@ rum_ratectl_task(void *arg, int pending) ok[2] = (le32toh(sc->sta[5]) & 0xffff); /* TX ok w/ multiple retries */ fail = (le32toh(sc->sta[5]) >> 16); /* TX retry-fail count */ - success = ok[0] + ok[1] + ok[2]; - sum = success + fail; + txs->flags = IEEE80211_RATECTL_TX_STATS_RETRIES; + txs->nframes = ok[0] + ok[1] + ok[2] + fail; + txs->nsuccess = txs->nframes - fail; /* XXX at least */ - retrycnt = ok[1] + ok[2] * 2 + fail * (rvp->maxretry + 1); + txs->nretries = ok[1] + ok[2] * 2 + fail * (rvp->maxretry + 1); - if (sum != 0) { - ni = ieee80211_ref_node(vap->iv_bss); - ieee80211_ratectl_tx_update(vap, ni, &sum, &ok, &retrycnt); - (void) ieee80211_ratectl_rate(ni, NULL, 0); - ieee80211_free_node(ni); - } + if (txs->nframes != 0) + ieee80211_ratectl_tx_update(vap, txs); /* count TX retry-fail as Tx errors */ if_inc_counter(vap->iv_ifp, IFCOUNTER_OERRORS, fail); Modified: head/sys/dev/usb/wlan/if_rumvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_rumvar.h Sun Oct 2 19:39:23 2016 (r306590) +++ head/sys/dev/usb/wlan/if_rumvar.h Sun Oct 2 20:35:55 2016 (r306591) @@ -110,6 +110,7 @@ enum { struct rum_softc { struct ieee80211com sc_ic; + struct ieee80211_ratectl_tx_stats sc_txs; struct mbufq sc_snd; device_t sc_dev; struct usb_device *sc_udev; Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Sun Oct 2 19:39:23 2016 (r306590) +++ head/sys/dev/usb/wlan/if_run.c Sun Oct 2 20:35:55 2016 (r306591) @@ -2552,11 +2552,12 @@ static void run_iter_func(void *arg, struct ieee80211_node *ni) { struct run_softc *sc = arg; + struct ieee80211_ratectl_tx_stats *txs = &sc->sc_txs; struct ieee80211vap *vap = ni->ni_vap; struct run_node *rn = RUN_NODE(ni); union run_stats sta[2]; uint16_t (*wstat)[3]; - int txcnt, success, retrycnt, error; + int error; RUN_LOCK(sc); @@ -2565,6 +2566,9 @@ run_iter_func(void *arg, struct ieee8021 ni != vap->iv_bss) goto fail; + txs->flags = IEEE80211_RATECTL_TX_STATS_NODE | + IEEE80211_RATECTL_TX_STATS_RETRIES; + txs->ni = ni; if (sc->rvp_cnt <= 1 && (vap->iv_opmode == IEEE80211_M_IBSS || vap->iv_opmode == IEEE80211_M_STA)) { /* read statistic counters (clear on read) and update AMRR state */ @@ -2577,12 +2581,15 @@ run_iter_func(void *arg, struct ieee8021 if_inc_counter(vap->iv_ifp, IFCOUNTER_OERRORS, le16toh(sta[0].error.fail)); - retrycnt = le16toh(sta[1].tx.retry); - success = le16toh(sta[1].tx.success); - txcnt = retrycnt + success + le16toh(sta[0].error.fail); + txs->nretries = le16toh(sta[1].tx.retry); + txs->nsuccess = le16toh(sta[1].tx.success); + /* nretries??? */ + txs->nframes = txs->nretries + txs->nsuccess + + le16toh(sta[0].error.fail); DPRINTFN(3, "retrycnt=%d success=%d failcnt=%d\n", - retrycnt, success, le16toh(sta[0].error.fail)); + txs->nretries, txs->nsuccess, + le16toh(sta[0].error.fail)); } else { wstat = &(sc->wcid_stats[RUN_AID2WCID(ni->ni_associd)]); @@ -2590,16 +2597,16 @@ run_iter_func(void *arg, struct ieee8021 wstat > &(sc->wcid_stats[RT2870_WCID_MAX])) goto fail; - txcnt = (*wstat)[RUN_TXCNT]; - success = (*wstat)[RUN_SUCCESS]; - retrycnt = (*wstat)[RUN_RETRY]; + txs->nretries = (*wstat)[RUN_RETRY]; + txs->nsuccess = (*wstat)[RUN_SUCCESS]; + txs->nframes = (*wstat)[RUN_TXCNT]; DPRINTFN(3, "retrycnt=%d txcnt=%d success=%d\n", - retrycnt, txcnt, success); + txs->nretries, txs->nframes, txs->nsuccess); memset(wstat, 0, sizeof(*wstat)); } - ieee80211_ratectl_tx_update(vap, ni, &txcnt, &success, &retrycnt); + ieee80211_ratectl_tx_update(vap, txs); rn->amrr_ridx = ieee80211_ratectl_rate(ni, NULL, 0); fail: Modified: head/sys/dev/usb/wlan/if_runvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_runvar.h Sun Oct 2 19:39:23 2016 (r306590) +++ head/sys/dev/usb/wlan/if_runvar.h Sun Oct 2 20:35:55 2016 (r306591) @@ -159,6 +159,7 @@ struct run_endpoint_queue { struct run_softc { struct mtx sc_mtx; struct ieee80211com sc_ic; + struct ieee80211_ratectl_tx_stats sc_txs; struct mbufq sc_snd; device_t sc_dev; struct usb_device *sc_udev; Modified: head/sys/dev/usb/wlan/if_ural.c ============================================================================== --- head/sys/dev/usb/wlan/if_ural.c Sun Oct 2 19:39:23 2016 (r306590) +++ head/sys/dev/usb/wlan/if_ural.c Sun Oct 2 20:35:55 2016 (r306591) @@ -1254,8 +1254,10 @@ ural_tx_data(struct ural_softc *sc, stru rate = tp->mcastrate; else if (tp->ucastrate != IEEE80211_FIXED_RATE_NONE) rate = tp->ucastrate; - else + else { + (void) ieee80211_ratectl_rate(ni, NULL, 0); rate = ni->ni_txrate; + } if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { k = ieee80211_crypto_encap(ni, m0); @@ -2208,32 +2210,29 @@ ural_ratectl_task(void *arg, int pending { struct ural_vap *uvp = arg; struct ieee80211vap *vap = &uvp->vap; - struct ieee80211com *ic = vap->iv_ic; - struct ural_softc *sc = ic->ic_softc; - struct ieee80211_node *ni; - int ok, fail; - int sum, retrycnt; + struct ural_softc *sc = vap->iv_ic->ic_softc; + struct ieee80211_ratectl_tx_stats *txs = &sc->sc_txs; + int fail; - ni = ieee80211_ref_node(vap->iv_bss); RAL_LOCK(sc); /* read and clear statistic registers (STA_CSR0 to STA_CSR10) */ ural_read_multi(sc, RAL_STA_CSR0, sc->sta, sizeof(sc->sta)); - ok = sc->sta[7] + /* TX ok w/o retry */ - sc->sta[8]; /* TX ok w/ retry */ + txs->flags = IEEE80211_RATECTL_TX_STATS_RETRIES; + txs->nsuccess = sc->sta[7] + /* TX ok w/o retry */ + sc->sta[8]; /* TX ok w/ retry */ fail = sc->sta[9]; /* TX retry-fail count */ - sum = ok+fail; - retrycnt = sc->sta[8] + fail; + txs->nframes = txs->nsuccess + fail; + /* XXX fail * maxretry */ + txs->nretries = sc->sta[8] + fail; - ieee80211_ratectl_tx_update(vap, ni, &sum, &ok, &retrycnt); - (void) ieee80211_ratectl_rate(ni, NULL, 0); + ieee80211_ratectl_tx_update(vap, txs); /* count TX retry-fail as Tx errors */ - if_inc_counter(ni->ni_vap->iv_ifp, IFCOUNTER_OERRORS, fail); + if_inc_counter(vap->iv_ifp, IFCOUNTER_OERRORS, fail); usb_callout_reset(&uvp->ratectl_ch, hz, ural_ratectl_timeout, uvp); RAL_UNLOCK(sc); - ieee80211_free_node(ni); } static int Modified: head/sys/dev/usb/wlan/if_uralvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_uralvar.h Sun Oct 2 19:39:23 2016 (r306590) +++ head/sys/dev/usb/wlan/if_uralvar.h Sun Oct 2 20:35:55 2016 (r306591) @@ -90,6 +90,7 @@ enum { struct ural_softc { struct ieee80211com sc_ic; + struct ieee80211_ratectl_tx_stats sc_txs; struct mbufq sc_snd; device_t sc_dev; struct usb_device *sc_udev; Modified: head/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- head/sys/dev/usb/wlan/if_zyd.c Sun Oct 2 19:39:23 2016 (r306590) +++ head/sys/dev/usb/wlan/if_zyd.c Sun Oct 2 20:35:55 2016 (r306591) @@ -662,12 +662,24 @@ zyd_intr_read_callback(struct usb_xfer * */ ni = ieee80211_find_txnode(vap, retry->macaddr); if (ni != NULL) { + struct ieee80211_ratectl_tx_status *txs = + &sc->sc_txs; int retrycnt = (int)(le16toh(retry->count) & 0xff); - - ieee80211_ratectl_tx_complete(vap, ni, - IEEE80211_RATECTL_TX_FAILURE, - &retrycnt, NULL); + + txs->flags = + IEEE80211_RATECTL_STATUS_LONG_RETRY; + txs->long_retries = retrycnt; + if (le16toh(retry->count) & 0x100) { + txs->status = + IEEE80211_RATECTL_TX_FAIL_LONG; + } else { + txs->status = + IEEE80211_RATECTL_TX_SUCCESS; + } + + + ieee80211_ratectl_tx_complete(ni, txs); ieee80211_free_node(ni); } if (le16toh(retry->count) & 0x100) Modified: head/sys/dev/usb/wlan/if_zydreg.h ============================================================================== --- head/sys/dev/usb/wlan/if_zydreg.h Sun Oct 2 19:39:23 2016 (r306590) +++ head/sys/dev/usb/wlan/if_zydreg.h Sun Oct 2 20:35:55 2016 (r306591) @@ -1254,6 +1254,7 @@ enum { struct zyd_softc { struct ieee80211com sc_ic; + struct ieee80211_ratectl_tx_status sc_txs; struct mbufq sc_snd; device_t sc_dev; struct usb_device *sc_udev; Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Oct 2 19:39:23 2016 (r306590) +++ head/sys/dev/wpi/if_wpi.c Sun Oct 2 20:35:55 2016 (r306591) @@ -526,6 +526,10 @@ wpi_attach(device_t dev) wpi_radiotap_attach(sc); + /* Setup Tx status flags (constant). */ + sc->sc_txs.flags = IEEE80211_RATECTL_STATUS_SHORT_RETRY | + IEEE80211_RATECTL_STATUS_LONG_RETRY; + callout_init_mtx(&sc->calib_to, &sc->rxon_mtx, 0); callout_init_mtx(&sc->scan_timeout, &sc->rxon_mtx, 0); callout_init_mtx(&sc->tx_timeout, &sc->txq_state_mtx, 0); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Oct 2 20:48:13 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62828AF189A; Sun, 2 Oct 2016 20:48:13 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29107192; Sun, 2 Oct 2016 20:48:13 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u92KmCMK049351; Sun, 2 Oct 2016 20:48:12 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u92KmCY1049350; Sun, 2 Oct 2016 20:48:12 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201610022048.u92KmCY1049350@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sun, 2 Oct 2016 20:48:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306592 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 20:48:13 -0000 Author: avos Date: Sun Oct 2 20:48:12 2016 New Revision: 306592 URL: https://svnweb.freebsd.org/changeset/base/306592 Log: Bump __FreeBSD_version for net80211(4) changes (r306590, r306591). Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sun Oct 2 20:35:55 2016 (r306591) +++ head/sys/sys/param.h Sun Oct 2 20:48:12 2016 (r306592) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1200011 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200012 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@freebsd.org Sun Oct 2 21:06:56 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76FCEAC64FB; Sun, 2 Oct 2016 21:06:56 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B09A686; Sun, 2 Oct 2016 21:06:56 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u92L6tZX056822; Sun, 2 Oct 2016 21:06:55 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u92L6t0a056821; Sun, 2 Oct 2016 21:06:55 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201610022106.u92L6t0a056821@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sun, 2 Oct 2016 21:06:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306593 - stable/11/sys/net X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 21:06:56 -0000 Author: kp Date: Sun Oct 2 21:06:55 2016 New Revision: 306593 URL: https://svnweb.freebsd.org/changeset/base/306593 Log: MFC r306289: bridge: Fix fragment handling and memory leak Fragmented UDP and ICMP packets were corrupted if a firewall with reassembling feature (like pf'scrub) is enabled on the bridge. This patch fixes corrupted packet problem and the panic (triggered easly with low RAM) as explain in PR 185633. bridge_pfil and bridge_fragment relationship: bridge_pfil() receive (IN direction) packets and sent it to the firewall The firewall can be configured for reassembling fragmented packet (like pf'scrubing) in one mbuf chain when bridge_pfil() need to send this reassembled packet to the outgoing interface, it needs to re-fragment it by using bridge_fragment() bridge_fragment() had to split this mbuf (using ip_fragment) first then had to M_PREPEND each packet in the mbuf chain for adding Ethernet header. But M_PREPEND can sometime create a new mbuf on the begining of the mbuf chain, then the "main" pointer of this mbuf chain should be updated and this case is tottaly forgotten. The original bridge_fragment code (Revision 158140, 2006 April 29) came from OpenBSD, and the call to bridge_enqueue was embedded. But on FreeBSD, bridge_enqueue() is done after bridge_fragment(), then the original OpenBSD code can't work as-it of FreeBSD. PR: 185633 Submitted by: Olivier Cochard-Labbé Modified: stable/11/sys/net/if_bridge.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/if_bridge.c ============================================================================== --- stable/11/sys/net/if_bridge.c Sun Oct 2 20:48:12 2016 (r306592) +++ stable/11/sys/net/if_bridge.c Sun Oct 2 21:06:55 2016 (r306593) @@ -333,7 +333,7 @@ static int bridge_ip_checkbasic(struct m #ifdef INET6 static int bridge_ip6_checkbasic(struct mbuf **mp); #endif /* INET6 */ -static int bridge_fragment(struct ifnet *, struct mbuf *, +static int bridge_fragment(struct ifnet *, struct mbuf **mp, struct ether_header *, int, struct llc *); static void bridge_linkstate(struct ifnet *ifp); static void bridge_linkcheck(struct bridge_softc *sc); @@ -1917,6 +1917,7 @@ bridge_enqueue(struct bridge_softc *sc, m->m_flags &= ~M_VLANTAG; } + M_ASSERTPKTHDR(m); /* We shouldn't transmit mbuf without pkthdr */ if ((err = dst_ifp->if_transmit(dst_ifp, m))) { m_freem(m0); if_inc_counter(sc->sc_ifp, IFCOUNTER_OERRORS, 1); @@ -3234,10 +3235,12 @@ bridge_pfil(struct mbuf **mp, struct ifn break; /* check if we need to fragment the packet */ + /* bridge_fragment generates a mbuf chain of packets */ + /* that already include eth headers */ if (V_pfil_member && ifp != NULL && dir == PFIL_OUT) { i = (*mp)->m_pkthdr.len; if (i > ifp->if_mtu) { - error = bridge_fragment(ifp, *mp, &eh2, snap, + error = bridge_fragment(ifp, mp, &eh2, snap, &llc1); return (error); } @@ -3476,56 +3479,77 @@ bad: /* * bridge_fragment: * - * Return a fragmented mbuf chain. + * Fragment mbuf chain in multiple packets and prepend ethernet header. */ static int -bridge_fragment(struct ifnet *ifp, struct mbuf *m, struct ether_header *eh, +bridge_fragment(struct ifnet *ifp, struct mbuf **mp, struct ether_header *eh, int snap, struct llc *llc) { - struct mbuf *m0; + struct mbuf *m = *mp, *nextpkt = NULL, *mprev = NULL, *mcur = NULL; struct ip *ip; int error = -1; if (m->m_len < sizeof(struct ip) && (m = m_pullup(m, sizeof(struct ip))) == NULL) - goto out; + goto dropit; ip = mtod(m, struct ip *); m->m_pkthdr.csum_flags |= CSUM_IP; error = ip_fragment(ip, &m, ifp->if_mtu, ifp->if_hwassist); if (error) - goto out; + goto dropit; - /* walk the chain and re-add the Ethernet header */ - for (m0 = m; m0; m0 = m0->m_nextpkt) { - if (error == 0) { - if (snap) { - M_PREPEND(m0, sizeof(struct llc), M_NOWAIT); - if (m0 == NULL) { - error = ENOBUFS; - continue; - } - bcopy(llc, mtod(m0, caddr_t), - sizeof(struct llc)); - } - M_PREPEND(m0, ETHER_HDR_LEN, M_NOWAIT); - if (m0 == NULL) { + /* + * Walk the chain and re-add the Ethernet header for + * each mbuf packet. + */ + for (mcur = m; mcur; mcur = mcur->m_nextpkt) { + nextpkt = mcur->m_nextpkt; + mcur->m_nextpkt = NULL; + if (snap) { + M_PREPEND(mcur, sizeof(struct llc), M_NOWAIT); + if (mcur == NULL) { error = ENOBUFS; - continue; + if (mprev != NULL) + mprev->m_nextpkt = nextpkt; + goto dropit; } - bcopy(eh, mtod(m0, caddr_t), ETHER_HDR_LEN); - } else - m_freem(m); - } + bcopy(llc, mtod(mcur, caddr_t),sizeof(struct llc)); + } + + M_PREPEND(mcur, ETHER_HDR_LEN, M_NOWAIT); + if (mcur == NULL) { + error = ENOBUFS; + if (mprev != NULL) + mprev->m_nextpkt = nextpkt; + goto dropit; + } + bcopy(eh, mtod(mcur, caddr_t), ETHER_HDR_LEN); - if (error == 0) - KMOD_IPSTAT_INC(ips_fragmented); + /* + * The previous two M_PREPEND could have inserted one or two + * mbufs in front so we have to update the previous packet's + * m_nextpkt. + */ + mcur->m_nextpkt = nextpkt; + if (mprev != NULL) + mprev->m_nextpkt = mcur; + else { + /* The first mbuf in the original chain needs to be + * updated. */ + *mp = mcur; + } + mprev = mcur; + } + KMOD_IPSTAT_INC(ips_fragmented); return (error); -out: - if (m != NULL) - m_freem(m); +dropit: + for (mcur = *mp; mcur; mcur = m) { /* droping the full packet chain */ + m = mcur->m_nextpkt; + m_freem(mcur); + } return (error); } From owner-svn-src-all@freebsd.org Sun Oct 2 21:11:26 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ECE23AC6798; Sun, 2 Oct 2016 21:11:26 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC57DA89; Sun, 2 Oct 2016 21:11:26 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u92LBP95058329; Sun, 2 Oct 2016 21:11:25 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u92LBP1f058328; Sun, 2 Oct 2016 21:11:25 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201610022111.u92LBP1f058328@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sun, 2 Oct 2016 21:11:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306594 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 21:11:27 -0000 Author: kp Date: Sun Oct 2 21:11:25 2016 New Revision: 306594 URL: https://svnweb.freebsd.org/changeset/base/306594 Log: MFC r306289: bridge: Fix fragment handling and memory leak Fragmented UDP and ICMP packets were corrupted if a firewall with reassembling feature (like pf'scrub) is enabled on the bridge. This patch fixes corrupted packet problem and the panic (triggered easly with low RAM) as explain in PR 185633. bridge_pfil and bridge_fragment relationship: bridge_pfil() receive (IN direction) packets and sent it to the firewall The firewall can be configured for reassembling fragmented packet (like pf'scrubing) in one mbuf chain when bridge_pfil() need to send this reassembled packet to the outgoing interface, it needs to re-fragment it by using bridge_fragment() bridge_fragment() had to split this mbuf (using ip_fragment) first then had to M_PREPEND each packet in the mbuf chain for adding Ethernet header. But M_PREPEND can sometime create a new mbuf on the begining of the mbuf chain, then the "main" pointer of this mbuf chain should be updated and this case is tottaly forgotten. The original bridge_fragment code (Revision 158140, 2006 April 29) came from OpenBSD, and the call to bridge_enqueue was embedded. But on FreeBSD, bridge_enqueue() is done after bridge_fragment(), then the original OpenBSD code can't work as-it of FreeBSD. PR: 185633 Submitted by: Olivier Cochard-Labbé Modified: stable/10/sys/net/if_bridge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/if_bridge.c ============================================================================== --- stable/10/sys/net/if_bridge.c Sun Oct 2 21:06:55 2016 (r306593) +++ stable/10/sys/net/if_bridge.c Sun Oct 2 21:11:25 2016 (r306594) @@ -331,7 +331,7 @@ static int bridge_ip_checkbasic(struct m #ifdef INET6 static int bridge_ip6_checkbasic(struct mbuf **mp); #endif /* INET6 */ -static int bridge_fragment(struct ifnet *, struct mbuf *, +static int bridge_fragment(struct ifnet *, struct mbuf **mp, struct ether_header *, int, struct llc *); static void bridge_linkstate(struct ifnet *ifp); static void bridge_linkcheck(struct bridge_softc *sc); @@ -1862,6 +1862,7 @@ bridge_enqueue(struct bridge_softc *sc, m->m_flags &= ~M_VLANTAG; } + M_ASSERTPKTHDR(m); /* We shouldn't transmit mbuf without pkthdr */ if ((err = dst_ifp->if_transmit(dst_ifp, m))) { m_freem(m0); sc->sc_ifp->if_oerrors++; @@ -3177,10 +3178,12 @@ bridge_pfil(struct mbuf **mp, struct ifn break; /* check if we need to fragment the packet */ + /* bridge_fragment generates a mbuf chain of packets */ + /* that already include eth headers */ if (pfil_member && ifp != NULL && dir == PFIL_OUT) { i = (*mp)->m_pkthdr.len; if (i > ifp->if_mtu) { - error = bridge_fragment(ifp, *mp, &eh2, snap, + error = bridge_fragment(ifp, mp, &eh2, snap, &llc1); return (error); } @@ -3419,56 +3422,77 @@ bad: /* * bridge_fragment: * - * Return a fragmented mbuf chain. + * Fragment mbuf chain in multiple packets and prepend ethernet header. */ static int -bridge_fragment(struct ifnet *ifp, struct mbuf *m, struct ether_header *eh, +bridge_fragment(struct ifnet *ifp, struct mbuf **mp, struct ether_header *eh, int snap, struct llc *llc) { - struct mbuf *m0; + struct mbuf *m = *mp, *nextpkt = NULL, *mprev = NULL, *mcur = NULL; struct ip *ip; int error = -1; if (m->m_len < sizeof(struct ip) && (m = m_pullup(m, sizeof(struct ip))) == NULL) - goto out; + goto dropit; ip = mtod(m, struct ip *); m->m_pkthdr.csum_flags |= CSUM_IP; error = ip_fragment(ip, &m, ifp->if_mtu, ifp->if_hwassist); if (error) - goto out; + goto dropit; - /* walk the chain and re-add the Ethernet header */ - for (m0 = m; m0; m0 = m0->m_nextpkt) { - if (error == 0) { - if (snap) { - M_PREPEND(m0, sizeof(struct llc), M_NOWAIT); - if (m0 == NULL) { - error = ENOBUFS; - continue; - } - bcopy(llc, mtod(m0, caddr_t), - sizeof(struct llc)); - } - M_PREPEND(m0, ETHER_HDR_LEN, M_NOWAIT); - if (m0 == NULL) { + /* + * Walk the chain and re-add the Ethernet header for + * each mbuf packet. + */ + for (mcur = m; mcur; mcur = mcur->m_nextpkt) { + nextpkt = mcur->m_nextpkt; + mcur->m_nextpkt = NULL; + if (snap) { + M_PREPEND(mcur, sizeof(struct llc), M_NOWAIT); + if (mcur == NULL) { error = ENOBUFS; - continue; + if (mprev != NULL) + mprev->m_nextpkt = nextpkt; + goto dropit; } - bcopy(eh, mtod(m0, caddr_t), ETHER_HDR_LEN); - } else - m_freem(m); - } + bcopy(llc, mtod(mcur, caddr_t),sizeof(struct llc)); + } + + M_PREPEND(mcur, ETHER_HDR_LEN, M_NOWAIT); + if (mcur == NULL) { + error = ENOBUFS; + if (mprev != NULL) + mprev->m_nextpkt = nextpkt; + goto dropit; + } + bcopy(eh, mtod(mcur, caddr_t), ETHER_HDR_LEN); - if (error == 0) - KMOD_IPSTAT_INC(ips_fragmented); + /* + * The previous two M_PREPEND could have inserted one or two + * mbufs in front so we have to update the previous packet's + * m_nextpkt. + */ + mcur->m_nextpkt = nextpkt; + if (mprev != NULL) + mprev->m_nextpkt = mcur; + else { + /* The first mbuf in the original chain needs to be + * updated. */ + *mp = mcur; + } + mprev = mcur; + } + KMOD_IPSTAT_INC(ips_fragmented); return (error); -out: - if (m != NULL) - m_freem(m); +dropit: + for (mcur = *mp; mcur; mcur = m) { /* droping the full packet chain */ + m = mcur->m_nextpkt; + m_freem(mcur); + } return (error); } From owner-svn-src-all@freebsd.org Sun Oct 2 23:13:48 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00A18AF2795; Sun, 2 Oct 2016 23:13:48 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7B1E8C6; Sun, 2 Oct 2016 23:13:47 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u92NDlS2006243; Sun, 2 Oct 2016 23:13:47 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u92NDlNC006242; Sun, 2 Oct 2016 23:13:47 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610022313.u92NDlNC006242@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sun, 2 Oct 2016 23:13:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306597 - head/bin/kill X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 23:13:48 -0000 Author: sevan (doc committer) Date: Sun Oct 2 23:13:46 2016 New Revision: 306597 URL: https://svnweb.freebsd.org/changeset/base/306597 Log: In v3 UNIX, the kill utility is documented in category 8, not 1. Add a note of it. http://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man8/kill.8 PR: 211786 Approved by: bcr (mentor) Obtained from: TUHS Differential Revision: https://reviews.freebsd.org/D8105 Modified: head/bin/kill/kill.1 Modified: head/bin/kill/kill.1 ============================================================================== --- head/bin/kill/kill.1 Sun Oct 2 21:14:38 2016 (r306596) +++ head/bin/kill/kill.1 Sun Oct 2 23:13:46 2016 (r306597) @@ -32,7 +32,7 @@ .\" @(#)kill.1 8.2 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd April 28, 1995 +.Dd October 3, 2016 .Dt KILL 1 .Os .Sh NAME @@ -147,7 +147,8 @@ compatible. A .Nm command appeared in -.At v3 . +.At v3 +in section 8 of the manual. .Sh BUGS A replacement for the command .Dq Li kill 0 From owner-svn-src-all@freebsd.org Sun Oct 2 23:19:06 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62F7DAF297A; Sun, 2 Oct 2016 23:19:06 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3387DBB2; Sun, 2 Oct 2016 23:19:06 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u92NJ5o3006468; Sun, 2 Oct 2016 23:19:05 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u92NJ5d1006467; Sun, 2 Oct 2016 23:19:05 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610022319.u92NJ5d1006467@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sun, 2 Oct 2016 23:19:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306598 - head/sbin/ccdconfig X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 23:19:06 -0000 Author: sevan (doc committer) Date: Sun Oct 2 23:19:05 2016 New Revision: 306598 URL: https://svnweb.freebsd.org/changeset/base/306598 Log: ccdconfig first appeared in NetBSD 1.1 From NetBSD man page, confirmed with repo tags in CVS [1] (there was also no 1.0a release according to [2]) [1] http://cvsweb.netbsd.org/bsdweb.cgi/src/sbin/ccdconfig/ccdconfig.c [2] http://netbsd.org/releases/formal.html#history PR: 212437 Approved by: bcr (mentor) Obtained from: NetBSD MFC after: 4 days Differential Revision: https://reviews.freebsd.org/D8105 Modified: head/sbin/ccdconfig/ccdconfig.8 Modified: head/sbin/ccdconfig/ccdconfig.8 ============================================================================== --- head/sbin/ccdconfig/ccdconfig.8 Sun Oct 2 23:13:46 2016 (r306597) +++ head/sbin/ccdconfig/ccdconfig.8 Sun Oct 2 23:19:05 2016 (r306598) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 1, 2013 +.Dd October 3, 2016 .Dt CCDCONFIG 8 .Os .Sh NAME @@ -159,7 +159,7 @@ It reads as a two disk stripe of da4 and to a two disk stripe of da6 and da7. The last example is a simple mirror. -The 2nd slice of /dev/da8 is mirrored with the 3rd slice of /dev/da9 +The second slice of /dev/da8 is mirrored with the third slice of /dev/da9 and assigned to ccd0. .Bd -literal # ccdconfig ccd0 64 none /dev/da0s1 /dev/da1s1 /dev/da2s1 /dev/da3s1 @@ -246,7 +246,7 @@ and The .Nm utility first appeared in -.Nx 1.0a . +.Nx 1.1 . .Sh BUGS The initial disklabel returned by .Xr ccd 4 From owner-svn-src-all@freebsd.org Sun Oct 2 23:26:42 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A5E9AF2BF5; Sun, 2 Oct 2016 23:26:42 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 326FAEE; Sun, 2 Oct 2016 23:26:42 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u92NQfPn010086; Sun, 2 Oct 2016 23:26:41 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u92NQf2q010085; Sun, 2 Oct 2016 23:26:41 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610022326.u92NQf2q010085@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sun, 2 Oct 2016 23:26:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306599 - head/sbin/dmesg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 23:26:42 -0000 Author: sevan (doc committer) Date: Sun Oct 2 23:26:41 2016 New Revision: 306599 URL: https://svnweb.freebsd.org/changeset/base/306599 Log: dmesg(8) first appeared in 3BSD. http://minnie.tuhs.org/cgi-bin/utree.pl?file=3BSD/usr/man/man1/dmesg.1m PR: 212443 Approved by: bcr (mentor) Obtained from: TUHS MFC after: 4 days Differential Revision: https://reviews.freebsd.org/D8105 Modified: head/sbin/dmesg/dmesg.8 Modified: head/sbin/dmesg/dmesg.8 ============================================================================== --- head/sbin/dmesg/dmesg.8 Sun Oct 2 23:19:05 2016 (r306598) +++ head/sbin/dmesg/dmesg.8 Sun Oct 2 23:26:41 2016 (r306599) @@ -28,7 +28,7 @@ .\" @(#)dmesg.8 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd May 9, 2013 +.Dd October 3, 2016 .Dt DMESG 8 .Os .Sh NAME @@ -84,4 +84,4 @@ at startup time The .Nm utility appeared in -.Bx 4.0 . +.Bx 3 . From owner-svn-src-all@freebsd.org Sun Oct 2 23:30:29 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D2B8AF2CB4; Sun, 2 Oct 2016 23:30:29 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B1D12AD; Sun, 2 Oct 2016 23:30:29 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u92NUSPM010279; Sun, 2 Oct 2016 23:30:28 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u92NUSZF010278; Sun, 2 Oct 2016 23:30:28 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610022330.u92NUSZF010278@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sun, 2 Oct 2016 23:30:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306600 - head/sbin/dump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 23:30:29 -0000 Author: sevan (doc committer) Date: Sun Oct 2 23:30:28 2016 New Revision: 306600 URL: https://svnweb.freebsd.org/changeset/base/306600 Log: dump(8) first appeared in V4 UNIX http://minnie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man8 PR: 212444 Approved by: bcr (mentor) Obtained from: TUHS MFC after: 4 days Differential Revision: https://reviews.freebsd.org/D8105 Modified: head/sbin/dump/dump.8 Modified: head/sbin/dump/dump.8 ============================================================================== --- head/sbin/dump/dump.8 Sun Oct 2 23:26:41 2016 (r306599) +++ head/sbin/dump/dump.8 Sun Oct 2 23:30:28 2016 (r306600) @@ -29,7 +29,7 @@ .\" @(#)dump.8 8.3 (Berkeley) 5/1/95 .\" $FreeBSD$ .\" -.Dd February 24, 2006 +.Dd October 3, 2016 .Dt DUMP 8 .Os .Sh NAME @@ -514,7 +514,7 @@ Many, and verbose. A .Nm utility appeared in -.At v6 . +.At v4 . .Sh BUGS Fewer than 32 read errors on the file system are ignored, though all errors will generate a warning message. From owner-svn-src-all@freebsd.org Sun Oct 2 23:35:46 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B036AF2E60; Sun, 2 Oct 2016 23:35:46 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E0A593B; Sun, 2 Oct 2016 23:35:46 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u92NZjKJ013989; Sun, 2 Oct 2016 23:35:45 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u92NZj8q013988; Sun, 2 Oct 2016 23:35:45 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610022335.u92NZj8q013988@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sun, 2 Oct 2016 23:35:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306601 - head/sbin/dumpon X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 23:35:46 -0000 Author: sevan (doc committer) Date: Sun Oct 2 23:35:45 2016 New Revision: 306601 URL: https://svnweb.freebsd.org/changeset/base/306601 Log: dumpon(8) appears to be present in FreeBSD 2.0.5, despite initial import of man page listed FreeBSD 2.1. PR: 212445 Approved by: bcr (mentor) MFC after: 4 days Differential Revision: https://reviews.freebsd.org/D8105 Modified: head/sbin/dumpon/dumpon.8 Modified: head/sbin/dumpon/dumpon.8 ============================================================================== --- head/sbin/dumpon/dumpon.8 Sun Oct 2 23:30:28 2016 (r306600) +++ head/sbin/dumpon/dumpon.8 Sun Oct 2 23:35:45 2016 (r306601) @@ -28,7 +28,7 @@ .\" From: @(#)swapon.8 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd October 8, 2014 +.Dd October 3, 2016 .Dt DUMPON 8 .Os .Sh NAME @@ -154,7 +154,7 @@ boot-time system configuration The .Nm utility appeared in -.Fx 2.1 . +.Fx 2.0.5 . .Sh BUGS Because the file system layer is already dead by the time a crash dump is taken, it is not possible to send crash dumps directly to a file. From owner-svn-src-all@freebsd.org Sun Oct 2 23:40:18 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC9F6AF2F19; Sun, 2 Oct 2016 23:40:18 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BDC8FB31; Sun, 2 Oct 2016 23:40:18 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u92NeH7f014204; Sun, 2 Oct 2016 23:40:17 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u92NeHLB014203; Sun, 2 Oct 2016 23:40:17 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610022340.u92NeHLB014203@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sun, 2 Oct 2016 23:40:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306602 - head/sbin/fsck_msdosfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 23:40:19 -0000 Author: sevan (doc committer) Date: Sun Oct 2 23:40:17 2016 New Revision: 306602 URL: https://svnweb.freebsd.org/changeset/base/306602 Log: Mention the version of NetBSD the utility originated from. PR: 212476 Approved by: bcr (mentor) MFC after: 4 days Differential Revision: https://reviews.freebsd.org/D8105 Modified: head/sbin/fsck_msdosfs/fsck_msdosfs.8 Modified: head/sbin/fsck_msdosfs/fsck_msdosfs.8 ============================================================================== --- head/sbin/fsck_msdosfs/fsck_msdosfs.8 Sun Oct 2 23:35:45 2016 (r306601) +++ head/sbin/fsck_msdosfs/fsck_msdosfs.8 Sun Oct 2 23:40:17 2016 (r306602) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 4, 2009 +.Dd October 3, 2016 .Dt FSCK_MSDOSFS 8 .Os .Sh NAME @@ -114,7 +114,10 @@ as the answer to all operator questions. .Sh HISTORY The .Nm -utility first appeared in +utility appeared in +.Nx 1.2 . +.Nm +first appeared in .Fx 4.4 . .Sh BUGS The From owner-svn-src-all@freebsd.org Sun Oct 2 23:44:54 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1904AAF2199; Sun, 2 Oct 2016 23:44:54 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E04D0F48; Sun, 2 Oct 2016 23:44:53 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u92Nir8l017682; Sun, 2 Oct 2016 23:44:53 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u92Nirf9017681; Sun, 2 Oct 2016 23:44:53 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610022344.u92Nirf9017681@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sun, 2 Oct 2016 23:44:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306603 - head/sbin/fsdb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 23:44:54 -0000 Author: sevan (doc committer) Date: Sun Oct 2 23:44:52 2016 New Revision: 306603 URL: https://svnweb.freebsd.org/changeset/base/306603 Log: Document which version of BSD first showed up in and add the version info for NetBSD & FreeBSD. PR: 212477 Approved by: bcr (mentor) MFC after: 4 days Differential Revision: https://reviews.freebsd.org/D8105 Modified: head/sbin/fsdb/fsdb.8 Modified: head/sbin/fsdb/fsdb.8 ============================================================================== --- head/sbin/fsdb/fsdb.8 Sun Oct 2 23:40:17 2016 (r306602) +++ head/sbin/fsdb/fsdb.8 Sun Oct 2 23:44:52 2016 (r306603) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 24, 2006 +.Dd October 3, 2016 .Dt FSDB 8 .Os .Sh NAME @@ -239,19 +239,20 @@ Exit the program. .Sh HISTORY The .Nm -utility uses the source code for +utility appeared in +.Bx 4.3 Tahoe . +It used the source code for .Xr fsck 8 to implement most of the file system manipulation code. The remainder of .Nm -first appeared in -.Nx , +appeared in +.Nx 1.1 written by .An John T. Kohl . -.Pp -.An Peter Wemm -ported it to -.Fx . +It first appeared in +.Fx 2.1.5 +ported by Peter Wemm. .Sh BUGS Manipulation of ``short'' symlinks has no effect. In particular, one should not From owner-svn-src-all@freebsd.org Sun Oct 2 23:48:34 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55E5EAF22F1; Sun, 2 Oct 2016 23:48:34 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27180152; Sun, 2 Oct 2016 23:48:34 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u92NmXnq017855; Sun, 2 Oct 2016 23:48:33 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u92NmX8w017854; Sun, 2 Oct 2016 23:48:33 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610022348.u92NmX8w017854@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sun, 2 Oct 2016 23:48:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306604 - head/sbin/gbde X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 23:48:34 -0000 Author: sevan (doc committer) Date: Sun Oct 2 23:48:33 2016 New Revision: 306604 URL: https://svnweb.freebsd.org/changeset/base/306604 Log: gbde first appeared in FreeBSD 5.0 PR: 212478 Approved by: brc (mentor) MFC after: 4 days Differential Revision: https://reviews.freebsd.org/D8105 Modified: head/sbin/gbde/gbde.8 Modified: head/sbin/gbde/gbde.8 ============================================================================== --- head/sbin/gbde/gbde.8 Sun Oct 2 23:44:52 2016 (r306603) +++ head/sbin/gbde/gbde.8 Sun Oct 2 23:48:33 2016 (r306604) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 27, 2014 +.Dd October 3, 2016 .Dt GBDE 8 .Os .Sh NAME @@ -263,6 +263,9 @@ under DARPA/SPAWAR contract N66001-01-C- .Pq Dq CBOSS , as part of the DARPA CHATS research program. +.Nm +first appeared in +.Fx 5.0 . .Sh AUTHORS .An Poul-Henning Kamp Aq Mt phk@FreeBSD.org .Sh BUGS From owner-svn-src-all@freebsd.org Sun Oct 2 23:51:14 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33060AF23CA; Sun, 2 Oct 2016 23:51:14 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 042BE381; Sun, 2 Oct 2016 23:51:13 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u92NpDKR020030; Sun, 2 Oct 2016 23:51:13 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u92NpDb2020029; Sun, 2 Oct 2016 23:51:13 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610022351.u92NpDb2020029@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sun, 2 Oct 2016 23:51:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306605 - head/sbin/init X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 23:51:14 -0000 Author: sevan (doc committer) Date: Sun Oct 2 23:51:13 2016 New Revision: 306605 URL: https://svnweb.freebsd.org/changeset/base/306605 Log: init was there in UNIX from V1 http://minnie.tuhs.org/cgi-bin/utree.pl?file=V1/init.s PR: 212503 Approved by: bcr (mentor) MFC after: 4 days Differential Revision: https://reviews.freebsd.org/D8105 Modified: head/sbin/init/init.8 Modified: head/sbin/init/init.8 ============================================================================== --- head/sbin/init/init.8 Sun Oct 2 23:48:33 2016 (r306604) +++ head/sbin/init/init.8 Sun Oct 2 23:51:13 2016 (r306605) @@ -31,7 +31,7 @@ .\" @(#)init.8 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd July 24, 2015 +.Dd October 3, 2016 .Dt INIT 8 .Os .Sh NAME @@ -345,7 +345,7 @@ a persistent device error condition. An .Nm utility appeared in -.At v6 . +.At v1 . .Sh CAVEATS Systems without .Xr sysctl 8 From owner-svn-src-all@freebsd.org Sun Oct 2 23:56:09 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A3E5AF255F; Sun, 2 Oct 2016 23:56:09 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0AC91953; Sun, 2 Oct 2016 23:56:08 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u92Nu8CP021517; Sun, 2 Oct 2016 23:56:08 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u92Nu8Ed021516; Sun, 2 Oct 2016 23:56:08 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610022356.u92Nu8Ed021516@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sun, 2 Oct 2016 23:56:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306606 - head/sbin/mknod X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 23:56:09 -0000 Author: sevan (doc committer) Date: Sun Oct 2 23:56:08 2016 New Revision: 306606 URL: https://svnweb.freebsd.org/changeset/base/306606 Log: mknod appeared in V4 UNIX http://minnie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man8/mknod.8 PR: 212509 Approved by: bcr (mentor) MFC after: 4 days Differential Revision: https://reviews.freebsd.org/D8105 Modified: head/sbin/mknod/mknod.8 Modified: head/sbin/mknod/mknod.8 ============================================================================== --- head/sbin/mknod/mknod.8 Sun Oct 2 23:51:13 2016 (r306605) +++ head/sbin/mknod/mknod.8 Sun Oct 2 23:56:08 2016 (r306606) @@ -28,7 +28,7 @@ .\" @(#)mknod.8 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd January 31, 2010 +.Dd October 3, 2016 .Dt MKNOD 8 .Os .Sh NAME @@ -149,4 +149,4 @@ nodes cannot be used to access devices. A .Nm utility appeared in -.At v6 . +.At v4 . From owner-svn-src-all@freebsd.org Sun Oct 2 23:59:32 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FBB2AF2865; Sun, 2 Oct 2016 23:59:32 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 429F0B2A; Sun, 2 Oct 2016 23:59:32 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u92NxVMF021678; Sun, 2 Oct 2016 23:59:31 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u92NxV7d021677; Sun, 2 Oct 2016 23:59:31 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610022359.u92NxV7d021677@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sun, 2 Oct 2016 23:59:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306607 - head/sbin/mksnap_ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 23:59:32 -0000 Author: sevan (doc committer) Date: Sun Oct 2 23:59:31 2016 New Revision: 306607 URL: https://svnweb.freebsd.org/changeset/base/306607 Log: mksnap_ffs appeared in FreeBSD 5.1. PR: 212510 Approved by: bcr (mentor) MFC after: 4 days Differential Revision: https://reviews.freebsd.org/D8105 Modified: head/sbin/mksnap_ffs/mksnap_ffs.8 Modified: head/sbin/mksnap_ffs/mksnap_ffs.8 ============================================================================== --- head/sbin/mksnap_ffs/mksnap_ffs.8 Sun Oct 2 23:56:08 2016 (r306606) +++ head/sbin/mksnap_ffs/mksnap_ffs.8 Sun Oct 2 23:59:31 2016 (r306607) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 14, 2011 +.Dd October 3, 2016 .Dt MKSNAP_FFS 8 .Os .Sh NAME @@ -75,7 +75,7 @@ mount -o ro /dev/md0 /mnt/ The .Nm utility first appeared in -.Fx 5.0 . +.Fx 5.1 . .Sh CAVEATS The disk full situation is not handled gracefully and may lead to a system panic when no free blocks are found. From owner-svn-src-all@freebsd.org Mon Oct 3 00:02:33 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57AB7AF2AA1; Mon, 3 Oct 2016 00:02:33 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A1A4EDF; Mon, 3 Oct 2016 00:02:32 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9302W3i025175; Mon, 3 Oct 2016 00:02:32 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9302WNn025174; Mon, 3 Oct 2016 00:02:32 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201610030002.u9302WNn025174@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 3 Oct 2016 00:02:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306608 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 00:02:33 -0000 Author: mjg Date: Mon Oct 3 00:02:32 2016 New Revision: 306608 URL: https://svnweb.freebsd.org/changeset/base/306608 Log: cache: ignore purgevfs requests for filesystems with few vnodes purgevfs is purely optional and induces lock contention in workloads which frequently mount and unmount filesystems. In particular, poudriere will do this for filesystems with 4 vnodes or less. Full cache scan is clearly wasteful. Since there is no explicit counter for namecache entries, the number of vnodes used by the target fs is checked. The default limit is the number of bucket locks. Reviewed by: kib Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Sun Oct 2 23:59:31 2016 (r306607) +++ head/sys/kern/vfs_cache.c Mon Oct 3 00:02:32 2016 (r306608) @@ -207,6 +207,9 @@ SYSCTL_ULONG(_debug, OID_AUTO, numcacheh u_int ncsizefactor = 2; SYSCTL_UINT(_vfs, OID_AUTO, ncsizefactor, CTLFLAG_RW, &ncsizefactor, 0, "Size factor for namecache"); +static u_int ncpurgeminvnodes; +SYSCTL_UINT(_vfs, OID_AUTO, ncpurgeminvnodes, CTLFLAG_RW, &ncpurgeminvnodes, 0, + "Number of vnodes below which purgevfs ignores the request"); struct nchstats nchstats; /* cache effectiveness statistics */ @@ -1614,6 +1617,7 @@ nchinit(void *dummy __unused) M_WAITOK | M_ZERO); for (i = 0; i < numvnodelocks; i++) mtx_init(&vnodelocks[i], "ncvn", NULL, MTX_DUPOK | MTX_RECURSE); + ncpurgeminvnodes = numbucketlocks; numcalls = counter_u64_alloc(M_WAITOK); dothits = counter_u64_alloc(M_WAITOK); @@ -1764,6 +1768,8 @@ cache_purgevfs(struct mount *mp) /* Scan hash tables for applicable entries */ SDT_PROBE1(vfs, namecache, purgevfs, done, mp); + if (mp->mnt_nvnodelistsize <= ncpurgeminvnodes) + return; TAILQ_INIT(&ncps); n_nchash = nchash + 1; vlp1 = vlp2 = NULL; From owner-svn-src-all@freebsd.org Mon Oct 3 00:10:16 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5F02AF2CD5; Mon, 3 Oct 2016 00:10:16 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8165019A; Mon, 3 Oct 2016 00:10:16 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u930AF9r025497; Mon, 3 Oct 2016 00:10:15 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u930AEKw025485; Mon, 3 Oct 2016 00:10:14 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201610030010.u930AEKw025485@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 3 Oct 2016 00:10:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306609 - in stable/11/sys/fs: nfs nfsclient nfsserver X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 00:10:16 -0000 Author: rmacklem Date: Mon Oct 3 00:10:14 2016 New Revision: 306609 URL: https://svnweb.freebsd.org/changeset/base/306609 Log: MFC: r304026 Update the nfsstats structure to include the changes needed by the patch in D1626 plus changes so that it includes counts for NFSv4.1 (and the draft of NFSv4.2). Also, make all the counts uint64_t and add a vers field at the beginning, so that future revisions can easily be implemented. There is code in place to handle the old vesion of the nfsstats structure for backwards binary compatibility. Subsequent commits will update nfsstat(8) to use the new fields. Modified: stable/11/sys/fs/nfs/nfs_commonkrpc.c stable/11/sys/fs/nfs/nfs_commonport.c stable/11/sys/fs/nfs/nfsport.h stable/11/sys/fs/nfs/nfsproto.h stable/11/sys/fs/nfsclient/nfs_clbio.c stable/11/sys/fs/nfsclient/nfs_clcomsubs.c stable/11/sys/fs/nfsclient/nfs_clstate.c stable/11/sys/fs/nfsclient/nfs_clsubs.c stable/11/sys/fs/nfsclient/nfs_clvfsops.c stable/11/sys/fs/nfsclient/nfs_clvnops.c stable/11/sys/fs/nfsserver/nfs_nfsdcache.c stable/11/sys/fs/nfsserver/nfs_nfsdport.c stable/11/sys/fs/nfsserver/nfs_nfsdsocket.c stable/11/sys/fs/nfsserver/nfs_nfsdstate.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nfs/nfs_commonkrpc.c ============================================================================== --- stable/11/sys/fs/nfs/nfs_commonkrpc.c Mon Oct 3 00:02:32 2016 (r306608) +++ stable/11/sys/fs/nfs/nfs_commonkrpc.c Mon Oct 3 00:10:14 2016 (r306609) @@ -89,7 +89,7 @@ uint32_t nfscl_nfs4_done_probes[NFSV41_N NFSSTATESPINLOCK; NFSREQSPINLOCK; NFSDLOCKMUTEX; -extern struct nfsstats newnfsstats; +extern struct nfsstatsv1 nfsstatsv1; extern struct nfsreqhead nfsd_reqq; extern int nfscl_ticks; extern void (*ncl_call_invalcaches)(struct vnode *); @@ -642,7 +642,7 @@ newnfs_request(struct nfsrv_descript *nd procnum = NFSV4PROC_COMPOUND; if (nmp != NULL) { - NFSINCRGLOBAL(newnfsstats.rpcrequests); + NFSINCRGLOBAL(nfsstatsv1.rpcrequests); /* Map the procnum to the old NFSv2 one, as required. */ if ((nd->nd_flag & ND_NFSV2) != 0) { @@ -762,18 +762,18 @@ tryagain: if (stat == RPC_SUCCESS) { error = 0; } else if (stat == RPC_TIMEDOUT) { - NFSINCRGLOBAL(newnfsstats.rpctimeouts); + NFSINCRGLOBAL(nfsstatsv1.rpctimeouts); error = ETIMEDOUT; } else if (stat == RPC_VERSMISMATCH) { - NFSINCRGLOBAL(newnfsstats.rpcinvalid); + NFSINCRGLOBAL(nfsstatsv1.rpcinvalid); error = EOPNOTSUPP; } else if (stat == RPC_PROGVERSMISMATCH) { - NFSINCRGLOBAL(newnfsstats.rpcinvalid); + NFSINCRGLOBAL(nfsstatsv1.rpcinvalid); error = EPROTONOSUPPORT; } else if (stat == RPC_INTR) { error = EINTR; } else { - NFSINCRGLOBAL(newnfsstats.rpcinvalid); + NFSINCRGLOBAL(nfsstatsv1.rpcinvalid); error = EACCES; } if (error) { Modified: stable/11/sys/fs/nfs/nfs_commonport.c ============================================================================== --- stable/11/sys/fs/nfs/nfs_commonport.c Mon Oct 3 00:02:32 2016 (r306608) +++ stable/11/sys/fs/nfs/nfs_commonport.c Mon Oct 3 00:10:14 2016 (r306609) @@ -58,7 +58,7 @@ extern void (*nfsd_call_recall)(struct v extern int nfsrv_useacl; struct mount nfsv4root_mnt; int newnfs_numnfsd = 0; -struct nfsstats newnfsstats; +struct nfsstatsv1 nfsstatsv1; int nfs_numnfscbd = 0; int nfscl_debuglevel = 0; char nfsv4_callbackaddr[INET6_ADDRSTRLEN]; @@ -69,6 +69,7 @@ void (*ncl_call_invalcaches)(struct vnod static int nfs_realign_test; static int nfs_realign_count; +static struct ext_nfsstats oldnfsstats; SYSCTL_NODE(_vfs, OID_AUTO, nfs, CTLFLAG_RW, 0, "NFS filesystem"); SYSCTL_INT(_vfs_nfs, OID_AUTO, realign_test, CTLFLAG_RW, &nfs_realign_test, @@ -446,9 +447,12 @@ nfssvc_nfscommon(struct thread *td, stru static int nfssvc_call(struct thread *p, struct nfssvc_args *uap, struct ucred *cred) { - int error = EINVAL; + int error = EINVAL, i, j; struct nfsd_idargs nid; struct nfsd_oidargs onid; + struct { + int vers; /* Just the first field of nfsstats. */ + } nfsstatver; if (uap->flag & NFSSVC_IDNAME) { if ((uap->flag & NFSSVC_NEWSTRUCT) != 0) @@ -472,63 +476,157 @@ nfssvc_call(struct thread *p, struct nfs error = nfssvc_idname(&nid); goto out; } else if (uap->flag & NFSSVC_GETSTATS) { - error = copyout(&newnfsstats, - CAST_USER_ADDR_T(uap->argp), sizeof (newnfsstats)); + if ((uap->flag & NFSSVC_NEWSTRUCT) == 0) { + /* Copy fields to the old ext_nfsstat structure. */ + oldnfsstats.attrcache_hits = + nfsstatsv1.attrcache_hits; + oldnfsstats.attrcache_misses = + nfsstatsv1.attrcache_misses; + oldnfsstats.lookupcache_hits = + nfsstatsv1.lookupcache_hits; + oldnfsstats.lookupcache_misses = + nfsstatsv1.lookupcache_misses; + oldnfsstats.direofcache_hits = + nfsstatsv1.direofcache_hits; + oldnfsstats.direofcache_misses = + nfsstatsv1.direofcache_misses; + oldnfsstats.accesscache_hits = + nfsstatsv1.accesscache_hits; + oldnfsstats.accesscache_misses = + nfsstatsv1.accesscache_misses; + oldnfsstats.biocache_reads = + nfsstatsv1.biocache_reads; + oldnfsstats.read_bios = + nfsstatsv1.read_bios; + oldnfsstats.read_physios = + nfsstatsv1.read_physios; + oldnfsstats.biocache_writes = + nfsstatsv1.biocache_writes; + oldnfsstats.write_bios = + nfsstatsv1.write_bios; + oldnfsstats.write_physios = + nfsstatsv1.write_physios; + oldnfsstats.biocache_readlinks = + nfsstatsv1.biocache_readlinks; + oldnfsstats.readlink_bios = + nfsstatsv1.readlink_bios; + oldnfsstats.biocache_readdirs = + nfsstatsv1.biocache_readdirs; + oldnfsstats.readdir_bios = + nfsstatsv1.readdir_bios; + for (i = 0; i < NFSV4_NPROCS; i++) + oldnfsstats.rpccnt[i] = nfsstatsv1.rpccnt[i]; + oldnfsstats.rpcretries = nfsstatsv1.rpcretries; + for (i = 0; i < NFSV4OP_NOPS; i++) + oldnfsstats.srvrpccnt[i] = + nfsstatsv1.srvrpccnt[i]; + for (i = NFSV42_NOPS, j = NFSV4OP_NOPS; + i < NFSV42_NOPS + NFSV4OP_FAKENOPS; i++, j++) + oldnfsstats.srvrpccnt[j] = + nfsstatsv1.srvrpccnt[i]; + oldnfsstats.srvrpc_errs = nfsstatsv1.srvrpc_errs; + oldnfsstats.srv_errs = nfsstatsv1.srv_errs; + oldnfsstats.rpcrequests = nfsstatsv1.rpcrequests; + oldnfsstats.rpctimeouts = nfsstatsv1.rpctimeouts; + oldnfsstats.rpcunexpected = nfsstatsv1.rpcunexpected; + oldnfsstats.rpcinvalid = nfsstatsv1.rpcinvalid; + oldnfsstats.srvcache_inproghits = + nfsstatsv1.srvcache_inproghits; + oldnfsstats.srvcache_idemdonehits = + nfsstatsv1.srvcache_idemdonehits; + oldnfsstats.srvcache_nonidemdonehits = + nfsstatsv1.srvcache_nonidemdonehits; + oldnfsstats.srvcache_misses = + nfsstatsv1.srvcache_misses; + oldnfsstats.srvcache_tcppeak = + nfsstatsv1.srvcache_tcppeak; + oldnfsstats.srvcache_size = nfsstatsv1.srvcache_size; + oldnfsstats.srvclients = nfsstatsv1.srvclients; + oldnfsstats.srvopenowners = nfsstatsv1.srvopenowners; + oldnfsstats.srvopens = nfsstatsv1.srvopens; + oldnfsstats.srvlockowners = nfsstatsv1.srvlockowners; + oldnfsstats.srvlocks = nfsstatsv1.srvlocks; + oldnfsstats.srvdelegates = nfsstatsv1.srvdelegates; + for (i = 0; i < NFSV4OP_CBNOPS; i++) + oldnfsstats.cbrpccnt[i] = + nfsstatsv1.cbrpccnt[i]; + oldnfsstats.clopenowners = nfsstatsv1.clopenowners; + oldnfsstats.clopens = nfsstatsv1.clopens; + oldnfsstats.cllockowners = nfsstatsv1.cllockowners; + oldnfsstats.cllocks = nfsstatsv1.cllocks; + oldnfsstats.cldelegates = nfsstatsv1.cldelegates; + oldnfsstats.cllocalopenowners = + nfsstatsv1.cllocalopenowners; + oldnfsstats.cllocalopens = nfsstatsv1.cllocalopens; + oldnfsstats.cllocallockowners = + nfsstatsv1.cllocallockowners; + oldnfsstats.cllocallocks = nfsstatsv1.cllocallocks; + error = copyout(&oldnfsstats, uap->argp, + sizeof (oldnfsstats)); + } else { + error = copyin(uap->argp, &nfsstatver, + sizeof(nfsstatver)); + if (error == 0 && nfsstatver.vers != NFSSTATS_V1) + error = EPERM; + if (error == 0) + error = copyout(&nfsstatsv1, uap->argp, + sizeof (nfsstatsv1)); + } if (error == 0) { if ((uap->flag & NFSSVC_ZEROCLTSTATS) != 0) { - newnfsstats.attrcache_hits = 0; - newnfsstats.attrcache_misses = 0; - newnfsstats.lookupcache_hits = 0; - newnfsstats.lookupcache_misses = 0; - newnfsstats.direofcache_hits = 0; - newnfsstats.direofcache_misses = 0; - newnfsstats.accesscache_hits = 0; - newnfsstats.accesscache_misses = 0; - newnfsstats.biocache_reads = 0; - newnfsstats.read_bios = 0; - newnfsstats.read_physios = 0; - newnfsstats.biocache_writes = 0; - newnfsstats.write_bios = 0; - newnfsstats.write_physios = 0; - newnfsstats.biocache_readlinks = 0; - newnfsstats.readlink_bios = 0; - newnfsstats.biocache_readdirs = 0; - newnfsstats.readdir_bios = 0; - newnfsstats.rpcretries = 0; - newnfsstats.rpcrequests = 0; - newnfsstats.rpctimeouts = 0; - newnfsstats.rpcunexpected = 0; - newnfsstats.rpcinvalid = 0; - bzero(newnfsstats.rpccnt, - sizeof(newnfsstats.rpccnt)); + nfsstatsv1.attrcache_hits = 0; + nfsstatsv1.attrcache_misses = 0; + nfsstatsv1.lookupcache_hits = 0; + nfsstatsv1.lookupcache_misses = 0; + nfsstatsv1.direofcache_hits = 0; + nfsstatsv1.direofcache_misses = 0; + nfsstatsv1.accesscache_hits = 0; + nfsstatsv1.accesscache_misses = 0; + nfsstatsv1.biocache_reads = 0; + nfsstatsv1.read_bios = 0; + nfsstatsv1.read_physios = 0; + nfsstatsv1.biocache_writes = 0; + nfsstatsv1.write_bios = 0; + nfsstatsv1.write_physios = 0; + nfsstatsv1.biocache_readlinks = 0; + nfsstatsv1.readlink_bios = 0; + nfsstatsv1.biocache_readdirs = 0; + nfsstatsv1.readdir_bios = 0; + nfsstatsv1.rpcretries = 0; + nfsstatsv1.rpcrequests = 0; + nfsstatsv1.rpctimeouts = 0; + nfsstatsv1.rpcunexpected = 0; + nfsstatsv1.rpcinvalid = 0; + bzero(nfsstatsv1.rpccnt, + sizeof(nfsstatsv1.rpccnt)); } if ((uap->flag & NFSSVC_ZEROSRVSTATS) != 0) { - newnfsstats.srvrpc_errs = 0; - newnfsstats.srv_errs = 0; - newnfsstats.srvcache_inproghits = 0; - newnfsstats.srvcache_idemdonehits = 0; - newnfsstats.srvcache_nonidemdonehits = 0; - newnfsstats.srvcache_misses = 0; - newnfsstats.srvcache_tcppeak = 0; - newnfsstats.srvclients = 0; - newnfsstats.srvopenowners = 0; - newnfsstats.srvopens = 0; - newnfsstats.srvlockowners = 0; - newnfsstats.srvlocks = 0; - newnfsstats.srvdelegates = 0; - newnfsstats.clopenowners = 0; - newnfsstats.clopens = 0; - newnfsstats.cllockowners = 0; - newnfsstats.cllocks = 0; - newnfsstats.cldelegates = 0; - newnfsstats.cllocalopenowners = 0; - newnfsstats.cllocalopens = 0; - newnfsstats.cllocallockowners = 0; - newnfsstats.cllocallocks = 0; - bzero(newnfsstats.srvrpccnt, - sizeof(newnfsstats.srvrpccnt)); - bzero(newnfsstats.cbrpccnt, - sizeof(newnfsstats.cbrpccnt)); + nfsstatsv1.srvrpc_errs = 0; + nfsstatsv1.srv_errs = 0; + nfsstatsv1.srvcache_inproghits = 0; + nfsstatsv1.srvcache_idemdonehits = 0; + nfsstatsv1.srvcache_nonidemdonehits = 0; + nfsstatsv1.srvcache_misses = 0; + nfsstatsv1.srvcache_tcppeak = 0; + nfsstatsv1.srvclients = 0; + nfsstatsv1.srvopenowners = 0; + nfsstatsv1.srvopens = 0; + nfsstatsv1.srvlockowners = 0; + nfsstatsv1.srvlocks = 0; + nfsstatsv1.srvdelegates = 0; + nfsstatsv1.clopenowners = 0; + nfsstatsv1.clopens = 0; + nfsstatsv1.cllockowners = 0; + nfsstatsv1.cllocks = 0; + nfsstatsv1.cldelegates = 0; + nfsstatsv1.cllocalopenowners = 0; + nfsstatsv1.cllocalopens = 0; + nfsstatsv1.cllocallockowners = 0; + nfsstatsv1.cllocallocks = 0; + bzero(nfsstatsv1.srvrpccnt, + sizeof(nfsstatsv1.srvrpccnt)); + bzero(nfsstatsv1.cbrpccnt, + sizeof(nfsstatsv1.cbrpccnt)); } } goto out; Modified: stable/11/sys/fs/nfs/nfsport.h ============================================================================== --- stable/11/sys/fs/nfs/nfsport.h Mon Oct 3 00:02:32 2016 (r306608) +++ stable/11/sys/fs/nfs/nfsport.h Mon Oct 3 00:10:14 2016 (r306609) @@ -55,6 +55,7 @@ #include #include #include +#include #include #include #include @@ -254,24 +255,26 @@ /* * Must be one more than last op#. + * NFSv4.2 isn't implemented yet, but define the op# limit for it. */ #define NFSV41_NOPS 59 +#define NFSV42_NOPS 72 /* Quirky case if the illegal op code */ #define NFSV4OP_OPILLEGAL 10044 /* - * Fake NFSV4OP_xxx used for nfsstat. Start at NFSV4OP_NOPS. + * Fake NFSV4OP_xxx used for nfsstat. Start at NFSV42_NOPS. */ -#define NFSV4OP_SYMLINK (NFSV4OP_NOPS) -#define NFSV4OP_MKDIR (NFSV4OP_NOPS + 1) -#define NFSV4OP_RMDIR (NFSV4OP_NOPS + 2) -#define NFSV4OP_READDIRPLUS (NFSV4OP_NOPS + 3) -#define NFSV4OP_MKNOD (NFSV4OP_NOPS + 4) -#define NFSV4OP_FSSTAT (NFSV4OP_NOPS + 5) -#define NFSV4OP_FSINFO (NFSV4OP_NOPS + 6) -#define NFSV4OP_PATHCONF (NFSV4OP_NOPS + 7) -#define NFSV4OP_V3CREATE (NFSV4OP_NOPS + 8) +#define NFSV4OP_SYMLINK (NFSV42_NOPS) +#define NFSV4OP_MKDIR (NFSV42_NOPS + 1) +#define NFSV4OP_RMDIR (NFSV42_NOPS + 2) +#define NFSV4OP_READDIRPLUS (NFSV42_NOPS + 3) +#define NFSV4OP_MKNOD (NFSV42_NOPS + 4) +#define NFSV4OP_FSSTAT (NFSV42_NOPS + 5) +#define NFSV4OP_FSINFO (NFSV42_NOPS + 6) +#define NFSV4OP_PATHCONF (NFSV42_NOPS + 7) +#define NFSV4OP_V3CREATE (NFSV42_NOPS + 8) /* * This is the count of the fake operations listed above. @@ -285,12 +288,12 @@ #define NFSV4OP_CBRECALL 4 /* - * Must be one greater than the last Callback Operation#. + * Must be one greater than the last Callback Operation# for NFSv4.0. */ #define NFSV4OP_CBNOPS 5 /* - * Additional Callback Ops for NFSv4.1 only. Not yet in nfsstats. + * Additional Callback Ops for NFSv4.1 only. */ #define NFSV4OP_CBLAYOUTRECALL 5 #define NFSV4OP_CBNOTIFY 6 @@ -303,6 +306,9 @@ #define NFSV4OP_CBNOTIFYLOCK 13 #define NFSV4OP_CBNOTIFYDEVID 14 +#define NFSV41_CBNOPS 15 +#define NFSV42_CBNOPS 16 + /* * The lower numbers -> 21 are used by NFSv2 and v3. These define higher * numbers used by NFSv4. @@ -360,7 +366,72 @@ #endif /* NFS_V3NPROCS */ /* - * Stats structure + * New stats structure. + * The vers field will be set to NFSSTATS_V1 by the caller. + */ +#define NFSSTATS_V1 1 +struct nfsstatsv1 { + int vers; /* Set to version requested by caller. */ + uint64_t attrcache_hits; + uint64_t attrcache_misses; + uint64_t lookupcache_hits; + uint64_t lookupcache_misses; + uint64_t direofcache_hits; + uint64_t direofcache_misses; + uint64_t accesscache_hits; + uint64_t accesscache_misses; + uint64_t biocache_reads; + uint64_t read_bios; + uint64_t read_physios; + uint64_t biocache_writes; + uint64_t write_bios; + uint64_t write_physios; + uint64_t biocache_readlinks; + uint64_t readlink_bios; + uint64_t biocache_readdirs; + uint64_t readdir_bios; + uint64_t rpccnt[NFSV41_NPROCS + 15]; + uint64_t rpcretries; + uint64_t srvrpccnt[NFSV42_NOPS + NFSV4OP_FAKENOPS]; + uint64_t srvrpc_errs; + uint64_t srv_errs; + uint64_t rpcrequests; + uint64_t rpctimeouts; + uint64_t rpcunexpected; + uint64_t rpcinvalid; + uint64_t srvcache_inproghits; + uint64_t srvcache_idemdonehits; + uint64_t srvcache_nonidemdonehits; + uint64_t srvcache_misses; + uint64_t srvcache_tcppeak; + int srvcache_size; /* Updated by atomic_xx_int(). */ + uint64_t srvclients; + uint64_t srvopenowners; + uint64_t srvopens; + uint64_t srvlockowners; + uint64_t srvlocks; + uint64_t srvdelegates; + uint64_t cbrpccnt[NFSV42_CBNOPS]; + uint64_t clopenowners; + uint64_t clopens; + uint64_t cllockowners; + uint64_t cllocks; + uint64_t cldelegates; + uint64_t cllocalopenowners; + uint64_t cllocalopens; + uint64_t cllocallockowners; + uint64_t cllocallocks; + uint64_t srvstartcnt; + uint64_t srvdonecnt; + uint64_t srvbytes[NFSV42_NOPS + NFSV4OP_FAKENOPS]; + uint64_t srvops[NFSV42_NOPS + NFSV4OP_FAKENOPS]; + struct bintime srvduration[NFSV42_NOPS + NFSV4OP_FAKENOPS]; + struct bintime busyfrom; + struct bintime busytime; +}; + +/* + * Old stats structure. */ struct ext_nfsstats { int attrcache_hits; @@ -416,11 +487,6 @@ struct ext_nfsstats { #ifdef _KERNEL /* - * Define the ext_nfsstats as nfsstats for the kernel code. - */ -#define nfsstats ext_nfsstats - -/* * Define NFS_NPROCS as NFSV4_NPROCS for the experimental kernel code. */ #ifndef NFS_NPROCS Modified: stable/11/sys/fs/nfs/nfsproto.h ============================================================================== --- stable/11/sys/fs/nfs/nfsproto.h Mon Oct 3 00:02:32 2016 (r306608) +++ stable/11/sys/fs/nfs/nfsproto.h Mon Oct 3 00:10:14 2016 (r306609) @@ -345,10 +345,10 @@ /* * NFSPROC_NOOP is a fake op# that can't be the same as any V2/3/4 Procedure - * or Operation#. Since the NFS V4 Op #s go higher, use NFSV41_NOPS, which + * or Operation#. Since the NFS V4 Op #s go higher, use NFSV42_NOPS, which * is one greater than the highest Op#. */ -#define NFSPROC_NOOP NFSV41_NOPS +#define NFSPROC_NOOP NFSV42_NOPS /* Actual Version 2 procedure numbers */ #define NFSV2PROC_NULL 0 Modified: stable/11/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- stable/11/sys/fs/nfsclient/nfs_clbio.c Mon Oct 3 00:02:32 2016 (r306608) +++ stable/11/sys/fs/nfsclient/nfs_clbio.c Mon Oct 3 00:10:14 2016 (r306609) @@ -60,7 +60,7 @@ __FBSDID("$FreeBSD$"); #include extern int newnfs_directio_allow_mmap; -extern struct nfsstats newnfsstats; +extern struct nfsstatsv1 nfsstatsv1; extern struct mtx ncl_iod_mutex; extern int ncl_numasync; extern enum nfsiod_state ncl_iodwant[NFS_MAXASYNCDAEMON]; @@ -466,7 +466,7 @@ ncl_bioread(struct vnode *vp, struct uio switch (vp->v_type) { case VREG: - NFSINCRGLOBAL(newnfsstats.biocache_reads); + NFSINCRGLOBAL(nfsstatsv1.biocache_reads); lbn = uio->uio_offset / biosize; on = uio->uio_offset - (lbn * biosize); @@ -543,7 +543,7 @@ ncl_bioread(struct vnode *vp, struct uio n = MIN((unsigned)(bcount - on), uio->uio_resid); break; case VLNK: - NFSINCRGLOBAL(newnfsstats.biocache_readlinks); + NFSINCRGLOBAL(nfsstatsv1.biocache_readlinks); bp = nfs_getcacheblk(vp, (daddr_t)0, NFS_MAXPATHLEN, td); if (!bp) { error = newnfs_sigintr(nmp, td); @@ -563,7 +563,7 @@ ncl_bioread(struct vnode *vp, struct uio on = 0; break; case VDIR: - NFSINCRGLOBAL(newnfsstats.biocache_readdirs); + NFSINCRGLOBAL(nfsstatsv1.biocache_readdirs); if (np->n_direofoffset && uio->uio_offset >= np->n_direofoffset) { return (0); @@ -992,7 +992,7 @@ ncl_write(struct vop_write_args *ap) } } - NFSINCRGLOBAL(newnfsstats.biocache_writes); + NFSINCRGLOBAL(nfsstatsv1.biocache_writes); lbn = uio->uio_offset / biosize; on = uio->uio_offset - (lbn * biosize); n = MIN((unsigned)(biosize - on), uio->uio_resid); @@ -1606,7 +1606,7 @@ ncl_doio(struct vnode *vp, struct buf *b switch (vp->v_type) { case VREG: uiop->uio_offset = ((off_t)bp->b_blkno) * DEV_BSIZE; - NFSINCRGLOBAL(newnfsstats.read_bios); + NFSINCRGLOBAL(nfsstatsv1.read_bios); error = ncl_readrpc(vp, uiop, cr); if (!error) { @@ -1641,11 +1641,11 @@ ncl_doio(struct vnode *vp, struct buf *b break; case VLNK: uiop->uio_offset = (off_t)0; - NFSINCRGLOBAL(newnfsstats.readlink_bios); + NFSINCRGLOBAL(nfsstatsv1.readlink_bios); error = ncl_readlinkrpc(vp, uiop, cr); break; case VDIR: - NFSINCRGLOBAL(newnfsstats.readdir_bios); + NFSINCRGLOBAL(nfsstatsv1.readdir_bios); uiop->uio_offset = ((u_quad_t)bp->b_lblkno) * NFS_DIRBLKSIZ; if ((nmp->nm_flag & NFSMNT_RDIRPLUS) != 0) { error = ncl_readdirplusrpc(vp, uiop, cr, td); @@ -1707,7 +1707,7 @@ ncl_doio(struct vnode *vp, struct buf *b + bp->b_dirtyoff; io.iov_base = (char *)bp->b_data + bp->b_dirtyoff; uiop->uio_rw = UIO_WRITE; - NFSINCRGLOBAL(newnfsstats.write_bios); + NFSINCRGLOBAL(nfsstatsv1.write_bios); if ((bp->b_flags & (B_ASYNC | B_NEEDCOMMIT | B_NOCACHE | B_CLUSTER)) == B_ASYNC) iomode = NFSWRITE_UNSTABLE; Modified: stable/11/sys/fs/nfsclient/nfs_clcomsubs.c ============================================================================== --- stable/11/sys/fs/nfsclient/nfs_clcomsubs.c Mon Oct 3 00:02:32 2016 (r306608) +++ stable/11/sys/fs/nfsclient/nfs_clcomsubs.c Mon Oct 3 00:10:14 2016 (r306609) @@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$"); #ifndef APPLEKEXT #include -extern struct nfsstats newnfsstats; +extern struct nfsstatsv1 nfsstatsv1; extern struct nfsv4_opflag nfsv4_opflag[NFSV41_NOPS]; extern int ncl_mbuf_mlen; extern enum vtype newnv2tov_type[8]; @@ -241,8 +241,8 @@ nfscl_reqstart(struct nfsrv_descript *nd } else { (void) nfsm_fhtom(nd, nfhp, fhlen, 0); } - if (procnum < NFSV4_NPROCS) - NFSINCRGLOBAL(newnfsstats.rpccnt[procnum]); + if (procnum < NFSV41_NPROCS) + NFSINCRGLOBAL(nfsstatsv1.rpccnt[procnum]); } #ifndef APPLE Modified: stable/11/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- stable/11/sys/fs/nfsclient/nfs_clstate.c Mon Oct 3 00:02:32 2016 (r306608) +++ stable/11/sys/fs/nfsclient/nfs_clstate.c Mon Oct 3 00:10:14 2016 (r306609) @@ -84,7 +84,7 @@ __FBSDID("$FreeBSD$"); /* * Global variables */ -extern struct nfsstats newnfsstats; +extern struct nfsstatsv1 nfsstatsv1; extern struct nfsreqhead nfsd_reqq; extern u_int32_t newnfs_false, newnfs_true; extern int nfscl_debuglevel; @@ -343,10 +343,10 @@ nfscl_newopen(struct nfsclclient *clp, s nowp->nfsow_defunct = 0; nfscl_lockinit(&nowp->nfsow_rwlock); if (dp != NULL) { - newnfsstats.cllocalopenowners++; + nfsstatsv1.cllocalopenowners++; LIST_INSERT_HEAD(&dp->nfsdl_owner, nowp, nfsow_list); } else { - newnfsstats.clopenowners++; + nfsstatsv1.clopenowners++; LIST_INSERT_HEAD(&clp->nfsc_owner, nowp, nfsow_list); } owp = *owpp = nowp; @@ -380,9 +380,9 @@ nfscl_newopen(struct nfsclclient *clp, s TAILQ_INSERT_HEAD(&clp->nfsc_deleg, dp, nfsdl_list); dp->nfsdl_timestamp = NFSD_MONOSEC + 120; - newnfsstats.cllocalopens++; + nfsstatsv1.cllocalopens++; } else { - newnfsstats.clopens++; + nfsstatsv1.clopens++; } LIST_INSERT_HEAD(&owp->nfsow_open, nop, nfso_list); *opp = nop; @@ -430,7 +430,7 @@ nfscl_deleg(mount_t mp, struct nfsclclie LIST_INSERT_HEAD(NFSCLDELEGHASH(clp, nfhp, fhlen), dp, nfsdl_hash); dp->nfsdl_timestamp = NFSD_MONOSEC + 120; - newnfsstats.cldelegates++; + nfsstatsv1.cldelegates++; nfscl_delegcnt++; } else { /* @@ -1071,10 +1071,10 @@ nfscl_getbytelock(vnode_t vp, u_int64_t LIST_INIT(&nlp->nfsl_lock); if (donelocally) { nlp->nfsl_open = NULL; - newnfsstats.cllocallockowners++; + nfsstatsv1.cllocallockowners++; } else { nlp->nfsl_open = op; - newnfsstats.cllockowners++; + nfsstatsv1.cllockowners++; } LIST_INSERT_HEAD(lhp, nlp, nfsl_list); lp = nlp; @@ -1402,9 +1402,9 @@ nfscl_freeopen(struct nfsclopen *op, int nfscl_freealllocks(&op->nfso_lock, local); FREE((caddr_t)op, M_NFSCLOPEN); if (local) - newnfsstats.cllocalopens--; + nfsstatsv1.cllocalopens--; else - newnfsstats.clopens--; + nfsstatsv1.clopens--; } /* @@ -1483,9 +1483,9 @@ nfscl_freeopenowner(struct nfsclowner *o LIST_REMOVE(owp, nfsow_list); FREE((caddr_t)owp, M_NFSCLOWNER); if (local) - newnfsstats.cllocalopenowners--; + nfsstatsv1.cllocalopenowners--; else - newnfsstats.clopenowners--; + nfsstatsv1.clopenowners--; } /* @@ -1502,9 +1502,9 @@ nfscl_freelockowner(struct nfscllockowne } FREE((caddr_t)lp, M_NFSCLLOCKOWNER); if (local) - newnfsstats.cllocallockowners--; + nfsstatsv1.cllocallockowners--; else - newnfsstats.cllockowners--; + nfsstatsv1.cllockowners--; } /* @@ -1517,9 +1517,9 @@ nfscl_freelock(struct nfscllock *lop, in LIST_REMOVE(lop, nfslo_list); FREE((caddr_t)lop, M_NFSCLLOCK); if (local) - newnfsstats.cllocallocks--; + nfsstatsv1.cllocallocks--; else - newnfsstats.cllocks--; + nfsstatsv1.cllocks--; } /* @@ -1553,7 +1553,7 @@ nfscl_freedeleg(struct nfscldeleghead *h TAILQ_REMOVE(hdp, dp, nfsdl_list); LIST_REMOVE(dp, nfsdl_hash); FREE((caddr_t)dp, M_NFSCLDELEG); - newnfsstats.cldelegates--; + nfsstatsv1.cldelegates--; nfscl_delegcnt--; } @@ -1621,18 +1621,18 @@ nfscl_expireclient(struct nfsclclient *c LIST_REMOVE(op, nfso_list); op->nfso_own = towp; LIST_INSERT_HEAD(&towp->nfsow_open, op, nfso_list); - newnfsstats.cllocalopens--; - newnfsstats.clopens++; + nfsstatsv1.cllocalopens--; + nfsstatsv1.clopens++; } } else { /* Just add the openowner to the client list */ LIST_REMOVE(owp, nfsow_list); owp->nfsow_clp = clp; LIST_INSERT_HEAD(&clp->nfsc_owner, owp, nfsow_list); - newnfsstats.cllocalopenowners--; - newnfsstats.clopenowners++; - newnfsstats.cllocalopens--; - newnfsstats.clopens++; + nfsstatsv1.cllocalopenowners--; + nfsstatsv1.clopenowners++; + nfsstatsv1.cllocalopens--; + nfsstatsv1.clopens++; } } owp = nowp; @@ -2282,9 +2282,9 @@ nfscl_insertlock(struct nfscllockowner * else LIST_INSERT_AFTER(insert_lop, new_lop, nfslo_list); if (local) - newnfsstats.cllocallocks++; + nfsstatsv1.cllocallocks++; else - newnfsstats.cllocks++; + nfsstatsv1.cllocks++; } /* @@ -2571,7 +2571,7 @@ tryagain: LIST_REMOVE(dp, nfsdl_hash); TAILQ_INSERT_HEAD(&dh, dp, nfsdl_list); nfscl_delegcnt--; - newnfsstats.cldelegates--; + nfsstatsv1.cldelegates--; } NFSLOCKCLSTATE(); } @@ -2612,7 +2612,7 @@ tryagain: LIST_REMOVE(dp, nfsdl_hash); TAILQ_INSERT_HEAD(&dh, dp, nfsdl_list); nfscl_delegcnt--; - newnfsstats.cldelegates--; + nfsstatsv1.cldelegates--; } } dp = ndp; @@ -3215,8 +3215,8 @@ nfscl_docb(struct nfsrv_descript *nd, NF break; } nd->nd_procnum = op; - if (op < NFSV4OP_CBNOPS) - newnfsstats.cbrpccnt[nd->nd_procnum]++; + if (op < NFSV41_CBNOPS) + nfsstatsv1.cbrpccnt[nd->nd_procnum]++; switch (op) { case NFSV4OP_CBGETATTR: NFSCL_DEBUG(4, "cbgetattr\n"); Modified: stable/11/sys/fs/nfsclient/nfs_clsubs.c ============================================================================== --- stable/11/sys/fs/nfsclient/nfs_clsubs.c Mon Oct 3 00:02:32 2016 (r306608) +++ stable/11/sys/fs/nfsclient/nfs_clsubs.c Mon Oct 3 00:10:14 2016 (r306609) @@ -83,7 +83,7 @@ extern enum nfsiod_state ncl_iodwant[NFS extern struct nfsmount *ncl_iodmount[NFS_MAXASYNCDAEMON]; extern int ncl_numasync; extern unsigned int ncl_iodmax; -extern struct nfsstats newnfsstats; +extern struct nfsstatsv1 nfsstatsv1; struct task ncl_nfsiodnew_task; @@ -219,12 +219,12 @@ ncl_getattrcache(struct vnode *vp, struc if ((time_second - np->n_attrstamp) >= timeo && (mustflush != 0 || np->n_attrstamp == 0)) { - newnfsstats.attrcache_misses++; + nfsstatsv1.attrcache_misses++; mtx_unlock(&np->n_mtx); KDTRACE_NFS_ATTRCACHE_GET_MISS(vp); return( ENOENT); } - newnfsstats.attrcache_hits++; + nfsstatsv1.attrcache_hits++; if (vap->va_size != np->n_size) { if (vap->va_type == VREG) { if (np->n_flag & NMODIFIED) { Modified: stable/11/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- stable/11/sys/fs/nfsclient/nfs_clvfsops.c Mon Oct 3 00:02:32 2016 (r306608) +++ stable/11/sys/fs/nfsclient/nfs_clvfsops.c Mon Oct 3 00:10:14 2016 (r306609) @@ -78,7 +78,6 @@ FEATURE(nfscl, "NFSv4 client"); extern int nfscl_ticks; extern struct timeval nfsboottime; -extern struct nfsstats newnfsstats; extern int nfsrv_useacl; extern int nfscl_debuglevel; extern enum nfsiod_state ncl_iodwant[NFS_MAXASYNCDAEMON]; Modified: stable/11/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- stable/11/sys/fs/nfsclient/nfs_clvnops.c Mon Oct 3 00:02:32 2016 (r306608) +++ stable/11/sys/fs/nfsclient/nfs_clvnops.c Mon Oct 3 00:10:14 2016 (r306609) @@ -100,7 +100,7 @@ uint32_t nfscl_accesscache_load_done_id; #define TRUE 1 #define FALSE 0 -extern struct nfsstats newnfsstats; +extern struct nfsstatsv1 nfsstatsv1; extern int nfsrv_useacl; extern int nfscl_debuglevel; MALLOC_DECLARE(M_NEWNFSREQ); @@ -258,14 +258,6 @@ int newnfs_directio_allow_mmap = 1; SYSCTL_INT(_vfs_nfs, OID_AUTO, nfs_directio_allow_mmap, CTLFLAG_RW, &newnfs_directio_allow_mmap, 0, "Enable mmaped IO on file with O_DIRECT opens"); -#if 0 -SYSCTL_INT(_vfs_nfs, OID_AUTO, access_cache_hits, CTLFLAG_RD, - &newnfsstats.accesscache_hits, 0, "NFS ACCESS cache hit count"); - -SYSCTL_INT(_vfs_nfs, OID_AUTO, access_cache_misses, CTLFLAG_RD, - &newnfsstats.accesscache_misses, 0, "NFS ACCESS cache miss count"); -#endif - #define NFSACCESS_ALL (NFSACCESS_READ | NFSACCESS_MODIFY \ | NFSACCESS_EXTEND | NFSACCESS_EXECUTE \ | NFSACCESS_DELETE | NFSACCESS_LOOKUP) @@ -418,7 +410,7 @@ nfs_access(struct vop_access_args *ap) if (time_second < (np->n_accesscache[i].stamp + nfsaccess_cache_timeout) && (np->n_accesscache[i].mode & mode) == mode) { - NFSINCRGLOBAL(newnfsstats.accesscache_hits); + NFSINCRGLOBAL(nfsstatsv1.accesscache_hits); gotahit = 1; } break; @@ -437,7 +429,7 @@ nfs_access(struct vop_access_args *ap) /* * Either a no, or a don't know. Go to the wire. */ - NFSINCRGLOBAL(newnfsstats.accesscache_misses); + NFSINCRGLOBAL(nfsstatsv1.accesscache_misses); error = nfs34_access_otw(vp, wmode, ap->a_td, ap->a_cred, &rmode); if (!error && @@ -857,7 +849,7 @@ nfs_getattr(struct vop_getattr_args *ap) if (NFS_ISV34(vp) && nfs_prime_access_cache && nfsaccess_cache_timeout > 0) { - NFSINCRGLOBAL(newnfsstats.accesscache_misses); + NFSINCRGLOBAL(nfsstatsv1.accesscache_misses); nfs34_access_otw(vp, NFSACCESS_ALL, td, ap->a_cred, NULL); if (ncl_getattrcache(vp, ap->a_vap) == 0) { nfscl_deleggetmodtime(vp, &ap->a_vap->va_mtime); @@ -1114,7 +1106,7 @@ nfs_lookup(struct vop_lookup_args *ap) ((u_int)(ticks - ncticks) < (nmp->nm_nametimeo * hz) && VOP_GETATTR(newvp, &vattr, cnp->cn_cred) == 0 && timespeccmp(&vattr.va_ctime, &nctime, ==))) { - NFSINCRGLOBAL(newnfsstats.lookupcache_hits); + NFSINCRGLOBAL(nfsstatsv1.lookupcache_hits); if (cnp->cn_nameiop != LOOKUP && (flags & ISLASTCN)) cnp->cn_flags |= SAVENAME; @@ -1141,7 +1133,7 @@ nfs_lookup(struct vop_lookup_args *ap) if ((u_int)(ticks - ncticks) < (nmp->nm_negnametimeo * hz) && VOP_GETATTR(dvp, &vattr, cnp->cn_cred) == 0 && timespeccmp(&vattr.va_mtime, &nctime, ==)) { - NFSINCRGLOBAL(newnfsstats.lookupcache_hits); + NFSINCRGLOBAL(nfsstatsv1.lookupcache_hits); return (ENOENT); } cache_purge_negative(dvp); @@ -1149,7 +1141,7 @@ nfs_lookup(struct vop_lookup_args *ap) error = 0; newvp = NULLVP; - NFSINCRGLOBAL(newnfsstats.lookupcache_misses); + NFSINCRGLOBAL(nfsstatsv1.lookupcache_misses); error = nfsrpc_lookup(dvp, cnp->cn_nameptr, cnp->cn_namelen, cnp->cn_cred, td, &dnfsva, &nfsva, &nfhp, &attrflag, &dattrflag, NULL); @@ -2227,7 +2219,7 @@ nfs_readdir(struct vop_readdir_args *ap) if ((NFS_ISV4(vp) && np->n_change == vattr.va_filerev) || !NFS_TIMESPEC_COMPARE(&np->n_mtime, &vattr.va_mtime)) { mtx_unlock(&np->n_mtx); - NFSINCRGLOBAL(newnfsstats.direofcache_hits); + NFSINCRGLOBAL(nfsstatsv1.direofcache_hits); if (ap->a_eofflag != NULL) *ap->a_eofflag = 1; return (0); @@ -2254,7 +2246,7 @@ nfs_readdir(struct vop_readdir_args *ap) error = ncl_bioread(vp, uio, 0, ap->a_cred); if (!error && uio->uio_resid == tresid) { - NFSINCRGLOBAL(newnfsstats.direofcache_misses); + NFSINCRGLOBAL(nfsstatsv1.direofcache_misses); if (ap->a_eofflag != NULL) *ap->a_eofflag = 1; } Modified: stable/11/sys/fs/nfsserver/nfs_nfsdcache.c ============================================================================== --- stable/11/sys/fs/nfsserver/nfs_nfsdcache.c Mon Oct 3 00:02:32 2016 (r306608) +++ stable/11/sys/fs/nfsserver/nfs_nfsdcache.c Mon Oct 3 00:10:14 2016 (r306609) @@ -159,7 +159,7 @@ __FBSDID("$FreeBSD$"); #ifndef APPLEKEXT #include -extern struct nfsstats newnfsstats; +extern struct nfsstatsv1 nfsstatsv1; extern struct mtx nfsrc_udpmtx; extern struct nfsrchash_bucket nfsrchash_table[NFSRVCACHE_HASHSIZE]; extern struct nfsrchash_bucket nfsrcahash_table[NFSRVCACHE_HASHSIZE]; @@ -318,8 +318,8 @@ nfsrvd_initcache(void) TAILQ_INIT(&nfsrvudplru); nfsrc_tcpsavedreplies = 0; nfsrc_udpcachesize = 0; - newnfsstats.srvcache_tcppeak = 0; - newnfsstats.srvcache_size = 0; + nfsstatsv1.srvcache_tcppeak = 0; + nfsstatsv1.srvcache_size = 0; } /* @@ -395,14 +395,14 @@ loop: TAILQ_REMOVE(&nfsrvudplru, rp, rc_lru); TAILQ_INSERT_TAIL(&nfsrvudplru, rp, rc_lru); if (rp->rc_flag & RC_INPROG) { - newnfsstats.srvcache_inproghits++; + nfsstatsv1.srvcache_inproghits++; mtx_unlock(mutex); ret = RC_DROPIT; } else if (rp->rc_flag & RC_REPSTATUS) { /* * V2 only. */ - newnfsstats.srvcache_nonidemdonehits++; + nfsstatsv1.srvcache_nonidemdonehits++; mtx_unlock(mutex); nfsrvd_rephead(nd); *(nd->nd_errp) = rp->rc_status; @@ -410,7 +410,7 @@ loop: rp->rc_timestamp = NFSD_MONOSEC + NFSRVCACHE_UDPTIMEOUT; } else if (rp->rc_flag & RC_REPMBUF) { - newnfsstats.srvcache_nonidemdonehits++; + nfsstatsv1.srvcache_nonidemdonehits++; mtx_unlock(mutex); nd->nd_mreq = m_copym(rp->rc_reply, 0, M_COPYALL, M_WAITOK); @@ -425,8 +425,8 @@ loop: goto out; } } - newnfsstats.srvcache_misses++; - atomic_add_int(&newnfsstats.srvcache_size, 1); + nfsstatsv1.srvcache_misses++; + atomic_add_int(&nfsstatsv1.srvcache_size, 1); nfsrc_udpcachesize++; newrp->rc_flag |= RC_INPROG; @@ -480,7 +480,7 @@ nfsrvd_updatecache(struct nfsrv_descript * Reply from cache is a special case returned by nfsrv_checkseqid(). */ if (nd->nd_repstat == NFSERR_REPLYFROMCACHE) { - newnfsstats.srvcache_nonidemdonehits++; + nfsstatsv1.srvcache_nonidemdonehits++; mtx_unlock(mutex); nd->nd_repstat = 0; if (nd->nd_mreq) @@ -519,8 +519,8 @@ nfsrvd_updatecache(struct nfsrv_descript if (!(rp->rc_flag & RC_UDP)) { atomic_add_int(&nfsrc_tcpsavedreplies, 1); if (nfsrc_tcpsavedreplies > - newnfsstats.srvcache_tcppeak) - newnfsstats.srvcache_tcppeak = + nfsstatsv1.srvcache_tcppeak) + nfsstatsv1.srvcache_tcppeak = nfsrc_tcpsavedreplies; } mtx_unlock(mutex); @@ -678,7 +678,7 @@ tryagain: panic("nfs tcp cache0"); rp->rc_flag |= RC_LOCKED; if (rp->rc_flag & RC_INPROG) { - newnfsstats.srvcache_inproghits++; + nfsstatsv1.srvcache_inproghits++; mtx_unlock(mutex); if (newrp->rc_sockref == rp->rc_sockref) nfsrc_marksametcpconn(rp->rc_sockref); @@ -687,7 +687,7 @@ tryagain: /* * V2 only. */ - newnfsstats.srvcache_nonidemdonehits++; + nfsstatsv1.srvcache_nonidemdonehits++; mtx_unlock(mutex); if (newrp->rc_sockref == rp->rc_sockref) nfsrc_marksametcpconn(rp->rc_sockref); @@ -696,7 +696,7 @@ tryagain: *(nd->nd_errp) = rp->rc_status; rp->rc_timestamp = NFSD_MONOSEC + nfsrc_tcptimeout; } else if (rp->rc_flag & RC_REPMBUF) { - newnfsstats.srvcache_nonidemdonehits++; + nfsstatsv1.srvcache_nonidemdonehits++; mtx_unlock(mutex); if (newrp->rc_sockref == rp->rc_sockref) nfsrc_marksametcpconn(rp->rc_sockref); @@ -711,8 +711,8 @@ tryagain: free((caddr_t)newrp, M_NFSRVCACHE); goto out; } - newnfsstats.srvcache_misses++; - atomic_add_int(&newnfsstats.srvcache_size, 1); + nfsstatsv1.srvcache_misses++; + atomic_add_int(&nfsstatsv1.srvcache_size, 1); /* * For TCP, multiple entries for a key are allowed, so don't @@ -801,7 +801,7 @@ nfsrc_freecache(struct nfsrvcache *rp) atomic_add_int(&nfsrc_tcpsavedreplies, -1); } FREE((caddr_t)rp, M_NFSRVCACHE); - atomic_add_int(&newnfsstats.srvcache_size, -1); + atomic_add_int(&nfsstatsv1.srvcache_size, -1); } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Oct 3 00:16:17 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E750AF2E52; Mon, 3 Oct 2016 00:16:17 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A8A67E2; Mon, 3 Oct 2016 00:16:17 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u930GGbl029027; Mon, 3 Oct 2016 00:16:16 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u930GGZB029026; Mon, 3 Oct 2016 00:16:16 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610030016.u930GGZB029026@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Mon, 3 Oct 2016 00:16:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306610 - head/sbin/mount_fusefs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 00:16:17 -0000 Author: sevan (doc committer) Date: Mon Oct 3 00:16:16 2016 New Revision: 306610 URL: https://svnweb.freebsd.org/changeset/base/306610 Log: Note mount_fusefs appeared in FreeBSD 10. Move note regarding implementation to caveats. Address issued raised by Igor. PR: 212513 Approved by: bcr (mentor) MFC after: 4 days Differential Revision: https://reviews.freebsd.org/D8105 Modified: head/sbin/mount_fusefs/mount_fusefs.8 Modified: head/sbin/mount_fusefs/mount_fusefs.8 ============================================================================== --- head/sbin/mount_fusefs/mount_fusefs.8 Mon Oct 3 00:10:14 2016 (r306609) +++ head/sbin/mount_fusefs/mount_fusefs.8 Mon Oct 3 00:16:16 2016 (r306610) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 11, 2012 +.Dd October 3, 2016 .Dt MOUNT_FUSEFS 8 .Os .Sh NAME @@ -52,7 +52,8 @@ .Sh DESCRIPTION Basic usage is to start a fuse daemon on the given .Ar special -file. In practice, the daemon is assigned a +file. +In practice, the daemon is assigned a .Ar special file automatically, which can then be indentified via .Xr fstat 1 . @@ -68,7 +69,8 @@ is appended to the list of arguments, .Nm will call the .Ar fuse_daemon -via that command. In that way the +via that command. +In that way the .Ar fuse_daemon will be instructed to attach itself to .Ar special . @@ -101,7 +103,8 @@ The options are as follows: .It Fl A , Ic --reject-allow_other Prohibit the .Cm allow_other -mount flag. Intended for use in scripts and the +mount flag. +Intended for use in scripts and the .Xr sudoers 5 file. .It Fl S , Ic --safe @@ -143,8 +146,8 @@ Only root can use this option Limit size of read requests to .Ar n .It Cm private -Refuse shared mounting of the daemon. This is the default behaviour, -to allow sharing, expicitly use +Refuse shared mounting of the daemon. +This is the default behaviour, to allow sharing, expicitly use .Fl o Cm noprivate .It Cm neglect_shares Do not refuse unmounting if there are secondary mounts @@ -154,11 +157,13 @@ Prefix absolute symlinks with the mountp .El .Pp Besides the above mount options, there is a set of pseudo-mount options which -are supported by the Fuse library. One can list these by passing +are supported by the Fuse library. +One can list these by passing .Fl h -to a Fuse daemon. Most of these options have effect only on the behaviour of -the daemon (that is, their scope is limited to userspace). However, -there are some which do require in-kernel support. +to a Fuse daemon. +Most of these options only have affect on the behavior of the daemon (that is, +their scope is limited to userspace). +However, there are some which do require in-kernel support. Currently the options supported by the kernel are: .Bl -tag -width indent .It Cm direct_io @@ -189,7 +194,7 @@ only if the filesystem daemon has the sa real gid) as the user. .Pp This is applied for Fuse mounts by default and only root can mount without -the strict access policy (ie. the +the strict access policy (i.e. the .Cm allow_other mount option). .Pp @@ -201,7 +206,7 @@ Users might opt to willingly relax stric are concerned) by doing their own secondary mount (See .Sx SHARED MOUNTS ) . .Sh SHARED MOUNTS -A Fuse daemon can be shared (ie. mounted multiple times). +A Fuse daemon can be shared (i.e. mounted multiple times). When doing the first (primary) mount, the spawner and the mounter of the daemon must have the same uid, or the mounter should be the superuser. .Pp @@ -212,9 +217,9 @@ The behaviour of a secondary mount is an links: they redirect all filesystem operations to the primary mount. .Pp Doing a secondary mount is like signing an agreement: by this action, the mounter -agrees that the Fuse daemon can trace her I/O activities. From then on -she is not banned from using the filesystem (either via her own mount or -via the primary mount), regardless whether +agrees that the Fuse daemon can trace her I/O activities. +From then on she is not banned from using the filesystem +(either via her own mount or via the primary mount), regardless whether .Cm allow_other is used or not. .Pp @@ -226,14 +231,15 @@ mount; e.g. System administrators might want to use a custom mount policy (ie., one going beyond the .Va vfs.usermount -sysctl). The primary tool for such purposes is +sysctl). +The primary tool for such purposes is .Xr sudo 8 . However, given that .Nm is capable of invoking an arbitrary program, one must be careful when doing this. .Nm -is designed in a way such that it makes that easy. For this purpose, -there are options which disable certain risky features (ie. +is designed in a way such that it makes that easy. +For this purpose, there are options which disable certain risky features (i.e. .Fl S and .Fl A ) , @@ -269,8 +275,8 @@ If set, .Nm will ignore uknown mount options. .It Ev MOUNT_FUSEFS_CALL_BY_LIB -Adjust behaviour to the needs of the FUSE library. Currently it effects -help output. +Adjust behavior to the needs of the FUSE library. +Currently it effects help output. .El .Pp Although the following variables do not have any effect on @@ -278,11 +284,13 @@ Although the following variables do not itself, they affect the behaviour of fuse daemons: .Bl -tag -width ".Ev FUSE_DEV_NAME" .It Ev FUSE_DEV_NAME -Device to attach. If not set, the multiplexer path +Device to attach. +If not set, the multiplexer path .Ar /dev/fuse is used. .It Ev FUSE_DEV_FD -File desciptor of an opened Fuse device to use. Overrides +File desciptor of an opened Fuse device to use. +Overrides .Ev FUSE_DEV_NAME . .It Ev FUSE_NO_MOUNT If set, the library will not attempt to mount the filesystem, even @@ -293,7 +301,8 @@ if a mountpoint argument is supplied. .It Pa /dev/fuse Fuse device with which the kernel and Fuse daemons can communicate. .It Pa /dev/fuse -The multiplexer path. An +The multiplexer path. +An .Xr open 2 performed on it automatically is passed to a free Fuse device by the kernel (which might be created just for this puprose). @@ -330,12 +339,19 @@ does not call any external utility and a .Xr umount 8 .Sh HISTORY .Nm -appears as the part of the FreeBSD implementation of the Fuse userspace filesystem -framework (see http://fuse.sourceforge.net). This user interface is FreeBSD specific. +appeared in +.Fx 10.0 +as the part of the +.Fx +implementation of the Fuse userspace filesystem +framework (see http://fuse.sourceforge.net). .Sh CAVEATS -Secondary mounts should be unmounted via their device name. If an attempt is -made to be unmount them via their filesystem root path, the unmount request -will be forwarded to the primary mount path. +This user interface is +.Fx +specific. +Secondary mounts should be unmounted via their device name. +If an attempt is made to unmount them via their filesystem root path, +the unmount request will be forwarded to the primary mount path. In general, unmounting by device name is less error-prone than by mount path (although the latter will also work under normal circumstances). .Pp From owner-svn-src-all@freebsd.org Mon Oct 3 00:25:16 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C150BAC6010; Mon, 3 Oct 2016 00:25:16 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79F26BEF; Mon, 3 Oct 2016 00:25:16 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u930PFRo033045; Mon, 3 Oct 2016 00:25:15 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u930PFYm033044; Mon, 3 Oct 2016 00:25:15 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610030025.u930PFYm033044@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Mon, 3 Oct 2016 00:25:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306611 - head/sbin/mount_msdosfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 00:25:16 -0000 Author: sevan (doc committer) Date: Mon Oct 3 00:25:15 2016 New Revision: 306611 URL: https://svnweb.freebsd.org/changeset/base/306611 Log: Amend history to mention predecessor originated from 386BSD[1] & current implementation from NetBSD[2]. Reword history since the utility was renamed once more in FreeBSD 5.0. Separate out author & historical information regarding character code conversion. Add AUTHORS section. [1] https://groups.google.com/forum/#!search/mount_pcfs.c/comp.unix.bsd/9qhH0v1tZm0/inlPnXZj_2sJ [2] http://cvsweb.netbsd.org/bsdweb.cgi/src/sbin/mount_msdos/mount_msdos.c?rev=1.6&content-type=text/x-cvsweb-markup PR: 212536 Approved by: bcr (mentor) MFC after: 4 days Differential Revision: https://reviews.freebsd.org/D8105 Modified: head/sbin/mount_msdosfs/mount_msdosfs.8 Modified: head/sbin/mount_msdosfs/mount_msdosfs.8 ============================================================================== --- head/sbin/mount_msdosfs/mount_msdosfs.8 Mon Oct 3 00:16:16 2016 (r306610) +++ head/sbin/mount_msdosfs/mount_msdosfs.8 Mon Oct 3 00:25:15 2016 (r306611) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 1, 2013 +.Dd October 3, 2016 .Dt MOUNT_MSDOSFS 8 .Os .Sh NAME @@ -193,21 +193,32 @@ To mount a Japanese MS-DOS file system l List of Localized MS Operating Systems: .Pa http://www.microsoft.com/globaldev/reference/oslocversion.mspx . .Sh HISTORY -The -.Nm -utility first appeared in +The predecessor to +.Nm mount_msdos +utility named +.Nm mount_pcfs +appeared in +.Bx 386 . +It was rewritten in +.Nx 1.0 +and first appeared in .Fx 2.0 . -Its predecessor, the +.Nm mount_msdos +was renamed to the more aptly-named +.Nm +in +.Fx 5.0. +The character code conversion routine was added in 2003. +.Sh AUTHORS +Initial implementation as .Nm mount_pcfs -utility appeared in -.Fx 1.0 , -and was abandoned in favor -of the more aptly-named -.Nm . -.Pp +was written by +.An -nosplit +.An Paul Popelka Aq Mt paulp@uts.amdahl.com . +It was rewritten by +.An Christopher G. Demetriou Aq Mt cgd@NetBSD.org . The character code conversion routine was added by -.An Ryuichiro Imura Aq Mt imura@ryu16.org -in 2003. +.An Ryuichiro Imura Aq Mt imura@ryu16.org . .Sh CAVEATS The use of the .Fl 9 From owner-svn-src-all@freebsd.org Mon Oct 3 00:28:43 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70D36AC611A; Mon, 3 Oct 2016 00:28:43 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33716DB9; Mon, 3 Oct 2016 00:28:43 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u930SgZT033201; Mon, 3 Oct 2016 00:28:42 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u930SgD2033200; Mon, 3 Oct 2016 00:28:42 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610030028.u930SgD2033200@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Mon, 3 Oct 2016 00:28:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306612 - head/sbin/mount_nullfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 00:28:43 -0000 Author: sevan (doc committer) Date: Mon Oct 3 00:28:42 2016 New Revision: 306612 URL: https://svnweb.freebsd.org/changeset/base/306612 Log: Note the name change from mount_null to mount_nullfs in FreeBSD 5.0. PR: 212541 Approved by: bcr (mentor) MFC after: 4 days Differential Revision: https://reviews.freebsd.org/D8105 Modified: head/sbin/mount_nullfs/mount_nullfs.8 Modified: head/sbin/mount_nullfs/mount_nullfs.8 ============================================================================== --- head/sbin/mount_nullfs/mount_nullfs.8 Mon Oct 3 00:25:15 2016 (r306611) +++ head/sbin/mount_nullfs/mount_nullfs.8 Mon Oct 3 00:28:42 2016 (r306612) @@ -33,7 +33,7 @@ .\" @(#)mount_null.8 8.6 (Berkeley) 5/1/95 .\" $FreeBSD$ .\" -.Dd May 1, 1995 +.Dd October 3, 2016 .Dt MOUNT_NULLFS 8 .Os .Sh NAME @@ -240,6 +240,10 @@ UCLA Technical Report CSD-910056, .Em "Stackable Layers: an Architecture for File System Development" . .Sh HISTORY The -.Nm +.Nm mount_null utility first appeared in .Bx 4.4 . +It was renamed to +.Nm +in +.Fx 5.0 . From owner-svn-src-all@freebsd.org Mon Oct 3 00:31:59 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD588AC6348; Mon, 3 Oct 2016 00:31:59 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 992D079; Mon, 3 Oct 2016 00:31:59 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u930Vwkh036837; Mon, 3 Oct 2016 00:31:58 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u930Vwbl036836; Mon, 3 Oct 2016 00:31:58 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610030031.u930Vwbl036836@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Mon, 3 Oct 2016 00:31:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306613 - head/sbin/mount_unionfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 00:31:59 -0000 Author: sevan (doc committer) Date: Mon Oct 3 00:31:58 2016 New Revision: 306613 URL: https://svnweb.freebsd.org/changeset/base/306613 Log: Note the change of name in FreeBSD 5.0. PR: 212542 Approved by: bcr (mentor) MFC after: 4 days Differential Revision: https://reviews.freebsd.org/D8105 Modified: head/sbin/mount_unionfs/mount_unionfs.8 Modified: head/sbin/mount_unionfs/mount_unionfs.8 ============================================================================== --- head/sbin/mount_unionfs/mount_unionfs.8 Mon Oct 3 00:28:42 2016 (r306612) +++ head/sbin/mount_unionfs/mount_unionfs.8 Mon Oct 3 00:31:58 2016 (r306613) @@ -31,7 +31,7 @@ .\" @(#)mount_union.8 8.6 (Berkeley) 3/27/94 .\" $FreeBSD$ .\" -.Dd November 30, 2006 +.Dd October 3, 2016 .Dt MOUNT_UNIONFS 8 .Os .Sh NAME @@ -328,9 +328,13 @@ accessible via .Xr mount_nullfs 8 .Sh HISTORY The -.Nm +.Nm mount_null utility first appeared in .Bx 4.4 . +It was renamed to +.Nm +in +.Fx 5.0 . .Pp The .Fl r From owner-svn-src-all@freebsd.org Mon Oct 3 00:35:16 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0AF36AC647B; Mon, 3 Oct 2016 00:35:16 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B95323DD; Mon, 3 Oct 2016 00:35:15 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u930ZEHi037022; Mon, 3 Oct 2016 00:35:14 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u930ZEan037021; Mon, 3 Oct 2016 00:35:14 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610030035.u930ZEan037021@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Mon, 3 Oct 2016 00:35:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306614 - head/sbin/pfctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 00:35:16 -0000 Author: sevan (doc committer) Date: Mon Oct 3 00:35:14 2016 New Revision: 306614 URL: https://svnweb.freebsd.org/changeset/base/306614 Log: Note the version PF first appeared in FreeBSD & from which version it was ported from. Address the contractions raised by igor. PR: 212574 Approved by: bcr (mentor) MFC after: 4 days Differential Revision: https://reviews.freebsd.org/D8105 Modified: head/sbin/pfctl/pfctl.8 Modified: head/sbin/pfctl/pfctl.8 ============================================================================== --- head/sbin/pfctl/pfctl.8 Mon Oct 3 00:31:58 2016 (r306613) +++ head/sbin/pfctl/pfctl.8 Mon Oct 3 00:35:14 2016 (r306614) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 21, 2011 +.Dd October 3, 2016 .Dt PFCTL 8 .Os .Sh NAME @@ -390,7 +390,7 @@ Note that the optimization done automatically by the kernel will skip evaluation of rules where possible. Packets passed statefully are counted in the rule that created the state -(even though the rule isn't evaluated more than once for the entire +(even though the rule is not evaluated more than once for the entire connection). .It Fl s Cm Anchors Show the currently loaded anchors directly attached to the main ruleset. @@ -593,7 +593,7 @@ counters are incremented instead of the .Dq Pass counters when a .Dq stateful -packet is passed but doesn't match the table anymore. +packet is passed but does not match the table anymore. This will happen in our example if someone flushes the table while the .Xr ping 8 command is running. @@ -609,7 +609,7 @@ The flags are defined as follows: For constant tables, which cannot be altered outside .Xr pf.conf 5 . .It p -For persistent tables, which don't get automatically killed when no rules +For persistent tables, which do not get automatically killed when no rules refer to them. .It a For tables which are part of the @@ -648,7 +648,7 @@ Set the debug .Pp .Bl -tag -width xxxxxxxxxxxx -compact .It Fl x Cm none -Don't generate debug messages. +Do not generate debug messages. .It Fl x Cm urgent Generate debug messages only for serious errors. .It Fl x Cm misc @@ -682,5 +682,9 @@ The .Nm program and the .Xr pf 4 -filter mechanism first appeared in +filter mechanism appeared in .Ox 3.0 . +They first appeared in +.Fx 5.3 +ported from the version in +.Ox 3.5 From owner-svn-src-all@freebsd.org Mon Oct 3 00:40:21 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4AC3AAC65E9; Mon, 3 Oct 2016 00:40:21 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1857784E; Mon, 3 Oct 2016 00:40:21 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u930eK8o037253; Mon, 3 Oct 2016 00:40:20 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u930eK8H037252; Mon, 3 Oct 2016 00:40:20 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610030040.u930eK8H037252@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Mon, 3 Oct 2016 00:40:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306615 - head/sbin/sconfig X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 00:40:21 -0000 Author: sevan (doc committer) Date: Mon Oct 3 00:40:20 2016 New Revision: 306615 URL: https://svnweb.freebsd.org/changeset/base/306615 Log: sconfig appeared in FreeBSD 5.2. PR: 212550 Approved by: bcr (mentor) MFC after: 4 days Differential Revision: https://reviews.freebsd.org/D8105 Modified: head/sbin/sconfig/sconfig.8 Modified: head/sbin/sconfig/sconfig.8 ============================================================================== --- head/sbin/sconfig/sconfig.8 Mon Oct 3 00:35:14 2016 (r306614) +++ head/sbin/sconfig/sconfig.8 Mon Oct 3 00:40:20 2016 (r306615) @@ -11,7 +11,7 @@ .\" works or modified versions. .\" .\" $FreeBSD$ -.Dd May 19, 2004 +.Dd October 3, 2016 .Dt SCONFIG 8 i386 .Os .Sh NAME @@ -575,7 +575,13 @@ Test error (G.703 only). .Xr spppcontrol 8 .\"-------------------------------------------------------------- .Sh HISTORY -This utility is a replacement for the +The +.Nm +utility appeared in +.Fx 5.2 . +The +.Nm +utility is a replacement for the .Nm cxconfig and .Nm ctconfig From owner-svn-src-all@freebsd.org Mon Oct 3 00:42:26 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4ABECAC6729; Mon, 3 Oct 2016 00:42:26 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1809DBC1; Mon, 3 Oct 2016 00:42:26 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u930gPps040640; Mon, 3 Oct 2016 00:42:25 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u930gPX1040639; Mon, 3 Oct 2016 00:42:25 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610030042.u930gPX1040639@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Mon, 3 Oct 2016 00:42:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306616 - head/sbin/setkey X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 00:42:26 -0000 Author: sevan (doc committer) Date: Mon Oct 3 00:42:25 2016 New Revision: 306616 URL: https://svnweb.freebsd.org/changeset/base/306616 Log: setkey appeared in FreeBSD 4.0 PR: 212551 Approved by: bcr (mentor) MFC after: 4 days Differential Revision: https://reviews.freebsd.org/D8105 Modified: head/sbin/setkey/setkey.8 Modified: head/sbin/setkey/setkey.8 ============================================================================== --- head/sbin/setkey/setkey.8 Mon Oct 3 00:40:20 2016 (r306615) +++ head/sbin/setkey/setkey.8 Mon Oct 3 00:42:25 2016 (r306616) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 3, 2015 +.Dd October 3, 2016 .Dt SETKEY 8 .Os .\" @@ -713,6 +713,8 @@ The .Nm utility first appeared in WIDE Hydrangea IPv6 protocol stack kit. The utility was completely re-designed in June 1998. +It first appeared in +.Fx 4.0 . .\" .Sh BUGS The From owner-svn-src-all@freebsd.org Mon Oct 3 00:55:19 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57CC1AC6901; Mon, 3 Oct 2016 00:55:19 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F9B3A0; Mon, 3 Oct 2016 00:55:19 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u930tIfk044438; Mon, 3 Oct 2016 00:55:18 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u930tI6u044437; Mon, 3 Oct 2016 00:55:18 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610030055.u930tI6u044437@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Mon, 3 Oct 2016 00:55:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306617 - head/sbin/shutdown X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 00:55:19 -0000 Author: sevan (doc committer) Date: Mon Oct 3 00:55:18 2016 New Revision: 306617 URL: https://svnweb.freebsd.org/changeset/base/306617 Log: shutdown appeared as a standalone utility in 4.1BSD. http://mail-index.netbsd.org/source-changes-d/2016/09/13/msg008686.html http://mail-index.netbsd.org/source-changes-d/2016/09/14/msg008691.html PR: 212552 Approved by: bcr (mentor) Obtained from: NetBSD MFC after: 4 days Differential Revision: https://reviews.freebsd.org/D8105 Modified: head/sbin/shutdown/shutdown.8 Modified: head/sbin/shutdown/shutdown.8 ============================================================================== --- head/sbin/shutdown/shutdown.8 Mon Oct 3 00:42:25 2016 (r306616) +++ head/sbin/shutdown/shutdown.8 Mon Oct 3 00:55:18 2016 (r306617) @@ -28,7 +28,7 @@ .\" @(#)shutdown.8 8.2 (Berkeley) 4/27/95 .\" $FreeBSD$ .\" -.Dd December 15, 2014 +.Dd September 21, 2016 .Dt SHUTDOWN 8 .Os .Sh NAME @@ -215,7 +215,9 @@ a colon (``:'') for backward compatibili .Xr init 8 , .Xr reboot 8 .Sh HISTORY -The +A .Nm -utility appeared in -.Bx 4.0 . +command was originally written by Ian Johnstone for UNSW's modified +.At "6th Edn" . +It was modified and then incorporated in +.Bx 4.1 . From owner-svn-src-all@freebsd.org Mon Oct 3 01:07:07 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7C3CAC6BFD; Mon, 3 Oct 2016 01:07:07 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA8208C6; Mon, 3 Oct 2016 01:07:07 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u931762E048464; Mon, 3 Oct 2016 01:07:06 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u931763h048463; Mon, 3 Oct 2016 01:07:06 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201610030107.u931763h048463@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 3 Oct 2016 01:07:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306618 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 01:07:07 -0000 Author: gonzo Date: Mon Oct 3 01:07:06 2016 New Revision: 306618 URL: https://svnweb.freebsd.org/changeset/base/306618 Log: Fix attach/detach methods - Initialize lock before starting worker process - Do not hold lock when destroying evdev. By that time ther should be no other active code pathes that can access softc Modified: head/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c Mon Oct 3 00:55:18 2016 (r306617) +++ head/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c Mon Oct 3 01:07:06 2016 (r306618) @@ -288,13 +288,13 @@ ft5406ts_attach(device_t dev) sc->sc_init_hook.ich_func = ft5406ts_init; sc->sc_init_hook.ich_arg = sc; + FT5406_LOCK_INIT(sc); + if (config_intrhook_establish(&sc->sc_init_hook) != 0) { device_printf(dev, "config_intrhook_establish failed\n"); return (ENOMEM); } - FT5406_LOCK_INIT(sc); - return (0); } @@ -308,10 +308,11 @@ ft5406ts_detach(device_t dev) FT5406_LOCK(sc); if (sc->sc_worker) sc->sc_detaching = 1; + wakeup(sc); + FT5406_UNLOCK(sc); if (sc->sc_evdev) evdev_free(sc->sc_evdev); - FT5406_UNLOCK(sc); FT5406_LOCK_DESTROY(sc); From owner-svn-src-all@freebsd.org Mon Oct 3 01:08:36 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18479AC6C6B; Mon, 3 Oct 2016 01:08:36 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF4F7A33; Mon, 3 Oct 2016 01:08:35 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9318ZeG048555; Mon, 3 Oct 2016 01:08:35 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9318Y6J048552; Mon, 3 Oct 2016 01:08:34 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201610030108.u9318Y6J048552@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 3 Oct 2016 01:08:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306619 - in head/sys: arm/conf modules/rpi_ft5406 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 01:08:36 -0000 Author: gonzo Date: Mon Oct 3 01:08:34 2016 New Revision: 306619 URL: https://svnweb.freebsd.org/changeset/base/306619 Log: Add rpi_ft5406 module and add it to extra modules in Raspberry Pi configs Added: head/sys/modules/rpi_ft5406/ head/sys/modules/rpi_ft5406/Makefile (contents, props changed) Modified: head/sys/arm/conf/RPI-B head/sys/arm/conf/RPI2 Modified: head/sys/arm/conf/RPI-B ============================================================================== --- head/sys/arm/conf/RPI-B Mon Oct 3 01:07:06 2016 (r306618) +++ head/sys/arm/conf/RPI-B Mon Oct 3 01:08:34 2016 (r306619) @@ -94,4 +94,4 @@ options FDT # Configure using FDT/DTB # handed to kernel via U-Boot and ubldr. #options FDT_DTB_STATIC #makeoptions FDT_DTS_FILE=rpi.dts -makeoptions MODULES_EXTRA=dtb/rpi +makeoptions MODULES_EXTRA="dtb/rpi rpi_ft5406" Modified: head/sys/arm/conf/RPI2 ============================================================================== --- head/sys/arm/conf/RPI2 Mon Oct 3 01:07:06 2016 (r306618) +++ head/sys/arm/conf/RPI2 Mon Oct 3 01:08:34 2016 (r306619) @@ -99,4 +99,4 @@ options FDT # Configure using FDT/DTB # handed to kernel via U-Boot and ubldr. #options FDT_DTB_STATIC #makeoptions FDT_DTS_FILE=rpi2.dts -makeoptions MODULES_EXTRA=dtb/rpi +makeoptions MODULES_EXTRA="dtb/rpi rpi_ft5406" Added: head/sys/modules/rpi_ft5406/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/rpi_ft5406/Makefile Mon Oct 3 01:08:34 2016 (r306619) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../arm/broadcom/bcm2835/ + +KMOD= rpi_ft5406 +SRCS= bcm2835_ft5406.c + +SRCS+= bus_if.h device_if.h ofw_bus_if.h + +.include From owner-svn-src-all@freebsd.org Mon Oct 3 01:12:59 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58489AC6F3D; Mon, 3 Oct 2016 01:12:59 +0000 (UTC) (envelope-from gonzo@freebsd.org) Received: from id.bluezbox.com (id.bluezbox.com [45.55.20.155]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DB28E2A; Mon, 3 Oct 2016 01:12:58 +0000 (UTC) (envelope-from gonzo@freebsd.org) Received: from [127.0.0.1] (helo=id.bluezbox.com) by id.bluezbox.com with esmtp (Exim 4.86_2 (FreeBSD)) (envelope-from ) id 1bqroN-0004N1-JK; Sun, 02 Oct 2016 18:12:56 -0700 Received: (from gonzo@localhost) by id.bluezbox.com (8.15.2/8.15.2/Submit) id u931CtJ5016802; Sun, 2 Oct 2016 18:12:55 -0700 (PDT) (envelope-from gonzo@freebsd.org) X-Authentication-Warning: id.bluezbox.com: gonzo set sender to gonzo@freebsd.org using -f Date: Sun, 2 Oct 2016 18:12:54 -0700 From: Oleksandr Tymoshenko To: Andrew Turner Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306490 - head/sys/arm/conf Message-ID: <20161003011254.GA16793@bluezbox.com> References: <201609301020.u8UAKriZ087716@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201609301020.u8UAKriZ087716@repo.freebsd.org> X-Operating-System: FreeBSD/10.3-RELEASE-p3 (amd64) User-Agent: Mutt/1.6.1 (2016-04-27) X-Spam-Level: -- X-Spam-Report: Spam detection software, running on the system "id.bluezbox.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: Andrew Turner (andrew@FreeBSD.org) wrote: > Author: andrew > Date: Fri Sep 30 10:20:53 2016 > New Revision: 306490 > URL: https://svnweb.freebsd.org/changeset/base/306490 > > Log: > Add support for Tegra to the armv6 GENERIC kernel. > > Reviewed by: imp, mmel > Sponsored by: ABT Systems Ltd > Differential Revision: https://reviews.freebsd.org/D8084 > > Modified: > head/sys/arm/conf/GENERIC [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 01:12:59 -0000 Andrew Turner (andrew@FreeBSD.org) wrote: > Author: andrew > Date: Fri Sep 30 10:20:53 2016 > New Revision: 306490 > URL: https://svnweb.freebsd.org/changeset/base/306490 > > Log: > Add support for Tegra to the armv6 GENERIC kernel. > > Reviewed by: imp, mmel > Sponsored by: ABT Systems Ltd > Differential Revision: https://reviews.freebsd.org/D8084 > > Modified: > head/sys/arm/conf/GENERIC This change also requires dtb/nvidia in MODULES_EXTRA -- gonzo From owner-svn-src-all@freebsd.org Mon Oct 3 01:46:49 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98214AD98F8; Mon, 3 Oct 2016 01:46:49 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5AF85DC3; Mon, 3 Oct 2016 01:46:49 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u931kmwt063322; Mon, 3 Oct 2016 01:46:48 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u931klQS063311; Mon, 3 Oct 2016 01:46:47 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201610030146.u931klQS063311@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Mon, 3 Oct 2016 01:46:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306620 - head/usr.bin/mkimg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 01:46:49 -0000 Author: marcel Date: Mon Oct 3 01:46:47 2016 New Revision: 306620 URL: https://svnweb.freebsd.org/changeset/base/306620 Log: Replace STAILQ with TAILQ. TAILQs are portable enough that they can be used on both macOS and Linux. STAILQs are not. In particular, STAILQ_LAST does not next on Linux. Since neither STAILQ_FOREACH_SAFE nor TAILQ_FOREACH_SAFE exist on Linux, replace its use with a regular TAILQ_FOREACH. The _SAFE variant was only used for having the next pointer in a local variable. Modified: head/usr.bin/mkimg/apm.c head/usr.bin/mkimg/bsd.c head/usr.bin/mkimg/ebr.c head/usr.bin/mkimg/gpt.c head/usr.bin/mkimg/image.c head/usr.bin/mkimg/mbr.c head/usr.bin/mkimg/mkimg.c head/usr.bin/mkimg/mkimg.h head/usr.bin/mkimg/pc98.c head/usr.bin/mkimg/vtoc8.c Modified: head/usr.bin/mkimg/apm.c ============================================================================== --- head/usr.bin/mkimg/apm.c Mon Oct 3 01:08:34 2016 (r306619) +++ head/usr.bin/mkimg/apm.c Mon Oct 3 01:46:47 2016 (r306620) @@ -91,7 +91,7 @@ apm_write(lba_t imgsz, void *bootcode __ strncpy(ent->ent_type, APM_ENT_TYPE_SELF, sizeof(ent->ent_type)); strncpy(ent->ent_name, "Apple", sizeof(ent->ent_name)); - STAILQ_FOREACH(part, &partlist, link) { + TAILQ_FOREACH(part, &partlist, link) { ent = (void *)(buf + (part->index + 2) * secsz); be16enc(&ent->ent_sig, APM_ENT_SIG); be32enc(&ent->ent_pmblkcnt, nparts + 1); Modified: head/usr.bin/mkimg/bsd.c ============================================================================== --- head/usr.bin/mkimg/bsd.c Mon Oct 3 01:08:34 2016 (r306619) +++ head/usr.bin/mkimg/bsd.c Mon Oct 3 01:46:47 2016 (r306620) @@ -103,7 +103,7 @@ bsd_write(lba_t imgsz, void *bootcode) dp = &d->d_partitions[RAW_PART]; le32enc(&dp->p_size, imgsz); - STAILQ_FOREACH(part, &partlist, link) { + TAILQ_FOREACH(part, &partlist, link) { n = part->index + ((part->index >= RAW_PART) ? 1 : 0); dp = &d->d_partitions[n]; le32enc(&dp->p_size, part->size); Modified: head/usr.bin/mkimg/ebr.c ============================================================================== --- head/usr.bin/mkimg/ebr.c Mon Oct 3 01:08:34 2016 (r306619) +++ head/usr.bin/mkimg/ebr.c Mon Oct 3 01:46:47 2016 (r306620) @@ -88,7 +88,7 @@ ebr_write(lba_t imgsz __unused, void *bo le16enc(ebr + DOSMAGICOFFSET, DOSMAGIC); error = 0; - STAILQ_FOREACH_SAFE(part, &partlist, link, next) { + TAILQ_FOREACH(part, &partlist, link) { block = part->block - nsecs; size = round_track(part->size); dp = (void *)(ebr + DOSPARTOFF); @@ -100,6 +100,7 @@ ebr_write(lba_t imgsz __unused, void *bo le32enc(&dp->dp_size, size); /* Add link entry */ + next = TAILQ_NEXT(part, link); if (next != NULL) { size = round_track(next->size); dp++; Modified: head/usr.bin/mkimg/gpt.c ============================================================================== --- head/usr.bin/mkimg/gpt.c Mon Oct 3 01:08:34 2016 (r306619) +++ head/usr.bin/mkimg/gpt.c Mon Oct 3 01:46:47 2016 (r306620) @@ -208,7 +208,7 @@ gpt_mktbl(u_int tblsz) if (tbl == NULL) return (NULL); - STAILQ_FOREACH(part, &partlist, link) { + TAILQ_FOREACH(part, &partlist, link) { ent = tbl + part->index; gpt_uuid_enc(&ent->ent_type, ALIAS_TYPE2PTR(part->type)); mkimg_uuid(&uuid); Modified: head/usr.bin/mkimg/image.c ============================================================================== --- head/usr.bin/mkimg/image.c Mon Oct 3 01:08:34 2016 (r306619) +++ head/usr.bin/mkimg/image.c Mon Oct 3 01:46:47 2016 (r306620) @@ -60,7 +60,7 @@ __FBSDID("$FreeBSD$"); #endif struct chunk { - STAILQ_ENTRY(chunk) ch_list; + TAILQ_ENTRY(chunk) ch_list; size_t ch_size; /* Size of chunk in bytes. */ lba_t ch_block; /* Block address in image. */ union { @@ -78,7 +78,7 @@ struct chunk { #define CH_TYPE_MEMORY 2 /* Memory-backed chunk */ }; -static STAILQ_HEAD(chunk_head, chunk) image_chunks; +static TAILQ_HEAD(chunk_head, chunk) image_chunks; static u_int image_nchunks; static char image_swap_file[PATH_MAX]; @@ -139,14 +139,14 @@ image_chunk_find(lba_t blk) struct chunk *ch; ch = (last != NULL && last->ch_block <= blk) - ? last : STAILQ_FIRST(&image_chunks); + ? last : TAILQ_FIRST(&image_chunks); while (ch != NULL) { if (ch->ch_block <= blk && (lba_t)(ch->ch_block + (ch->ch_size / secsz)) > blk) { last = ch; break; } - ch = STAILQ_NEXT(ch, ch_list); + ch = TAILQ_NEXT(ch, ch_list); } return (ch); } @@ -188,7 +188,7 @@ image_chunk_memory(struct chunk *ch, lba ch->ch_size = (blk - ch->ch_block) * secsz; new->ch_block = blk; new->ch_size -= ch->ch_size; - STAILQ_INSERT_AFTER(&image_chunks, ch, new, ch_list); + TAILQ_INSERT_AFTER(&image_chunks, ch, new, ch_list); image_nchunks++; ch = new; } @@ -203,7 +203,7 @@ image_chunk_memory(struct chunk *ch, lba ch->ch_size = secsz; new->ch_block++; new->ch_size -= secsz; - STAILQ_INSERT_AFTER(&image_chunks, ch, new, ch_list); + TAILQ_INSERT_AFTER(&image_chunks, ch, new, ch_list); image_nchunks++; } @@ -219,7 +219,7 @@ image_chunk_skipto(lba_t to) lba_t from; size_t sz; - ch = STAILQ_LAST(&image_chunks, chunk, ch_list); + ch = TAILQ_LAST(&image_chunks, chunk_head); from = (ch != NULL) ? ch->ch_block + (ch->ch_size / secsz) : 0LL; assert(from <= to); @@ -244,7 +244,7 @@ image_chunk_skipto(lba_t to) ch->ch_block = from; ch->ch_size = sz; ch->ch_type = CH_TYPE_ZEROES; - STAILQ_INSERT_TAIL(&image_chunks, ch, ch_list); + TAILQ_INSERT_TAIL(&image_chunks, ch, ch_list); image_nchunks++; return (0); } @@ -254,7 +254,7 @@ image_chunk_append(lba_t blk, size_t sz, { struct chunk *ch; - ch = STAILQ_LAST(&image_chunks, chunk, ch_list); + ch = TAILQ_LAST(&image_chunks, chunk_head); if (ch != NULL && ch->ch_type == CH_TYPE_FILE) { if (fd == ch->ch_u.file.fd && blk == (lba_t)(ch->ch_block + (ch->ch_size / secsz)) && @@ -275,7 +275,7 @@ image_chunk_append(lba_t blk, size_t sz, ch->ch_type = CH_TYPE_FILE; ch->ch_u.file.ofs = ofs; ch->ch_u.file.fd = fd; - STAILQ_INSERT_TAIL(&image_chunks, ch, ch_list); + TAILQ_INSERT_TAIL(&image_chunks, ch, ch_list); image_nchunks++; return (0); } @@ -698,7 +698,7 @@ image_cleanup(void) { struct chunk *ch; - while ((ch = STAILQ_FIRST(&image_chunks)) != NULL) { + while ((ch = TAILQ_FIRST(&image_chunks)) != NULL) { switch (ch->ch_type) { case CH_TYPE_FILE: /* We may be closing the same file multiple times. */ @@ -711,7 +711,7 @@ image_cleanup(void) default: break; } - STAILQ_REMOVE_HEAD(&image_chunks, ch_list); + TAILQ_REMOVE(&image_chunks, ch, ch_list); free(ch); } if (image_swap_fd != -1) @@ -724,7 +724,7 @@ image_init(void) { const char *tmpdir; - STAILQ_INIT(&image_chunks); + TAILQ_INIT(&image_chunks); image_nchunks = 0; image_swap_size = 0; Modified: head/usr.bin/mkimg/mbr.c ============================================================================== --- head/usr.bin/mkimg/mbr.c Mon Oct 3 01:08:34 2016 (r306619) +++ head/usr.bin/mkimg/mbr.c Mon Oct 3 01:46:47 2016 (r306620) @@ -101,7 +101,7 @@ mbr_write(lba_t imgsz __unused, void *bo memset(mbr, 0, secsz); le16enc(mbr + DOSMAGICOFFSET, DOSMAGIC); dpbase = (void *)(mbr + DOSPARTOFF); - STAILQ_FOREACH(part, &partlist, link) { + TAILQ_FOREACH(part, &partlist, link) { size = round_track(part->size); dp = dpbase + part->index; dp->dp_flag = (part->index == 0 && bootcode != NULL) ? 0x80 : 0; Modified: head/usr.bin/mkimg/mkimg.c ============================================================================== --- head/usr.bin/mkimg/mkimg.c Mon Oct 3 01:08:34 2016 (r306619) +++ head/usr.bin/mkimg/mkimg.c Mon Oct 3 01:46:47 2016 (r306620) @@ -61,7 +61,7 @@ static struct option longopts[] = { static uint64_t capacity; -struct partlisthead partlist = STAILQ_HEAD_INITIALIZER(partlist); +struct partlisthead partlist = TAILQ_HEAD_INITIALIZER(partlist); u_int nparts = 0; u_int unit_testing; @@ -301,7 +301,7 @@ parse_part(const char *spec) } part->index = nparts; - STAILQ_INSERT_TAIL(&partlist, part, link); + TAILQ_INSERT_TAIL(&partlist, part, link); nparts++; return (0); @@ -412,14 +412,14 @@ mkimg(void) int error, fd; /* First check partition information */ - STAILQ_FOREACH(part, &partlist, link) { + TAILQ_FOREACH(part, &partlist, link) { error = scheme_check_part(part); if (error) errc(EX_DATAERR, error, "partition %d", part->index+1); } block = scheme_metadata(SCHEME_META_IMG_START, 0); - STAILQ_FOREACH(part, &partlist, link) { + TAILQ_FOREACH(part, &partlist, link) { block = scheme_metadata(SCHEME_META_PART_BEFORE, block); if (verbose) fprintf(stderr, "partition %d: starting block %llu " Modified: head/usr.bin/mkimg/mkimg.h ============================================================================== --- head/usr.bin/mkimg/mkimg.h Mon Oct 3 01:08:34 2016 (r306619) +++ head/usr.bin/mkimg/mkimg.h Mon Oct 3 01:46:47 2016 (r306620) @@ -32,7 +32,7 @@ #include struct part { - STAILQ_ENTRY(part) link; + TAILQ_ENTRY(part) link; char *alias; /* Partition type alias. */ char *contents; /* Contents/size specification. */ u_int kind; /* Content kind. */ @@ -47,7 +47,7 @@ struct part { char *label; /* Partition label. */ }; -extern STAILQ_HEAD(partlisthead, part) partlist; +extern TAILQ_HEAD(partlisthead, part) partlist; extern u_int nparts; extern u_int unit_testing; Modified: head/usr.bin/mkimg/pc98.c ============================================================================== --- head/usr.bin/mkimg/pc98.c Mon Oct 3 01:08:34 2016 (r306619) +++ head/usr.bin/mkimg/pc98.c Mon Oct 3 01:46:47 2016 (r306620) @@ -97,7 +97,7 @@ pc98_write(lba_t imgsz __unused, void *b memset(buf, 0, PC98_BOOTCODESZ); le16enc(buf + PC98_MAGICOFS, PC98_MAGIC); dpbase = (void *)(buf + secsz); - STAILQ_FOREACH(part, &partlist, link) { + TAILQ_FOREACH(part, &partlist, link) { size = round_track(part->size); dp = dpbase + part->index; ptyp = ALIAS_TYPE2INT(part->type); Modified: head/usr.bin/mkimg/vtoc8.c ============================================================================== --- head/usr.bin/mkimg/vtoc8.c Mon Oct 3 01:08:34 2016 (r306619) +++ head/usr.bin/mkimg/vtoc8.c Mon Oct 3 01:46:47 2016 (r306620) @@ -87,7 +87,7 @@ vtoc8_write(lba_t imgsz, void *bootcode be16enc(&vtoc8.magic, VTOC_MAGIC); be32enc(&vtoc8.map[VTOC_RAW_PART].nblks, imgsz); - STAILQ_FOREACH(part, &partlist, link) { + TAILQ_FOREACH(part, &partlist, link) { n = part->index + ((part->index >= VTOC_RAW_PART) ? 1 : 0); be16enc(&vtoc8.part[n].tag, ALIAS_TYPE2INT(part->type)); be32enc(&vtoc8.map[n].cyl, part->block / (nsecs * nheads)); From owner-svn-src-all@freebsd.org Mon Oct 3 02:37:30 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD476AC66EB; Mon, 3 Oct 2016 02:37:30 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 860AE2A1; Mon, 3 Oct 2016 02:37:30 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u932bT6T081953; Mon, 3 Oct 2016 02:37:29 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u932bSZ6081938; Mon, 3 Oct 2016 02:37:28 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201610030237.u932bSZ6081938@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Mon, 3 Oct 2016 02:37:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306621 - head/usr.bin/mkimg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 02:37:30 -0000 Author: marcel Date: Mon Oct 3 02:37:28 2016 New Revision: 306621 URL: https://svnweb.freebsd.org/changeset/base/306621 Log: Prefer over . While here remove redundant inclusion of . Move the inclusion of the disk partitioning headers out of order and inbetween standard headers and local header. They will change in a subsequent commit. Modified: head/usr.bin/mkimg/apm.c head/usr.bin/mkimg/bsd.c head/usr.bin/mkimg/ebr.c head/usr.bin/mkimg/format.c head/usr.bin/mkimg/gpt.c head/usr.bin/mkimg/image.c head/usr.bin/mkimg/mbr.c head/usr.bin/mkimg/mkimg.c head/usr.bin/mkimg/pc98.c head/usr.bin/mkimg/qcow.c head/usr.bin/mkimg/raw.c head/usr.bin/mkimg/scheme.c head/usr.bin/mkimg/vhd.c head/usr.bin/mkimg/vmdk.c head/usr.bin/mkimg/vtoc8.c Modified: head/usr.bin/mkimg/apm.c ============================================================================== --- head/usr.bin/mkimg/apm.c Mon Oct 3 01:46:47 2016 (r306620) +++ head/usr.bin/mkimg/apm.c Mon Oct 3 02:37:28 2016 (r306621) @@ -27,13 +27,14 @@ #include __FBSDID("$FreeBSD$"); -#include -#include #include +#include #include #include #include +#include + #include "endian.h" #include "image.h" #include "mkimg.h" Modified: head/usr.bin/mkimg/bsd.c ============================================================================== --- head/usr.bin/mkimg/bsd.c Mon Oct 3 01:46:47 2016 (r306620) +++ head/usr.bin/mkimg/bsd.c Mon Oct 3 02:37:28 2016 (r306621) @@ -27,13 +27,14 @@ #include __FBSDID("$FreeBSD$"); -#include -#include #include +#include #include #include #include +#include + #include "endian.h" #include "image.h" #include "mkimg.h" Modified: head/usr.bin/mkimg/ebr.c ============================================================================== --- head/usr.bin/mkimg/ebr.c Mon Oct 3 01:46:47 2016 (r306620) +++ head/usr.bin/mkimg/ebr.c Mon Oct 3 02:37:28 2016 (r306621) @@ -27,13 +27,14 @@ #include __FBSDID("$FreeBSD$"); -#include -#include #include +#include #include #include #include +#include + #include "endian.h" #include "image.h" #include "mkimg.h" Modified: head/usr.bin/mkimg/format.c ============================================================================== --- head/usr.bin/mkimg/format.c Mon Oct 3 01:46:47 2016 (r306620) +++ head/usr.bin/mkimg/format.c Mon Oct 3 02:37:28 2016 (r306621) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include #include #include #include Modified: head/usr.bin/mkimg/gpt.c ============================================================================== --- head/usr.bin/mkimg/gpt.c Mon Oct 3 01:46:47 2016 (r306620) +++ head/usr.bin/mkimg/gpt.c Mon Oct 3 02:37:28 2016 (r306621) @@ -27,10 +27,7 @@ #include __FBSDID("$FreeBSD$"); -#include -#include #include -#include #include #include #include @@ -38,6 +35,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include + #include "endian.h" #include "image.h" #include "mkimg.h" Modified: head/usr.bin/mkimg/image.c ============================================================================== --- head/usr.bin/mkimg/image.c Mon Oct 3 01:46:47 2016 (r306620) +++ head/usr.bin/mkimg/image.c Mon Oct 3 02:37:28 2016 (r306621) @@ -28,9 +28,7 @@ __FBSDID("$FreeBSD$"); #include -#include #include -#include #include #include #include Modified: head/usr.bin/mkimg/mbr.c ============================================================================== --- head/usr.bin/mkimg/mbr.c Mon Oct 3 01:46:47 2016 (r306620) +++ head/usr.bin/mkimg/mbr.c Mon Oct 3 02:37:28 2016 (r306621) @@ -27,13 +27,14 @@ #include __FBSDID("$FreeBSD$"); -#include -#include #include +#include #include #include #include +#include + #include "endian.h" #include "image.h" #include "mkimg.h" Modified: head/usr.bin/mkimg/mkimg.c ============================================================================== --- head/usr.bin/mkimg/mkimg.c Mon Oct 3 01:46:47 2016 (r306620) +++ head/usr.bin/mkimg/mkimg.c Mon Oct 3 02:37:28 2016 (r306621) @@ -27,9 +27,7 @@ #include __FBSDID("$FreeBSD$"); -#include #include -#include #include #include #include @@ -37,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/usr.bin/mkimg/pc98.c ============================================================================== --- head/usr.bin/mkimg/pc98.c Mon Oct 3 01:46:47 2016 (r306620) +++ head/usr.bin/mkimg/pc98.c Mon Oct 3 02:37:28 2016 (r306621) @@ -27,13 +27,14 @@ #include __FBSDID("$FreeBSD$"); -#include -#include #include +#include #include #include #include +#include + #include "endian.h" #include "image.h" #include "mkimg.h" Modified: head/usr.bin/mkimg/qcow.c ============================================================================== --- head/usr.bin/mkimg/qcow.c Mon Oct 3 01:46:47 2016 (r306620) +++ head/usr.bin/mkimg/qcow.c Mon Oct 3 02:37:28 2016 (r306621) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include #include #include #include Modified: head/usr.bin/mkimg/raw.c ============================================================================== --- head/usr.bin/mkimg/raw.c Mon Oct 3 01:46:47 2016 (r306620) +++ head/usr.bin/mkimg/raw.c Mon Oct 3 02:37:28 2016 (r306621) @@ -27,8 +27,8 @@ #include __FBSDID("$FreeBSD$"); -#include #include +#include #include #include #include Modified: head/usr.bin/mkimg/scheme.c ============================================================================== --- head/usr.bin/mkimg/scheme.c Mon Oct 3 01:46:47 2016 (r306620) +++ head/usr.bin/mkimg/scheme.c Mon Oct 3 02:37:28 2016 (r306621) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include #include #include #include Modified: head/usr.bin/mkimg/vhd.c ============================================================================== --- head/usr.bin/mkimg/vhd.c Mon Oct 3 01:46:47 2016 (r306620) +++ head/usr.bin/mkimg/vhd.c Mon Oct 3 02:37:28 2016 (r306621) @@ -27,8 +27,8 @@ #include __FBSDID("$FreeBSD$"); -#include #include +#include #include #include #include Modified: head/usr.bin/mkimg/vmdk.c ============================================================================== --- head/usr.bin/mkimg/vmdk.c Mon Oct 3 01:46:47 2016 (r306620) +++ head/usr.bin/mkimg/vmdk.c Mon Oct 3 02:37:28 2016 (r306621) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include #include #include #include Modified: head/usr.bin/mkimg/vtoc8.c ============================================================================== --- head/usr.bin/mkimg/vtoc8.c Mon Oct 3 01:46:47 2016 (r306620) +++ head/usr.bin/mkimg/vtoc8.c Mon Oct 3 02:37:28 2016 (r306621) @@ -27,14 +27,15 @@ #include __FBSDID("$FreeBSD$"); -#include #include -#include +#include #include #include #include #include +#include + #include "endian.h" #include "image.h" #include "mkimg.h" From owner-svn-src-all@freebsd.org Mon Oct 3 04:00:31 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3CE9AF36FE; Mon, 3 Oct 2016 04:00:31 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A3F257E6; Mon, 3 Oct 2016 04:00:31 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9340Ub8012583; Mon, 3 Oct 2016 04:00:30 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9340UM1012582; Mon, 3 Oct 2016 04:00:30 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201610030400.u9340UM1012582@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Mon, 3 Oct 2016 04:00:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306622 - head/usr.bin/mkimg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 04:00:31 -0000 Author: marcel Date: Mon Oct 3 04:00:30 2016 New Revision: 306622 URL: https://svnweb.freebsd.org/changeset/base/306622 Log: Replace OFF_MAX with INT64_MAX. The former is defined on Linux. Modified: head/usr.bin/mkimg/mkimg.c Modified: head/usr.bin/mkimg/mkimg.c ============================================================================== --- head/usr.bin/mkimg/mkimg.c Mon Oct 3 02:37:28 2016 (r306621) +++ head/usr.bin/mkimg/mkimg.c Mon Oct 3 04:00:30 2016 (r306622) @@ -496,7 +496,7 @@ main(int argc, char *argv[]) err(EX_UNAVAILABLE, "%s", optarg); break; case 'c': /* CAPACITY */ - error = parse_uint64(&capacity, 1, OFF_MAX, optarg); + error = parse_uint64(&capacity, 1, INT64_MAX, optarg); if (error) errc(EX_DATAERR, error, "capacity in bytes"); break; From owner-svn-src-all@freebsd.org Mon Oct 3 06:43:58 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0404AC676A for ; Mon, 3 Oct 2016 06:43:58 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yw0-x22e.google.com (mail-yw0-x22e.google.com [IPv6:2607:f8b0:4002:c05::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6E9A76C2 for ; Mon, 3 Oct 2016 06:43:58 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yw0-x22e.google.com with SMTP id g192so102649596ywh.1 for ; Sun, 02 Oct 2016 23:43:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=DiLC6+ist35+d4Kh9Ipgacx6CVC+5i6qb0gxnZtbMoU=; b=SaGV6IXVzlTD8bMae9fKN6bJWoKc5oZ+Rd89jgZ1WzFP3wNeurVfSTEEyS00+P7v1u GHhXUC1MKjSfN0Po+z+eLXdP5brWHPUmfn92jxvAyOg+VEN1S/sdhmE7OXAaYFpbdC27 NM86HWBbo2aAKkoYjleohlwUpge+T5IxoJ8Bvk4lDLMcTFf/fjinq+Z8nZvXgGzmcA/a Q9PWYkMug4oSXA7juJumnclMH6To0Z3Pbmc4B9aBMss0Vg/3mhGqUL7P89VLKHodtMkv Hn5kjm8TlrLFwpSaYHc+pXmwxdYw8XsDXNoi4+3mpL+HTglv02c23zcZSOYUEti7OHXQ 2yIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=DiLC6+ist35+d4Kh9Ipgacx6CVC+5i6qb0gxnZtbMoU=; b=P+HPYc6GpQIMbbyBkuPtopd2ZuCc2XehrzSV6ppWFKR3gAt3KANtFu8ZuX+/5+u/c2 65+2LCATN5vDaf53JfXftNQG+7Y+CyQMn/rbvpp5cp1QJS300bVIfoj52Vu0nAxdn41S GLiR2Z+g0U7YSYXTAeBlt6Ba9dIX8xViauKAyxi3RLA2P0j+dyTHKziyV88RHnXOXUfQ RpjI3D1PIXhFN2mLi5QT1PH1lKqL13jk1oTucVCF1L8qjCv+ln22L/wK8BWNqpqJyRF+ JR4NuQMgqKSZXng1+aXs+LWS73EJ/mYWDR9T9sK4Z4BciYNQt52C6sLsIEHmEgQfwaJz /ANg== X-Gm-Message-State: AA6/9RmbBNBf8D6mCh3bOpn+DeToClNUSnrhbNbRi2zajldLsffXEeIFF7JbB2Vr8BYrybynT7CzMufkf4Cipw== X-Received: by 10.13.221.147 with SMTP id g141mr1004560ywe.169.1475477037589; Sun, 02 Oct 2016 23:43:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.201.71 with HTTP; Sun, 2 Oct 2016 23:43:57 -0700 (PDT) In-Reply-To: <201610030400.u9340UM1012582@repo.freebsd.org> References: <201610030400.u9340UM1012582@repo.freebsd.org> From: Ed Schouten Date: Mon, 3 Oct 2016 08:43:57 +0200 Message-ID: Subject: Re: svn commit: r306622 - head/usr.bin/mkimg To: Marcel Moolenaar Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 06:43:58 -0000 2016-10-03 6:00 GMT+02:00 Marcel Moolenaar : > Log: > Replace OFF_MAX with INT64_MAX. The former is defined on Linux. Blargh. If only C had std::numeric_limits::{min,max}. :-( -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 From owner-svn-src-all@freebsd.org Mon Oct 3 06:52:32 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 088E4AC6980 for ; Mon, 3 Oct 2016 06:52:32 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x235.google.com (mail-io0-x235.google.com [IPv6:2607:f8b0:4001:c06::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CEB1AB17 for ; Mon, 3 Oct 2016 06:52:31 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x235.google.com with SMTP id e66so111927552iod.1 for ; Sun, 02 Oct 2016 23:52:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=aDzmCz6TFHWuG3NyrWWsOP3D8Ul3cQjcwbhhH5cBe4Q=; b=G+CXdf4EB9aI2kzcOVEc8BvwZOSaoJvTqOpy3xmxw+th1bkVgjwqtVaTH8fbDSJb+j WvRHL34d4ahi3g0emDfdrcfvMBVqjuwZYA5/EOV3kZzjFANQPUEHEUGNR+rIItPISuj3 P5ttkFofZBGmErSKb0xL/O57IkMfX9hjfCygCf9RC7vXPfb5fMI0PIYy30Mo9FTgSSCB Kdv1ZutwsFbGMujxIvGMnqEVHgkXNatlA1bPzhBSO4nkqUxR7FNWzGZZDYrz/+DeGd4Q AMfead816e8eCqSRezTZRuWW/hxtuARuA63tKhKR/yGvteQwinlXCj4ceG0zbhJmn4oC E1TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=aDzmCz6TFHWuG3NyrWWsOP3D8Ul3cQjcwbhhH5cBe4Q=; b=FVgrBVNHTuZyAPZSHEbldNfbe/7VyZsDKY7nRqcq6YN8WG9jLeBAnZNXxW0Hx6sHsy 56nszrZA//VR3dN7lA5WVsPYQnk4y8k6ZQ6MRLphivuKi27M34j6ofAABvNMfiIvPmuW +aKLu+akrv6YC5I1LTTYvtHDcnJzTN44bRfh2Xtaj1lx/e3j85qI6Kr/GCub1DkaY1SM pdGfPNIKUYPK++1d7h5RZ/69rTwnGSmqpxy+gMPONT3l6Vv0MkSWT9y3y4N/znAf00W7 Z/LVR1wf78J9wDpUf37F4LByl+qUZaR4svNV1KwbckBsFSdm6ouCicoyFAd6jJ90odFg cLlg== X-Gm-Message-State: AA6/9RnJoZ065tIvrkjs03azZ9leXkt86j+zQsDHWS6KMeujYtXt3nS15/NJO8zvgc5G+g2aAPIjlIxOPpLTUw== X-Received: by 10.107.135.202 with SMTP id r71mr7200717ioi.224.1475477551191; Sun, 02 Oct 2016 23:52:31 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.36.65.7 with HTTP; Sun, 2 Oct 2016 23:52:30 -0700 (PDT) X-Originating-IP: [69.53.245.200] In-Reply-To: References: <201610030400.u9340UM1012582@repo.freebsd.org> From: Warner Losh Date: Mon, 3 Oct 2016 00:52:30 -0600 X-Google-Sender-Auth: pCcipQa7LpOL7Gssh0lGw5870V0 Message-ID: Subject: Re: svn commit: r306622 - head/usr.bin/mkimg To: Ed Schouten Cc: Marcel Moolenaar , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 06:52:32 -0000 Wouldn't it be better to say at the top #ifndef OFF_MAX #define OFF_MAX INT64_MAX #endif On Mon, Oct 3, 2016 at 12:43 AM, Ed Schouten wrote: > 2016-10-03 6:00 GMT+02:00 Marcel Moolenaar : >> Log: >> Replace OFF_MAX with INT64_MAX. The former is defined on Linux. > > Blargh. If only C had std::numeric_limits::{min,max}. :-( > > -- > Ed Schouten > Nuxi, 's-Hertogenbosch, the Netherlands > KvK-nr.: 62051717 > From owner-svn-src-all@freebsd.org Mon Oct 3 08:15:59 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9131FAF3101; Mon, 3 Oct 2016 08:15:59 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60A9893D; Mon, 3 Oct 2016 08:15:59 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u938Fw9E010092; Mon, 3 Oct 2016 08:15:58 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u938FwX2010091; Mon, 3 Oct 2016 08:15:58 GMT (envelope-from des@FreeBSD.org) Message-Id: <201610030815.u938FwX2010091@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Mon, 3 Oct 2016 08:15:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r306623 - stable/9/crypto/openssh X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 08:15:59 -0000 Author: des Date: Mon Oct 3 08:15:58 2016 New Revision: 306623 URL: https://svnweb.freebsd.org/changeset/base/306623 Log: MFH (r292408): use correct length in calloc() call Modified: stable/9/crypto/openssh/digest-libc.c Directory Properties: stable/9/ (props changed) stable/9/crypto/openssh/ (props changed) Modified: stable/9/crypto/openssh/digest-libc.c ============================================================================== --- stable/9/crypto/openssh/digest-libc.c Mon Oct 3 04:00:30 2016 (r306622) +++ stable/9/crypto/openssh/digest-libc.c Mon Oct 3 08:15:58 2016 (r306623) @@ -147,7 +147,7 @@ ssh_digest_start(int alg) const struct ssh_digest *digest = ssh_digest_by_alg(alg); struct ssh_digest_ctx *ret; - if (digest == NULL || (ret = calloc(1, sizeof(ret))) == NULL) + if (digest == NULL || (ret = calloc(1, sizeof(*ret))) == NULL) return NULL; if ((ret->mdctx = calloc(1, digest->ctx_len)) == NULL) { free(ret); From owner-svn-src-all@freebsd.org Mon Oct 3 09:16:06 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0AA08AF2BAE; Mon, 3 Oct 2016 09:16:06 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99EDAA9A; Mon, 3 Oct 2016 09:16:05 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id u939FvAA058938 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 3 Oct 2016 12:15:57 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u939FvAA058938 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u939FvGR058936; Mon, 3 Oct 2016 12:15:57 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 3 Oct 2016 12:15:57 +0300 From: Konstantin Belousov To: Sevan Janiyan Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306598 - head/sbin/ccdconfig Message-ID: <20161003091557.GJ38409@kib.kiev.ua> References: <201610022319.u92NJ5d1006467@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201610022319.u92NJ5d1006467@repo.freebsd.org> User-Agent: Mutt/1.6.1 (2016-04-27) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 09:16:06 -0000 On Sun, Oct 02, 2016 at 11:19:05PM +0000, Sevan Janiyan wrote: > Author: sevan (doc committer) > Date: Sun Oct 2 23:19:05 2016 > New Revision: 306598 > URL: https://svnweb.freebsd.org/changeset/base/306598 > > Log: > ccdconfig first appeared in NetBSD 1.1 > From NetBSD man page, confirmed with repo tags in CVS [1] > (there was also no 1.0a release according to [2]) > > [1] http://cvsweb.netbsd.org/bsdweb.cgi/src/sbin/ccdconfig/ccdconfig.c > [2] http://netbsd.org/releases/formal.html#history > > PR: 212437 > Approved by: bcr (mentor) > Obtained from: NetBSD > MFC after: 4 days > Differential Revision: https://reviews.freebsd.org/D8105 > > Modified: > head/sbin/ccdconfig/ccdconfig.8 Is ccd(4) still operational ? I suspect that it is not, and that sbin/ccdconfig and ccd(4) page should be removed. From owner-svn-src-all@freebsd.org Mon Oct 3 09:28:07 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7984AAF2F5C; Mon, 3 Oct 2016 09:28:07 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4961014F; Mon, 3 Oct 2016 09:28:07 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u939S69n037064; Mon, 3 Oct 2016 09:28:06 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u939S61L037063; Mon, 3 Oct 2016 09:28:06 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201610030928.u939S61L037063@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 3 Oct 2016 09:28:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306624 - stable/11/lib/libc/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 09:28:07 -0000 Author: kib Date: Mon Oct 3 09:28:06 2016 New Revision: 306624 URL: https://svnweb.freebsd.org/changeset/base/306624 Log: MFC r306505: Add an article. Modified: stable/11/lib/libc/sys/cap_enter.2 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/cap_enter.2 ============================================================================== --- stable/11/lib/libc/sys/cap_enter.2 Mon Oct 3 08:15:58 2016 (r306623) +++ stable/11/lib/libc/sys/cap_enter.2 Mon Oct 3 09:28:06 2016 (r306624) @@ -73,7 +73,7 @@ sandbox. If the .Dv kern.trap_enocap sysctl MIB is set to a non-zero value, then for any process executing in a -capability mode sandbox, any syscall which results in either +capability mode sandbox, any syscall which results in either an .Er ENOTCAPABLE or .Er ECAPMODE From owner-svn-src-all@freebsd.org Mon Oct 3 09:30:27 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E154AC60ED; Mon, 3 Oct 2016 09:30:27 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E37033AF; Mon, 3 Oct 2016 09:30:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u939UQcu037213; Mon, 3 Oct 2016 09:30:26 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u939UPhl037210; Mon, 3 Oct 2016 09:30:25 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201610030930.u939UPhl037210@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 3 Oct 2016 09:30:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306625 - stable/11/lib/libc/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 09:30:27 -0000 Author: kib Date: Mon Oct 3 09:30:25 2016 New Revision: 306625 URL: https://svnweb.freebsd.org/changeset/base/306625 Log: MFC r306334: Document thr_suspend(2) and thr_wake(2). MFC r306506: Reword the statement. Added: stable/11/lib/libc/sys/thr_suspend.2 - copied, changed from r306334, head/lib/libc/sys/thr_suspend.2 stable/11/lib/libc/sys/thr_wake.2 - copied unchanged from r306334, head/lib/libc/sys/thr_wake.2 Modified: stable/11/lib/libc/sys/Makefile.inc Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/Makefile.inc ============================================================================== --- stable/11/lib/libc/sys/Makefile.inc Mon Oct 3 09:28:06 2016 (r306624) +++ stable/11/lib/libc/sys/Makefile.inc Mon Oct 3 09:30:25 2016 (r306625) @@ -311,6 +311,8 @@ MAN+= sctp_generic_recvmsg.2 \ thr_new.2 \ thr_self.2 \ thr_set_name.2 \ + thr_suspend.2 \ + thr_wake.2 \ timer_create.2 \ timer_delete.2 \ timer_settime.2 \ Copied and modified: stable/11/lib/libc/sys/thr_suspend.2 (from r306334, head/lib/libc/sys/thr_suspend.2) ============================================================================== --- head/lib/libc/sys/thr_suspend.2 Mon Sep 26 08:18:34 2016 (r306334, copy source) +++ stable/11/lib/libc/sys/thr_suspend.2 Mon Oct 3 09:30:25 2016 (r306625) @@ -61,9 +61,9 @@ system call puts the calling thread in a not eligible for CPU time. This state is exited by another thread calling .Xr thr_wake 2 , -by expiration of the timeout specified in the +when the time interval specified by .Fa timeout -argument, +has elapsed, or by the delivery of a signal to the suspended thread. .Pp If the Copied: stable/11/lib/libc/sys/thr_wake.2 (from r306334, head/lib/libc/sys/thr_wake.2) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/lib/libc/sys/thr_wake.2 Mon Oct 3 09:30:25 2016 (r306625, copy of r306334, head/lib/libc/sys/thr_wake.2) @@ -0,0 +1,112 @@ +.\" Copyright (c) 2016 The FreeBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This documentation was written by +.\" Konstantin Belousov under sponsorship +.\" from the FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd September 23, 2016 +.Dt THR_WAKE 2 +.Os +.Sh NAME +.Nm thr_wake +.Nd wake up the suspended thread +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In sys/thr.h +.Ft int +.Fn thr_wake "long id" +.Sh DESCRIPTION +.Bf -symbolic +This function is intended for implementing threading. +Normal applications should use +.Xr pthread_cond_timedwait 3 +together with +.Xr pthread_cond_broadcast 3 +for typical safe suspension with cooperation of the thread +being suspended, or +.Xr pthread_suspend_np 3 +and +.Xr pthread_resume_np 3 +in some specific situations, instead. +.Ef +.Pp +Passing the thread identifier of the calling thread +.Po +see +.Xr thr_self 2 +.Pc +to +.Fn thr_wake +sets a thread's flag to cause the next signal-interruptible sleep +of that thread in the kernel to fail immediately with the +.Er EINTR +error. +The flag is cleared by an interruptible sleep attempt or by a call to +.Xr thr_suspend 2. +This is used by the system threading library to implement cancellation. +.Pp +If +.Fa id +is not equal to the current thread identifier, the specified thread is +woken up if suspended by the +.Xr thr_suspend +system call. +If the thread is not suspended at the time of the +.Nm +call, the wake is remembered and the next attempt of the thread to +suspend itself with the +.Xr thr_suspend 2 +results in immediate return with success. +Only one wake is remembered. +.Sh RETURN VALUES +.Rv -std thr_wake +.Sh ERRORS +The +.Fn thr_wake +operation returns these errors: +.Bl -tag -width Er +.It Bq Er ESRCH +The specified thread was not found or does not belong to the process +of the calling thread. +.El +.Sh SEE ALSO +.Xr ps 1 , +.Xr thr_self 2 +.Xr thr_suspend 2 , +.Xr pthread_cancel 3 , +.Xr pthread_resume_np 3 , +.Xr pthread_suspend_np 3 +.Sh STANDARDS +The +.Fn thr_suspend +system call is non-standard and is used by +.Lb libthr +to implement +.St -p1003.1-2001 +.Xr pthread 3 +functionality. From owner-svn-src-all@freebsd.org Mon Oct 3 09:32:20 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7BBBAC6370; Mon, 3 Oct 2016 09:32:20 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 664AAA8E; Mon, 3 Oct 2016 09:32:20 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u939WJ7k040602; Mon, 3 Oct 2016 09:32:19 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u939WJB0040598; Mon, 3 Oct 2016 09:32:19 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201610030932.u939WJB0040598@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 3 Oct 2016 09:32:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306626 - stable/10/lib/libc/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 09:32:20 -0000 Author: kib Date: Mon Oct 3 09:32:19 2016 New Revision: 306626 URL: https://svnweb.freebsd.org/changeset/base/306626 Log: MFC r306334: Document thr_suspend(2) and thr_wake(2). MFC r306506: Reword the statement. Added: stable/10/lib/libc/sys/thr_suspend.2 - copied, changed from r306334, head/lib/libc/sys/thr_suspend.2 stable/10/lib/libc/sys/thr_wake.2 - copied unchanged from r306334, head/lib/libc/sys/thr_wake.2 Modified: stable/10/lib/libc/sys/Makefile.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sys/Makefile.inc ============================================================================== --- stable/10/lib/libc/sys/Makefile.inc Mon Oct 3 09:30:25 2016 (r306625) +++ stable/10/lib/libc/sys/Makefile.inc Mon Oct 3 09:32:19 2016 (r306626) @@ -316,6 +316,8 @@ MAN+= sctp_generic_recvmsg.2 \ sync.2 \ sysarch.2 \ syscall.2 \ + thr_suspend.2 \ + thr_wake.2 \ timer_create.2 \ timer_delete.2 \ timer_settime.2 \ Copied and modified: stable/10/lib/libc/sys/thr_suspend.2 (from r306334, head/lib/libc/sys/thr_suspend.2) ============================================================================== --- head/lib/libc/sys/thr_suspend.2 Mon Sep 26 08:18:34 2016 (r306334, copy source) +++ stable/10/lib/libc/sys/thr_suspend.2 Mon Oct 3 09:32:19 2016 (r306626) @@ -61,9 +61,9 @@ system call puts the calling thread in a not eligible for CPU time. This state is exited by another thread calling .Xr thr_wake 2 , -by expiration of the timeout specified in the +when the time interval specified by .Fa timeout -argument, +has elapsed, or by the delivery of a signal to the suspended thread. .Pp If the Copied: stable/10/lib/libc/sys/thr_wake.2 (from r306334, head/lib/libc/sys/thr_wake.2) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/sys/thr_wake.2 Mon Oct 3 09:32:19 2016 (r306626, copy of r306334, head/lib/libc/sys/thr_wake.2) @@ -0,0 +1,112 @@ +.\" Copyright (c) 2016 The FreeBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This documentation was written by +.\" Konstantin Belousov under sponsorship +.\" from the FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd September 23, 2016 +.Dt THR_WAKE 2 +.Os +.Sh NAME +.Nm thr_wake +.Nd wake up the suspended thread +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In sys/thr.h +.Ft int +.Fn thr_wake "long id" +.Sh DESCRIPTION +.Bf -symbolic +This function is intended for implementing threading. +Normal applications should use +.Xr pthread_cond_timedwait 3 +together with +.Xr pthread_cond_broadcast 3 +for typical safe suspension with cooperation of the thread +being suspended, or +.Xr pthread_suspend_np 3 +and +.Xr pthread_resume_np 3 +in some specific situations, instead. +.Ef +.Pp +Passing the thread identifier of the calling thread +.Po +see +.Xr thr_self 2 +.Pc +to +.Fn thr_wake +sets a thread's flag to cause the next signal-interruptible sleep +of that thread in the kernel to fail immediately with the +.Er EINTR +error. +The flag is cleared by an interruptible sleep attempt or by a call to +.Xr thr_suspend 2. +This is used by the system threading library to implement cancellation. +.Pp +If +.Fa id +is not equal to the current thread identifier, the specified thread is +woken up if suspended by the +.Xr thr_suspend +system call. +If the thread is not suspended at the time of the +.Nm +call, the wake is remembered and the next attempt of the thread to +suspend itself with the +.Xr thr_suspend 2 +results in immediate return with success. +Only one wake is remembered. +.Sh RETURN VALUES +.Rv -std thr_wake +.Sh ERRORS +The +.Fn thr_wake +operation returns these errors: +.Bl -tag -width Er +.It Bq Er ESRCH +The specified thread was not found or does not belong to the process +of the calling thread. +.El +.Sh SEE ALSO +.Xr ps 1 , +.Xr thr_self 2 +.Xr thr_suspend 2 , +.Xr pthread_cancel 3 , +.Xr pthread_resume_np 3 , +.Xr pthread_suspend_np 3 +.Sh STANDARDS +The +.Fn thr_suspend +system call is non-standard and is used by +.Lb libthr +to implement +.St -p1003.1-2001 +.Xr pthread 3 +functionality. From owner-svn-src-all@freebsd.org Mon Oct 3 09:37:58 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16F64AC6593; Mon, 3 Oct 2016 09:37:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E909BEEC; Mon, 3 Oct 2016 09:37:57 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u939bvQQ041013; Mon, 3 Oct 2016 09:37:57 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u939bvYs041011; Mon, 3 Oct 2016 09:37:57 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201610030937.u939bvYs041011@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 3 Oct 2016 09:37:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306627 - in stable/11/sys/ufs: ffs ufs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 09:37:58 -0000 Author: kib Date: Mon Oct 3 09:37:56 2016 New Revision: 306627 URL: https://svnweb.freebsd.org/changeset/base/306627 Log: MFC r305977: Be more strict when selecting between snapshot/regular mount. Modified: stable/11/sys/ufs/ffs/ffs_alloc.c stable/11/sys/ufs/ufs/ufs_gjournal.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- stable/11/sys/ufs/ffs/ffs_alloc.c Mon Oct 3 09:32:19 2016 (r306626) +++ stable/11/sys/ufs/ffs/ffs_alloc.c Mon Oct 3 09:37:56 2016 (r306627) @@ -2171,12 +2171,13 @@ ffs_blkfree_cg(ump, fs, devvp, bno, size MPASS(devvp->v_mount->mnt_data == ump); dev = ump->um_devvp->v_rdev; cgblkno = fragstoblks(fs, cgtod(fs, cg)); - } else { + } else if (devvp->v_type == VCHR) { /* devvp is a normal disk device */ dev = devvp->v_rdev; cgblkno = fsbtodb(fs, cgtod(fs, cg)); ASSERT_VOP_LOCKED(devvp, "ffs_blkfree_cg"); - } + } else + return; #ifdef INVARIANTS if ((u_int)size > fs->fs_bsize || fragoff(fs, size) != 0 || fragnum(fs, bno) + numfrags(fs, size) > fs->fs_frag) { @@ -2270,7 +2271,7 @@ ffs_blkfree_cg(ump, fs, devvp, bno, size ACTIVECLEAR(fs, cg); UFS_UNLOCK(ump); mp = UFSTOVFS(ump); - if (MOUNTEDSOFTDEP(mp) && devvp->v_type != VREG) + if (MOUNTEDSOFTDEP(mp) && devvp->v_type == VCHR) softdep_setup_blkfree(UFSTOVFS(ump), bp, bno, numfrags(fs, size), dephd); bdwrite(bp); @@ -2335,7 +2336,7 @@ ffs_blkfree(ump, fs, devvp, bno, size, i * it has a snapshot(s) associated with it, and one of the * snapshots wants to claim the block. */ - if (devvp->v_type != VREG && + if (devvp->v_type == VCHR && (devvp->v_vflag & VV_COPYONWRITE) && ffs_snapblkfree(fs, devvp, bno, size, inum, vtype, dephd)) { return; @@ -2480,10 +2481,13 @@ ffs_freefile(ump, fs, devvp, ino, mode, MPASS(devvp->v_mount->mnt_data == ump); dev = ump->um_devvp->v_rdev; cgbno = fragstoblks(fs, cgtod(fs, cg)); - } else { + } else if (devvp->v_type == VCHR) { /* devvp is a normal disk device */ dev = devvp->v_rdev; cgbno = fsbtodb(fs, cgtod(fs, cg)); + } else { + bp = NULL; + return (0); } if (ino >= fs->fs_ipg * fs->fs_ncg) panic("ffs_freefile: range: dev = %s, ino = %ju, fs = %s", @@ -2522,7 +2526,7 @@ ffs_freefile(ump, fs, devvp, ino, mode, fs->fs_fmod = 1; ACTIVECLEAR(fs, cg); UFS_UNLOCK(ump); - if (MOUNTEDSOFTDEP(UFSTOVFS(ump)) && devvp->v_type != VREG) + if (MOUNTEDSOFTDEP(UFSTOVFS(ump)) && devvp->v_type == VCHR) softdep_setup_inofree(UFSTOVFS(ump), bp, ino + cg * fs->fs_ipg, wkhd); bdwrite(bp); @@ -2549,9 +2553,11 @@ ffs_checkfreefile(fs, devvp, ino) if (devvp->v_type == VREG) { /* devvp is a snapshot */ cgbno = fragstoblks(fs, cgtod(fs, cg)); - } else { + } else if (devvp->v_type == VCHR) { /* devvp is a normal disk device */ cgbno = fsbtodb(fs, cgtod(fs, cg)); + } else { + return (1); } if (ino >= fs->fs_ipg * fs->fs_ncg) return (1); Modified: stable/11/sys/ufs/ufs/ufs_gjournal.c ============================================================================== --- stable/11/sys/ufs/ufs/ufs_gjournal.c Mon Oct 3 09:32:19 2016 (r306626) +++ stable/11/sys/ufs/ufs/ufs_gjournal.c Mon Oct 3 09:37:56 2016 (r306627) @@ -71,14 +71,17 @@ ufs_gjournal_modref(struct vnode *vp, in ino = ip->i_number; cg = ino_to_cg(fs, ino); - if (devvp->v_type != VCHR) { + if (devvp->v_type == VREG) { /* devvp is a snapshot */ dev = VFSTOUFS(devvp->v_mount)->um_devvp->v_rdev; cgbno = fragstoblks(fs, cgtod(fs, cg)); - } else { + } else if (devvp->v_type == VCHR) { /* devvp is a normal disk device */ dev = devvp->v_rdev; cgbno = fsbtodb(fs, cgtod(fs, cg)); + } else { + bp = NULL; + return (EIO); } if ((u_int)ino >= fs->fs_ipg * fs->fs_ncg) panic("ufs_gjournal_modref: range: dev = %s, ino = %lu, fs = %s", From owner-svn-src-all@freebsd.org Mon Oct 3 09:39:48 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5ED22AC6625; Mon, 3 Oct 2016 09:39:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20FFDB4; Mon, 3 Oct 2016 09:39:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u939dlqP041127; Mon, 3 Oct 2016 09:39:47 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u939dlsI041123; Mon, 3 Oct 2016 09:39:47 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201610030939.u939dlsI041123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 3 Oct 2016 09:39:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306628 - in stable/11/sys/x86: acpica include x86 xen X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 09:39:48 -0000 Author: kib Date: Mon Oct 3 09:39:46 2016 New Revision: 306628 URL: https://svnweb.freebsd.org/changeset/base/306628 Log: MFC r305978: Detect x2APIC mode on boot and obey it. Modified: stable/11/sys/x86/acpica/madt.c stable/11/sys/x86/include/apicvar.h stable/11/sys/x86/x86/local_apic.c stable/11/sys/x86/xen/xen_apic.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/x86/acpica/madt.c ============================================================================== --- stable/11/sys/x86/acpica/madt.c Mon Oct 3 09:37:56 2016 (r306627) +++ stable/11/sys/x86/acpica/madt.c Mon Oct 3 09:39:46 2016 (r306628) @@ -135,10 +135,11 @@ madt_setup_local(void) const char *reason; char *hw_vendor; u_int p[4]; + int user_x2apic; + bool bios_x2apic; madt = pmap_mapbios(madt_physaddr, madt_length); if ((cpu_feature2 & CPUID2_X2APIC) != 0) { - x2apic_mode = 1; reason = NULL; /* @@ -150,21 +151,17 @@ madt_setup_local(void) if (dmartbl_physaddr != 0) { dmartbl = acpi_map_table(dmartbl_physaddr, ACPI_SIG_DMAR); - if ((dmartbl->Flags & ACPI_DMAR_X2APIC_OPT_OUT) != 0) { - x2apic_mode = 0; + if ((dmartbl->Flags & ACPI_DMAR_X2APIC_OPT_OUT) != 0) reason = "by DMAR table"; - } acpi_unmap_table(dmartbl); } if (vm_guest == VM_GUEST_VMWARE) { vmware_hvcall(VMW_HVCMD_GETVCPU_INFO, p); if ((p[0] & VMW_VCPUINFO_VCPU_RESERVED) != 0 || - (p[0] & VMW_VCPUINFO_LEGACY_X2APIC) == 0) { - x2apic_mode = 0; - reason = "inside VMWare without intr redirection"; - } + (p[0] & VMW_VCPUINFO_LEGACY_X2APIC) == 0) + reason = + "inside VMWare without intr redirection"; } else if (vm_guest == VM_GUEST_XEN) { - x2apic_mode = 0; reason = "due to running under XEN"; } else if (vm_guest == VM_GUEST_NO && CPUID_TO_FAMILY(cpu_id) == 0x6 && @@ -184,16 +181,33 @@ madt_setup_local(void) if (!strcmp(hw_vendor, "LENOVO") || !strcmp(hw_vendor, "ASUSTeK Computer Inc.")) { - x2apic_mode = 0; reason = "for a suspected SandyBridge BIOS bug"; } freeenv(hw_vendor); } } - TUNABLE_INT_FETCH("hw.x2apic_enable", &x2apic_mode); - if (!x2apic_mode && reason != NULL && bootverbose) + bios_x2apic = lapic_is_x2apic(); + if (reason != NULL && bios_x2apic) { + if (bootverbose) + printf("x2APIC should be disabled %s but " + "already enabled by BIOS; enabling.\n", + reason); + reason = NULL; + } + if (reason == NULL) + x2apic_mode = 1; + else if (bootverbose) printf("x2APIC available but disabled %s\n", reason); + user_x2apic = x2apic_mode; + TUNABLE_INT_FETCH("hw.x2apic_enable", &user_x2apic); + if (user_x2apic != x2apic_mode) { + if (bios_x2apic && !user_x2apic) + printf("x2APIC disabled by tunable and " + "enabled by BIOS; ignoring tunable."); + else + x2apic_mode = user_x2apic; + } } lapic_init(madt->Address); Modified: stable/11/sys/x86/include/apicvar.h ============================================================================== --- stable/11/sys/x86/include/apicvar.h Mon Oct 3 09:37:56 2016 (r306627) +++ stable/11/sys/x86/include/apicvar.h Mon Oct 3 09:39:46 2016 (r306628) @@ -206,6 +206,7 @@ struct apic_ops { void (*create)(u_int, int); void (*init)(vm_paddr_t); void (*xapic_mode)(void); + bool (*is_x2apic)(void); void (*setup)(int); void (*dump)(const char *); void (*disable)(void); @@ -268,6 +269,13 @@ lapic_xapic_mode(void) apic_ops.xapic_mode(); } +static inline bool +lapic_is_x2apic(void) +{ + + return (apic_ops.is_x2apic()); +} + static inline void lapic_setup(int boot) { Modified: stable/11/sys/x86/x86/local_apic.c ============================================================================== --- stable/11/sys/x86/x86/local_apic.c Mon Oct 3 09:37:56 2016 (r306627) +++ stable/11/sys/x86/x86/local_apic.c Mon Oct 3 09:39:46 2016 (r306628) @@ -269,6 +269,16 @@ native_lapic_enable_x2apic(void) wrmsr(MSR_APICBASE, apic_base); } +static bool +native_lapic_is_x2apic(void) +{ + uint64_t apic_base; + + apic_base = rdmsr(MSR_APICBASE); + return ((apic_base & (APICBASE_X2APIC | APICBASE_ENABLED)) == + (APICBASE_X2APIC | APICBASE_ENABLED)); +} + static void lapic_enable(void); static void lapic_resume(struct pic *pic, bool suspend_cancelled); static void lapic_timer_oneshot(struct lapic *); @@ -329,6 +339,7 @@ struct apic_ops apic_ops = { .create = native_lapic_create, .init = native_lapic_init, .xapic_mode = native_lapic_xapic_mode, + .is_x2apic = native_lapic_is_x2apic, .setup = native_lapic_setup, .dump = native_lapic_dump, .disable = native_lapic_disable, Modified: stable/11/sys/x86/xen/xen_apic.c ============================================================================== --- stable/11/sys/x86/xen/xen_apic.c Mon Oct 3 09:37:56 2016 (r306627) +++ stable/11/sys/x86/xen/xen_apic.c Mon Oct 3 09:39:46 2016 (r306628) @@ -139,6 +139,13 @@ xen_pv_lapic_disable(void) } +static bool +xen_pv_lapic_is_x2apic(void) +{ + + return (false); +} + static void xen_pv_lapic_eoi(void) { @@ -351,6 +358,7 @@ struct apic_ops xen_apic_ops = { .create = xen_pv_lapic_create, .init = xen_pv_lapic_init, .xapic_mode = xen_pv_lapic_disable, + .is_x2apic = xen_pv_lapic_is_x2apic, .setup = xen_pv_lapic_setup, .dump = xen_pv_lapic_dump, .disable = xen_pv_lapic_disable, From owner-svn-src-all@freebsd.org Mon Oct 3 09:41:34 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E125EAC66AD; Mon, 3 Oct 2016 09:41:34 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92E632E1; Mon, 3 Oct 2016 09:41:34 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u939fXE4041277; Mon, 3 Oct 2016 09:41:33 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u939fXie041276; Mon, 3 Oct 2016 09:41:33 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201610030941.u939fXie041276@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 3 Oct 2016 09:41:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306629 - stable/11/sys/amd64/amd64 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 09:41:35 -0000 Author: kib Date: Mon Oct 3 09:41:33 2016 New Revision: 306629 URL: https://svnweb.freebsd.org/changeset/base/306629 Log: MFC r306350: For machines which support PCID but not have INVPCID instruction, i.e. SandyBridge and IvyBridge, correct a race between pmap_activate() and invltlb_pcid_handler(). Modified: stable/11/sys/amd64/amd64/pmap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/pmap.c ============================================================================== --- stable/11/sys/amd64/amd64/pmap.c Mon Oct 3 09:39:46 2016 (r306628) +++ stable/11/sys/amd64/amd64/pmap.c Mon Oct 3 09:41:33 2016 (r306629) @@ -6868,6 +6868,7 @@ pmap_activate_sw(struct thread *td) { pmap_t oldpmap, pmap; uint64_t cached, cr3; + register_t rflags; u_int cpuid; oldpmap = PCPU_GET(curpmap); @@ -6891,16 +6892,43 @@ pmap_activate_sw(struct thread *td) pmap == kernel_pmap, ("non-kernel pmap thread %p pmap %p cpu %d pcid %#x", td, pmap, cpuid, pmap->pm_pcids[cpuid].pm_pcid)); + + /* + * If the INVPCID instruction is not available, + * invltlb_pcid_handler() is used for handle + * invalidate_all IPI, which checks for curpmap == + * smp_tlb_pmap. Below operations sequence has a + * window where %CR3 is loaded with the new pmap's + * PML4 address, but curpmap value is not yet updated. + * This causes invltlb IPI handler, called between the + * updates, to execute as NOP, which leaves stale TLB + * entries. + * + * Note that the most typical use of + * pmap_activate_sw(), from the context switch, is + * immune to this race, because interrupts are + * disabled (while the thread lock is owned), and IPI + * happends after curpmap is updated. Protect other + * callers in a similar way, by disabling interrupts + * around the %cr3 register reload and curpmap + * assignment. + */ + if (!invpcid_works) + rflags = intr_disable(); + if (!cached || (cr3 & ~CR3_PCID_MASK) != pmap->pm_cr3) { load_cr3(pmap->pm_cr3 | pmap->pm_pcids[cpuid].pm_pcid | cached); if (cached) PCPU_INC(pm_save_cnt); } + PCPU_SET(curpmap, pmap); + if (!invpcid_works) + intr_restore(rflags); } else if (cr3 != pmap->pm_cr3) { load_cr3(pmap->pm_cr3); + PCPU_SET(curpmap, pmap); } - PCPU_SET(curpmap, pmap); #ifdef SMP CPU_CLR_ATOMIC(cpuid, &oldpmap->pm_active); #else From owner-svn-src-all@freebsd.org Mon Oct 3 10:15:17 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D179AF3122; Mon, 3 Oct 2016 10:15:17 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 376CF995; Mon, 3 Oct 2016 10:15:17 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u93AFGeb056456; Mon, 3 Oct 2016 10:15:16 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u93AFGPQ056454; Mon, 3 Oct 2016 10:15:16 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201610031015.u93AFGPQ056454@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 3 Oct 2016 10:15:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306630 - in stable/10/sys/ufs: ffs ufs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 10:15:17 -0000 Author: kib Date: Mon Oct 3 10:15:16 2016 New Revision: 306630 URL: https://svnweb.freebsd.org/changeset/base/306630 Log: MFC r305977: Be more strict when selecting between snapshot/regular mount. Modified: stable/10/sys/ufs/ffs/ffs_alloc.c stable/10/sys/ufs/ufs/ufs_gjournal.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- stable/10/sys/ufs/ffs/ffs_alloc.c Mon Oct 3 09:41:33 2016 (r306629) +++ stable/10/sys/ufs/ffs/ffs_alloc.c Mon Oct 3 10:15:16 2016 (r306630) @@ -2156,12 +2156,13 @@ ffs_blkfree_cg(ump, fs, devvp, bno, size /* devvp is a snapshot */ dev = VTOI(devvp)->i_devvp->v_rdev; cgblkno = fragstoblks(fs, cgtod(fs, cg)); - } else { + } else if (devvp->v_type == VCHR) { /* devvp is a normal disk device */ dev = devvp->v_rdev; cgblkno = fsbtodb(fs, cgtod(fs, cg)); ASSERT_VOP_LOCKED(devvp, "ffs_blkfree_cg"); - } + } else + return; #ifdef INVARIANTS if ((u_int)size > fs->fs_bsize || fragoff(fs, size) != 0 || fragnum(fs, bno) + numfrags(fs, size) > fs->fs_frag) { @@ -2255,7 +2256,7 @@ ffs_blkfree_cg(ump, fs, devvp, bno, size ACTIVECLEAR(fs, cg); UFS_UNLOCK(ump); mp = UFSTOVFS(ump); - if (MOUNTEDSOFTDEP(mp) && devvp->v_type != VREG) + if (MOUNTEDSOFTDEP(mp) && devvp->v_type == VCHR) softdep_setup_blkfree(UFSTOVFS(ump), bp, bno, numfrags(fs, size), dephd); bdwrite(bp); @@ -2320,7 +2321,7 @@ ffs_blkfree(ump, fs, devvp, bno, size, i * it has a snapshot(s) associated with it, and one of the * snapshots wants to claim the block. */ - if (devvp->v_type != VREG && + if (devvp->v_type == VCHR && (devvp->v_vflag & VV_COPYONWRITE) && ffs_snapblkfree(fs, devvp, bno, size, inum, vtype, dephd)) { return; @@ -2463,10 +2464,13 @@ ffs_freefile(ump, fs, devvp, ino, mode, /* devvp is a snapshot */ dev = VTOI(devvp)->i_devvp->v_rdev; cgbno = fragstoblks(fs, cgtod(fs, cg)); - } else { + } else if (devvp->v_type == VCHR) { /* devvp is a normal disk device */ dev = devvp->v_rdev; cgbno = fsbtodb(fs, cgtod(fs, cg)); + } else { + bp = NULL; + return (0); } if (ino >= fs->fs_ipg * fs->fs_ncg) panic("ffs_freefile: range: dev = %s, ino = %ju, fs = %s", @@ -2505,7 +2509,7 @@ ffs_freefile(ump, fs, devvp, ino, mode, fs->fs_fmod = 1; ACTIVECLEAR(fs, cg); UFS_UNLOCK(ump); - if (MOUNTEDSOFTDEP(UFSTOVFS(ump)) && devvp->v_type != VREG) + if (MOUNTEDSOFTDEP(UFSTOVFS(ump)) && devvp->v_type == VCHR) softdep_setup_inofree(UFSTOVFS(ump), bp, ino + cg * fs->fs_ipg, wkhd); bdwrite(bp); @@ -2532,9 +2536,11 @@ ffs_checkfreefile(fs, devvp, ino) if (devvp->v_type == VREG) { /* devvp is a snapshot */ cgbno = fragstoblks(fs, cgtod(fs, cg)); - } else { + } else if (devvp->v_type == VCHR) { /* devvp is a normal disk device */ cgbno = fsbtodb(fs, cgtod(fs, cg)); + } else { + return (1); } if (ino >= fs->fs_ipg * fs->fs_ncg) return (1); Modified: stable/10/sys/ufs/ufs/ufs_gjournal.c ============================================================================== --- stable/10/sys/ufs/ufs/ufs_gjournal.c Mon Oct 3 09:41:33 2016 (r306629) +++ stable/10/sys/ufs/ufs/ufs_gjournal.c Mon Oct 3 10:15:16 2016 (r306630) @@ -70,14 +70,17 @@ ufs_gjournal_modref(struct vnode *vp, in ino = ip->i_number; cg = ino_to_cg(fs, ino); - if (devvp->v_type != VCHR) { + if (devvp->v_type == VREG) { /* devvp is a snapshot */ dev = VTOI(devvp)->i_devvp->v_rdev; cgbno = fragstoblks(fs, cgtod(fs, cg)); - } else { + } else if (devvp->v_type == VCHR) { /* devvp is a normal disk device */ dev = devvp->v_rdev; cgbno = fsbtodb(fs, cgtod(fs, cg)); + } else { + bp = NULL; + return (EIO); } if ((u_int)ino >= fs->fs_ipg * fs->fs_ncg) panic("ufs_gjournal_modref: range: dev = %s, ino = %lu, fs = %s", From owner-svn-src-all@freebsd.org Mon Oct 3 11:57:11 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99AF5AF301B; Mon, 3 Oct 2016 11:57:11 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7788A38F; Mon, 3 Oct 2016 11:57:11 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u93BvAcC093646; Mon, 3 Oct 2016 11:57:10 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u93BvAGk093645; Mon, 3 Oct 2016 11:57:10 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201610031157.u93BvAGk093645@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 3 Oct 2016 11:57:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306631 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 11:57:11 -0000 Author: andrew Date: Mon Oct 3 11:57:10 2016 New Revision: 306631 URL: https://svnweb.freebsd.org/changeset/base/306631 Log: Use C99 designated initializers to create the armv6 cpu_functions structs. This will help with a later cleanup of what functions we implement. Sponsored by: ABT Systems Ltd Modified: head/sys/arm/arm/cpufunc.c Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Mon Oct 3 10:15:16 2016 (r306630) +++ head/sys/arm/arm/cpufunc.c Mon Oct 3 11:57:10 2016 (r306631) @@ -243,49 +243,40 @@ struct cpu_functions sheeva_cpufuncs = { #ifdef CPU_MV_PJ4B struct cpu_functions pj4bv7_cpufuncs = { /* CPU functions */ - - armv7_drain_writebuf, /* cpwait */ + .cf_cpwait = armv7_drain_writebuf, /* MMU functions */ - - cpufunc_control, /* control */ - armv7_setttb, /* Setttb */ + .cf_control = cpufunc_control, + .cf_setttb = armv7_setttb, /* TLB functions */ - - armv7_tlb_flushID, /* tlb_flushID */ - armv7_tlb_flushID_SE, /* tlb_flushID_SE */ - armv7_tlb_flushID, /* tlb_flushD */ - armv7_tlb_flushID_SE, /* tlb_flushD_SE */ + .cf_tlb_flushID = armv7_tlb_flushID, + .cf_tlb_flushID_SE = armv7_tlb_flushID_SE, + .cf_tlb_flushD = armv7_tlb_flushID, + .cf_tlb_flushD_SE = armv7_tlb_flushID_SE, /* Cache operations */ - armv7_icache_sync_range, /* icache_sync_range */ - - armv7_dcache_wbinv_all, /* dcache_wbinv_all */ - armv7_dcache_wbinv_range, /* dcache_wbinv_range */ - armv7_dcache_inv_range, /* dcache_inv_range */ - armv7_dcache_wb_range, /* dcache_wb_range */ - - armv7_idcache_inv_all, /* idcache_inv_all */ - armv7_idcache_wbinv_all, /* idcache_wbinv_all */ - armv7_idcache_wbinv_range, /* idcache_wbinv_all */ - - (void *)cpufunc_nullop, /* l2cache_wbinv_all */ - (void *)cpufunc_nullop, /* l2cache_wbinv_range */ - (void *)cpufunc_nullop, /* l2cache_inv_range */ - (void *)cpufunc_nullop, /* l2cache_wb_range */ - (void *)cpufunc_nullop, /* l2cache_drain_writebuf */ + .cf_icache_sync_range = armv7_icache_sync_range, + .cf_dcache_wbinv_all = armv7_dcache_wbinv_all, + .cf_dcache_wbinv_range = armv7_dcache_wbinv_range, + .cf_dcache_inv_range = armv7_dcache_inv_range, + .cf_dcache_wb_range = armv7_dcache_wb_range, + .cf_idcache_inv_all = armv7_idcache_inv_all, + .cf_idcache_wbinv_all = armv7_idcache_wbinv_all, + .cf_idcache_wbinv_range = armv7_idcache_wbinv_range, + .cf_l2cache_wbinv_all = (void *)cpufunc_nullop, + .cf_l2cache_wbinv_range = (void *)cpufunc_nullop, + .cf_l2cache_inv_range = (void *)cpufunc_nullop, + .cf_l2cache_wb_range = (void *)cpufunc_nullop, + .cf_l2cache_drain_writebuf = (void *)cpufunc_nullop, /* Other functions */ - - armv7_drain_writebuf, /* drain_writebuf */ - - (void *)cpufunc_nullop, /* sleep */ + .cf_drain_writebuf = armv7_drain_writebuf, + .cf_sleep = (void *)cpufunc_nullop, /* Soft functions */ - armv7_context_switch, /* context_switch */ - - pj4bv7_setup /* cpu setup */ + .cf_context_switch = armv7_context_switch, + .cf_setup = pj4bv7_setup }; #endif /* CPU_MV_PJ4B */ @@ -446,64 +437,51 @@ struct cpu_functions fa526_cpufuncs = { #if defined(CPU_ARM1176) struct cpu_functions arm1176_cpufuncs = { /* CPU functions */ - - cpufunc_nullop, /* cpwait */ - + .cf_cpwait = cpufunc_nullop, + /* MMU functions */ - - cpufunc_control, /* control */ - arm11x6_setttb, /* Setttb */ + .cf_control = cpufunc_control, + .cf_setttb = arm11x6_setttb, /* TLB functions */ - - arm11_tlb_flushID, /* tlb_flushID */ - arm11_tlb_flushID_SE, /* tlb_flushID_SE */ - arm11_tlb_flushD, /* tlb_flushD */ - arm11_tlb_flushD_SE, /* tlb_flushD_SE */ + .cf_tlb_flushID = arm11_tlb_flushID, + .cf_tlb_flushID_SE = arm11_tlb_flushID_SE, + .cf_tlb_flushD = arm11_tlb_flushD, + .cf_tlb_flushD_SE = arm11_tlb_flushD_SE, /* Cache operations */ - - arm11x6_icache_sync_range, /* icache_sync_range */ - - arm11x6_dcache_wbinv_all, /* dcache_wbinv_all */ - armv6_dcache_wbinv_range, /* dcache_wbinv_range */ - armv6_dcache_inv_range, /* dcache_inv_range */ - armv6_dcache_wb_range, /* dcache_wb_range */ - - armv6_idcache_inv_all, /* idcache_inv_all */ - arm11x6_idcache_wbinv_all, /* idcache_wbinv_all */ - arm11x6_idcache_wbinv_range, /* idcache_wbinv_range */ - - (void *)cpufunc_nullop, /* l2cache_wbinv_all */ - (void *)cpufunc_nullop, /* l2cache_wbinv_range */ - (void *)cpufunc_nullop, /* l2cache_inv_range */ - (void *)cpufunc_nullop, /* l2cache_wb_range */ - (void *)cpufunc_nullop, /* l2cache_drain_writebuf */ + .cf_icache_sync_range = arm11x6_icache_sync_range, + .cf_dcache_wbinv_all = arm11x6_dcache_wbinv_all, + .cf_dcache_wbinv_range = armv6_dcache_wbinv_range, + .cf_dcache_inv_range = armv6_dcache_inv_range, + .cf_dcache_wb_range = armv6_dcache_wb_range, + .cf_idcache_inv_all = armv6_idcache_inv_all, + .cf_idcache_wbinv_all = arm11x6_idcache_wbinv_all, + .cf_idcache_wbinv_range = arm11x6_idcache_wbinv_range, + .cf_l2cache_wbinv_all = (void *)cpufunc_nullop, + .cf_l2cache_wbinv_range = (void *)cpufunc_nullop, + .cf_l2cache_inv_range = (void *)cpufunc_nullop, + .cf_l2cache_wb_range = (void *)cpufunc_nullop, + .cf_l2cache_drain_writebuf = (void *)cpufunc_nullop, /* Other functions */ - - arm11_drain_writebuf, /* drain_writebuf */ - - arm11x6_sleep, /* sleep */ + .cf_drain_writebuf = arm11_drain_writebuf, + .cf_sleep = arm11x6_sleep, /* Soft functions */ - - arm11_context_switch, /* context_switch */ - - arm11x6_setup /* cpu setup */ + .cf_context_switch = arm11_context_switch, + .cf_setup = arm11x6_setup }; #endif /*CPU_ARM1176 */ #if defined(CPU_CORTEXA) || defined(CPU_KRAIT) struct cpu_functions cortexa_cpufuncs = { /* CPU functions */ - - cpufunc_nullop, /* cpwait */ + .cf_cpwait = cpufunc_nullop, /* MMU functions */ - - cpufunc_control, /* control */ - armv7_setttb, /* Setttb */ + .cf_control = cpufunc_control, + .cf_setttb = armv7_setttb, /* * TLB functions. ARMv7 does all TLB ops based on a unified TLB model @@ -511,45 +489,38 @@ struct cpu_functions cortexa_cpufuncs = * same 'ID' functions for all 3 variations. */ - armv7_tlb_flushID, /* tlb_flushID */ - armv7_tlb_flushID_SE, /* tlb_flushID_SE */ - armv7_tlb_flushID, /* tlb_flushD */ - armv7_tlb_flushID_SE, /* tlb_flushD_SE */ + .cf_tlb_flushID = armv7_tlb_flushID, + .cf_tlb_flushID_SE = armv7_tlb_flushID_SE, + .cf_tlb_flushD = armv7_tlb_flushID, + .cf_tlb_flushD_SE = armv7_tlb_flushID_SE, /* Cache operations */ - - armv7_icache_sync_range, /* icache_sync_range */ - - armv7_dcache_wbinv_all, /* dcache_wbinv_all */ - armv7_dcache_wbinv_range, /* dcache_wbinv_range */ - armv7_dcache_inv_range, /* dcache_inv_range */ - armv7_dcache_wb_range, /* dcache_wb_range */ - - armv7_idcache_inv_all, /* idcache_inv_all */ - armv7_idcache_wbinv_all, /* idcache_wbinv_all */ - armv7_idcache_wbinv_range, /* idcache_wbinv_range */ + .cf_icache_sync_range = armv7_icache_sync_range, + .cf_dcache_wbinv_all = armv7_dcache_wbinv_all, + .cf_dcache_wbinv_range = armv7_dcache_wbinv_range, + .cf_dcache_inv_range = armv7_dcache_inv_range, + .cf_dcache_wb_range = armv7_dcache_wb_range, + .cf_idcache_inv_all = armv7_idcache_inv_all, + .cf_idcache_wbinv_all = armv7_idcache_wbinv_all, + .cf_idcache_wbinv_range = armv7_idcache_wbinv_range, /* * Note: For CPUs using the PL310 the L2 ops are filled in when the * L2 cache controller is actually enabled. */ - cpufunc_nullop, /* l2cache_wbinv_all */ - (void *)cpufunc_nullop, /* l2cache_wbinv_range */ - (void *)cpufunc_nullop, /* l2cache_inv_range */ - (void *)cpufunc_nullop, /* l2cache_wb_range */ - (void *)cpufunc_nullop, /* l2cache_drain_writebuf */ + .cf_l2cache_wbinv_all = cpufunc_nullop, + .cf_l2cache_wbinv_range = (void *)cpufunc_nullop, + .cf_l2cache_inv_range = (void *)cpufunc_nullop, + .cf_l2cache_wb_range = (void *)cpufunc_nullop, + .cf_l2cache_drain_writebuf = (void *)cpufunc_nullop, /* Other functions */ - - armv7_drain_writebuf, /* drain_writebuf */ - - armv7_cpu_sleep, /* sleep */ + .cf_drain_writebuf = armv7_drain_writebuf, + .cf_sleep = armv7_cpu_sleep, /* Soft functions */ - - armv7_context_switch, /* context_switch */ - - cortexa_setup /* cpu setup */ + .cf_context_switch = armv7_context_switch, + .cf_setup = cortexa_setup }; #endif /* CPU_CORTEXA */ From owner-svn-src-all@freebsd.org Mon Oct 3 12:02:46 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 785E6AF396D; Mon, 3 Oct 2016 12:02:46 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41126DF7; Mon, 3 Oct 2016 12:02:46 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u93C2jN7097374; Mon, 3 Oct 2016 12:02:45 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u93C2jnx097372; Mon, 3 Oct 2016 12:02:45 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201610031202.u93C2jnx097372@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 3 Oct 2016 12:02:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306632 - stable/11/usr.bin/nfsstat X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 12:02:46 -0000 Author: rmacklem Date: Mon Oct 3 12:02:45 2016 New Revision: 306632 URL: https://svnweb.freebsd.org/changeset/base/306632 Log: MFC: r304058, r304066, r304194 Update nfsstat.c to use the new kernel nfsstat structure and add the new "-d" flag from D1626. The man page will be updated in a subsequent commit. Modified: stable/11/usr.bin/nfsstat/Makefile stable/11/usr.bin/nfsstat/nfsstat.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/nfsstat/Makefile ============================================================================== --- stable/11/usr.bin/nfsstat/Makefile Mon Oct 3 11:57:10 2016 (r306631) +++ stable/11/usr.bin/nfsstat/Makefile Mon Oct 3 12:02:45 2016 (r306632) @@ -4,4 +4,6 @@ PROG= nfsstat CFLAGS+=-DNFS +LIBADD+= devstat + .include Modified: stable/11/usr.bin/nfsstat/nfsstat.c ============================================================================== --- stable/11/usr.bin/nfsstat/nfsstat.c Mon Oct 3 11:57:10 2016 (r306631) +++ stable/11/usr.bin/nfsstat/nfsstat.c Mon Oct 3 12:02:45 2016 (r306632) @@ -29,6 +29,36 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ +/*- + * Copyright (c) 2004, 2008, 2009 Silicon Graphics International Corp. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * + * NO WARRANTY + * 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 MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES. + */ + #ifndef lint static const char copyright[] = @@ -64,33 +94,58 @@ static const char rcsid[] = #include #include #include +#include #include #include #include +#include #include static int widemode = 0; static int zflag = 0; static int printtitle = 1; -static struct ext_nfsstats ext_nfsstats; +static struct nfsstatsv1 ext_nfsstats; static int extra_output = 0; static void intpr(int, int); -static void printhdr(int, int); +static void printhdr(int, int, int); static void usage(void); static char *sperc1(int, int); static char *sperc2(int, int); static void exp_intpr(int, int); -static void exp_sidewaysintpr(u_int, int, int); +static void exp_sidewaysintpr(u_int, int, int, int); +static void compute_new_stats(struct nfsstatsv1 *cur_stats, + struct nfsstatsv1 *prev_stats, int curop, long double etime, + long double *mbsec, long double *kb_per_transfer, + long double *transfers_per_second, long double *ms_per_transfer, + uint64_t *queue_len, long double *busy_pct); #define DELTA(field) (nfsstats.field - lastst.field) +#define STAT_TYPE_READ 0 +#define STAT_TYPE_WRITE 1 +#define STAT_TYPE_COMMIT 2 +#define NUM_STAT_TYPES 3 + +struct stattypes { + int stat_type; + int nfs_type; +}; +static struct stattypes statstruct[] = { + {STAT_TYPE_READ, NFSV4OP_READ}, + {STAT_TYPE_WRITE, NFSV4OP_WRITE}, + {STAT_TYPE_COMMIT, NFSV4OP_COMMIT} +}; + +#define STAT_TYPE_TO_NFS(stat_type) statstruct[stat_type].nfs_type + int main(int argc, char **argv) { u_int interval; int clientOnly = -1; int serverOnly = -1; + int newStats = 0; int ch; char *memf, *nlistf; int mntlen, i; @@ -100,7 +155,7 @@ main(int argc, char **argv) interval = 0; memf = nlistf = NULL; - while ((ch = getopt(argc, argv, "cesWM:mN:w:z")) != -1) + while ((ch = getopt(argc, argv, "cdesWM:mN:w:z")) != -1) switch(ch) { case 'M': memf = optarg; @@ -140,6 +195,11 @@ main(int argc, char **argv) if (serverOnly < 0) serverOnly = 0; break; + case 'd': + newStats = 1; + if (interval == 0) + interval = 1; + break; case 's': serverOnly = 1; if (clientOnly < 0) @@ -173,7 +233,8 @@ main(int argc, char **argv) errx(1, "NFS client/server not loaded"); if (interval) { - exp_sidewaysintpr(interval, clientOnly, serverOnly); + exp_sidewaysintpr(interval, clientOnly, serverOnly, + newStats); } else { if (extra_output != 0) exp_intpr(clientOnly, serverOnly); @@ -191,13 +252,14 @@ intpr(int clientOnly, int serverOnly) { int nfssvc_flag; - nfssvc_flag = NFSSVC_GETSTATS; + nfssvc_flag = NFSSVC_GETSTATS | NFSSVC_NEWSTRUCT; if (zflag != 0) { if (clientOnly != 0) nfssvc_flag |= NFSSVC_ZEROCLTSTATS; if (serverOnly != 0) nfssvc_flag |= NFSSVC_ZEROSRVSTATS; } + ext_nfsstats.vers = NFSSTATS_V1; if (nfssvc(nfssvc_flag, &ext_nfsstats) < 0) err(1, "Can't get stats"); if (clientOnly) { @@ -206,124 +268,124 @@ intpr(int clientOnly, int serverOnly) printf("%9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s\n", "Getattr", "Setattr", "Lookup", "Readlink", "Read", "Write", "Create", "Remove"); - printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", - ext_nfsstats.rpccnt[NFSPROC_GETATTR], - ext_nfsstats.rpccnt[NFSPROC_SETATTR], - ext_nfsstats.rpccnt[NFSPROC_LOOKUP], - ext_nfsstats.rpccnt[NFSPROC_READLINK], - ext_nfsstats.rpccnt[NFSPROC_READ], - ext_nfsstats.rpccnt[NFSPROC_WRITE], - ext_nfsstats.rpccnt[NFSPROC_CREATE], - ext_nfsstats.rpccnt[NFSPROC_REMOVE]); + printf("%9ju %9ju %9ju %9ju %9ju %9ju %9ju %9ju\n", + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_GETATTR], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_SETATTR], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_LOOKUP], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_READLINK], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_READ], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_WRITE], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_CREATE], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_REMOVE]); printf("%9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s\n", "Rename", "Link", "Symlink", "Mkdir", "Rmdir", "Readdir", "RdirPlus", "Access"); - printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", - ext_nfsstats.rpccnt[NFSPROC_RENAME], - ext_nfsstats.rpccnt[NFSPROC_LINK], - ext_nfsstats.rpccnt[NFSPROC_SYMLINK], - ext_nfsstats.rpccnt[NFSPROC_MKDIR], - ext_nfsstats.rpccnt[NFSPROC_RMDIR], - ext_nfsstats.rpccnt[NFSPROC_READDIR], - ext_nfsstats.rpccnt[NFSPROC_READDIRPLUS], - ext_nfsstats.rpccnt[NFSPROC_ACCESS]); + printf("%9ju %9ju %9ju %9ju %9ju %9ju %9ju %9ju\n", + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_RENAME], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_LINK], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_SYMLINK], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_MKDIR], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_RMDIR], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_READDIR], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_READDIRPLUS], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_ACCESS]); printf("%9.9s %9.9s %9.9s %9.9s %9.9s\n", "Mknod", "Fsstat", "Fsinfo", "PathConf", "Commit"); - printf("%9d %9d %9d %9d %9d\n", - ext_nfsstats.rpccnt[NFSPROC_MKNOD], - ext_nfsstats.rpccnt[NFSPROC_FSSTAT], - ext_nfsstats.rpccnt[NFSPROC_FSINFO], - ext_nfsstats.rpccnt[NFSPROC_PATHCONF], - ext_nfsstats.rpccnt[NFSPROC_COMMIT]); + printf("%9ju %9ju %9ju %9ju %9ju\n", + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_MKNOD], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_FSSTAT], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_FSINFO], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_PATHCONF], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_COMMIT]); printf("Rpc Info:\n"); printf("%9.9s %9.9s %9.9s %9.9s %9.9s\n", "TimedOut", "Invalid", "X Replies", "Retries", "Requests"); - printf("%9d %9d %9d %9d %9d\n", - ext_nfsstats.rpctimeouts, - ext_nfsstats.rpcinvalid, - ext_nfsstats.rpcunexpected, - ext_nfsstats.rpcretries, - ext_nfsstats.rpcrequests); + printf("%9ju %9ju %9ju %9ju %9ju\n", + (uintmax_t)ext_nfsstats.rpctimeouts, + (uintmax_t)ext_nfsstats.rpcinvalid, + (uintmax_t)ext_nfsstats.rpcunexpected, + (uintmax_t)ext_nfsstats.rpcretries, + (uintmax_t)ext_nfsstats.rpcrequests); printf("Cache Info:\n"); printf("%9.9s %9.9s %9.9s %9.9s", "Attr Hits", "Misses", "Lkup Hits", "Misses"); printf(" %9.9s %9.9s %9.9s %9.9s\n", "BioR Hits", "Misses", "BioW Hits", "Misses"); - printf("%9d %9d %9d %9d", - ext_nfsstats.attrcache_hits, - ext_nfsstats.attrcache_misses, - ext_nfsstats.lookupcache_hits, - ext_nfsstats.lookupcache_misses); - printf(" %9d %9d %9d %9d\n", - ext_nfsstats.biocache_reads - - ext_nfsstats.read_bios, - ext_nfsstats.read_bios, - ext_nfsstats.biocache_writes - - ext_nfsstats.write_bios, - ext_nfsstats.write_bios); + printf("%9ju %9ju %9ju %9ju", + (uintmax_t)ext_nfsstats.attrcache_hits, + (uintmax_t)ext_nfsstats.attrcache_misses, + (uintmax_t)ext_nfsstats.lookupcache_hits, + (uintmax_t)ext_nfsstats.lookupcache_misses); + printf(" %9ju %9ju %9ju %9ju\n", + (uintmax_t)(ext_nfsstats.biocache_reads - + ext_nfsstats.read_bios), + (uintmax_t)ext_nfsstats.read_bios, + (uintmax_t)(ext_nfsstats.biocache_writes - + ext_nfsstats.write_bios), + (uintmax_t)ext_nfsstats.write_bios); printf("%9.9s %9.9s %9.9s %9.9s", "BioRLHits", "Misses", "BioD Hits", "Misses"); printf(" %9.9s %9.9s %9.9s %9.9s\n", "DirE Hits", "Misses", "Accs Hits", "Misses"); - printf("%9d %9d %9d %9d", - ext_nfsstats.biocache_readlinks - - ext_nfsstats.readlink_bios, - ext_nfsstats.readlink_bios, - ext_nfsstats.biocache_readdirs - - ext_nfsstats.readdir_bios, - ext_nfsstats.readdir_bios); - printf(" %9d %9d %9d %9d\n", - ext_nfsstats.direofcache_hits, - ext_nfsstats.direofcache_misses, - ext_nfsstats.accesscache_hits, - ext_nfsstats.accesscache_misses); + printf("%9ju %9ju %9ju %9ju", + (uintmax_t)(ext_nfsstats.biocache_readlinks - + ext_nfsstats.readlink_bios), + (uintmax_t)ext_nfsstats.readlink_bios, + (uintmax_t)(ext_nfsstats.biocache_readdirs - + ext_nfsstats.readdir_bios), + (uintmax_t)ext_nfsstats.readdir_bios); + printf(" %9ju %9ju %9ju %9ju\n", + (uintmax_t)ext_nfsstats.direofcache_hits, + (uintmax_t)ext_nfsstats.direofcache_misses, + (uintmax_t)ext_nfsstats.accesscache_hits, + (uintmax_t)ext_nfsstats.accesscache_misses); } if (serverOnly) { printf("\nServer Info:\n"); printf("%9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s\n", "Getattr", "Setattr", "Lookup", "Readlink", "Read", "Write", "Create", "Remove"); - printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", - ext_nfsstats.srvrpccnt[NFSV4OP_GETATTR], - ext_nfsstats.srvrpccnt[NFSV4OP_SETATTR], - ext_nfsstats.srvrpccnt[NFSV4OP_LOOKUP], - ext_nfsstats.srvrpccnt[NFSV4OP_READLINK], - ext_nfsstats.srvrpccnt[NFSV4OP_READ], - ext_nfsstats.srvrpccnt[NFSV4OP_WRITE], - ext_nfsstats.srvrpccnt[NFSV4OP_CREATE], - ext_nfsstats.srvrpccnt[NFSV4OP_REMOVE]); + printf("%9ju %9ju %9ju %9ju %9ju %9ju %9ju %9ju\n", + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_GETATTR], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_SETATTR], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_LOOKUP], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_READLINK], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_READ], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_WRITE], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_CREATE], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_REMOVE]); printf("%9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s\n", "Rename", "Link", "Symlink", "Mkdir", "Rmdir", "Readdir", "RdirPlus", "Access"); - printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", - ext_nfsstats.srvrpccnt[NFSV4OP_RENAME], - ext_nfsstats.srvrpccnt[NFSV4OP_LINK], - ext_nfsstats.srvrpccnt[NFSV4OP_SYMLINK], - ext_nfsstats.srvrpccnt[NFSV4OP_MKDIR], - ext_nfsstats.srvrpccnt[NFSV4OP_RMDIR], - ext_nfsstats.srvrpccnt[NFSV4OP_READDIR], - ext_nfsstats.srvrpccnt[NFSV4OP_READDIRPLUS], - ext_nfsstats.srvrpccnt[NFSV4OP_ACCESS]); + printf("%9ju %9ju %9ju %9ju %9ju %9ju %9ju %9ju\n", + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_RENAME], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_LINK], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_SYMLINK], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_MKDIR], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_RMDIR], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_READDIR], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_READDIRPLUS], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_ACCESS]); printf("%9.9s %9.9s %9.9s %9.9s %9.9s\n", "Mknod", "Fsstat", "Fsinfo", "PathConf", "Commit"); - printf("%9d %9d %9d %9d %9d\n", - ext_nfsstats.srvrpccnt[NFSV4OP_MKNOD], - ext_nfsstats.srvrpccnt[NFSV4OP_FSSTAT], - ext_nfsstats.srvrpccnt[NFSV4OP_FSINFO], - ext_nfsstats.srvrpccnt[NFSV4OP_PATHCONF], - ext_nfsstats.srvrpccnt[NFSV4OP_COMMIT]); + printf("%9ju %9ju %9ju %9ju %9ju\n", + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_MKNOD], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_FSSTAT], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_FSINFO], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_PATHCONF], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_COMMIT]); printf("Server Ret-Failed\n"); - printf("%17d\n", ext_nfsstats.srvrpc_errs); + printf("%17ju\n", (uintmax_t)ext_nfsstats.srvrpc_errs); printf("Server Faults\n"); - printf("%13d\n", ext_nfsstats.srv_errs); + printf("%13ju\n", (uintmax_t)ext_nfsstats.srv_errs); printf("Server Cache Stats:\n"); printf("%9.9s %9.9s %9.9s %9.9s\n", "Inprog", "Idem", "Non-idem", "Misses"); - printf("%9d %9d %9d %9d\n", - ext_nfsstats.srvcache_inproghits, - ext_nfsstats.srvcache_idemdonehits, - ext_nfsstats.srvcache_nonidemdonehits, - ext_nfsstats.srvcache_misses); + printf("%9ju %9ju %9ju %9ju\n", + (uintmax_t)ext_nfsstats.srvcache_inproghits, + (uintmax_t)ext_nfsstats.srvcache_idemdonehits, + (uintmax_t)ext_nfsstats.srvcache_nonidemdonehits, + (uintmax_t)ext_nfsstats.srvcache_misses); printf("Server Write Gathering:\n"); printf("%9.9s %9.9s %9.9s\n", "WriteOps", "WriteRPC", "Opsaved"); @@ -331,21 +393,37 @@ intpr(int clientOnly, int serverOnly) * The new client doesn't do write gathering. It was * only useful for NFSv2. */ - printf("%9d %9d %9d\n", - ext_nfsstats.srvrpccnt[NFSV4OP_WRITE], - ext_nfsstats.srvrpccnt[NFSV4OP_WRITE], 0); + printf("%9ju %9ju %9d\n", + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_WRITE], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_WRITE], 0); } } static void -printhdr(int clientOnly, int serverOnly) +printhdr(int clientOnly, int serverOnly, int newStats) { - printf("%s%6.6s %6.6s %6.6s %6.6s %6.6s %6.6s %6.6s %6.6s", - ((serverOnly && clientOnly) ? " " : " "), - "GtAttr", "Lookup", "Rdlink", "Read", "Write", "Rename", - "Access", "Rddir"); - if (widemode && clientOnly) { - printf(" Attr Lkup BioR BioW Accs BioD"); + + if (newStats) { + printf(" [%s Read %s] [%s Write %s] " + "%s[=========== Total ============]\n" + " KB/t tps MB/s%s KB/t tps MB/s%s " + "%sKB/t tps MB/s ms ql %%b", + widemode ? "========" : "=====", + widemode ? "========" : "=====", + widemode ? "========" : "=====", + widemode ? "=======" : "====", + widemode ? "[Commit ] " : "", + widemode ? " ms" : "", + widemode ? " ms" : "", + widemode ? "tps ms " : ""); + } else { + printf("%s%6.6s %6.6s %6.6s %6.6s %6.6s %6.6s %6.6s %6.6s", + ((serverOnly && clientOnly) ? " " : " "), + "GtAttr", "Lookup", "Rdlink", "Read", "Write", "Rename", + "Access", "Rddir"); + if (widemode && clientOnly) { + printf(" Attr Lkup BioR BioW Accs BioD"); + } } printf("\n"); fflush(stdout); @@ -355,7 +433,7 @@ static void usage(void) { (void)fprintf(stderr, - "usage: nfsstat [-cemszW] [-M core] [-N system] [-w wait]\n"); + "usage: nfsstat [-cdemszW] [-M core] [-N system] [-w wait]\n"); exit(1); } @@ -392,6 +470,75 @@ sperc2(int ttl, int misses) return(p); } +#define DELTA_T(field) \ + devstat_compute_etime(&cur_stats->field, \ + (prev_stats ? &prev_stats->field : NULL)) + +/* + * XXX KDM mostly copied from ctlstat. We should commonize the code (and + * the devstat code) somehow. + */ +static void +compute_new_stats(struct nfsstatsv1 *cur_stats, + struct nfsstatsv1 *prev_stats, int curop, + long double etime, long double *mbsec, + long double *kb_per_transfer, + long double *transfers_per_second, + long double *ms_per_transfer, uint64_t *queue_len, + long double *busy_pct) +{ + uint64_t total_bytes = 0, total_operations = 0; + struct bintime total_time_bt; + struct timespec total_time_ts; + + bzero(&total_time_bt, sizeof(total_time_bt)); + bzero(&total_time_ts, sizeof(total_time_ts)); + + total_bytes = cur_stats->srvbytes[curop]; + total_operations = cur_stats->srvops[curop]; + if (prev_stats != NULL) { + total_bytes -= prev_stats->srvbytes[curop]; + total_operations -= prev_stats->srvops[curop]; + } + + *mbsec = total_bytes; + *mbsec /= 1024 * 1024; + if (etime > 0.0) { + *busy_pct = DELTA_T(busytime); + if (*busy_pct < 0) + *busy_pct = 0; + *busy_pct /= etime; + *busy_pct *= 100; + if (*busy_pct < 0) + *busy_pct = 0; + *mbsec /= etime; + } else { + *busy_pct = 0; + *mbsec = 0; + } + *kb_per_transfer = total_bytes; + *kb_per_transfer /= 1024; + if (total_operations > 0) + *kb_per_transfer /= total_operations; + else + *kb_per_transfer = 0; + if (etime > 0.0) { + *transfers_per_second = total_operations; + *transfers_per_second /= etime; + } else { + *transfers_per_second = 0.0; + } + + if (total_operations > 0) { + *ms_per_transfer = DELTA_T(srvduration[curop]); + *ms_per_transfer /= total_operations; + *ms_per_transfer *= 1000; + } else + *ms_per_transfer = 0.0; + + *queue_len = cur_stats->srvstartcnt - cur_stats->srvdonecnt; +} + /* * Print a description of the nfs stats for the experimental client/server. */ @@ -400,13 +547,14 @@ exp_intpr(int clientOnly, int serverOnly { int nfssvc_flag; - nfssvc_flag = NFSSVC_GETSTATS; + nfssvc_flag = NFSSVC_GETSTATS | NFSSVC_NEWSTRUCT; if (zflag != 0) { if (clientOnly != 0) nfssvc_flag |= NFSSVC_ZEROCLTSTATS; if (serverOnly != 0) nfssvc_flag |= NFSSVC_ZEROSRVSTATS; } + ext_nfsstats.vers = NFSSTATS_V1; if (nfssvc(nfssvc_flag, &ext_nfsstats) < 0) err(1, "Can't get stats"); if (clientOnly != 0) { @@ -418,81 +566,81 @@ exp_intpr(int clientOnly, int serverOnly , "Getattr", "Setattr", "Lookup", "Readlink", "Read", "Write", "Create", "Remove"); } - printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", - ext_nfsstats.rpccnt[NFSPROC_GETATTR], - ext_nfsstats.rpccnt[NFSPROC_SETATTR], - ext_nfsstats.rpccnt[NFSPROC_LOOKUP], - ext_nfsstats.rpccnt[NFSPROC_READLINK], - ext_nfsstats.rpccnt[NFSPROC_READ], - ext_nfsstats.rpccnt[NFSPROC_WRITE], - ext_nfsstats.rpccnt[NFSPROC_CREATE], - ext_nfsstats.rpccnt[NFSPROC_REMOVE]); + printf("%9ju %9ju %9ju %9ju %9ju %9ju %9ju %9ju\n", + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_GETATTR], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_SETATTR], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_LOOKUP], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_READLINK], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_READ], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_WRITE], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_CREATE], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_REMOVE]); if (printtitle) printf( "%9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s\n" , "Rename", "Link", "Symlink", "Mkdir", "Rmdir", "Readdir", "RdirPlus", "Access"); - printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", - ext_nfsstats.rpccnt[NFSPROC_RENAME], - ext_nfsstats.rpccnt[NFSPROC_LINK], - ext_nfsstats.rpccnt[NFSPROC_SYMLINK], - ext_nfsstats.rpccnt[NFSPROC_MKDIR], - ext_nfsstats.rpccnt[NFSPROC_RMDIR], - ext_nfsstats.rpccnt[NFSPROC_READDIR], - ext_nfsstats.rpccnt[NFSPROC_READDIRPLUS], - ext_nfsstats.rpccnt[NFSPROC_ACCESS]); + printf("%9ju %9ju %9ju %9ju %9ju %9ju %9ju %9ju\n", + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_RENAME], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_LINK], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_SYMLINK], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_MKDIR], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_RMDIR], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_READDIR], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_READDIRPLUS], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_ACCESS]); if (printtitle) printf( "%9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s\n" , "Mknod", "Fsstat", "Fsinfo", "PathConf", "Commit", "SetClId", "SetClIdCf", "Lock"); - printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", - ext_nfsstats.rpccnt[NFSPROC_MKNOD], - ext_nfsstats.rpccnt[NFSPROC_FSSTAT], - ext_nfsstats.rpccnt[NFSPROC_FSINFO], - ext_nfsstats.rpccnt[NFSPROC_PATHCONF], - ext_nfsstats.rpccnt[NFSPROC_COMMIT], - ext_nfsstats.rpccnt[NFSPROC_SETCLIENTID], - ext_nfsstats.rpccnt[NFSPROC_SETCLIENTIDCFRM], - ext_nfsstats.rpccnt[NFSPROC_LOCK]); + printf("%9ju %9ju %9ju %9ju %9ju %9ju %9ju %9ju\n", + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_MKNOD], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_FSSTAT], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_FSINFO], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_PATHCONF], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_COMMIT], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_SETCLIENTID], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_SETCLIENTIDCFRM], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_LOCK]); if (printtitle) printf("%9.9s %9.9s %9.9s %9.9s\n", "LockT", "LockU", "Open", "OpenCfr"); - printf("%9d %9d %9d %9d\n", - ext_nfsstats.rpccnt[NFSPROC_LOCKT], - ext_nfsstats.rpccnt[NFSPROC_LOCKU], - ext_nfsstats.rpccnt[NFSPROC_OPEN], - ext_nfsstats.rpccnt[NFSPROC_OPENCONFIRM]); + printf("%9ju %9ju %9ju %9ju\n", + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_LOCKT], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_LOCKU], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_OPEN], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_OPENCONFIRM]); if (printtitle) printf( "%9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s\n" , "OpenOwner", "Opens", "LockOwner", "Locks", "Delegs", "LocalOwn", "LocalOpen", "LocalLOwn"); - printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", - ext_nfsstats.clopenowners, - ext_nfsstats.clopens, - ext_nfsstats.cllockowners, - ext_nfsstats.cllocks, - ext_nfsstats.cldelegates, - ext_nfsstats.cllocalopenowners, - ext_nfsstats.cllocalopens, - ext_nfsstats.cllocallockowners); + printf("%9ju %9ju %9ju %9ju %9ju %9ju %9ju %9ju\n", + (uintmax_t)ext_nfsstats.clopenowners, + (uintmax_t)ext_nfsstats.clopens, + (uintmax_t)ext_nfsstats.cllockowners, + (uintmax_t)ext_nfsstats.cllocks, + (uintmax_t)ext_nfsstats.cldelegates, + (uintmax_t)ext_nfsstats.cllocalopenowners, + (uintmax_t)ext_nfsstats.cllocalopens, + (uintmax_t)ext_nfsstats.cllocallockowners); if (printtitle) printf("%9.9s\n", "LocalLock"); - printf("%9d\n", ext_nfsstats.cllocallocks); + printf("%9ju\n", (uintmax_t)ext_nfsstats.cllocallocks); if (printtitle) { printf("Rpc Info:\n"); printf("%9.9s %9.9s %9.9s %9.9s %9.9s\n", "TimedOut", "Invalid", "X Replies", "Retries", "Requests"); } - printf("%9d %9d %9d %9d %9d\n", - ext_nfsstats.rpctimeouts, - ext_nfsstats.rpcinvalid, - ext_nfsstats.rpcunexpected, - ext_nfsstats.rpcretries, - ext_nfsstats.rpcrequests); + printf("%9ju %9ju %9ju %9ju %9ju\n", + (uintmax_t)ext_nfsstats.rpctimeouts, + (uintmax_t)ext_nfsstats.rpcinvalid, + (uintmax_t)ext_nfsstats.rpcunexpected, + (uintmax_t)ext_nfsstats.rpcretries, + (uintmax_t)ext_nfsstats.rpcrequests); if (printtitle) { printf("Cache Info:\n"); printf("%9.9s %9.9s %9.9s %9.9s", @@ -500,31 +648,33 @@ exp_intpr(int clientOnly, int serverOnly printf(" %9.9s %9.9s %9.9s %9.9s\n", "BioR Hits", "Misses", "BioW Hits", "Misses"); } - printf("%9d %9d %9d %9d", - ext_nfsstats.attrcache_hits, - ext_nfsstats.attrcache_misses, - ext_nfsstats.lookupcache_hits, - ext_nfsstats.lookupcache_misses); - printf(" %9d %9d %9d %9d\n", - ext_nfsstats.biocache_reads - ext_nfsstats.read_bios, - ext_nfsstats.read_bios, - ext_nfsstats.biocache_writes - ext_nfsstats.write_bios, - ext_nfsstats.write_bios); + printf("%9ju %9ju %9ju %9ju", + (uintmax_t)ext_nfsstats.attrcache_hits, + (uintmax_t)ext_nfsstats.attrcache_misses, + (uintmax_t)ext_nfsstats.lookupcache_hits, + (uintmax_t)ext_nfsstats.lookupcache_misses); + printf(" %9ju %9ju %9ju %9ju\n", + (uintmax_t)(ext_nfsstats.biocache_reads - + ext_nfsstats.read_bios), + (uintmax_t)ext_nfsstats.read_bios, + (uintmax_t)(ext_nfsstats.biocache_writes - + ext_nfsstats.write_bios), + (uintmax_t)ext_nfsstats.write_bios); if (printtitle) { printf("%9.9s %9.9s %9.9s %9.9s", "BioRLHits", "Misses", "BioD Hits", "Misses"); printf(" %9.9s %9.9s\n", "DirE Hits", "Misses"); } - printf("%9d %9d %9d %9d", - ext_nfsstats.biocache_readlinks - - ext_nfsstats.readlink_bios, - ext_nfsstats.readlink_bios, - ext_nfsstats.biocache_readdirs - - ext_nfsstats.readdir_bios, - ext_nfsstats.readdir_bios); - printf(" %9d %9d\n", - ext_nfsstats.direofcache_hits, - ext_nfsstats.direofcache_misses); + printf("%9ju %9ju %9ju %9ju", + (uintmax_t)(ext_nfsstats.biocache_readlinks - + ext_nfsstats.readlink_bios), + (uintmax_t)ext_nfsstats.readlink_bios, + (uintmax_t)(ext_nfsstats.biocache_readdirs - + ext_nfsstats.readdir_bios), + (uintmax_t)ext_nfsstats.readdir_bios); + printf(" %9ju %9ju\n", + (uintmax_t)ext_nfsstats.direofcache_hits, + (uintmax_t)ext_nfsstats.direofcache_misses); } if (serverOnly != 0) { if (printtitle) { @@ -534,116 +684,136 @@ exp_intpr(int clientOnly, int serverOnly , "Getattr", "Setattr", "Lookup", "Readlink", "Read", "Write", "Create", "Remove"); } - printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", - ext_nfsstats.srvrpccnt[NFSV4OP_GETATTR], - ext_nfsstats.srvrpccnt[NFSV4OP_SETATTR], - ext_nfsstats.srvrpccnt[NFSV4OP_LOOKUP], - ext_nfsstats.srvrpccnt[NFSV4OP_READLINK], - ext_nfsstats.srvrpccnt[NFSV4OP_READ], - ext_nfsstats.srvrpccnt[NFSV4OP_WRITE], - ext_nfsstats.srvrpccnt[NFSV4OP_V3CREATE], - ext_nfsstats.srvrpccnt[NFSV4OP_REMOVE]); + printf("%9ju %9ju %9ju %9ju %9ju %9ju %9ju %9ju\n", + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_GETATTR], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_SETATTR], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_LOOKUP], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_READLINK], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_READ], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_WRITE], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_V3CREATE], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_REMOVE]); if (printtitle) printf( "%9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s\n" , "Rename", "Link", "Symlink", "Mkdir", "Rmdir", "Readdir", "RdirPlus", "Access"); - printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", - ext_nfsstats.srvrpccnt[NFSV4OP_RENAME], - ext_nfsstats.srvrpccnt[NFSV4OP_LINK], - ext_nfsstats.srvrpccnt[NFSV4OP_SYMLINK], - ext_nfsstats.srvrpccnt[NFSV4OP_MKDIR], - ext_nfsstats.srvrpccnt[NFSV4OP_RMDIR], - ext_nfsstats.srvrpccnt[NFSV4OP_READDIR], - ext_nfsstats.srvrpccnt[NFSV4OP_READDIRPLUS], - ext_nfsstats.srvrpccnt[NFSV4OP_ACCESS]); + printf("%9ju %9ju %9ju %9ju %9ju %9ju %9ju %9ju\n", + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_RENAME], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_LINK], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_SYMLINK], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_MKDIR], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_RMDIR], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_READDIR], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_READDIRPLUS], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_ACCESS]); if (printtitle) printf( "%9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s\n" , "Mknod", "Fsstat", "Fsinfo", "PathConf", "Commit", "LookupP", "SetClId", "SetClIdCf"); - printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", - ext_nfsstats.srvrpccnt[NFSV4OP_MKNOD], - ext_nfsstats.srvrpccnt[NFSV4OP_FSSTAT], - ext_nfsstats.srvrpccnt[NFSV4OP_FSINFO], - ext_nfsstats.srvrpccnt[NFSV4OP_PATHCONF], - ext_nfsstats.srvrpccnt[NFSV4OP_COMMIT], - ext_nfsstats.srvrpccnt[NFSV4OP_LOOKUPP], - ext_nfsstats.srvrpccnt[NFSV4OP_SETCLIENTID], - ext_nfsstats.srvrpccnt[NFSV4OP_SETCLIENTIDCFRM]); + printf("%9ju %9ju %9ju %9ju %9ju %9ju %9ju %9ju\n", + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_MKNOD], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_FSSTAT], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_FSINFO], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_PATHCONF], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_COMMIT], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_LOOKUPP], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_SETCLIENTID], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_SETCLIENTIDCFRM]); if (printtitle) printf( "%9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s\n" , "Open", "OpenAttr", "OpenDwnGr", "OpenCfrm", "DelePurge", "DeleRet", "GetFH", "Lock"); - printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", - ext_nfsstats.srvrpccnt[NFSV4OP_OPEN], - ext_nfsstats.srvrpccnt[NFSV4OP_OPENATTR], - ext_nfsstats.srvrpccnt[NFSV4OP_OPENDOWNGRADE], - ext_nfsstats.srvrpccnt[NFSV4OP_OPENCONFIRM], - ext_nfsstats.srvrpccnt[NFSV4OP_DELEGPURGE], - ext_nfsstats.srvrpccnt[NFSV4OP_DELEGRETURN], - ext_nfsstats.srvrpccnt[NFSV4OP_GETFH], - ext_nfsstats.srvrpccnt[NFSV4OP_LOCK]); + printf("%9ju %9ju %9ju %9ju %9ju %9ju %9ju %9ju\n", + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_OPEN], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_OPENATTR], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_OPENDOWNGRADE], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_OPENCONFIRM], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_DELEGPURGE], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_DELEGRETURN], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_GETFH], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_LOCK]); if (printtitle) printf( "%9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s\n" , "LockT", "LockU", "Close", "Verify", "NVerify", "PutFH", "PutPubFH", "PutRootFH"); - printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", - ext_nfsstats.srvrpccnt[NFSV4OP_LOCKT], - ext_nfsstats.srvrpccnt[NFSV4OP_LOCKU], - ext_nfsstats.srvrpccnt[NFSV4OP_CLOSE], - ext_nfsstats.srvrpccnt[NFSV4OP_VERIFY], - ext_nfsstats.srvrpccnt[NFSV4OP_NVERIFY], - ext_nfsstats.srvrpccnt[NFSV4OP_PUTFH], - ext_nfsstats.srvrpccnt[NFSV4OP_PUTPUBFH], - ext_nfsstats.srvrpccnt[NFSV4OP_PUTROOTFH]); + printf("%9ju %9ju %9ju %9ju %9ju %9ju %9ju %9ju\n", + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_LOCKT], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_LOCKU], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_CLOSE], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_VERIFY], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_NVERIFY], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_PUTFH], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_PUTPUBFH], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_PUTROOTFH]); if (printtitle) printf("%9.9s %9.9s %9.9s %9.9s %9.9s %9.9s\n", "Renew", "RestoreFH", "SaveFH", "Secinfo", "RelLckOwn", "V4Create"); - printf("%9d %9d %9d %9d %9d %9d\n", - ext_nfsstats.srvrpccnt[NFSV4OP_RENEW], - ext_nfsstats.srvrpccnt[NFSV4OP_RESTOREFH], - ext_nfsstats.srvrpccnt[NFSV4OP_SAVEFH], - ext_nfsstats.srvrpccnt[NFSV4OP_SECINFO], - ext_nfsstats.srvrpccnt[NFSV4OP_RELEASELCKOWN], - ext_nfsstats.srvrpccnt[NFSV4OP_CREATE]); + printf("%9ju %9ju %9ju %9ju %9ju %9ju\n", + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_RENEW], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_RESTOREFH], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_SAVEFH], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_SECINFO], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_RELEASELCKOWN], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_CREATE]); if (printtitle) { printf("Server:\n"); printf("%9.9s %9.9s %9.9s\n", "Retfailed", "Faults", "Clients"); } - printf("%9d %9d %9d\n", - ext_nfsstats.srv_errs, ext_nfsstats.srvrpc_errs, - ext_nfsstats.srvclients); + printf("%9ju %9ju %9ju\n", + (uintmax_t)ext_nfsstats.srv_errs, + (uintmax_t)ext_nfsstats.srvrpc_errs, + (uintmax_t)ext_nfsstats.srvclients); if (printtitle) printf("%9.9s %9.9s %9.9s %9.9s %9.9s \n", "OpenOwner", "Opens", "LockOwner", "Locks", "Delegs"); - printf("%9d %9d %9d %9d %9d \n", - ext_nfsstats.srvopenowners, - ext_nfsstats.srvopens, - ext_nfsstats.srvlockowners, - ext_nfsstats.srvlocks, - ext_nfsstats.srvdelegates); + printf("%9ju %9ju %9ju %9ju %9ju \n", + (uintmax_t)ext_nfsstats.srvopenowners, + (uintmax_t)ext_nfsstats.srvopens, + (uintmax_t)ext_nfsstats.srvlockowners, + (uintmax_t)ext_nfsstats.srvlocks, + (uintmax_t)ext_nfsstats.srvdelegates); if (printtitle) { printf("Server Cache Stats:\n"); printf("%9.9s %9.9s %9.9s %9.9s %9.9s %9.9s\n", "Inprog", "Idem", "Non-idem", "Misses", "CacheSize", "TCPPeak"); } - printf("%9d %9d %9d %9d %9d %9d\n", - ext_nfsstats.srvcache_inproghits, - ext_nfsstats.srvcache_idemdonehits, - ext_nfsstats.srvcache_nonidemdonehits, - ext_nfsstats.srvcache_misses, - ext_nfsstats.srvcache_size, - ext_nfsstats.srvcache_tcppeak); + printf("%9ju %9ju %9ju %9ju %9ju %9ju\n", + (uintmax_t)ext_nfsstats.srvcache_inproghits, + (uintmax_t)ext_nfsstats.srvcache_idemdonehits, + (uintmax_t)ext_nfsstats.srvcache_nonidemdonehits, + (uintmax_t)ext_nfsstats.srvcache_misses, + (uintmax_t)ext_nfsstats.srvcache_size, + (uintmax_t)ext_nfsstats.srvcache_tcppeak); } } +static void +compute_totals(struct nfsstatsv1 *total_stats, struct nfsstatsv1 *cur_stats) +{ + int i; + + bzero(total_stats, sizeof(*total_stats)); + for (i = 0; i < (NFSV42_NOPS + NFSV4OP_FAKENOPS); i++) { + total_stats->srvbytes[0] += cur_stats->srvbytes[i]; + total_stats->srvops[0] += cur_stats->srvops[i]; + bintime_add(&total_stats->srvduration[0], + &cur_stats->srvduration[i]); + total_stats->srvrpccnt[i] = cur_stats->srvrpccnt[i]; + } + total_stats->srvstartcnt = cur_stats->srvstartcnt; + total_stats->srvdonecnt = cur_stats->srvdonecnt; + total_stats->busytime = cur_stats->busytime; + +} + /* * Print a running summary of nfs statistics for the experimental client and/or * server. @@ -652,40 +822,51 @@ exp_intpr(int clientOnly, int serverOnly * First line printed at top of screen is always cumulative. */ static void -exp_sidewaysintpr(u_int interval, int clientOnly, int serverOnly) +exp_sidewaysintpr(u_int interval, int clientOnly, int serverOnly, + int newStats) { - struct ext_nfsstats nfsstats, lastst, *ext_nfsstatsp; + struct nfsstatsv1 nfsstats, lastst, *ext_nfsstatsp; + struct nfsstatsv1 curtotal, lasttotal; + struct timespec ts, lastts; int hdrcnt = 1; ext_nfsstatsp = &lastst; - if (nfssvc(NFSSVC_GETSTATS, ext_nfsstatsp) < 0) + ext_nfsstatsp->vers = NFSSTATS_V1; + if (nfssvc(NFSSVC_GETSTATS | NFSSVC_NEWSTRUCT, ext_nfsstatsp) < 0) err(1, "Can't get stats"); + clock_gettime(CLOCK_MONOTONIC, &lastts); + compute_totals(&lasttotal, ext_nfsstatsp); sleep(interval); for (;;) { ext_nfsstatsp = &nfsstats; - if (nfssvc(NFSSVC_GETSTATS, ext_nfsstatsp) < 0) + ext_nfsstatsp->vers = NFSSTATS_V1; + if (nfssvc(NFSSVC_GETSTATS | NFSSVC_NEWSTRUCT, ext_nfsstatsp) + < 0) err(1, "Can't get stats"); + clock_gettime(CLOCK_MONOTONIC, &ts); if (--hdrcnt == 0) { - printhdr(clientOnly, serverOnly); - if (clientOnly && serverOnly) + printhdr(clientOnly, serverOnly, newStats); + if (newStats) + hdrcnt = 20; + else if (clientOnly && serverOnly) hdrcnt = 10; else hdrcnt = 20; } - if (clientOnly) { - printf("%s %6d %6d %6d %6d %6d %6d %6d %6d", + if (clientOnly && newStats == 0) { + printf("%s %6ju %6ju %6ju %6ju %6ju %6ju %6ju %6ju", ((clientOnly && serverOnly) ? "Client:" : ""), - DELTA(rpccnt[NFSPROC_GETATTR]), - DELTA(rpccnt[NFSPROC_LOOKUP]), - DELTA(rpccnt[NFSPROC_READLINK]), - DELTA(rpccnt[NFSPROC_READ]), - DELTA(rpccnt[NFSPROC_WRITE]), - DELTA(rpccnt[NFSPROC_RENAME]), - DELTA(rpccnt[NFSPROC_ACCESS]), - DELTA(rpccnt[NFSPROC_READDIR]) + - DELTA(rpccnt[NFSPROC_READDIRPLUS]) + (uintmax_t)DELTA(rpccnt[NFSPROC_GETATTR]), + (uintmax_t)DELTA(rpccnt[NFSPROC_LOOKUP]), + (uintmax_t)DELTA(rpccnt[NFSPROC_READLINK]), + (uintmax_t)DELTA(rpccnt[NFSPROC_READ]), + (uintmax_t)DELTA(rpccnt[NFSPROC_WRITE]), + (uintmax_t)DELTA(rpccnt[NFSPROC_RENAME]), + (uintmax_t)DELTA(rpccnt[NFSPROC_ACCESS]), + (uintmax_t)(DELTA(rpccnt[NFSPROC_READDIR]) + + DELTA(rpccnt[NFSPROC_READDIRPLUS])) ); if (widemode) { printf(" %s %s %s %s %s %s", @@ -705,21 +886,74 @@ exp_sidewaysintpr(u_int interval, int cl } printf("\n"); } - if (serverOnly) { - printf("%s %6d %6d %6d %6d %6d %6d %6d %6d", + + if (serverOnly && newStats) { + long double cur_secs, last_secs, etime; + long double mbsec; + long double kb_per_transfer; + long double transfers_per_second; + long double ms_per_transfer; + uint64_t queue_len; + long double busy_pct; + int i; + + cur_secs = ts.tv_sec + + ((long double)ts.tv_nsec / 1000000000); + last_secs = lastts.tv_sec + + ((long double)lastts.tv_nsec / 1000000000); + etime = cur_secs - last_secs; + + compute_totals(&curtotal, &nfsstats); + + for (i = 0; i < NUM_STAT_TYPES; i++) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Oct 3 12:13:41 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFE5AAF3DD2; Mon, 3 Oct 2016 12:13:41 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2D9093F; Mon, 3 Oct 2016 12:13:41 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u93CDe5J001391; Mon, 3 Oct 2016 12:13:40 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u93CDeFQ001390; Mon, 3 Oct 2016 12:13:40 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201610031213.u93CDeFQ001390@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 3 Oct 2016 12:13:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306633 - stable/11/usr.bin/nfsstat X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 12:13:42 -0000 Author: rmacklem Date: Mon Oct 3 12:13:40 2016 New Revision: 306633 URL: https://svnweb.freebsd.org/changeset/base/306633 Log: MFC: r304059 Update the man page to descibe the "-d" option added by r304058. This is a content change. Modified: stable/11/usr.bin/nfsstat/nfsstat.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/nfsstat/nfsstat.1 ============================================================================== --- stable/11/usr.bin/nfsstat/nfsstat.1 Mon Oct 3 12:02:45 2016 (r306632) +++ stable/11/usr.bin/nfsstat/nfsstat.1 Mon Oct 3 12:13:40 2016 (r306633) @@ -28,7 +28,7 @@ .\" From: @(#)nfsstat.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd April 23, 2015 +.Dd August 13, 2016 .Dt NFSSTAT 1 .Os .Sh NAME @@ -38,7 +38,7 @@ statistics .Sh SYNOPSIS .Nm -.Op Fl cemszW +.Op Fl cdemszW .Op Fl M Ar core .Op Fl N Ar system .Op Fl w Ar wait @@ -57,6 +57,28 @@ The options are as follows: .Bl -tag -width indent .It Fl c Only display client side statistics. +.It Fl d +Display statistics for the new NFS server that are similar to those +displayed by +.Xr iostat 8 . +This includes kilobytes per transfer, transfers per second, and megabytes per +second for read, write, and all operations. +It also includes the current queue depth, the busy percentage, and latency +for all operations. +If the +.Fl W +flag is added, commits per second, commit latency, read latency, and write +latency are also added to the display. +The busy percentage shown can exceed 100 at times. +This is because of the way busy percentages are calculated. +The busy time is calculated by adding the elapsed time between the +last time an operation started or finished, +and the current time. +If there is only one operation outstanding, the "busy time" time +will get updated with the total time of that operation. +That means that the difference in the busy time between the two +measurement intervals (often 1 second) +will increase by more than the measurement interval. .It Fl e Report the extra statistics collected by the NFS client and server for NFSv4. @@ -79,7 +101,8 @@ Only display server side statistics. Use wide format with interval short summary. This option is especially useful when combined with -.Fl c +.Fl c , +.Fl d , or .Fl s and a time delay. From owner-svn-src-all@freebsd.org Mon Oct 3 12:48:56 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E06BCAF3BF5; Mon, 3 Oct 2016 12:48:56 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3086E85; Mon, 3 Oct 2016 12:48:56 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u93Cmt60012818; Mon, 3 Oct 2016 12:48:55 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u93Cmt1O012817; Mon, 3 Oct 2016 12:48:55 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201610031248.u93Cmt1O012817@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 3 Oct 2016 12:48:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306634 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 12:48:57 -0000 Author: hselasky Date: Mon Oct 3 12:48:55 2016 New Revision: 306634 URL: https://svnweb.freebsd.org/changeset/base/306634 Log: Change from passive to active english. Correctly specify that the task is being drained and not the queue. Submitted by: wblock @ MFC after: 3 days Modified: head/share/man/man9/taskqueue.9 Modified: head/share/man/man9/taskqueue.9 ============================================================================== --- head/share/man/man9/taskqueue.9 Mon Oct 3 12:13:40 2016 (r306633) +++ head/share/man/man9/taskqueue.9 Mon Oct 3 12:48:55 2016 (r306634) @@ -223,8 +223,8 @@ Otherwise, the task is scheduled for enq after the absolute value of .Va ticks is passed. -This function will return -1 if the queue is being drained. -Otherwise the number of pending calls will be returned. +This function returns -1 if the task is being drained. +Otherwise, the number of pending calls is returned. .Pp The .Fn taskqueue_cancel From owner-svn-src-all@freebsd.org Mon Oct 3 12:58:10 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D518AF3F95; Mon, 3 Oct 2016 12:58:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F10678EA; Mon, 3 Oct 2016 12:58:09 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u93Cw9SG016638; Mon, 3 Oct 2016 12:58:09 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u93Cw9KA016637; Mon, 3 Oct 2016 12:58:09 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201610031258.u93Cw9KA016637@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 3 Oct 2016 12:58:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306635 - stable/11/sys/fs/cuse X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 12:58:10 -0000 Author: hselasky Date: Mon Oct 3 12:58:08 2016 New Revision: 306635 URL: https://svnweb.freebsd.org/changeset/base/306635 Log: MFC r306228: Prevent cuse4bsd.ko and cuse.ko from loading at the same time by declaring support for the cuse4bsd interface in cuse.ko. Found by: Sergey V. Dyatko Modified: stable/11/sys/fs/cuse/cuse.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/cuse/cuse.c ============================================================================== --- stable/11/sys/fs/cuse/cuse.c Mon Oct 3 12:48:55 2016 (r306634) +++ stable/11/sys/fs/cuse/cuse.c Mon Oct 3 12:58:08 2016 (r306635) @@ -63,6 +63,12 @@ MODULE_VERSION(cuse, 1); +/* + * Prevent cuse4bsd.ko and cuse.ko from loading at the same time by + * declaring support for the cuse4bsd interface in cuse.ko: + */ +MODULE_VERSION(cuse4bsd, 1); + #define NBUSY ((uint8_t *)1) #ifdef FEATURE From owner-svn-src-all@freebsd.org Mon Oct 3 13:12:45 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55302AC632D; Mon, 3 Oct 2016 13:12:45 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E2FC1C9; Mon, 3 Oct 2016 13:12:44 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u93DCifu024252; Mon, 3 Oct 2016 13:12:44 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u93DCikZ024251; Mon, 3 Oct 2016 13:12:44 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201610031312.u93DCikZ024251@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 3 Oct 2016 13:12:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306636 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 13:12:45 -0000 Author: emaste Date: Mon Oct 3 13:12:44 2016 New Revision: 306636 URL: https://svnweb.freebsd.org/changeset/base/306636 Log: libc arc4_stir: use only kern.arandom sysctl The sysctl cannot fail. If it does fail on some FreeBSD derivative or after some future change, just abort() so that the problem will be found and fixed. It's preferable to provide an arc4random() function that cannot fail and cannot return poor quality random data. While abort() is not normally suitable for a library, it makes sense here. Reviewed by: ed, jonathan, markm MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8077 Modified: head/lib/libc/gen/arc4random.c Modified: head/lib/libc/gen/arc4random.c ============================================================================== --- head/lib/libc/gen/arc4random.c Mon Oct 3 12:58:08 2016 (r306635) +++ head/lib/libc/gen/arc4random.c Mon Oct 3 13:12:44 2016 (r306636) @@ -137,35 +137,17 @@ arc4_sysctl(u_char *buf, size_t size) static void arc4_stir(void) { - int done, fd, i; - struct { - struct timeval tv; - pid_t pid; - u_char rnd[KEYSIZE]; - } rdat; + u_char rdat[KEYSIZE]; + int i; if (!rs_initialized) { arc4_init(); rs_initialized = 1; } - done = 0; - if (arc4_sysctl((u_char *)&rdat, KEYSIZE) == KEYSIZE) - done = 1; - if (!done) { - fd = _open(RANDOMDEV, O_RDONLY | O_CLOEXEC, 0); - if (fd >= 0) { - if (_read(fd, &rdat, KEYSIZE) == KEYSIZE) - done = 1; - (void)_close(fd); - } - } - if (!done) { - (void)gettimeofday(&rdat.tv, NULL); - rdat.pid = getpid(); - /* We'll just take whatever was on the stack too... */ - } + if (arc4_sysctl(rdat, KEYSIZE) != KEYSIZE) + abort(); /* Random sysctl cannot fail. */ - arc4_addrandom((u_char *)&rdat, KEYSIZE); + arc4_addrandom(rdat, KEYSIZE); /* * Discard early keystream, as per recommendations in: From owner-svn-src-all@freebsd.org Mon Oct 3 13:23:45 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37EE1AC6705; Mon, 3 Oct 2016 13:23:45 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E3207BA1; Mon, 3 Oct 2016 13:23:44 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u93DNiZ4028212; Mon, 3 Oct 2016 13:23:44 GMT (envelope-from gallatin@FreeBSD.org) Received: (from gallatin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u93DNiMA028211; Mon, 3 Oct 2016 13:23:44 GMT (envelope-from gallatin@FreeBSD.org) Message-Id: <201610031323.u93DNiMA028211@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gallatin set sender to gallatin@FreeBSD.org using -f From: Andrew Gallatin Date: Mon, 3 Oct 2016 13:23:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306637 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 13:23:45 -0000 Author: gallatin Date: Mon Oct 3 13:23:43 2016 New Revision: 306637 URL: https://svnweb.freebsd.org/changeset/base/306637 Log: Conditionally move initial vfs bio alloc above 4G On machines with just the wrong amount of physical memory (enough to have a lot of bufs, but not enough to use VM_FREELIST_DMA32) it is possible for 32-bit address limited devices to have little to no memory left when attaching, due to potentially large vfs bio configs consuming all memory below 4GB not protected by VM_FREELIST_ISADMA. This causes the 32-bit devices to allocate from VM_FREELIST_ISADMA, leaving that freelist emtpy when ISA devices need DMAable memory. Rather than decrease VM_DMA32_NPAGES_THRESHOLD, use the time honored technique of putting initially allocated kernel data structs at the end (or at least not the beginning) of memory. Since this allocation is done at boot and is wired, is not freed, so the system is low on 32-bit (and ISA) dma'ble memory forever. So it is a good candidate to move above 4GB. While here, remove an unneeded round_page() from kmem_malloc's size argument as suggested by alc. The first thing kmem_malloc() does is a round_page(size), so there is no need to do it before the call. Reviewed by: alc Sponsored by: Netflix Modified: head/sys/vm/vm_init.c Modified: head/sys/vm/vm_init.c ============================================================================== --- head/sys/vm/vm_init.c Mon Oct 3 13:12:44 2016 (r306636) +++ head/sys/vm/vm_init.c Mon Oct 3 13:23:43 2016 (r306637) @@ -206,8 +206,18 @@ again: */ if (firstaddr == 0) { size = (vm_size_t)v; - firstaddr = kmem_malloc(kernel_arena, round_page(size), - M_ZERO | M_WAITOK); +#ifdef VM_FREELIST_DMA32 + /* + * Try to protect 32-bit DMAable memory from the largest + * early alloc of wired mem. + */ + firstaddr = kmem_alloc_attr(kernel_arena, size, + M_ZERO | M_NOWAIT, (vm_paddr_t)1 << 32, + ~(vm_paddr_t)0, VM_MEMATTR_DEFAULT); + if (firstaddr == 0) +#endif + firstaddr = kmem_malloc(kernel_arena, size, + M_ZERO | M_WAITOK); if (firstaddr == 0) panic("startup: no room for tables"); goto again; From owner-svn-src-all@freebsd.org Mon Oct 3 14:07:16 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9398CAF34C9; Mon, 3 Oct 2016 14:07:16 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60BF0885; Mon, 3 Oct 2016 14:07:16 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u93E7FQd043441; Mon, 3 Oct 2016 14:07:15 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u93E7Fdc043440; Mon, 3 Oct 2016 14:07:15 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201610031407.u93E7Fdc043440@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Mon, 3 Oct 2016 14:07:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306638 - head/lib/libstand X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 14:07:16 -0000 Author: tsoome Date: Mon Oct 3 14:07:15 2016 New Revision: 306638 URL: https://svnweb.freebsd.org/changeset/base/306638 Log: Fix remaining bugs in libstancd/cd9660.c reported by Bruce Evans. Fixed text in comments. Reported by: Bruce Evans Reviewed by: allanjude Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D8119 Modified: head/lib/libstand/cd9660.c Modified: head/lib/libstand/cd9660.c ============================================================================== --- head/lib/libstand/cd9660.c Mon Oct 3 13:23:43 2016 (r306637) +++ head/lib/libstand/cd9660.c Mon Oct 3 14:07:15 2016 (r306638) @@ -353,9 +353,9 @@ cd9660_open(const char *path, struct ope dp = (struct iso_directory_record *) ((char *) dp + isonum_711(dp->length)); - /* if the new block is zero length, its padding */ + /* If the new block has zero length, it is padding. */ if (isonum_711(dp->length) == 0) { - /* skip to next block, if any */ + /* Skip to next block, if any. */ off = boff * ISO_DEFAULT_BLOCK_SIZE; continue; } From owner-svn-src-all@freebsd.org Mon Oct 3 14:18:14 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3752AF376C; Mon, 3 Oct 2016 14:18:14 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C708E65; Mon, 3 Oct 2016 14:18:14 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u93EID0M047299; Mon, 3 Oct 2016 14:18:13 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u93EID4W047298; Mon, 3 Oct 2016 14:18:13 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201610031418.u93EID4W047298@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 3 Oct 2016 14:18:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306639 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 14:18:14 -0000 Author: andrew Date: Mon Oct 3 14:18:13 2016 New Revision: 306639 URL: https://svnweb.freebsd.org/changeset/base/306639 Log: Split the compiler command line for building the arm elf trampoline code so common parts of the command are on separate lines. Sponsored by: ABT Systems Ltd Modified: head/sys/conf/Makefile.arm Modified: head/sys/conf/Makefile.arm ============================================================================== --- head/sys/conf/Makefile.arm Mon Oct 3 14:07:15 2016 (r306638) +++ head/sys/conf/Makefile.arm Mon Oct 3 14:18:13 2016 (r306639) @@ -90,13 +90,20 @@ ${KERNEL_KO}.tramp: ${KERNEL_KO} $S/$M/$ -g --strip-symbol '$$t' ${FULLKERNEL} ${KERNEL_KO}.tmp eval $$(stat -s ${KERNEL_KO}.tmp) && \ echo "#define KERNSIZE $$st_size" >>opt_kernname.h - ${CC} -O -nostdlib -I. -I$S -Xlinker -T -Xlinker ldscript.$M.tramp \ - tmphack.S $S/$M/$M/elf_trampoline.c $S/$M/$M/inckern.S \ - ${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp - ${CC} -O -nostdlib -I. -I$S -Xlinker -T -Xlinker \ - ldscript.$M.tramp.noheader \ - tmphack.S $S/$M/$M/elf_trampoline.c $S/$M/$M/inckern.S \ - ${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp.noheader + ${CC} -O -nostdlib -I. -I$S \ + -Xlinker -T -Xlinker ldscript.$M.tramp \ + tmphack.S \ + $S/$M/$M/elf_trampoline.c \ + $S/$M/$M/inckern.S \ + ${FILES_CPU_FUNC} \ + -o ${KERNEL_KO}.tramp + ${CC} -O -nostdlib -I. -I$S \ + -Xlinker -T -Xlinker ldscript.$M.tramp.noheader \ + tmphack.S \ + $S/$M/$M/elf_trampoline.c \ + $S/$M/$M/inckern.S \ + ${FILES_CPU_FUNC} \ + -o ${KERNEL_KO}.tramp.noheader ${OBJCOPY} -S -O binary ${KERNEL_KO}.tramp.noheader \ ${KERNEL_KO}.tramp.bin ${OBJCOPY} ${STRIP_FLAGS} ${KERNEL_KO}.tmp @@ -106,15 +113,28 @@ ${KERNEL_KO}.tramp: ${KERNEL_KO} $S/$M/$ gzip -f9 ${KERNEL_KO}.tmp eval $$(stat -s ${KERNEL_KO}.tmp.gz) && \ echo "#define KERNCOMPSIZE $$st_size" >>opt_kernname.h - ${CC} -O2 -ffreestanding -DKZIP -I. -I$S -c $S/kern/inflate.c -o \ - inflate-tramp.o - ${CC} -O -nostdlib -I. -I$S -Xlinker -T -Xlinker ldscript.$M.tramp \ - -DKZIP tmphack.S $S/$M/$M/elf_trampoline.c inflate-tramp.o \ - $S/$M/$M/inckern.S ${FILES_CPU_FUNC} -o ${KERNEL_KO}.gz.tramp - ${CC} -O -nostdlib -I. -I$S -Xlinker -T -Xlinker \ - ldscript.$M.tramp.noheader \ - -DKZIP tmphack.S $S/$M/$M/elf_trampoline.c inflate-tramp.o \ - $S/$M/$M/inckern.S ${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp.noheader + ${CC} -O2 -ffreestanding -I. -I$S -c \ + -DKZIP \ + $S/kern/inflate.c \ + -o inflate-tramp.o + ${CC} -O -nostdlib -I. -I$S \ + -Xlinker -T -Xlinker ldscript.$M.tramp \ + -DKZIP \ + tmphack.S \ + $S/$M/$M/elf_trampoline.c \ + inflate-tramp.o \ + $S/$M/$M/inckern.S \ + ${FILES_CPU_FUNC} \ + -o ${KERNEL_KO}.gz.tramp + ${CC} -O -nostdlib -I. -I$S \ + -Xlinker -T -Xlinker ldscript.$M.tramp.noheader \ + -DKZIP \ + tmphack.S \ + $S/$M/$M/elf_trampoline.c \ + inflate-tramp.o \ + $S/$M/$M/inckern.S \ + ${FILES_CPU_FUNC} \ + -o ${KERNEL_KO}.tramp.noheader ${OBJCOPY} -S -O binary ${KERNEL_KO}.tramp.noheader \ ${KERNEL_KO}.gz.tramp.bin rm ${KERNEL_KO}.tmp.gz ${KERNEL_KO}.tramp.noheader opt_kernname.h \ From owner-svn-src-all@freebsd.org Mon Oct 3 14:26:56 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86D86AF3F0A; Mon, 3 Oct 2016 14:26:56 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5667FAFD; Mon, 3 Oct 2016 14:26:56 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u93EQtjv051235; Mon, 3 Oct 2016 14:26:55 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u93EQthK051234; Mon, 3 Oct 2016 14:26:55 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201610031426.u93EQthK051234@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 3 Oct 2016 14:26:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306640 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 14:26:56 -0000 Author: andrew Date: Mon Oct 3 14:26:55 2016 New Revision: 306640 URL: https://svnweb.freebsd.org/changeset/base/306640 Log: Only define the CF_* macros on ARMv4/v5. They are unused on armv6. Sponsored by: ABT Systems Ltd Modified: head/sys/arm/arm/genassym.c Modified: head/sys/arm/arm/genassym.c ============================================================================== --- head/sys/arm/arm/genassym.c Mon Oct 3 14:18:13 2016 (r306639) +++ head/sys/arm/arm/genassym.c Mon Oct 3 14:26:55 2016 (r306640) @@ -92,11 +92,13 @@ ASSYM(M_DATA, offsetof(struct mbuf, m_da ASSYM(M_NEXT, offsetof(struct mbuf, m_next)); ASSYM(IP_SRC, offsetof(struct ip, ip_src)); ASSYM(IP_DST, offsetof(struct ip, ip_dst)); +#if __ARM_ARCH < 6 ASSYM(CF_CONTEXT_SWITCH, offsetof(struct cpu_functions, cf_context_switch)); ASSYM(CF_DCACHE_WB_RANGE, offsetof(struct cpu_functions, cf_dcache_wb_range)); ASSYM(CF_IDCACHE_WBINV_ALL, offsetof(struct cpu_functions, cf_idcache_wbinv_all)); ASSYM(CF_L2CACHE_WBINV_ALL, offsetof(struct cpu_functions, cf_l2cache_wbinv_all)); ASSYM(CF_TLB_FLUSHID_SE, offsetof(struct cpu_functions, cf_tlb_flushID_SE)); +#endif ASSYM(TD_PCB, offsetof(struct thread, td_pcb)); ASSYM(TD_FLAGS, offsetof(struct thread, td_flags)); From owner-svn-src-all@freebsd.org Mon Oct 3 14:43:58 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E84E4AF3648; Mon, 3 Oct 2016 14:43:58 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ACD4B6C2; Mon, 3 Oct 2016 14:43:58 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u93EhvYs058516; Mon, 3 Oct 2016 14:43:57 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u93Ehv4c058514; Mon, 3 Oct 2016 14:43:57 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201610031443.u93Ehv4c058514@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 3 Oct 2016 14:43:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306641 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 14:43:59 -0000 Author: andrew Date: Mon Oct 3 14:43:57 2016 New Revision: 306641 URL: https://svnweb.freebsd.org/changeset/base/306641 Log: Remove the parts of cpu_functions from armv6 that are unused on that architecture. Sponsored by: ABT Systems Ltd Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/include/cpufunc.h Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Mon Oct 3 14:26:55 2016 (r306640) +++ head/sys/arm/arm/cpufunc.c Mon Oct 3 14:43:57 2016 (r306641) @@ -242,28 +242,11 @@ struct cpu_functions sheeva_cpufuncs = { #ifdef CPU_MV_PJ4B struct cpu_functions pj4bv7_cpufuncs = { - /* CPU functions */ - .cf_cpwait = armv7_drain_writebuf, - /* MMU functions */ .cf_control = cpufunc_control, .cf_setttb = armv7_setttb, - /* TLB functions */ - .cf_tlb_flushID = armv7_tlb_flushID, - .cf_tlb_flushID_SE = armv7_tlb_flushID_SE, - .cf_tlb_flushD = armv7_tlb_flushID, - .cf_tlb_flushD_SE = armv7_tlb_flushID_SE, - /* Cache operations */ - .cf_icache_sync_range = armv7_icache_sync_range, - .cf_dcache_wbinv_all = armv7_dcache_wbinv_all, - .cf_dcache_wbinv_range = armv7_dcache_wbinv_range, - .cf_dcache_inv_range = armv7_dcache_inv_range, - .cf_dcache_wb_range = armv7_dcache_wb_range, - .cf_idcache_inv_all = armv7_idcache_inv_all, - .cf_idcache_wbinv_all = armv7_idcache_wbinv_all, - .cf_idcache_wbinv_range = armv7_idcache_wbinv_range, .cf_l2cache_wbinv_all = (void *)cpufunc_nullop, .cf_l2cache_wbinv_range = (void *)cpufunc_nullop, .cf_l2cache_inv_range = (void *)cpufunc_nullop, @@ -275,7 +258,6 @@ struct cpu_functions pj4bv7_cpufuncs = { .cf_sleep = (void *)cpufunc_nullop, /* Soft functions */ - .cf_context_switch = armv7_context_switch, .cf_setup = pj4bv7_setup }; #endif /* CPU_MV_PJ4B */ @@ -436,28 +418,11 @@ struct cpu_functions fa526_cpufuncs = { #if defined(CPU_ARM1176) struct cpu_functions arm1176_cpufuncs = { - /* CPU functions */ - .cf_cpwait = cpufunc_nullop, - /* MMU functions */ .cf_control = cpufunc_control, .cf_setttb = arm11x6_setttb, - /* TLB functions */ - .cf_tlb_flushID = arm11_tlb_flushID, - .cf_tlb_flushID_SE = arm11_tlb_flushID_SE, - .cf_tlb_flushD = arm11_tlb_flushD, - .cf_tlb_flushD_SE = arm11_tlb_flushD_SE, - /* Cache operations */ - .cf_icache_sync_range = arm11x6_icache_sync_range, - .cf_dcache_wbinv_all = arm11x6_dcache_wbinv_all, - .cf_dcache_wbinv_range = armv6_dcache_wbinv_range, - .cf_dcache_inv_range = armv6_dcache_inv_range, - .cf_dcache_wb_range = armv6_dcache_wb_range, - .cf_idcache_inv_all = armv6_idcache_inv_all, - .cf_idcache_wbinv_all = arm11x6_idcache_wbinv_all, - .cf_idcache_wbinv_range = arm11x6_idcache_wbinv_range, .cf_l2cache_wbinv_all = (void *)cpufunc_nullop, .cf_l2cache_wbinv_range = (void *)cpufunc_nullop, .cf_l2cache_inv_range = (void *)cpufunc_nullop, @@ -469,40 +434,17 @@ struct cpu_functions arm1176_cpufuncs = .cf_sleep = arm11x6_sleep, /* Soft functions */ - .cf_context_switch = arm11_context_switch, .cf_setup = arm11x6_setup }; #endif /*CPU_ARM1176 */ #if defined(CPU_CORTEXA) || defined(CPU_KRAIT) struct cpu_functions cortexa_cpufuncs = { - /* CPU functions */ - .cf_cpwait = cpufunc_nullop, - /* MMU functions */ .cf_control = cpufunc_control, .cf_setttb = armv7_setttb, - /* - * TLB functions. ARMv7 does all TLB ops based on a unified TLB model - * whether the hardware implements separate I+D or not, so we use the - * same 'ID' functions for all 3 variations. - */ - - .cf_tlb_flushID = armv7_tlb_flushID, - .cf_tlb_flushID_SE = armv7_tlb_flushID_SE, - .cf_tlb_flushD = armv7_tlb_flushID, - .cf_tlb_flushD_SE = armv7_tlb_flushID_SE, - /* Cache operations */ - .cf_icache_sync_range = armv7_icache_sync_range, - .cf_dcache_wbinv_all = armv7_dcache_wbinv_all, - .cf_dcache_wbinv_range = armv7_dcache_wbinv_range, - .cf_dcache_inv_range = armv7_dcache_inv_range, - .cf_dcache_wb_range = armv7_dcache_wb_range, - .cf_idcache_inv_all = armv7_idcache_inv_all, - .cf_idcache_wbinv_all = armv7_idcache_wbinv_all, - .cf_idcache_wbinv_range = armv7_idcache_wbinv_range, /* * Note: For CPUs using the PL310 the L2 ops are filled in when the @@ -519,7 +461,6 @@ struct cpu_functions cortexa_cpufuncs = .cf_sleep = armv7_cpu_sleep, /* Soft functions */ - .cf_context_switch = armv7_context_switch, .cf_setup = cortexa_setup }; #endif /* CPU_CORTEXA */ Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Mon Oct 3 14:26:55 2016 (r306640) +++ head/sys/arm/include/cpufunc.h Mon Oct 3 14:43:57 2016 (r306641) @@ -59,14 +59,16 @@ breakpoint(void) struct cpu_functions { /* CPU functions */ - +#if __ARM_ARCH < 6 void (*cf_cpwait) (void); +#endif /* MMU functions */ u_int (*cf_control) (u_int bic, u_int eor); void (*cf_setttb) (u_int ttb); +#if __ARM_ARCH < 6 /* TLB functions */ void (*cf_tlb_flushID) (void); @@ -139,6 +141,7 @@ struct cpu_functions { void (*cf_idcache_inv_all) (void); void (*cf_idcache_wbinv_all) (void); void (*cf_idcache_wbinv_range) (vm_offset_t, vm_size_t); +#endif void (*cf_l2cache_wbinv_all) (void); void (*cf_l2cache_wbinv_range) (vm_offset_t, vm_size_t); void (*cf_l2cache_inv_range) (vm_offset_t, vm_size_t); @@ -151,9 +154,11 @@ struct cpu_functions { void (*cf_sleep) (int mode); +#if __ARM_ARCH < 6 /* Soft functions */ void (*cf_context_switch) (void); +#endif void (*cf_setup) (void); }; From owner-svn-src-all@freebsd.org Mon Oct 3 14:59:34 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03C14AF3BC8; Mon, 3 Oct 2016 14:59:34 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEBB1F55; Mon, 3 Oct 2016 14:59:33 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u93ExWLc062679; Mon, 3 Oct 2016 14:59:32 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u93ExWYP062677; Mon, 3 Oct 2016 14:59:32 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201610031459.u93ExWYP062677@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 3 Oct 2016 14:59:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306642 - stable/11/etc/periodic/security X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 14:59:34 -0000 Author: asomers Date: Mon Oct 3 14:59:32 2016 New Revision: 306642 URL: https://svnweb.freebsd.org/changeset/base/306642 Log: MFC r306048 Fix periodic scripts when an NFS mount covers a local mount 100.chksetuid and 110.neggrpperm try to search through all UFS and ZFS filesystems. But their logic contains an error. They also search through remote filesystems that are mounted on top of the root of a local filesystem. For example, if a user installs a FreeBSD system with the default ZFS layout, he'll get a zroot/usr/home filesystem. If he then mounts /usr/home over NFS, these scripts would search through /usr/home. Modified: stable/11/etc/periodic/security/100.chksetuid stable/11/etc/periodic/security/110.neggrpperm Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/periodic/security/100.chksetuid ============================================================================== --- stable/11/etc/periodic/security/100.chksetuid Mon Oct 3 14:43:57 2016 (r306641) +++ stable/11/etc/periodic/security/100.chksetuid Mon Oct 3 14:59:32 2016 (r306642) @@ -46,7 +46,7 @@ then echo "" echo 'Checking setuid files and devices:' MP=`mount -t ufs,zfs | awk '$0 !~ /no(suid|exec)/ { print $3 }'` - find -sx $MP /dev/null -type f \ + find -sx $MP /dev/null \( ! -fstype local \) -prune -o -type f \ \( -perm -u+x -or -perm -g+x -or -perm -o+x \) \ \( -perm -u+s -or -perm -g+s \) -exec ls -liTd \{\} \+ | check_diff setuid - "${host} setuid diffs:" Modified: stable/11/etc/periodic/security/110.neggrpperm ============================================================================== --- stable/11/etc/periodic/security/110.neggrpperm Mon Oct 3 14:43:57 2016 (r306641) +++ stable/11/etc/periodic/security/110.neggrpperm Mon Oct 3 14:59:32 2016 (r306642) @@ -44,7 +44,7 @@ then echo "" echo 'Checking negative group permissions:' MP=`mount -t ufs,zfs | awk '$0 !~ /no(suid|exec)/ { print $3 }'` - n=$(find -sx $MP /dev/null -type f \ + n=$(find -sx $MP /dev/null \( ! -fstype local \) -prune -o -type f \ \( \( ! -perm +010 -and -perm +001 \) -or \ \( ! -perm +020 -and -perm +002 \) -or \ \( ! -perm +040 -and -perm +004 \) \) \ From owner-svn-src-all@freebsd.org Mon Oct 3 15:13:21 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0FBA1AF316A; Mon, 3 Oct 2016 15:13:21 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x22b.google.com (mail-io0-x22b.google.com [IPv6:2607:f8b0:4001:c06::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CDD46B31; Mon, 3 Oct 2016 15:13:20 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-io0-x22b.google.com with SMTP id i202so43143713ioi.2; Mon, 03 Oct 2016 08:13:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=2WFOw5WtZR1c5PuRZwYJrtqqf2NAS/+JkmkpYnl0sPM=; b=rXeslyrn30RM7RdJzQOnQo8PiFTZEs60ZjqdbHpzeOJtbt4BQ3+6dPP42j+u/j6lkA rxYcdb7yK2nUBSVoXDv1tSSlgdM6Y9Jr9Yv5y1HcjJibyF7gia4bS5ENqfRfujLW39a/ jLFp3OFT9hj69TAH3WGwztJV088fI0gGx9okxo1mHwqZRkzkOTKDADuA8XZelRNSvNy0 Ca3dRvIrpfl+az7dhxpy0kwY0A3TacdYUmXZVHwVNOzsDP1XrdOGEul591ltSp9y/R2p Y4eCJpR2DJz1IP0MDLAVoU4Chph/fxQttQVxZ4vb91Y0DjY8PaNWur6RjXXKINutf97z DUIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=2WFOw5WtZR1c5PuRZwYJrtqqf2NAS/+JkmkpYnl0sPM=; b=OexNBKK//mjdE9SE543GCs9qeHFGX//YF7HlRTCsrNy2SkxustAJkxJR5iUjf8zTZl c7m6ypFf+KFYCKFUHtOP5B3/XTQHKJv/fUSPgIzAlMpElRTHuD92jHMdVXZoVqBtSxLr B6HJbTn23+eDYcX1fDuabLQ8n1LA9XIyN71TcOJwBvYkDsLVMnCM6zaeeKMZRg7sHM1N yge5pWBKlo8aPTkl05ih6XqcwB8Crez1hAYsQilx6fO5Oe4ckdQCVYTSXEQTg1MZbulU o5Iykf9LcV+vTJNEsqCWwVJHPyayMbE67wqNLUGjFqQfoyznV1L+z2//RyvM8QIeo1yF T+FA== X-Gm-Message-State: AA6/9RkesIay2hb7+R6BanrVeqyqHkyRe9mZQd6ZxhwzjMQ49b5YvCArhc9DRRIYFV3A8LEP/c5AZ2jrE9O14Q== X-Received: by 10.107.6.166 with SMTP id f38mr4857187ioi.129.1475507600155; Mon, 03 Oct 2016 08:13:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.141.129 with HTTP; Mon, 3 Oct 2016 08:13:19 -0700 (PDT) In-Reply-To: References: <201610030400.u9340UM1012582@repo.freebsd.org> From: Adrian Chadd Date: Mon, 3 Oct 2016 08:13:19 -0700 Message-ID: Subject: Re: svn commit: r306622 - head/usr.bin/mkimg To: Ed Schouten Cc: Marcel Moolenaar , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 15:13:21 -0000 suggest it for the next C standard? :) -a On 2 October 2016 at 23:43, Ed Schouten wrote: > 2016-10-03 6:00 GMT+02:00 Marcel Moolenaar : >> Log: >> Replace OFF_MAX with INT64_MAX. The former is defined on Linux. > > Blargh. If only C had std::numeric_limits::{min,max}. :-( > > -- > Ed Schouten > Nuxi, 's-Hertogenbosch, the Netherlands > KvK-nr.: 62051717 > From owner-svn-src-all@freebsd.org Mon Oct 3 15:17:24 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4EE76AF3291; Mon, 3 Oct 2016 15:17:24 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07321E09; Mon, 3 Oct 2016 15:17:23 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u93FHNVk070258; Mon, 3 Oct 2016 15:17:23 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u93FHNkT070256; Mon, 3 Oct 2016 15:17:23 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201610031517.u93FHNkT070256@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 3 Oct 2016 15:17:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306644 - stable/10/etc/periodic/security X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 15:17:24 -0000 Author: asomers Date: Mon Oct 3 15:17:22 2016 New Revision: 306644 URL: https://svnweb.freebsd.org/changeset/base/306644 Log: MFC r306048 Fix periodic scripts when an NFS mount covers a local mount 100.chksetuid and 110.neggrpperm try to search through all UFS and ZFS filesystems. But their logic contains an error. They also search through remote filesystems that are mounted on top of the root of a local filesystem. For example, if a user installs a FreeBSD system with the default ZFS layout, he'll get a zroot/usr/home filesystem. If he then mounts /usr/home over NFS, these scripts would search through /usr/home. Modified: stable/10/etc/periodic/security/100.chksetuid stable/10/etc/periodic/security/110.neggrpperm Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/periodic/security/100.chksetuid ============================================================================== --- stable/10/etc/periodic/security/100.chksetuid Mon Oct 3 15:14:58 2016 (r306643) +++ stable/10/etc/periodic/security/100.chksetuid Mon Oct 3 15:17:22 2016 (r306644) @@ -46,7 +46,7 @@ then echo "" echo 'Checking setuid files and devices:' MP=`mount -t ufs,zfs | awk '$0 !~ /no(suid|exec)/ { print $3 }'` - find -sx $MP /dev/null -type f \ + find -sx $MP /dev/null \( ! -fstype local \) -prune -o -type f \ \( -perm -u+x -or -perm -g+x -or -perm -o+x \) \ \( -perm -u+s -or -perm -g+s \) -exec ls -liTd \{\} \+ | check_diff setuid - "${host} setuid diffs:" Modified: stable/10/etc/periodic/security/110.neggrpperm ============================================================================== --- stable/10/etc/periodic/security/110.neggrpperm Mon Oct 3 15:14:58 2016 (r306643) +++ stable/10/etc/periodic/security/110.neggrpperm Mon Oct 3 15:17:22 2016 (r306644) @@ -44,7 +44,7 @@ then echo "" echo 'Checking negative group permissions:' MP=`mount -t ufs,zfs | awk '$0 !~ /no(suid|exec)/ { print $3 }'` - n=$(find -sx $MP /dev/null -type f \ + n=$(find -sx $MP /dev/null \( ! -fstype local \) -prune -o -type f \ \( \( ! -perm +010 -and -perm +001 \) -or \ \( ! -perm +020 -and -perm +002 \) -or \ \( ! -perm +040 -and -perm +004 \) \) \ From owner-svn-src-all@freebsd.org Mon Oct 3 16:10:40 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A90BAF44BE; Mon, 3 Oct 2016 16:10:40 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D11B2FDB; Mon, 3 Oct 2016 16:10:39 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u93GAd1B089862; Mon, 3 Oct 2016 16:10:39 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u93GAc6x089697; Mon, 3 Oct 2016 16:10:38 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201610031610.u93GAc6x089697@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 3 Oct 2016 16:10:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306645 - in head/sys: arm/arm arm/include conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 16:10:40 -0000 Author: andrew Date: Mon Oct 3 16:10:38 2016 New Revision: 306645 URL: https://svnweb.freebsd.org/changeset/base/306645 Log: Remove unused functions on armv6. Some of the cache handling code is still used in the elf trampoline so add a macro to handle this. Sponsored by: ABT Systems Ltd Modified: head/sys/arm/arm/cpufunc_asm_arm11.S head/sys/arm/arm/cpufunc_asm_arm11x6.S head/sys/arm/arm/cpufunc_asm_armv6.S head/sys/arm/arm/cpufunc_asm_armv7.S head/sys/arm/include/cpufunc.h head/sys/conf/Makefile.arm Modified: head/sys/arm/arm/cpufunc_asm_arm11.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_arm11.S Mon Oct 3 15:17:22 2016 (r306644) +++ head/sys/arm/arm/cpufunc_asm_arm11.S Mon Oct 3 16:10:38 2016 (r306645) @@ -38,62 +38,6 @@ __FBSDID("$FreeBSD$"); /* - * TLB functions - */ -ENTRY(arm11_tlb_flushID_SE) - mcr p15, 0, r0, c8, c6, 1 /* flush D tlb single entry */ - mcr p15, 0, r0, c8, c5, 1 /* flush I tlb single entry */ - mcr p15, 0, r0, c7, c10, 4 /* drain write buffer */ - RET -END(arm11_tlb_flushID_SE) - -/* - * Context switch. - * - * These is the CPU-specific parts of the context switcher cpu_switch() - * These functions actually perform the TTB reload. - * - * NOTE: Special calling convention - * r1, r4-r13 must be preserved - */ -ENTRY(arm11_context_switch) - /* - * We can assume that the caches will only contain kernel addresses - * at this point. So no need to flush them again. - */ - mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ - mcr p15, 0, r0, c2, c0, 0 /* set the new TTB */ - mcr p15, 0, r0, c8, c7, 0 /* and flush the I+D tlbs */ - - /* Paranoia -- make sure the pipeline is empty. */ - nop - nop - nop - RET -END(arm11_context_switch) - -/* - * TLB functions - */ -ENTRY(arm11_tlb_flushID) - mcr p15, 0, r0, c8, c7, 0 /* flush I+D tlb */ - mcr p15, 0, r0, c7, c10, 4 /* drain write buffer */ - mov pc, lr -END(arm11_tlb_flushID) - -ENTRY(arm11_tlb_flushD) - mcr p15, 0, r0, c8, c6, 0 /* flush D tlb */ - mcr p15, 0, r0, c7, c10, 4 /* drain write buffer */ - mov pc, lr -END(arm11_tlb_flushD) - -ENTRY(arm11_tlb_flushD_SE) - mcr p15, 0, r0, c8, c6, 1 /* flush D tlb single entry */ - mcr p15, 0, r0, c7, c10, 4 /* drain write buffer */ - mov pc, lr -END(arm11_tlb_flushD_SE) - -/* * Other functions */ ENTRY(arm11_drain_writebuf) Modified: head/sys/arm/arm/cpufunc_asm_arm11x6.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_arm11x6.S Mon Oct 3 15:17:22 2016 (r306644) +++ head/sys/arm/arm/cpufunc_asm_arm11x6.S Mon Oct 3 16:10:38 2016 (r306645) @@ -64,55 +64,6 @@ __FBSDID("$FreeBSD$"); .cpu arm1176jz-s -#if 0 -#define Invalidate_I_cache(Rtmp1, Rtmp2) \ - mcr p15, 0, Rtmp1, c7, c5, 0 /* Invalidate Entire I cache */ -#else -/* - * Workaround for - * - * Erratum 411920 in ARM1136 (fixed in r1p4) - * Erratum 415045 in ARM1176 (fixed in r0p5?) - * - * - value of arg 'reg' Should Be Zero - */ -#define Invalidate_I_cache(Rtmp1, Rtmp2) \ - mov Rtmp1, #0; /* SBZ */ \ - mrs Rtmp2, cpsr; \ - cpsid ifa; \ - mcr p15, 0, Rtmp1, c7, c5, 0; /* Nuke Whole Icache */ \ - mcr p15, 0, Rtmp1, c7, c5, 0; /* Nuke Whole Icache */ \ - mcr p15, 0, Rtmp1, c7, c5, 0; /* Nuke Whole Icache */ \ - mcr p15, 0, Rtmp1, c7, c5, 0; /* Nuke Whole Icache */ \ - msr cpsr_cx, Rtmp2; \ - nop; \ - nop; \ - nop; \ - nop; \ - nop; \ - nop; \ - nop; \ - nop; \ - nop; \ - nop; \ - nop; -#endif - -#if 1 -#define Flush_D_cache(reg) \ - mov reg, #0; /* SBZ */ \ - mcr p15, 0, reg, c7, c14, 0;/* Clean and Invalidate Entire Data Cache */ \ - mcr p15, 0, reg, c7, c10, 4;/* Data Synchronization Barrier */ -#else -#define Flush_D_cache(reg) \ -1: mov reg, #0; /* SBZ */ \ - mcr p15, 0, reg, c7, c14, 0;/* Clean and Invalidate Entire Data Cache */ \ - mrc p15, 0, reg, C7, C10, 6;/* Read Cache Dirty Status Register */ \ - ands reg, reg, #01; /* Check if it is clean */ \ - bne 1b; /* loop if not */ \ - mcr p15, 0, reg, c7, c10, 4;/* Data Synchronization Barrier */ -#endif - ENTRY(arm11x6_setttb) mov r1, #0 mcr p15, 0, r0, c2, c0, 0 /* load new TTB */ @@ -121,71 +72,6 @@ ENTRY(arm11x6_setttb) RET END(arm11x6_setttb) -ENTRY_NP(arm11x6_idcache_wbinv_all) - Flush_D_cache(r0) - Invalidate_I_cache(r0, r1) - RET -END(arm11x6_idcache_wbinv_all) - -ENTRY_NP(arm11x6_dcache_wbinv_all) - Flush_D_cache(r0) - RET -END(arm11x6_dcache_wbinv_all) - -ENTRY_NP(arm11x6_icache_sync_range) - add r1, r1, r0 - sub r1, r1, #1 - /* Erratum ARM1136 371025, workaround #2 */ - /* Erratum ARM1176 371367 */ - mrs r2, cpsr /* save the CPSR */ - cpsid ifa /* disable interrupts (irq,fiq,abort) */ - mov r3, #0 - mcr p15, 0, r3, c13, c0, 0 /* write FCSE (uTLB invalidate) */ - mcr p15, 0, r3, c7, c5, 4 /* flush prefetch buffer */ - add r3, pc, #0x24 - mcr p15, 0, r3, c7, c13, 1 /* prefetch I-cache line */ - mcrr p15, 0, r1, r0, c5 /* invalidate I-cache range */ - msr cpsr_cx, r2 /* local_irq_restore */ - nop - nop - nop - nop - nop - nop - nop - - mcrr p15, 0, r1, r0, c12 /* clean and invalidate D cache range */ /* XXXNH */ - mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ - RET -END(arm11x6_icache_sync_range) - -ENTRY_NP(arm11x6_idcache_wbinv_range) - add r1, r1, r0 - sub r1, r1, #1 - /* Erratum ARM1136 371025, workaround #2 */ - /* Erratum ARM1176 371367 */ - mrs r2, cpsr /* save the CPSR */ - cpsid ifa /* disable interrupts (irq,fiq,abort) */ - mov r3, #0 - mcr p15, 0, r3, c13, c0, 0 /* write FCSE (uTLB invalidate) */ - mcr p15, 0, r3, c7, c5, 4 /* flush prefetch buffer */ - add r3, pc, #0x24 - mcr p15, 0, r3, c7, c13, 1 /* prefetch I-cache line */ - mcrr p15, 0, r1, r0, c5 /* invalidate I-cache range */ - msr cpsr_cx, r2 /* local_irq_restore */ - nop - nop - nop - nop - nop - nop - nop - - mcrr p15, 0, r1, r0, c14 /* clean and invalidate D cache range */ - mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ - RET -END(arm11x6_idcache_wbinv_range) - /* * Preload the cache before issuing the WFI by conditionally disabling the * mcr intstructions the first time around the loop. Ensure the function is @@ -208,4 +94,3 @@ ENTRY_NP(arm11x6_sleep) bne 1b RET END(arm11x6_sleep) - Modified: head/sys/arm/arm/cpufunc_asm_armv6.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_armv6.S Mon Oct 3 15:17:22 2016 (r306644) +++ head/sys/arm/arm/cpufunc_asm_armv6.S Mon Oct 3 16:10:38 2016 (r306645) @@ -43,56 +43,10 @@ .arch armv6 /* - * Functions to set the MMU Translation Table Base register - * - * We need to clean and flush the cache as it uses virtual - * addresses that are about to change. - */ -ENTRY(armv6_setttb) - mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ - - mcr p15, 0, r0, c2, c0, 0 /* load new TTB */ - - mcr p15, 0, r0, c8, c7, 0 /* invalidate I+D TLBs */ - RET -END(armv6_setttb) - -/* * Cache operations. */ -/* LINTSTUB: void armv6_dcache_wb_range(vaddr_t, vsize_t); */ -ENTRY(armv6_dcache_wb_range) - add r1, r1, r0 - sub r1, r1, #1 - mcrr p15, 0, r1, r0, c12 /* clean D cache range */ - mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ - RET -END(armv6_dcache_wb_range) - -/* LINTSTUB: void armv6_dcache_wbinv_range(vaddr_t, vsize_t); */ -ENTRY(armv6_dcache_wbinv_range) - add r1, r1, r0 - sub r1, r1, #1 - mcrr p15, 0, r1, r0, c14 /* clean and invaliate D cache range */ - mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ - RET -END(armv6_dcache_wbinv_range) - -/* - * Note, we must not invalidate everything. If the range is too big we - * must use wb-inv of the entire cache. - * - * LINTSTUB: void armv6_dcache_inv_range(vaddr_t, vsize_t); - */ -ENTRY(armv6_dcache_inv_range) - add r1, r1, r0 - sub r1, r1, #1 - mcrr p15, 0, r1, r0, c6 /* invaliate D cache range */ - mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ - RET -END(armv6_dcache_inv_range) - +#ifdef ELF_TRAMPOLINE /* LINTSTUB: void armv6_idcache_wbinv_all(void); */ ENTRY_NP(armv6_idcache_wbinv_all) /* @@ -107,10 +61,4 @@ ENTRY_NP(armv6_idcache_wbinv_all) mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ RET END(armv6_idcache_wbinv_all) - -ENTRY(armv6_idcache_inv_all) - mov r0, #0 - mcr p15, 0, r0, c7, c7, 0 /* invalidate all I+D cache */ - RET -END(armv6_idcache_inv_all) - +#endif /* ELF_TRAMPOLINE */ Modified: head/sys/arm/arm/cpufunc_asm_armv7.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_armv7.S Mon Oct 3 15:17:22 2016 (r306644) +++ head/sys/arm/arm/cpufunc_asm_armv7.S Mon Oct 3 16:10:38 2016 (r306645) @@ -86,35 +86,7 @@ ENTRY(armv7_setttb) RET END(armv7_setttb) -ENTRY(armv7_tlb_flushID) - dsb -#ifdef SMP - mcr CP15_TLBIALLIS - mcr CP15_BPIALLIS -#else - mcr CP15_TLBIALL - mcr CP15_BPIALL -#endif - dsb - isb - mov pc, lr -END(armv7_tlb_flushID) - -ENTRY(armv7_tlb_flushID_SE) - ldr r1, .Lpage_mask - bic r0, r0, r1 -#ifdef SMP - mcr CP15_TLBIMVAAIS(r0) - mcr CP15_BPIALLIS -#else - mcr CP15_TLBIMVA(r0) - mcr CP15_BPIALL -#endif - dsb - isb - mov pc, lr -END(armv7_tlb_flushID_SE) - +#ifdef ELF_TRAMPOLINE /* Based on algorithm from ARM Architecture Reference Manual */ ENTRY(armv7_dcache_wbinv_all) stmdb sp!, {r4, r5, r6, r7, r8, r9} @@ -181,94 +153,7 @@ ENTRY(armv7_idcache_wbinv_all) ldmia sp!, {lr} RET END(armv7_idcache_wbinv_all) - -ENTRY(armv7_dcache_wb_range) - ldr ip, .Larmv7_dcache_line_size - ldr ip, [ip] - sub r3, ip, #1 - and r2, r0, r3 - add r1, r1, r2 - bic r0, r0, r3 -.Larmv7_wb_next: - mcr CP15_DCCMVAC(r0) - add r0, r0, ip - subs r1, r1, ip - bhi .Larmv7_wb_next - dsb /* data synchronization barrier */ - RET -END(armv7_dcache_wb_range) - -ENTRY(armv7_dcache_wbinv_range) - ldr ip, .Larmv7_dcache_line_size - ldr ip, [ip] - sub r3, ip, #1 - and r2, r0, r3 - add r1, r1, r2 - bic r0, r0, r3 -.Larmv7_wbinv_next: - mcr CP15_DCCIMVAC(r0) - add r0, r0, ip - subs r1, r1, ip - bhi .Larmv7_wbinv_next - dsb /* data synchronization barrier */ - RET -END(armv7_dcache_wbinv_range) - -/* - * Note, we must not invalidate everything. If the range is too big we - * must use wb-inv of the entire cache. - */ -ENTRY(armv7_dcache_inv_range) - ldr ip, .Larmv7_dcache_line_size - ldr ip, [ip] - sub r3, ip, #1 - and r2, r0, r3 - add r1, r1, r2 - bic r0, r0, r3 -.Larmv7_inv_next: - mcr CP15_DCIMVAC(r0) - add r0, r0, ip - subs r1, r1, ip - bhi .Larmv7_inv_next - dsb /* data synchronization barrier */ - RET -END(armv7_dcache_inv_range) - -ENTRY(armv7_idcache_wbinv_range) - ldr ip, .Larmv7_idcache_line_size - ldr ip, [ip] - sub r3, ip, #1 - and r2, r0, r3 - add r1, r1, r2 - bic r0, r0, r3 -.Larmv7_id_wbinv_next: - mcr CP15_ICIMVAU(r0) - mcr CP15_DCCIMVAC(r0) - add r0, r0, ip - subs r1, r1, ip - bhi .Larmv7_id_wbinv_next - dsb /* data synchronization barrier */ - isb /* instruction synchronization barrier */ - RET -END(armv7_idcache_wbinv_range) - - -ENTRY_NP(armv7_icache_sync_range) - ldr ip, .Larmv7_icache_line_size - ldr ip, [ip] - sub r3, ip, #1 /* Address need not be aligned, but */ - and r2, r0, r3 /* round length up if op spans line */ - add r1, r1, r2 /* boundary: len += addr & linemask; */ -.Larmv7_sync_next: - mcr CP15_DCCMVAC(r0) - mcr CP15_ICIMVAU(r0) - add r0, r0, ip - subs r1, r1, ip - bhi .Larmv7_sync_next - dsb /* data synchronization barrier */ - isb /* instruction synchronization barrier */ - RET -END(armv7_icache_sync_range) +#endif ENTRY(armv7_cpu_sleep) dsb /* data synchronization barrier */ @@ -276,22 +161,6 @@ ENTRY(armv7_cpu_sleep) RET END(armv7_cpu_sleep) -ENTRY(armv7_context_switch) - dsb - orr r0, r0, #PT_ATTR - - mcr CP15_TTBR0(r0) - isb -#ifdef SMP - mcr CP15_TLBIALLIS -#else - mcr CP15_TLBIALL -#endif - dsb - isb - RET -END(armv7_context_switch) - ENTRY(armv7_drain_writebuf) dsb RET @@ -303,56 +172,3 @@ ENTRY(armv7_sev) nop RET END(armv7_sev) - -ENTRY(armv7_auxctrl) - mrc CP15_ACTLR(r2) - bic r3, r2, r0 /* Clear bits */ - eor r3, r3, r1 /* XOR bits */ - - teq r2, r3 - mcrne CP15_ACTLR(r3) - mov r0, r2 - RET -END(armv7_auxctrl) - -/* - * Invalidate all I+D+branch cache. Used by startup code, which counts - * on the fact that only r0-r3,ip are modified and no stack space is used. - */ -ENTRY(armv7_idcache_inv_all) - mov r0, #0 - mcr CP15_CSSELR(r0) @ set cache level to L1 - mrc CP15_CCSIDR(r0) - - ubfx r2, r0, #13, #15 @ get num sets - 1 from CCSIDR - ubfx r3, r0, #3, #10 @ get numways - 1 from CCSIDR - clz r1, r3 @ number of bits to MSB of way - lsl r3, r3, r1 @ shift into position - mov ip, #1 @ - lsl ip, ip, r1 @ ip now contains the way decr - - ubfx r0, r0, #0, #3 @ get linesize from CCSIDR - add r0, r0, #4 @ apply bias - lsl r2, r2, r0 @ shift sets by log2(linesize) - add r3, r3, r2 @ merge numsets - 1 with numways - 1 - sub ip, ip, r2 @ subtract numsets - 1 from way decr - mov r1, #1 - lsl r1, r1, r0 @ r1 now contains the set decr - mov r2, ip @ r2 now contains set way decr - - /* r3 = ways/sets, r2 = way decr, r1 = set decr, r0 and ip are free */ -1: mcr CP15_DCISW(r3) @ invalidate line - movs r0, r3 @ get current way/set - beq 2f @ at 0 means we are done. - movs r0, r0, lsl #10 @ clear way bits leaving only set bits - subne r3, r3, r1 @ non-zero?, decrement set # - subeq r3, r3, r2 @ zero?, decrement way # and restore set count - b 1b - -2: dsb @ wait for stores to finish - mov r0, #0 @ and ... - mcr CP15_ICIALLU @ invalidate instruction+branch cache - isb @ instruction sync barrier - bx lr @ return -END(armv7_idcache_inv_all) - Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Mon Oct 3 15:17:22 2016 (r306644) +++ head/sys/arm/include/cpufunc.h Mon Oct 3 16:10:38 2016 (r306645) @@ -280,22 +280,11 @@ void armv6_idcache_wbinv_all (void); #endif #if defined(CPU_MV_PJ4B) || defined(CPU_CORTEXA) || defined(CPU_KRAIT) void armv7_setttb (u_int); -void armv7_tlb_flushID (void); -void armv7_tlb_flushID_SE (u_int); -void armv7_icache_sync_range (vm_offset_t, vm_size_t); -void armv7_idcache_wbinv_range (vm_offset_t, vm_size_t); -void armv7_idcache_inv_all (void); -void armv7_dcache_wbinv_all (void); void armv7_idcache_wbinv_all (void); -void armv7_dcache_wbinv_range (vm_offset_t, vm_size_t); -void armv7_dcache_inv_range (vm_offset_t, vm_size_t); -void armv7_dcache_wb_range (vm_offset_t, vm_size_t); void armv7_cpu_sleep (int); void armv7_setup (void); -void armv7_context_switch (void); void armv7_drain_writebuf (void); void armv7_sev (void); -u_int armv7_auxctrl (u_int, u_int); void armadaxp_idcache_wbinv_all (void); @@ -307,26 +296,9 @@ void pj4bv7_setup (void); #endif #if defined(CPU_ARM1176) -void arm11_tlb_flushID (void); -void arm11_tlb_flushID_SE (u_int); -void arm11_tlb_flushD (void); -void arm11_tlb_flushD_SE (u_int va); - -void arm11_context_switch (void); - void arm11_drain_writebuf (void); -void armv6_dcache_wbinv_range (vm_offset_t, vm_size_t); -void armv6_dcache_inv_range (vm_offset_t, vm_size_t); -void armv6_dcache_wb_range (vm_offset_t, vm_size_t); - -void armv6_idcache_inv_all (void); - void arm11x6_setttb (u_int); -void arm11x6_idcache_wbinv_all (void); -void arm11x6_dcache_wbinv_all (void); -void arm11x6_icache_sync_range (vm_offset_t, vm_size_t); -void arm11x6_idcache_wbinv_range (vm_offset_t, vm_size_t); void arm11x6_setup (void); void arm11x6_sleep (int); /* no ref. for errata */ #endif Modified: head/sys/conf/Makefile.arm ============================================================================== --- head/sys/conf/Makefile.arm Mon Oct 3 15:17:22 2016 (r306644) +++ head/sys/conf/Makefile.arm Mon Oct 3 16:10:38 2016 (r306645) @@ -92,6 +92,7 @@ ${KERNEL_KO}.tramp: ${KERNEL_KO} $S/$M/$ echo "#define KERNSIZE $$st_size" >>opt_kernname.h ${CC} -O -nostdlib -I. -I$S \ -Xlinker -T -Xlinker ldscript.$M.tramp \ + -DELF_TRAMPOLINE \ tmphack.S \ $S/$M/$M/elf_trampoline.c \ $S/$M/$M/inckern.S \ @@ -99,6 +100,7 @@ ${KERNEL_KO}.tramp: ${KERNEL_KO} $S/$M/$ -o ${KERNEL_KO}.tramp ${CC} -O -nostdlib -I. -I$S \ -Xlinker -T -Xlinker ldscript.$M.tramp.noheader \ + -DELF_TRAMPOLINE \ tmphack.S \ $S/$M/$M/elf_trampoline.c \ $S/$M/$M/inckern.S \ @@ -114,12 +116,12 @@ ${KERNEL_KO}.tramp: ${KERNEL_KO} $S/$M/$ eval $$(stat -s ${KERNEL_KO}.tmp.gz) && \ echo "#define KERNCOMPSIZE $$st_size" >>opt_kernname.h ${CC} -O2 -ffreestanding -I. -I$S -c \ - -DKZIP \ + -DKZIP -DELF_TRAMPOLINE \ $S/kern/inflate.c \ -o inflate-tramp.o ${CC} -O -nostdlib -I. -I$S \ -Xlinker -T -Xlinker ldscript.$M.tramp \ - -DKZIP \ + -DKZIP -DELF_TRAMPOLINE \ tmphack.S \ $S/$M/$M/elf_trampoline.c \ inflate-tramp.o \ @@ -128,7 +130,7 @@ ${KERNEL_KO}.tramp: ${KERNEL_KO} $S/$M/$ -o ${KERNEL_KO}.gz.tramp ${CC} -O -nostdlib -I. -I$S \ -Xlinker -T -Xlinker ldscript.$M.tramp.noheader \ - -DKZIP \ + -DKZIP -DELF_TRAMPOLINE \ tmphack.S \ $S/$M/$M/elf_trampoline.c \ inflate-tramp.o \ From owner-svn-src-all@freebsd.org Mon Oct 3 16:25:58 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95A6AAF4AA6; Mon, 3 Oct 2016 16:25:58 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [50.0.150.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 698BA21A; Mon, 3 Oct 2016 16:25:58 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from marcels-mbp.int.brkt.com.mail (cerberus.brkt.com [208.185.168.138]) (authenticated bits=0) by mail.xcllnt.net (8.15.2/8.15.2) with ESMTPSA id u93GPoce068070 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Mon, 3 Oct 2016 09:25:51 -0700 (PDT) (envelope-from marcel@xcllnt.net) Date: Mon, 3 Oct 2016 09:25:44 -0700 From: Marcel Moolenaar To: Warner Losh , Ed Schouten Cc: "=?utf-8?Q?svn-src-all=40freebsd.org?=" , src-committers , "=?utf-8?Q?svn-src-head=40freebsd.org?=" , Marcel Moolenaar Message-ID: In-Reply-To: References: <201610030400.u9340UM1012582@repo.freebsd.org> Subject: Re: svn commit: r306622 - head/usr.bin/mkimg X-Mailer: Airmail (382) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="559D0520-19C5-48DA-8B8C-FCC7BB364736"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.xcllnt.net [50.0.150.214]); Mon, 03 Oct 2016 09:25:51 -0700 (PDT) X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 16:25:58 -0000 --559D0520-19C5-48DA-8B8C-FCC7BB364736 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On October 2, 2016 at 11:52:33 PM, Warner Losh (imp=40bsdimp.com) wrote: Wouldn't it be better to say at the top=C2=A0 =23ifndef O=46=46=5FMAX=C2=A0 =23define O=46=46=5FMAX INT64=5FMAX=C2=A0 =23endif=C2=A0 Not sure. The max is just for input checking. We do not even try to deal = with an lseek(2) implementation that doesn=E2=80=99t take a 64-bit offset= argument. Granted, the use of O=46=46=5FMAX before was based on =46reeBS= D=E2=80=99s lseek(2) implementation and was chosen to match it, knowing v= ery well that it has a 64-bit offset argument. If lseek(2) doesn=E2=80=99= t take a 64-bit offset then mkimg(1) fails for images larger than 2GB, bu= t the problems with that run deeper than the max capacity that a user can= specify on the mkimg command line. Not using O=46=46=5FMAX is a clear in= dication that the limit is not fully determined by lseek(2), but to a gre= ater extend by the datatype used to hold the capacity. Hence by preference for going with INT64=5FMAX. Easy to change if people = feel I should keep using O=46=46=5FMAX. --559D0520-19C5-48DA-8B8C-FCC7BB364736 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using AMPGpg -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJX8oaJAAoJEIda8t8f0tjj3gEP/il69UBVq4pDb+CUupE9xULa GYcK+h/4OVhX3iTmPTwNCooU55hlf2YOoy9AszVTXRN6VCEVzGdVLxuzvOuaUTW9 RxjrvcQqSR7tFxtoshfJda0O+Vsa1vv6Q0HWJKldmxD5BQ0ziKETy++7RFXggcLW OrkN+h1sbOGje/xSu/4ysDN1GKu8mjR+7ZMZPgnDE/mfYovFQbTMdccc34RW5jql y/74pc9pYllO3ZW1xviRMlI4ONJposqkHxQOOVhilvnzund3lVdX0qvSUDE58zFJ Mt7QBjLC44i6YjS4lxKPBFCzrQmWddI/sDAQB508p39KW9oFtB5+giJroHloViKu M4ISFh4fd6hjr4cAdRDXT+djQFsulnugCr+IUZOLNNFy8BZLEjhkd5Q/0EgyUlyG IONCycnHaFOWaJ4dg7ulSG9ElJmiEBGAkj3d8JRp3azdN0ks3zeUTVnS7zHjiZTw qWOACjt3i5Nrxp1UMLdnaSFXzBi+EdLrICsSe8gtEh2vREJs8CQD6XiHkmKfVO9J utFj2LZTmvIQf/w2u3xqIGZ6iTpWgVW5cZiG2xYoWABhNdJCt7IGkWM04SGPzDIQ uum/l9qFISpTJdijpruFmHFU0bP8LBFSk3A+uTcyfFzASRVCfH/OBBZvzFmyjROg fJHjKTpYdzz6CavPA49N -----END PGP SIGNATURE----- --559D0520-19C5-48DA-8B8C-FCC7BB364736-- From owner-svn-src-all@freebsd.org Mon Oct 3 16:47:48 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04242AF4F44; Mon, 3 Oct 2016 16:47:48 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF68768; Mon, 3 Oct 2016 16:47:47 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u93GlkRh005465; Mon, 3 Oct 2016 16:47:46 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u93Glk2B005464; Mon, 3 Oct 2016 16:47:46 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201610031647.u93Glk2B005464@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 3 Oct 2016 16:47:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306646 - in head/sys/arm/allwinner: a20 a31 a83t h3 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 16:47:48 -0000 Author: andrew Date: Mon Oct 3 16:47:46 2016 New Revision: 306646 URL: https://svnweb.freebsd.org/changeset/base/306646 Log: Remove the old Allwinner std.* files, these are not part of the common Allwinner kernel configs. Sponsored by: ABT Systems Ltd Deleted: head/sys/arm/allwinner/a20/std.a20 head/sys/arm/allwinner/a31/std.a31 head/sys/arm/allwinner/a83t/std.a83t head/sys/arm/allwinner/h3/std.h3 From owner-svn-src-all@freebsd.org Mon Oct 3 17:20:36 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 227E4AF3B57; Mon, 3 Oct 2016 17:20:36 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D77B83B4; Mon, 3 Oct 2016 17:20:35 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u93HKZb3016806; Mon, 3 Oct 2016 17:20:35 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u93HKY7S016801; Mon, 3 Oct 2016 17:20:34 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201610031720.u93HKY7S016801@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 3 Oct 2016 17:20:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306647 - in head/sys/dev: evdev usb/input X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 17:20:36 -0000 Author: gonzo Date: Mon Oct 3 17:20:34 2016 New Revision: 306647 URL: https://svnweb.freebsd.org/changeset/base/306647 Log: const-ify struct evdev_methods Submitted by: Vladimir Kondratiev Suggested by: hselasky Modified: head/sys/dev/evdev/evdev.c head/sys/dev/evdev/evdev.h head/sys/dev/evdev/evdev_private.h head/sys/dev/usb/input/ukbd.c head/sys/dev/usb/input/ums.c Modified: head/sys/dev/evdev/evdev.c ============================================================================== --- head/sys/dev/evdev/evdev.c Mon Oct 3 16:47:46 2016 (r306646) +++ head/sys/dev/evdev/evdev.c Mon Oct 3 17:20:34 2016 (r306647) @@ -302,7 +302,7 @@ evdev_set_serial(struct evdev_dev *evdev inline void evdev_set_methods(struct evdev_dev *evdev, void *softc, - struct evdev_methods *methods) + const struct evdev_methods *methods) { evdev->ev_methods = methods; Modified: head/sys/dev/evdev/evdev.h ============================================================================== --- head/sys/dev/evdev/evdev.h Mon Oct 3 16:47:46 2016 (r306646) +++ head/sys/dev/evdev/evdev.h Mon Oct 3 17:20:34 2016 (r306647) @@ -89,7 +89,8 @@ void evdev_set_name(struct evdev_dev *, void evdev_set_id(struct evdev_dev *, uint16_t, uint16_t, uint16_t, uint16_t); void evdev_set_phys(struct evdev_dev *, const char *); void evdev_set_serial(struct evdev_dev *, const char *); -void evdev_set_methods(struct evdev_dev *, void *, struct evdev_methods *); +void evdev_set_methods(struct evdev_dev *, void *, + const struct evdev_methods *); int evdev_register(struct evdev_dev *); int evdev_unregister(struct evdev_dev *); int evdev_push_event(struct evdev_dev *, uint16_t, uint16_t, int32_t); Modified: head/sys/dev/evdev/evdev_private.h ============================================================================== --- head/sys/dev/evdev/evdev_private.h Mon Oct 3 16:47:46 2016 (r306646) +++ head/sys/dev/evdev/evdev_private.h Mon Oct 3 17:20:34 2016 (r306647) @@ -116,7 +116,7 @@ struct evdev_dev uint64_t ev_report_count; /* Parent driver callbacks: */ - struct evdev_methods * ev_methods; + const struct evdev_methods * ev_methods; void * ev_softc; LIST_ENTRY(evdev_dev) ev_link; Modified: head/sys/dev/usb/input/ukbd.c ============================================================================== --- head/sys/dev/usb/input/ukbd.c Mon Oct 3 16:47:46 2016 (r306646) +++ head/sys/dev/usb/input/ukbd.c Mon Oct 3 17:20:34 2016 (r306647) @@ -364,7 +364,7 @@ static device_detach_t ukbd_detach; static device_resume_t ukbd_resume; #ifdef EVDEV_SUPPORT -static struct evdev_methods ukbd_evdev_methods = { +static const struct evdev_methods ukbd_evdev_methods = { .ev_event = evdev_ev_kbd_event, }; #endif Modified: head/sys/dev/usb/input/ums.c ============================================================================== --- head/sys/dev/usb/input/ums.c Mon Oct 3 16:47:46 2016 (r306646) +++ head/sys/dev/usb/input/ums.c Mon Oct 3 17:20:34 2016 (r306647) @@ -191,7 +191,7 @@ static struct usb_fifo_methods ums_fifo_ }; #ifdef EVDEV_SUPPORT -static struct evdev_methods ums_evdev_methods = { +static const struct evdev_methods ums_evdev_methods = { .ev_open = &ums_ev_open, .ev_close = &ums_ev_close, }; From owner-svn-src-all@freebsd.org Mon Oct 3 17:34:51 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85771AF3F01; Mon, 3 Oct 2016 17:34:51 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56C11DA7; Mon, 3 Oct 2016 17:34:51 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u93HYoTj024285; Mon, 3 Oct 2016 17:34:50 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u93HYoM3024284; Mon, 3 Oct 2016 17:34:50 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201610031734.u93HYoM3024284@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 3 Oct 2016 17:34:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306648 - head/gnu/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 17:34:51 -0000 Author: emaste Date: Mon Oct 3 17:34:50 2016 New Revision: 306648 URL: https://svnweb.freebsd.org/changeset/base/306648 Log: Don't build libdialog if WITHOUT_DIALOG is set X-MFC-With: r306375 Modified: head/gnu/lib/Makefile Modified: head/gnu/lib/Makefile ============================================================================== --- head/gnu/lib/Makefile Mon Oct 3 17:20:34 2016 (r306647) +++ head/gnu/lib/Makefile Mon Oct 3 17:34:50 2016 (r306648) @@ -2,7 +2,9 @@ .include -SUBDIR= csu libgcc libdialog libregex +SUBDIR= csu libgcc libregex + +SUBDIR.${MK_DIALOG}+= libdialog .if ${MK_GCC} != "no" SUBDIR+= libgcov libgomp From owner-svn-src-all@freebsd.org Mon Oct 3 17:36:26 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2413AF3FBB; Mon, 3 Oct 2016 17:36:26 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f41.google.com (mail-it0-f41.google.com [209.85.214.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 75A0BF1E; Mon, 3 Oct 2016 17:36:26 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f41.google.com with SMTP id r192so122099249ita.0; Mon, 03 Oct 2016 10:36:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=tQMleD30dx0zSkdAHQcM75Dpphl8u3/8GVizOZC9FyM=; b=iHZ7dET0SNVyw9A1G3jR/rGDbfXhZCoDVn/zV2T07hOpbPxEgAQDfvfqO4AAKcsZLW rdKeT+MxzeYqDc8f3gS8gL6fXYR73Y62i7CI7ZG4nbiHJYq8iMQGSRGyLUzQYmCho48T xbh6bXR8lz/dDbyon7fLE0QirxT8hseaCcZTyY1+FYQFq/YexJ7arE+OITSH8VSyzJTl jrQnvIa6VZW2lnw7MqbL4VLAqsSnRMYUG3CkBb4Fe6CAdSUmNbgjvkMniDxhfTCRDCbS gnDyAMW89nHLIWwn5x07fBFQe4PHNeljFoDHbyOT9BLleRlkdlPJiYlBvCRPjq+XEx+d HFWA== X-Gm-Message-State: AA6/9RneiSNvjgaDvcfjE1R3aJqfUqARW8zrfs58SfIXqne0Y5XptafgOBVCvFO/JVdR3A== X-Received: by 10.36.37.20 with SMTP id g20mr17322443itg.63.1475513043210; Mon, 03 Oct 2016 09:44:03 -0700 (PDT) Received: from mail-it0-f48.google.com (mail-it0-f48.google.com. [209.85.214.48]) by smtp.gmail.com with ESMTPSA id 63sm7902207itz.7.2016.10.03.09.44.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Oct 2016 09:44:03 -0700 (PDT) Received: by mail-it0-f48.google.com with SMTP id o19so102674681ito.1; Mon, 03 Oct 2016 09:44:03 -0700 (PDT) X-Received: by 10.36.250.131 with SMTP id v125mr11463577ith.104.1475513042614; Mon, 03 Oct 2016 09:44:02 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.36.220.129 with HTTP; Mon, 3 Oct 2016 09:44:02 -0700 (PDT) In-Reply-To: <201610030146.u931klQS063311@repo.freebsd.org> References: <201610030146.u931klQS063311@repo.freebsd.org> From: Conrad Meyer Date: Mon, 3 Oct 2016 09:44:02 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r306620 - head/usr.bin/mkimg To: Marcel Moolenaar Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 17:36:26 -0000 On Sun, Oct 2, 2016 at 6:46 PM, Marcel Moolenaar wrote: > Author: marcel > Date: Mon Oct 3 01:46:47 2016 > New Revision: 306620 > URL: https://svnweb.freebsd.org/changeset/base/306620 > > Log: > Replace STAILQ with TAILQ. TAILQs are portable enough that they can > be used on both macOS and Linux. STAILQs are not. In particular, > STAILQ_LAST does not next on Linux. Since neither STAILQ_FOREACH_SAFE > nor TAILQ_FOREACH_SAFE exist on Linux, replace its use with a regular > TAILQ_FOREACH. The _SAFE variant was only used for having the next > pointer in a local variable. All of these routines are available in the "libbsd" sys/queue.h. You might find other helpful portability/compatibility routines there, requiring fewer changes to the FreeBSD mkimg. Best, Conrad From owner-svn-src-all@freebsd.org Mon Oct 3 17:49:28 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32B33AF4393; Mon, 3 Oct 2016 17:49:28 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1070FC64; Mon, 3 Oct 2016 17:49:28 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u93HnRWG030267; Mon, 3 Oct 2016 17:49:27 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u93HnQFV030260; Mon, 3 Oct 2016 17:49:26 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201610031749.u93HnQFV030260@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 3 Oct 2016 17:49:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306649 - in head: . gnu/usr.bin/binutils share/mk tools/build/mk tools/build/options usr.bin/elfcopy X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 17:49:28 -0000 Author: emaste Date: Mon Oct 3 17:49:26 2016 New Revision: 306649 URL: https://svnweb.freebsd.org/changeset/base/306649 Log: Retire WITHOUT_ELFCOPY_AS_OBJCOPY option In FreeBSD 11 ELF Tool Chain's elfcopy is installed as objcopy by default, with the option to switch back to GNU objcopy by setting WITHOUT_ELFCOPY_AS_OBJCOPY in make.conf. We plan to remove the outdated in-tree binutils in FreeBSD 12, so remove the temporary transition aid. Reviewed by: brooks, imp Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D7337 Deleted: head/tools/build/options/WITHOUT_ELFCOPY_AS_OBJCOPY head/tools/build/options/WITH_ELFCOPY_AS_OBJCOPY Modified: head/ObsoleteFiles.inc head/UPDATING head/gnu/usr.bin/binutils/Makefile head/share/mk/src.opts.mk head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.bin/elfcopy/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Mon Oct 3 17:34:50 2016 (r306648) +++ head/ObsoleteFiles.inc Mon Oct 3 17:49:26 2016 (r306649) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20161003: MK_ELFCOPY_AS_OBJCOPY option retired +OLD_FILES+=usr/bin/elfcopy +OLD_FILES+=usr/share/man/man1/elfcopy.1.gz # 20160906: libkqueue tests moved to /usr/tests/sys/kqueue/libkqueue OLD_FILES+=usr/tests/sys/kqueue/kqtest OLD_FILES+=usr/tests/sys/kqueue/kqueue_test Modified: head/UPDATING ============================================================================== --- head/UPDATING Mon Oct 3 17:34:50 2016 (r306648) +++ head/UPDATING Mon Oct 3 17:49:26 2016 (r306649) @@ -31,6 +31,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20161003: + The WITHOUT_ELFCOPY_AS_OBJCOPY src.conf(5) knob has been retired. + ELF Tool Chain's elfcopy is always installed as /usr/bin/objcopy. + 20160924: Relocatable object files with the extension of .So have been renamed to use an extension of .pico instead. The purpose of this change is Modified: head/gnu/usr.bin/binutils/Makefile ============================================================================== --- head/gnu/usr.bin/binutils/Makefile Mon Oct 3 17:34:50 2016 (r306648) +++ head/gnu/usr.bin/binutils/Makefile Mon Oct 3 17:49:26 2016 (r306649) @@ -9,17 +9,12 @@ SUBDIR= doc\ libbinutils \ as \ ld \ - ${_objcopy} \ - objdump \ + objdump -.if ${MK_ELFCOPY_AS_OBJCOPY} == "no" -_objcopy= objcopy -.endif SUBDIR_DEPEND_libbinutils=libbfd # for bfdver.h SUBDIR_DEPEND_as=libbfd libiberty libopcodes SUBDIR_DEPEND_ld=libbfd libiberty -SUBDIR_DEPEND_objcopy=libbfd libiberty libbinutils SUBDIR_DEPEND_objdump=libbfd libiberty libbinutils libopcodes .if !make(install) Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Mon Oct 3 17:34:50 2016 (r306648) +++ head/share/mk/src.opts.mk Mon Oct 3 17:49:26 2016 (r306649) @@ -82,7 +82,6 @@ __DEFAULT_YES_OPTIONS = \ DYNAMICROOT \ ED_CRYPTO \ EE \ - ELFCOPY_AS_OBJCOPY \ ELFTOOLCHAIN_BOOTSTRAP \ EXAMPLES \ FDT \ Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Mon Oct 3 17:34:50 2016 (r306648) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Mon Oct 3 17:49:26 2016 (r306649) @@ -220,9 +220,6 @@ OLD_DIRS+=usr/share/examples/bhyve OLD_FILES+=usr/bin/as OLD_FILES+=usr/bin/ld OLD_FILES+=usr/bin/ld.bfd -.if ${MK_ELFCOPY_AS_OBJCOPY} == no -OLD_FILES+=usr/bin/objcopy -.endif OLD_FILES+=usr/bin/objdump OLD_FILES+=usr/libdata/ldscripts/armelf_fbsd.x OLD_FILES+=usr/libdata/ldscripts/armelf_fbsd.xbn @@ -421,9 +418,6 @@ OLD_FILES+=usr/libdata/ldscripts/elf_x86 OLD_FILES+=usr/libdata/ldscripts/elf_x86_64_fbsd.xw OLD_FILES+=usr/share/man/man1/as.1.gz OLD_FILES+=usr/share/man/man1/ld.1.gz -.if ${MK_ELFCOPY_AS_OBJCOPY} == no -OLD_FILES+=usr/share/man/man1/objcopy.1.gz -.endif OLD_FILES+=usr/share/man/man1/objdump.1.gz OLD_FILES+=usr/share/man/man7/as.7.gz OLD_FILES+=usr/share/man/man7/ld.7.gz @@ -8024,6 +8018,7 @@ OLD_FILES+=usr/bin/c++filt OLD_FILES+=usr/bin/ld OLD_FILES+=usr/bin/ld.bfd OLD_FILES+=usr/bin/nm +OLD_FILES+=usr/bin/objcopy OLD_FILES+=usr/bin/readelf OLD_FILES+=usr/bin/size OLD_FILES+=usr/bin/strings @@ -8036,10 +8031,7 @@ OLD_FILES+=usr/share/man/man1/readelf.1. OLD_FILES+=usr/share/man/man1/size.1.gz OLD_FILES+=usr/share/man/man1/strings.1.gz OLD_FILES+=usr/share/man/man1/strip.1.gz -.if ${MK_ELFCOPY_AS_OBJCOPY} != no -OLD_FILES+=usr/bin/objcopy OLD_FILES+=usr/share/man/man1/objcopy.1.gz -.endif OLD_FILES+=usr/tests/usr.bin/yacc/Kyuafile OLD_FILES+=usr/tests/usr.bin/yacc/btyacc_calc1.y OLD_FILES+=usr/tests/usr.bin/yacc/btyacc_demo.y @@ -8349,10 +8341,6 @@ OLD_FILES+=usr/tests/usr.bin/yacc/yacc/v OLD_FILES+=usr/tests/usr.bin/yacc/yacc_tests OLD_DIRS+=usr/tests/usr.bin/yacc .endif -.if ${MK_TOOLCHAIN} == no || ${MK_ELFCOPY_AS_OBJCOPY} != no -OLD_FILES+=usr/bin/elfcopy -OLD_FILES+=usr/share/man/man1/elfcopy.1.gz -.endif .if ${MK_UNBOUND} == no OLD_FILES+=etc/rc.d/local_unbound Modified: head/usr.bin/elfcopy/Makefile ============================================================================== --- head/usr.bin/elfcopy/Makefile Mon Oct 3 17:34:50 2016 (r306648) +++ head/usr.bin/elfcopy/Makefile Mon Oct 3 17:49:26 2016 (r306649) @@ -7,15 +7,11 @@ ELFCOPYDIR= ${ELFTCDIR}/elfcopy .PATH: ${ELFCOPYDIR} -.if ${MK_ELFCOPY_AS_OBJCOPY} != "no" PROG= objcopy objcopy.1: elfcopy.1 sed -e 's/\.Dt ELFCOPY 1/.Dt OBJCOPY 1/' \ -e 's/\.Nm elfcopy/.Nm objcopy/' < ${.ALLSRC} > ${.TARGET} CLEANFILES+= objcopy.1 -.else -PROG= elfcopy -.endif SRCS= archive.c ascii.c binary.c main.c pe.c sections.c segments.c symbols.c From owner-svn-src-all@freebsd.org Mon Oct 3 18:00:11 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 943ACAF464A; Mon, 3 Oct 2016 18:00:11 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61ACC281; Mon, 3 Oct 2016 18:00:11 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u93I0AwF034251; Mon, 3 Oct 2016 18:00:10 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u93I0AW5034250; Mon, 3 Oct 2016 18:00:10 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201610031800.u93I0AW5034250@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 3 Oct 2016 18:00:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306650 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 18:00:11 -0000 Author: andrew Date: Mon Oct 3 18:00:10 2016 New Revision: 306650 URL: https://svnweb.freebsd.org/changeset/base/306650 Log: Add the Cortex-A{53,57,72} ID register values. These can all run 32-bit code so could run a 32-bit kernel. Sponsored by: ABT Systems Ltd Modified: head/sys/arm/include/armreg.h Modified: head/sys/arm/include/armreg.h ============================================================================== --- head/sys/arm/include/armreg.h Mon Oct 3 17:49:26 2016 (r306649) +++ head/sys/arm/include/armreg.h Mon Oct 3 18:00:10 2016 (r306650) @@ -152,6 +152,9 @@ #define CPU_ID_CORTEXA15R1 (CPU_ID_CORTEXA15 | (1 << CPU_ID_VARIANT_SHIFT)) #define CPU_ID_CORTEXA15R2 (CPU_ID_CORTEXA15 | (2 << CPU_ID_VARIANT_SHIFT)) #define CPU_ID_CORTEXA15R3 (CPU_ID_CORTEXA15 | (3 << CPU_ID_VARIANT_SHIFT)) +#define CPU_ID_CORTEXA53 (CPU_ID_ARM_LTD | CPU_ID_CPUID_SCHEME | 0xd030) +#define CPU_ID_CORTEXA57 (CPU_ID_ARM_LTD | CPU_ID_CPUID_SCHEME | 0xd070) +#define CPU_ID_CORTEXA72 (CPU_ID_ARM_LTD | CPU_ID_CPUID_SCHEME | 0xd080) #define CPU_ID_KRAIT300 (CPU_ID_QUALCOM | CPU_ID_CPUID_SCHEME | 0x06f0) /* Snapdragon S4 Pro/APQ8064 */ From owner-svn-src-all@freebsd.org Mon Oct 3 18:03:20 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90CF8AF47E3; Mon, 3 Oct 2016 18:03:20 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [50.0.150.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 64A899C0; Mon, 3 Oct 2016 18:03:19 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from marcels-mbp.int.brkt.com.mail (cerberus.brkt.com [208.185.168.138]) (authenticated bits=0) by mail.xcllnt.net (8.15.2/8.15.2) with ESMTPSA id u93I3HQZ068867 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Mon, 3 Oct 2016 11:03:18 -0700 (PDT) (envelope-from marcel@xcllnt.net) Date: Mon, 3 Oct 2016 11:03:11 -0700 From: Marcel Moolenaar To: Marcel Moolenaar , cem@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org, src-committers Message-ID: In-Reply-To: References: <201610030146.u931klQS063311@repo.freebsd.org> Subject: Re: svn commit: r306620 - head/usr.bin/mkimg X-Mailer: Airmail (382) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="E39E89C5-6F29-47EE-9F69-EC6F4BDD6B29"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.xcllnt.net [50.0.150.214]); Mon, 03 Oct 2016 11:03:18 -0700 (PDT) X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 18:03:20 -0000 --E39E89C5-6F29-47EE-9F69-EC6F4BDD6B29 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On October 3, 2016 at 10:36:27 AM, Conrad Meyer (cem=40freebsd.org) wrote= : On Sun, Oct 2, 2016 at 6:46 PM, Marcel Moolenaar w= rote:=C2=A0 > Author: marcel=C2=A0 > Date: Mon Oct 3 01:46:47 2016=C2=A0 > New Revision: 306620=C2=A0 > URL: https://svnweb.freebsd.org/changeset/base/306620=C2=A0 >=C2=A0 > Log:=C2=A0 > Replace STAILQ with TAILQ. TAILQs are portable enough that they can=C2=A0= > be used on both macOS and Linux. STAILQs are not. In particular,=C2=A0 > STAILQ=5FLAST does not next on Linux. Since neither STAILQ=5F=46OREACH=5F= SA=46E=C2=A0 > nor TAILQ=5F=46OREACH=5FSA=46E exist on Linux, replace its use with a r= egular=C2=A0 > TAILQ=5F=46OREACH. The =5FSA=46E variant was only used for having the n= ext=C2=A0 > pointer in a local variable.=C2=A0 All of these routines are available in the =22libbsd=22 sys/queue.h. You=C2= =A0 might find other helpful portability/compatibility routines there,=C2=A0 requiring fewer changes to the =46reeBSD mkimg.=C2=A0 Oh, nice. I=E2=80=99ll take a look. --E39E89C5-6F29-47EE-9F69-EC6F4BDD6B29 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using AMPGpg -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJX8p1gAAoJEIda8t8f0tjj3oUQAOkZXml43xfdURFUkHXVjp7i Jd7440BA3/ZSxnnQ3hDFzJgZJ9ZNOcQ3XLUwAbYjHVkT3aItY/aKl4BbUMhgmY7W Kkes9iN0fQELu/QsA/kN+uu48hc8RzPKZibzRuiV1q4XN5iiEcKq3nutWab1U1vl tpIhG2tOgTj0Mm9jZ2UQ+u4xhajtTTo8IMDrrGIRryLD28JIjOooCfvkcqfsfx6d O7x63JZdMpgCcKpsR6Lp99/86VNNq8BW68HFtyppXQ0KjBr/TxZvqr6pZiG/kjrC Ca8rhMMbY4AXHX65U7X6EJDYOvUELCpyuUC+1ERLDLpLQmnaHZrZxyFzz3Se3Gfi wONq3XU2+LQ7lI9GolHIJf8nKB1xF7AMiiy4aEWttjCBhuM54C+mqjsnZ12lMdhU ZvdMEq6kxuiuodLszG/54l/a9u5c9dyB12mETbUlm2J1HDHu0JK36XRL3ZDICfFg g2xSm8aImnLH52/AKIEPgHlLS2Pg8FzKlllxZvjimd2mSVhMGlIjS6kt1A+/wW0f l1CFKZm43izMIiqrkbsj3fO4ul5pAQjzGxOtlrI4g0Ktn5h5QxDpBMUa6r1Xju3m 0MBWB80ySlHY1u9H6K7/QMLR/Pl/bKI8zqDDZAoohFgNqSA0kPbJfWJtuHzLO0AW hQ/2tQJkPx+18rSHeYw8 -----END PGP SIGNATURE----- --E39E89C5-6F29-47EE-9F69-EC6F4BDD6B29-- From owner-svn-src-all@freebsd.org Mon Oct 3 18:20:59 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF2DDAF4E61; Mon, 3 Oct 2016 18:20:59 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 938BB8ED; Mon, 3 Oct 2016 18:20:59 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u93IKwNm043330; Mon, 3 Oct 2016 18:20:58 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u93IKwIm043327; Mon, 3 Oct 2016 18:20:58 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201610031820.u93IKwIm043327@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Mon, 3 Oct 2016 18:20:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306651 - in head: include lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 18:20:59 -0000 Author: ed Date: Mon Oct 3 18:20:58 2016 New Revision: 306651 URL: https://svnweb.freebsd.org/changeset/base/306651 Log: Remove setkey(), encrypt(), des_setkey() and des_cipher(). The setkey() and encrypt() functions are part of XSI, not the POSIX base definitions. There is no strict requirement for us to provide these, especially if we're only going to keep these around as undocumented stubs. The same holds for des_setkey() and des_cipher(). Instead of providing functions that only generate warnings when linking, simply disallow linking against them. The impact of this is relatively low. It only causes two leaf ports to break. I'll see what I can do to help out to get those fixed. PR: 211626 Modified: head/include/stdlib.h head/include/unistd.h head/lib/libc/gen/Symbol.map head/lib/libc/gen/crypt.c Modified: head/include/stdlib.h ============================================================================== --- head/include/stdlib.h Mon Oct 3 18:00:10 2016 (r306650) +++ head/include/stdlib.h Mon Oct 3 18:20:58 2016 (r306651) @@ -221,10 +221,6 @@ int putenv(char *); long random(void); unsigned short *seed48(unsigned short[3]); -#ifndef _SETKEY_DECLARED -int setkey(const char *); -#define _SETKEY_DECLARED -#endif char *setstate(/* const */ char *); void srand48(long); void srandom(unsigned int); Modified: head/include/unistd.h ============================================================================== --- head/include/unistd.h Mon Oct 3 18:00:10 2016 (r306650) +++ head/include/unistd.h Mon Oct 3 18:20:58 2016 (r306651) @@ -449,8 +449,6 @@ int symlink(const char * __restrict, co /* X/Open System Interfaces */ #if __XSI_VISIBLE char *crypt(const char *, const char *); -/* char *ctermid(char *); */ /* XXX ??? */ -int encrypt(char *, int); long gethostid(void); int lockf(int, int, off_t); int nice(int); @@ -498,8 +496,6 @@ const char * crypt_get_format(void); char *crypt_r(const char *, const char *, struct crypt_data *); int crypt_set_format(const char *); -int des_cipher(const char *, char *, long, int); -int des_setkey(const char *key); int dup3(int, int, int); int eaccess(const char *, int); void endusershell(void); @@ -567,10 +563,6 @@ int setdomainname(const char *, int); int setgroups(int, const gid_t *); void sethostid(long); int sethostname(const char *, int); -#ifndef _SETKEY_DECLARED -int setkey(const char *); -#define _SETKEY_DECLARED -#endif int setlogin(const char *); int setloginclass(const char *); void *setmode(const char *); Modified: head/lib/libc/gen/Symbol.map ============================================================================== --- head/lib/libc/gen/Symbol.map Mon Oct 3 18:00:10 2016 (r306650) +++ head/lib/libc/gen/Symbol.map Mon Oct 3 18:20:58 2016 (r306651) @@ -73,10 +73,6 @@ FBSD_1.0 { clock; closedir; confstr; - encrypt; - des_setkey; - des_cipher; - setkey; ctermid; ctermid_r; daemon; Modified: head/lib/libc/gen/crypt.c ============================================================================== --- head/lib/libc/gen/crypt.c Mon Oct 3 18:00:10 2016 (r306650) +++ head/lib/libc/gen/crypt.c Mon Oct 3 18:20:58 2016 (r306651) @@ -48,47 +48,41 @@ __FBSDID("$FreeBSD$"); * encryption, make sure you've got libcrypt.a around. */ -__warn_references(des_setkey, - "WARNING! des_setkey(3) not present in the system!"); - /* ARGSUSED */ int -des_setkey(const char *key __unused) +__freebsd11_des_setkey(const char *key __unused) { fprintf(stderr, "WARNING! des_setkey(3) not present in the system!\n"); return (0); } -__warn_references(des_cipher, - "WARNING! des_cipher(3) not present in the system!"); - /* ARGSUSED */ int -des_cipher(const char *in, char *out, long salt __unused, int num_iter __unused) +__freebsd11_des_cipher(const char *in, char *out, long salt __unused, + int num_iter __unused) { fprintf(stderr, "WARNING! des_cipher(3) not present in the system!\n"); bcopy(in, out, 8); return (0); } -__warn_references(setkey, - "WARNING! setkey(3) not present in the system!"); - /* ARGSUSED */ int -setkey(const char *key __unused) +__freebsd11_setkey(const char *key __unused) { fprintf(stderr, "WARNING! setkey(3) not present in the system!\n"); return (0); } -__warn_references(encrypt, - "WARNING! encrypt(3) not present in the system!"); - /* ARGSUSED */ int -encrypt(char *block __unused, int flag __unused) +__freebsd11_encrypt(char *block __unused, int flag __unused) { fprintf(stderr, "WARNING! encrypt(3) not present in the system!\n"); return (0); } + +__sym_compat(des_setkey, __freebsd11_des_setkey, FBSD_1.0); +__sym_compat(des_cipher, __freebsd11_des_cipher, FBSD_1.0); +__sym_compat(setkey, __freebsd11_setkey, FBSD_1.0); +__sym_compat(encrypt, __freebsd11_encrypt, FBSD_1.0); From owner-svn-src-all@freebsd.org Mon Oct 3 18:30:44 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFEF1AF4F19; Mon, 3 Oct 2016 18:30:44 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CEDBD5A; Mon, 3 Oct 2016 18:30:44 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id u93IUdfG004160 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 3 Oct 2016 21:30:39 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u93IUdfG004160 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u93IUdNY004159; Mon, 3 Oct 2016 21:30:39 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 3 Oct 2016 21:30:39 +0300 From: Konstantin Belousov To: Ed Schouten Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306651 - in head: include lib/libc/gen Message-ID: <20161003183039.GT38409@kib.kiev.ua> References: <201610031820.u93IKwIm043327@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201610031820.u93IKwIm043327@repo.freebsd.org> User-Agent: Mutt/1.6.1 (2016-04-27) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 18:30:44 -0000 On Mon, Oct 03, 2016 at 06:20:58PM +0000, Ed Schouten wrote: > Modified: head/lib/libc/gen/Symbol.map > ============================================================================== > --- head/lib/libc/gen/Symbol.map Mon Oct 3 18:00:10 2016 (r306650) > +++ head/lib/libc/gen/Symbol.map Mon Oct 3 18:20:58 2016 (r306651) > @@ -73,10 +73,6 @@ FBSD_1.0 { > clock; > closedir; > confstr; > - encrypt; > - des_setkey; > - des_cipher; > - setkey; > ctermid; > ctermid_r; > daemon; You just break ABI. Symbols cannot be removed from the published version. From owner-svn-src-all@freebsd.org Mon Oct 3 18:34:28 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6ADACAF3046 for ; Mon, 3 Oct 2016 18:34:28 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yw0-x231.google.com (mail-yw0-x231.google.com [IPv6:2607:f8b0:4002:c05::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2AC29156 for ; Mon, 3 Oct 2016 18:34:28 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yw0-x231.google.com with SMTP id t193so34295351ywc.2 for ; Mon, 03 Oct 2016 11:34:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=xAeWOtsTI17fgHpUQDp3QhucBIB6p04QW1GUMR+Bfco=; b=tqEzrdQNh71Hjaq1P4IPqp2m2MbUrJXvR1CqQCQNToZmyKobB+JHpCut0WJoLAjyE5 ZODafxHHKp6CHIY5BXuV8yyTwXBBlXLyE2YTeR/5YOXpI9i7OJxKlvUc5V5r9lcyg4ja q2z4J4ozfIsmJLN4+bGl7HYyDPwx71fRJ7jEVwkbRwp997WYKV3oFdqAQfU/q9ri/esn oaXk6R87p/aUAIqUT1eM54odcqjnvE0EM/MHzNnuyW0tWDliv2Gxv80dT0hY9xeupsPT r+XAPr9J6ITN6J5KAXQf/Okv8hz+fWYxBUcGWJrgFYtkftgxI/99HAZzrxGkqj2yn1jD +DRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=xAeWOtsTI17fgHpUQDp3QhucBIB6p04QW1GUMR+Bfco=; b=EU591HLzypQrWRVCWM2PY/m9KXbBUvuSpUJHH9j9sZXjHParZyYpQbogJluYtPngmr zZLaJOUtL6tStEPdhlZ/AYl4bNxnGX754EbQFjbV4v+W05YiT7p4qYA++LVVo8dyLhtf E0Rezh1WW85wTLOFIw9IvcAU2W6gGotykqPDSXvoGsmWgeED+o2yVfBySnbC6pcKuVed k8LGDM0mKpTKEtYh6s6x9YgUYkltSS5zaqR7S/Zaq72NbFi+XzRHrvSvZWnNgvSek8tj Wwd9BBP2GgA5HeQLLeSmwoSzMSa45q2AhqEvXjb6Yoe8pRKjpu5PopZkEFV5H60VQ2NY qWhQ== X-Gm-Message-State: AA6/9Rm9vIDIUWl4AhrwtN0gERoSlUuHRwmchyqO9Zhwu2fwJbXatcSn/6puz2/p3CKf5BC+zPD/b9pyOn+dNw== X-Received: by 10.13.196.130 with SMTP id g124mr16085366ywd.138.1475519667397; Mon, 03 Oct 2016 11:34:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.201.71 with HTTP; Mon, 3 Oct 2016 11:34:26 -0700 (PDT) In-Reply-To: <20161003183039.GT38409@kib.kiev.ua> References: <201610031820.u93IKwIm043327@repo.freebsd.org> <20161003183039.GT38409@kib.kiev.ua> From: Ed Schouten Date: Mon, 3 Oct 2016 20:34:26 +0200 Message-ID: Subject: Re: svn commit: r306651 - in head: include lib/libc/gen To: Konstantin Belousov Cc: Ed Schouten , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 18:34:28 -0000 Hi Kostik, 2016-10-03 20:30 GMT+02:00 Konstantin Belousov : > You just break ABI. Symbols cannot be removed from the published version. But I've added __sym_compat()s for those. That still causes them to be available for linking, right? readelf -s gives: 72: 00000000000780d0 40 FUNC GLOBAL DEFAULT 11 encrypt@FBSD_1.0 1593: 0000000000078020 40 FUNC GLOBAL DEFAULT 11 des_setkey@FBSD_1.0 2728: 0000000000078050 68 FUNC GLOBAL DEFAULT 11 des_cipher@FBSD_1.0 3120: 00000000000780a0 40 FUNC GLOBAL DEFAULT 11 setkey@FBSD_1.0 If this is incorrect, what should I have done instead? -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 From owner-svn-src-all@freebsd.org Mon Oct 3 18:36:53 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91F7FAF30E1 for ; Mon, 3 Oct 2016 18:36:53 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yb0-x236.google.com (mail-yb0-x236.google.com [IPv6:2607:f8b0:4002:c09::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 50E0636C for ; Mon, 3 Oct 2016 18:36:53 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yb0-x236.google.com with SMTP id 191so13790348ybv.3 for ; Mon, 03 Oct 2016 11:36:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=MKe8yBWFe5X7ccC8MolLB2OsLFMMsobA4w06JhGzBJQ=; b=NjgIENqF76+PXOlmD8/2TNOXXLmmdZzbzM+s8L7vqagYGU45dKSX2ou/2KLSGvOKqV pycf63myPRmCkEi9MIUOYd2WbMrygR6i2O7kcILSfa+VAybQBZWP8qQc7s2nrABWDqay maJgRfgF5QRf9jKo7rcEnxVTViGqPFdUf+yLGbvFedi0+YkO5wPO8ritmeEM7Dqdahq1 iC/RqJpnaqrneiHYnEsPcHKOpR1yMnd+g/pgkfdftvYMMoIUw6b9jz8EaFjdhEqbOkJO vUhLGHeCQqpDdc9dvvXzWfI4D6YRaCtYmk4sS+Me4iqh9j7w8Jm/AwqOHgHIbT9LkAOe 7pBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=MKe8yBWFe5X7ccC8MolLB2OsLFMMsobA4w06JhGzBJQ=; b=BCjVaLaS1ofc1SrFV7aKH502vJCbxTG9KW8UoUrZUjkhMUf8AZESzSX6h1raHNjZ6Z Unx/nwMSQ/TGVhmQLHdLicp39JO12YDBl455gIPhQZVlpZjC6TUYjtrGxS4pQDpHlwId jvjW+nZfFyFFM09Ho6yAzJw0YFiO7LNuUxY9B8LR8L0WicaZVNWkbFRlJ8u4/8O13+Sg SBhrbXHHInQK93+2f5s/YEwFUPlfI0a42/2Hlmm7QSziwAKxs7TebCaktFlXqfUuYtIT rnMKSw8gF+Fni5vbrNBoz4sE2ASL62opPENOvqIJjKx+D6zX7s5WAFhwqvHXTQnWu4EV oWmQ== X-Gm-Message-State: AA6/9RniALn1h25RLxgulmOY+72GQ2uqzgzjg4lrqD6kYXjL9YpB4x4Bb5ztGYkizH4y6UmH1Wuy9YueE3txbw== X-Received: by 10.37.163.33 with SMTP id d30mr15348432ybi.54.1475519812562; Mon, 03 Oct 2016 11:36:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.201.71 with HTTP; Mon, 3 Oct 2016 11:36:52 -0700 (PDT) In-Reply-To: References: <201610031820.u93IKwIm043327@repo.freebsd.org> <20161003183039.GT38409@kib.kiev.ua> From: Ed Schouten Date: Mon, 3 Oct 2016 20:36:52 +0200 Message-ID: Subject: Re: svn commit: r306651 - in head: include lib/libc/gen To: Konstantin Belousov Cc: Ed Schouten , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 18:36:53 -0000 2016-10-03 20:34 GMT+02:00 Ed Schouten : > But I've added __sym_compat()s for those. That still causes them to be > available for linking, right? readelf -s gives: Sorry if I was unclear. In this context, 'linking' should say 'run-time linking'. -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 From owner-svn-src-all@freebsd.org Mon Oct 3 18:47:20 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75525AF3424; Mon, 3 Oct 2016 18:47:20 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 06DCBAEA; Mon, 3 Oct 2016 18:47:19 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id u93IlFDK008266 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 3 Oct 2016 21:47:15 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u93IlFDK008266 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u93IlFHe008265; Mon, 3 Oct 2016 21:47:15 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 3 Oct 2016 21:47:15 +0300 From: Konstantin Belousov To: Ed Schouten Cc: Ed Schouten , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306651 - in head: include lib/libc/gen Message-ID: <20161003184715.GU38409@kib.kiev.ua> References: <201610031820.u93IKwIm043327@repo.freebsd.org> <20161003183039.GT38409@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 18:47:20 -0000 On Mon, Oct 03, 2016 at 08:36:52PM +0200, Ed Schouten wrote: > 2016-10-03 20:34 GMT+02:00 Ed Schouten : > > But I've added __sym_compat()s for those. That still causes them to be > > available for linking, right? readelf -s gives: > > Sorry if I was unclear. In this context, 'linking' should say > 'run-time linking'. Sorry, I did not noticed this. Yes, sym_compat is enough there. From owner-svn-src-all@freebsd.org Mon Oct 3 18:48:23 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C54A4AF347E for ; Mon, 3 Oct 2016 18:48:23 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yb0-x229.google.com (mail-yb0-x229.google.com [IPv6:2607:f8b0:4002:c09::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 83671C85 for ; Mon, 3 Oct 2016 18:48:23 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yb0-x229.google.com with SMTP id e2so53440633ybi.1 for ; Mon, 03 Oct 2016 11:48:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=2x5ytb8cvmSFUgAj9l7oJHUzYv7ghyse7OY7Ge5XgwU=; b=IySMzAFGUT7OuaubUxzetWi05HPd6luEmJUmTQZ3B1jkNlq2hZG3JP0wbv5lr5+2gE 0gNVnfa26ifp4PZh1tG6FtRJVo1QC7gCqqynGwo7C1Oee+dIjV0l/WpeIN2LjMGEPdnH gBa7QRcNwghY56HD0ZbwsW+obndSpnaNDxtj+Nu3FXg7r2zQO5o5t3p7Zcr/pSIDVUS0 ZXOj2xuv3Lgy08sYYNUXd5T88OaskgwsZnpaaMhjrZas8EPNKtDIMA+mG457g2h12+AB YaJ5Gfygy9yFrYux+JMxkv++YDXsYn875jPrdGcP5KSNqBdfkkF9N9wV+gH16WB0EI6l AnUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=2x5ytb8cvmSFUgAj9l7oJHUzYv7ghyse7OY7Ge5XgwU=; b=iju5F4Ij93+UZm2ZlcUgwMHbH/Viyw8EkE3Q6H6ENOaKtyiUogTlg905IwMqb6pC8g WfMPoZlk8keulGiKs5eH+RxLxeO1CjiyVAgZTak1qJwCybkfgFh/FJnA4WlHmZJF5ERC b6n2DPFGRmsxk4CdAklIb946ZcaqSiH6icnYAeksMDNQNWxQsPh/x2CcqePbPDDtAxRc tMnFU5mWI4hVaDoZypfa6hnEcp95Ee9RIcva+Xow6ELuTb57bK5u0BJMXinR6RldTHAc qXWLWC7USFzJNd1vljUJreUIFn7LqGWL3V1t0PYf+VDTcy2C4KItHviT09ngbOFSC4MT hNAA== X-Gm-Message-State: AA6/9Rk4tOGHUO73caXi6NEpajtkWEHHm2Fzsrubpv5Ra64QTPAbA1W3W/EEOxym7eIkIIdQ3XO8P4M2NG0+BA== X-Received: by 10.37.163.33 with SMTP id d30mr15381104ybi.54.1475520502836; Mon, 03 Oct 2016 11:48:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.201.71 with HTTP; Mon, 3 Oct 2016 11:48:22 -0700 (PDT) In-Reply-To: <20161003184715.GU38409@kib.kiev.ua> References: <201610031820.u93IKwIm043327@repo.freebsd.org> <20161003183039.GT38409@kib.kiev.ua> <20161003184715.GU38409@kib.kiev.ua> From: Ed Schouten Date: Mon, 3 Oct 2016 20:48:22 +0200 Message-ID: Subject: Re: svn commit: r306651 - in head: include lib/libc/gen To: Konstantin Belousov Cc: Ed Schouten , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 18:48:23 -0000 2016-10-03 20:47 GMT+02:00 Konstantin Belousov : > Sorry, I did not noticed this. Yes, sym_compat is enough there. Ah, no problem. Thanks for taking your time regardless! -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 From owner-svn-src-all@freebsd.org Mon Oct 3 19:02:23 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9E33AF380B; Mon, 3 Oct 2016 19:02:23 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8494479A; Mon, 3 Oct 2016 19:02:23 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u93J2M4M062237; Mon, 3 Oct 2016 19:02:22 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u93J2MR8062236; Mon, 3 Oct 2016 19:02:22 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201610031902.u93J2MR8062236@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Mon, 3 Oct 2016 19:02:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306652 - head/usr.sbin/arp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 19:02:23 -0000 Author: vangyzen Date: Mon Oct 3 19:02:22 2016 New Revision: 306652 URL: https://svnweb.freebsd.org/changeset/base/306652 Log: Update arp(4) to document the net.link.ether.inet.garp_rexmit_count sysctl. Submitted by: David A. Bright Requested by: markj Reviewed by: markj, badger MFC after: 4 weeks X-MFC with: r306577 Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D8136 Modified: head/usr.sbin/arp/arp.4 Modified: head/usr.sbin/arp/arp.4 ============================================================================== --- head/usr.sbin/arp/arp.4 Mon Oct 3 18:20:58 2016 (r306651) +++ head/usr.sbin/arp/arp.4 Mon Oct 3 19:02:22 2016 (r306652) @@ -28,7 +28,7 @@ .\" @(#)arp4.4 6.5 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd November 5, 2013 +.Dd October 3, 2016 .Dt ARP 4 .Os .Sh NAME @@ -126,6 +126,24 @@ the hardware address. Installing such entries is RFC 1812 violation, but some prorietary load balancing techniques require routers on network to do so. Turned off by default. +.It Va garp_rexmit_count +Should the kernel retransmit gratuitous ARP (GARP) packets when an IPv4 address +is added to an interface. +A GARP is always transmitted when an IPv4 address is added to an interface. +A non-zero value of this sysctl will cause the GARP packet to be retransmitted +the stated number of times. +The interval between retransmissions is doubled each time, so the +retransmission intervals are: {1, 2, 4, 8, 16, ...} (seconds). +The default value of zero means only the initial GARP is sent; no +additional GARP packets are retransmitted. +The maximum value is sixteen. +.Pp +Although a single GARP packet (the default behavior) is usually sufficient, in +some circumstances, such as when a shared address is passed between cluster +nodes, this single GARP may be dropped or lost. +This can lead to neighbors on the network link working with a stale ARP cache +and sending packets destined for that address to the node that previously owned +the address, which may not respond. .It Va log_arp_movements Should the kernel log movements of IP addresses from one hardware address to an other. From owner-svn-src-all@freebsd.org Mon Oct 3 19:11:46 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9178AF39E1; Mon, 3 Oct 2016 19:11:46 +0000 (UTC) (envelope-from bms@fastmail.net) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F69CCE3; Mon, 3 Oct 2016 19:11:46 +0000 (UTC) (envelope-from bms@fastmail.net) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 05BDB20550; Mon, 3 Oct 2016 15:11:37 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute2.internal (MEProxy); Mon, 03 Oct 2016 15:11:37 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.net; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=yWRFtyRSbIHlSLV4gmvTUBqjB0A=; b=lozr1v 6ff7CnALOF9ornPWt8r+qOx6+5SktU30S9v/uayVAsdznquq4ONFRyvmVfnZZTYi WGnZWMn3yMkmJ17CamQNs4iRR2StooyCOz+3Ror1RWUjwXbO7000D74apbIu4FfZ 8uXk/TqD1osOVbfOtTszjCOo0chB4pqFnLtP4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=yWRFtyRSbIHlSLV 4gmvTUBqjB0A=; b=GV7PMMzyGjYQZ336OzpBHVDJFI2eeRMO4WAw2qkZ5YReQvR DAJ78IuSaRYYFPV+EFyB06UhzwVedulmyQdbw89+2JTbdHgx5i4VGqSB5Phwenn0 w5CMYtsQD2GtWC3FWv56fovYIAfQQw5ZU+kM0+AASWEgS5mjKe+9vplRwvcw= X-Sasl-enc: wYS1CBvGbYi6N2ZeTW9J2SAWbQIBtl1xlZaXQ1X3axPu 1475521896 Received: from pion.local (cpc96954-walt26-2-0-cust843.13-2.cable.virginm.net [82.31.91.76]) by mail.messagingengine.com (Postfix) with ESMTPA id 435F6F2C78; Mon, 3 Oct 2016 15:11:36 -0400 (EDT) Subject: Re: svn commit: r306652 - head/usr.sbin/arp To: Eric van Gyzen , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201610031902.u93J2MR8062236@repo.freebsd.org> From: Bruce Simpson Message-ID: Date: Mon, 3 Oct 2016 20:11:35 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <201610031902.u93J2MR8062236@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 19:11:46 -0000 On 03/10/16 20:02, Eric van Gyzen wrote: > Author: vangyzen > Date: Mon Oct 3 19:02:22 2016 > New Revision: 306652 > URL: https://svnweb.freebsd.org/changeset/base/306652 > > Log: > Update arp(4) to document the net.link.ether.inet.garp_rexmit_count sysctl. Meh, acronym collision. It's probably obvious in this context that GARP stands here for Gratuitous ARP, but my mental autocomplete reads it as Generic Attribute Registration Protocol (GARP). However, that GARP -- 802.1ak -- is due to be replaced with MRP. From owner-svn-src-all@freebsd.org Mon Oct 3 19:18:49 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9838AAF3C28; Mon, 3 Oct 2016 19:18:49 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 73BAF17A; Mon, 3 Oct 2016 19:18:47 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 20EAE10AF90; Mon, 3 Oct 2016 15:18:46 -0400 (EDT) From: John Baldwin To: Konstantin Belousov Cc: Sevan Janiyan , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306598 - head/sbin/ccdconfig Date: Mon, 03 Oct 2016 12:08:59 -0700 Message-ID: <13871739.SgV22gDlVU@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-PRERELEASE; KDE/4.14.10; amd64; ; ) In-Reply-To: <20161003091557.GJ38409@kib.kiev.ua> References: <201610022319.u92NJ5d1006467@repo.freebsd.org> <20161003091557.GJ38409@kib.kiev.ua> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 03 Oct 2016 15:18:46 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 19:18:49 -0000 On Monday, October 03, 2016 12:15:57 PM Konstantin Belousov wrote: > On Sun, Oct 02, 2016 at 11:19:05PM +0000, Sevan Janiyan wrote: > > Author: sevan (doc committer) > > Date: Sun Oct 2 23:19:05 2016 > > New Revision: 306598 > > URL: https://svnweb.freebsd.org/changeset/base/306598 > > > > Log: > > ccdconfig first appeared in NetBSD 1.1 > > From NetBSD man page, confirmed with repo tags in CVS [1] > > (there was also no 1.0a release according to [2]) > > > > [1] http://cvsweb.netbsd.org/bsdweb.cgi/src/sbin/ccdconfig/ccdconfig.c > > [2] http://netbsd.org/releases/formal.html#history > > > > PR: 212437 > > Approved by: bcr (mentor) > > Obtained from: NetBSD > > MFC after: 4 days > > Differential Revision: https://reviews.freebsd.org/D8105 > > > > Modified: > > head/sbin/ccdconfig/ccdconfig.8 > Is ccd(4) still operational ? I suspect that it is not, and that > sbin/ccdconfig and ccd(4) page should be removed. There is geom_ccd so I think there's a decent chance it still works. Of course, no one should be using it except for some legacy config. I'm not sure if 12 is sufficiently divorced in time from when ccdconfig was still something to use that we can remove it now. -- John Baldwin From owner-svn-src-all@freebsd.org Mon Oct 3 19:22:56 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 787A0AF3EEA; Mon, 3 Oct 2016 19:22:56 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [IPv6:2607:fc50:1000:7400:216:3eff:fe72:314f]) by mx1.freebsd.org (Postfix) with ESMTP id 49A798A8; Mon, 3 Oct 2016 19:22:56 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from sweettea.beer.town (unknown [76.164.8.130]) by smtp.vangyzen.net (Postfix) with ESMTPSA id 2F0F656488; Mon, 3 Oct 2016 14:22:55 -0500 (CDT) Subject: Re: svn commit: r306652 - head/usr.sbin/arp To: Bruce Simpson , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201610031902.u93J2MR8062236@repo.freebsd.org> From: Eric van Gyzen Message-ID: Date: Mon, 3 Oct 2016 14:22:54 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 19:22:56 -0000 On 10/03/2016 14:11, Bruce Simpson wrote: > On 03/10/16 20:02, Eric van Gyzen wrote: >> Author: vangyzen >> Date: Mon Oct 3 19:02:22 2016 >> New Revision: 306652 >> URL: https://svnweb.freebsd.org/changeset/base/306652 >> >> Log: >> Update arp(4) to document the net.link.ether.inet.garp_rexmit_count >> sysctl. > > Meh, acronym collision. > > It's probably obvious in this context that GARP stands here for > Gratuitous ARP, but my mental autocomplete reads it as Generic Attribute > Registration Protocol (GARP). The collision is unfortunate, but I agree that the context should be enough. > However, that GARP -- 802.1ak -- is due to be replaced with MRP. The "Mental-map Rewriting Protocol"? ;-) Cheers, Eric From owner-svn-src-all@freebsd.org Mon Oct 3 19:32:06 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91F7DAF40C5; Mon, 3 Oct 2016 19:32:06 +0000 (UTC) (envelope-from bms@fastmail.net) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63C27D98; Mon, 3 Oct 2016 19:32:06 +0000 (UTC) (envelope-from bms@fastmail.net) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 401C8208C1; Mon, 3 Oct 2016 15:32:05 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute2.internal (MEProxy); Mon, 03 Oct 2016 15:32:05 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.net; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=5VQIA80SWFxfXOeLwifFTNjq3xc=; b=MT4gEk OfX2Lmm4SIEKtdGEkSUedppSlrWRJwy4sY6lAMOmUX1pWg9v3Ea4zvSZUqexzKYf EUS+ouiomHkmKdSkNSuwx717Bz33js65UmMFN164UK106757kyOExUHUKF5xrYfE aweXoZXAQ8n6COaoSgCQlHQfvugTW8WVBSxv8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=5VQIA80SWFxfXOe LwifFTNjq3xc=; b=jjkMWTSX/F3rGit6c38e+EDIOjO6XMMBq9db0V28ApQ4YQG +YVEbjKbqouFzxc8DTZJ614F4WNbmYrtA4jfy2eTkE9E6hltBmZQeyTIZ4ZaCicS /PVKuWC+F+BSLBfH9D7Nb7/AEQ20bj1ImabSplAq+oU9e5gvx6oBW2uPEzIw= X-Sasl-enc: yf8j4/cD0/T4GnvgrW0NJuGo41lUcJcelcpHl1ZSON/O 1475523124 Received: from pion.local (cpc96954-walt26-2-0-cust843.13-2.cable.virginm.net [82.31.91.76]) by mail.messagingengine.com (Postfix) with ESMTPA id 7CD78F2D2F; Mon, 3 Oct 2016 15:32:04 -0400 (EDT) Subject: Re: svn commit: r306652 - head/usr.sbin/arp To: Eric van Gyzen , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201610031902.u93J2MR8062236@repo.freebsd.org> From: Bruce Simpson Message-ID: Date: Mon, 3 Oct 2016 20:32:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 19:32:06 -0000 On 03/10/16 20:22, Eric van Gyzen wrote: > The collision is unfortunate, but I agree that the context should be enough. Agreed -- other technical writers have also used this version of the GARP acronym in doco. >> However, that GARP -- 802.1ak -- is due to be replaced with MRP. > > The "Mental-map Rewriting Protocol"? ;-) Multiple Registration Protocol (MRP) is intended to fill most of the roles GARP/GVRP did, for dynamic VLAN, end-station MAC and L2 multicast registration. (Think Ethernet multicast without IP.) Actually, being reminded of this gave me an idea -- adding a subset of what's needed to support MRP to if_bridge would probably also help for supporting Ethernet rings; those protocols need to call into VLAN registration and port blocking too. It would make for some good junior kernel hacker tasks... From owner-svn-src-all@freebsd.org Mon Oct 3 19:34:33 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A80F6AF420E; Mon, 3 Oct 2016 19:34:33 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 796EFF81; Mon, 3 Oct 2016 19:34:33 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u93JYWLR073878; Mon, 3 Oct 2016 19:34:32 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u93JYWPb073877; Mon, 3 Oct 2016 19:34:32 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201610031934.u93JYWPb073877@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 3 Oct 2016 19:34:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306653 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 19:34:33 -0000 Author: gonzo Date: Mon Oct 3 19:34:32 2016 New Revision: 306653 URL: https://svnweb.freebsd.org/changeset/base/306653 Log: Add Tegra TK1 DTBs to GENERIC kernel Approved by: andrew Modified: head/sys/arm/conf/GENERIC Modified: head/sys/arm/conf/GENERIC ============================================================================== --- head/sys/arm/conf/GENERIC Mon Oct 3 19:02:22 2016 (r306652) +++ head/sys/arm/conf/GENERIC Mon Oct 3 19:34:32 2016 (r306653) @@ -169,4 +169,4 @@ options EFI # Flattened Device Tree options FDT # Configure using FDT/DTB data -makeoptions MODULES_EXTRA="dtb/allwinner dtb/rpi" +makeoptions MODULES_EXTRA="dtb/allwinner dtb/nvidia dtb/rpi" From owner-svn-src-all@freebsd.org Mon Oct 3 19:48:57 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C68EAAF45F3; Mon, 3 Oct 2016 19:48:57 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F72D7CE; Mon, 3 Oct 2016 19:48:57 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u93JmuS6077674; Mon, 3 Oct 2016 19:48:56 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u93Jmuoa077673; Mon, 3 Oct 2016 19:48:56 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201610031948.u93Jmuoa077673@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Mon, 3 Oct 2016 19:48:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306654 - head/sys/arm/ti/cpsw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 19:48:57 -0000 Author: loos Date: Mon Oct 3 19:48:56 2016 New Revision: 306654 URL: https://svnweb.freebsd.org/changeset/base/306654 Log: Enable the TX completion interrupt for the cpsw NIC to assure the free tx descriptors are reclaimed as soon as possible. Without this the free buffers are reclaimed only on watchdog runs or after trying to enqueue more packets. Sponsored by: Rubicon Communications, LLC (Netgte) Modified: head/sys/arm/ti/cpsw/if_cpsw.c Modified: head/sys/arm/ti/cpsw/if_cpsw.c ============================================================================== --- head/sys/arm/ti/cpsw/if_cpsw.c Mon Oct 3 19:34:32 2016 (r306653) +++ head/sys/arm/ti/cpsw/if_cpsw.c Mon Oct 3 19:48:56 2016 (r306654) @@ -117,6 +117,7 @@ static void cpsw_intr_rx(void *arg); static struct mbuf *cpsw_rx_dequeue(struct cpsw_softc *); static void cpsw_rx_enqueue(struct cpsw_softc *); static void cpswp_start(struct ifnet *); +static void cpsw_intr_tx(void *); static void cpswp_tx_enqueue(struct cpswp_softc *); static int cpsw_tx_dequeue(struct cpsw_softc *); @@ -209,6 +210,15 @@ static struct resource_spec irq_res_spec { -1, 0 } }; +static struct { + void (*cb)(void *); +} cpsw_intr_cb[] = { + { cpsw_intr_rx_thresh }, + { cpsw_intr_rx }, + { cpsw_intr_tx }, + { cpsw_intr_misc }, +}; + /* Number of entries here must match size of stats * array in struct cpswp_softc. */ static struct cpsw_stat { @@ -590,13 +600,15 @@ cpsw_init(struct cpsw_softc *sc) /* Enable Interrupts for core 0 */ cpsw_write_4(sc, CPSW_WR_C_RX_THRESH_EN(0), 0xFF); cpsw_write_4(sc, CPSW_WR_C_RX_EN(0), 0xFF); + cpsw_write_4(sc, CPSW_WR_C_TX_EN(0), 0xFF); cpsw_write_4(sc, CPSW_WR_C_MISC_EN(0), 0x1F); /* Enable host Error Interrupt */ cpsw_write_4(sc, CPSW_CPDMA_DMA_INTMASK_SET, 3); - /* Enable interrupts for RX Channel 0 */ + /* Enable interrupts for RX and TX on Channel 0 */ cpsw_write_4(sc, CPSW_CPDMA_RX_INTMASK_SET, 1); + cpsw_write_4(sc, CPSW_CPDMA_TX_INTMASK_SET, 1); /* Initialze MDIO - ENABLE, PREAMBLE=0, FAULTENB, CLKDIV=0xFF */ /* TODO Calculate MDCLK=CLK/(CLKDIV+1) */ @@ -645,22 +657,14 @@ cpsw_probe(device_t dev) static int cpsw_intr_attach(struct cpsw_softc *sc) { + int i; - /* Note: We don't use sc->irq_res[2] (TX interrupt) */ - if (bus_setup_intr(sc->dev, sc->irq_res[0], - INTR_TYPE_NET | INTR_MPSAFE, NULL, cpsw_intr_rx_thresh, - sc, &sc->ih_cookie[0]) != 0) { - return (-1); - } - if (bus_setup_intr(sc->dev, sc->irq_res[1], - INTR_TYPE_NET | INTR_MPSAFE, NULL, cpsw_intr_rx, - sc, &sc->ih_cookie[1]) != 0) { - return (-1); - } - if (bus_setup_intr(sc->dev, sc->irq_res[3], - INTR_TYPE_NET | INTR_MPSAFE, NULL, cpsw_intr_misc, - sc, &sc->ih_cookie[3]) != 0) { - return (-1); + for (i = 0; i < CPSW_INTR_COUNT; i++) { + if (bus_setup_intr(sc->dev, sc->irq_res[i], + INTR_TYPE_NET | INTR_MPSAFE, NULL, + cpsw_intr_cb[i].cb, sc, &sc->ih_cookie[i]) != 0) { + return (-1); + } } return (0); @@ -1696,6 +1700,18 @@ cpswp_start(struct ifnet *ifp) } static void +cpsw_intr_tx(void *arg) +{ + struct cpsw_softc *sc; + + sc = (struct cpsw_softc *)arg; + CPSW_TX_LOCK(sc); + cpsw_tx_dequeue(sc); + cpsw_write_4(sc, CPSW_CPDMA_CPDMA_EOI_VECTOR, 2); + CPSW_TX_UNLOCK(sc); +} + +static void cpswp_tx_enqueue(struct cpswp_softc *sc) { bus_dma_segment_t segs[CPSW_TXFRAGS]; From owner-svn-src-all@freebsd.org Mon Oct 3 20:05:34 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9BA8BAF49F2; Mon, 3 Oct 2016 20:05:34 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E9EA275; Mon, 3 Oct 2016 20:05:34 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u93K5X2t085326; Mon, 3 Oct 2016 20:05:33 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u93K5XYo085325; Mon, 3 Oct 2016 20:05:33 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201610032005.u93K5XYo085325@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 3 Oct 2016 20:05:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306656 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 20:05:34 -0000 Author: andrew Date: Mon Oct 3 20:05:33 2016 New Revision: 306656 URL: https://svnweb.freebsd.org/changeset/base/306656 Log: Use the cortex functions when booting on one of the Cortex-A ARMv8 CPUs. This list is incomplete, however we don't have the ID values for the missing Cortex-A32 or A35. Submitted by: loos (Cortex-A53) Sponsored by: ABT Systems Ltd Modified: head/sys/arm/arm/cpufunc.c Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Mon Oct 3 19:52:06 2016 (r306655) +++ head/sys/arm/arm/cpufunc.c Mon Oct 3 20:05:33 2016 (r306656) @@ -680,6 +680,9 @@ set_cpufuncs() case CPU_ID_CORTEXA9: case CPU_ID_CORTEXA12: case CPU_ID_CORTEXA15: + case CPU_ID_CORTEXA53: + case CPU_ID_CORTEXA57: + case CPU_ID_CORTEXA72: case CPU_ID_KRAIT300: cpufuncs = cortexa_cpufuncs; get_cachetype_cp15(); From owner-svn-src-all@freebsd.org Mon Oct 3 20:48:20 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 406CFAF4492; Mon, 3 Oct 2016 20:48:20 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0205EC11; Mon, 3 Oct 2016 20:48:19 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u93KmJXi000319; Mon, 3 Oct 2016 20:48:19 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u93KmIb2000316; Mon, 3 Oct 2016 20:48:18 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201610032048.u93KmIb2000316@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Mon, 3 Oct 2016 20:48:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306657 - in head/lib: . libcapsicum X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 20:48:20 -0000 Author: oshogbo Date: Mon Oct 3 20:48:18 2016 New Revision: 306657 URL: https://svnweb.freebsd.org/changeset/base/306657 Log: libcapsicum: introduce Capsicum helpers Capsicum helpers are a set of inline functions which goal is to reduce duplicated patterns used to Capsicumize applications. Reviewed by: cem, AllanJude, bapt, ed, emaste Differential Revision: https://reviews.freebsd.org/D8013 Added: head/lib/libcapsicum/ head/lib/libcapsicum/Makefile (contents, props changed) head/lib/libcapsicum/capsicum_helpers.h (contents, props changed) Modified: head/lib/Makefile Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Mon Oct 3 20:05:33 2016 (r306656) +++ head/lib/Makefile Mon Oct 3 20:48:18 2016 (r306657) @@ -38,6 +38,7 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \ libbz2 \ libcalendar \ libcam \ + libcapsicum \ ${_libcasper} \ ${_libcom_err} \ libcompat \ Added: head/lib/libcapsicum/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcapsicum/Makefile Mon Oct 3 20:48:18 2016 (r306657) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +PACKAGE=lib${LIB} + +INCS= capsicum_helpers.h + +.include Added: head/lib/libcapsicum/capsicum_helpers.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcapsicum/capsicum_helpers.h Mon Oct 3 20:48:18 2016 (r306657) @@ -0,0 +1,120 @@ +/*- + * Copyright (c) 2016 Mariusz Zaborski + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _CAPSICUM_HELPERS_H_ +#define _CAPSICUM_HELPERS_H_ + +#include +#include + +#include +#include +#include +#include +#include + +#define CAPH_IGNORE_EBADF 0x0001 +#define CAPH_READ 0x0002 +#define CAPH_WRITE 0x0004 + +static __inline int +caph_limit_stream(int fd, int flags) +{ + cap_rights_t rights; + unsigned long cmds[] = { TIOCGETA, TIOCGWINSZ }; + + cap_rights_init(&rights, CAP_FCNTL, CAP_FSTAT, CAP_IOCTL); + + if ((flags & CAPH_READ) != 0) + cap_rights_set(&rights, CAP_READ); + if ((flags & CAPH_WRITE) != 0) + cap_rights_set(&rights, CAP_WRITE); + + if (cap_rights_limit(fd, &rights) < 0 && errno != ENOSYS) { + if (errno == EBADF && (flags & CAPH_IGNORE_EBADF) != 0) + return (0); + return (-1); + } + + if (cap_ioctls_limit(fd, cmds, nitems(cmds)) < 0 && errno != ENOSYS) + return (-1); + + if (cap_fcntls_limit(fd, CAP_FCNTL_GETFL) < 0 && errno != ENOSYS) + return (-1); + + return (0); +} + +static __inline int +caph_limit_stdin(void) +{ + + return (caph_limit_stream(STDIN_FILENO, CAPH_READ)); +} + +static __inline int +caph_limit_stderr(void) +{ + + return (caph_limit_stream(STDERR_FILENO, CAPH_WRITE)); +} + +static __inline int +caph_limit_stdout(void) +{ + + return (caph_limit_stream(STDOUT_FILENO, CAPH_WRITE)); +} + +static __inline int +caph_limit_stdio(void) +{ + + if (caph_limit_stdin() == -1 || caph_limit_stdout() == -1 || + caph_limit_stdout() == -1) { + return (-1); + } + + return (0); +} + +static __inline void +caph_cache_tzdata(void) +{ + + tzset(); +} + +static __inline void +caph_cache_catpages(void) +{ + + (void)catopen("libc", NL_CAT_LOCALE); +} + +#endif /* _CAPSICUM_HELPERS_H_ */ From owner-svn-src-all@freebsd.org Mon Oct 3 21:15:32 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9922AF499C; Mon, 3 Oct 2016 21:15:32 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x244.google.com (mail-pa0-x244.google.com [IPv6:2607:f8b0:400e:c03::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 78D6FBC6; Mon, 3 Oct 2016 21:15:32 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pa0-x244.google.com with SMTP id cd13so7107783pac.3; Mon, 03 Oct 2016 14:15:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=TzwKL2i86rKu/AgnAS1Ug3znO2LCqiJx28xkFLkShBM=; b=aCDj7cNteUHb+ImHk3OqlmPJuXHnMkWcbMz9Jwqh//821gtrCHJZsJQ72yVy3u6WQ7 gO5ti1vvS2PpdRHrOon9XJVzdZGA+Hi5gfCS5GzOBk1KO/Fr8YV2rWf6A5v7iOhE57Dv 1uvjh3ab0jVjQXBymIoN+nEG0sq6xkDDPn2ykjiEEdFJUBgGlL/cnw6dFyeh41ML3KrB 3v7mASbQGlsuG0JHizS4FhqT6FVVGkeuQ5FeDoG4oTGfRoeVcB9duf5WjHyPIQ+U0gTz 5ldyOQX5kWkUuqqfTjByIgdkHNZEYHvNo8eiqxIgrVt7XelbA+jNcojVA8fK2SIOhZ9a vMPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=TzwKL2i86rKu/AgnAS1Ug3znO2LCqiJx28xkFLkShBM=; b=Js7EhFQ79sOmelc0PpHUxx7nVpW+jhiHyme5iZFyfev1D19E7DRo3AQtk73kVYx8ky O9rwyGQwXBjtlMXuIREm6GdIlgENbZzv0WP8l53H+foVDyAo0Biz0o2jYDgEFFnffCTI H3xz4BYmgcmWeYgn0mdBXock40sqfdoY9u6Kyj9SJ1qQJ2cF5jqJxBrQDKGI9waXcHzp clWxhXCnA5lKc/1AMMUgW/f0BG7HK52KO1oEPUu7bxDnnGq6nf7N1DbPKPQdNyVi4HwU kx1YwHksT+mszrdN7IOQk8Zcr3KTOBkLe9YQFMsGY3rA4+MyQ7pDnFtvcHqvDObuVSNK 6N6w== X-Gm-Message-State: AA6/9RniyKogiKQ/vhvMQ/Kh3ZRTWi1g+O3CXc6OSjrqfOIQy3WOoa9FXXOgg2HhfWbqHQ== X-Received: by 10.66.197.197 with SMTP id iw5mr162457pac.130.1475529332138; Mon, 03 Oct 2016 14:15:32 -0700 (PDT) Received: from [192.168.100.50] (fp276ebe43.tkyc502.ap.nuro.jp. [39.110.190.67]) by smtp.gmail.com with ESMTPSA id jh3sm62794pac.16.2016.10.03.14.15.31 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 03 Oct 2016 14:15:31 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r306598 - head/sbin/ccdconfig From: Ngie Cooper X-Mailer: iPhone Mail (13G36) In-Reply-To: <13871739.SgV22gDlVU@ralph.baldwin.cx> Date: Tue, 4 Oct 2016 06:15:29 +0900 Cc: Konstantin Belousov , Sevan Janiyan , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, phk@phk.freebsd.dk Content-Transfer-Encoding: quoted-printable Message-Id: <40F6F841-0027-40DB-B0BA-BE78E8C84E54@gmail.com> References: <201610022319.u92NJ5d1006467@repo.freebsd.org> <20161003091557.GJ38409@kib.kiev.ua> <13871739.SgV22gDlVU@ralph.baldwin.cx> To: John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 21:15:32 -0000 > On Oct 4, 2016, at 04:08, John Baldwin wrote: >=20 >> On Monday, October 03, 2016 12:15:57 PM Konstantin Belousov wrote: >>> On Sun, Oct 02, 2016 at 11:19:05PM +0000, Sevan Janiyan wrote: >>> Author: sevan (doc committer) >>> Date: Sun Oct 2 23:19:05 2016 >>> New Revision: 306598 >>> URL: https://svnweb.freebsd.org/changeset/base/306598 >>>=20 >>> Log: >>> ccdconfig first appeared in NetBSD 1.1 >>> =46rom NetBSD man page, confirmed with repo tags in CVS [1] >>> (there was also no 1.0a release according to [2]) >>>=20 >>> [1] http://cvsweb.netbsd.org/bsdweb.cgi/src/sbin/ccdconfig/ccdconfig.c >>> [2] http://netbsd.org/releases/formal.html#history >>>=20 >>> PR: 212437 >>> Approved by: bcr (mentor) >>> Obtained from: NetBSD >>> MFC after: 4 days >>> Differential Revision: https://reviews.freebsd.org/D8105 >>>=20 >>> Modified: >>> head/sbin/ccdconfig/ccdconfig.8 >> Is ccd(4) still operational ? I suspect that it is not, and that >> sbin/ccdconfig and ccd(4) page should be removed. >=20 > There is geom_ccd so I think there's a decent chance it still works. Of > course, no one should be using it except for some legacy config. I'm not > sure if 12 is sufficiently divorced in time from when ccdconfig was still > something to use that we can remove it now. I brought up its removal about 2 years ago: https://lists.freebsd.org/piperm= ail/freebsd-arch/2014-December/016454.html . If my memory serves me correctl= y, I think phk replied in another subthread (not tracked via pipermail above= ), requesting that *ccd(4) remain in the tree. I'm CCing him, just in case. Thanks! -Ngie= From owner-svn-src-all@freebsd.org Mon Oct 3 21:42:06 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4B4CAF3047; Mon, 3 Oct 2016 21:42:06 +0000 (UTC) (envelope-from jmcneill@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B290AB5A; Mon, 3 Oct 2016 21:42:06 +0000 (UTC) (envelope-from jmcneill@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u93Lg5t1022911; Mon, 3 Oct 2016 21:42:05 GMT (envelope-from jmcneill@FreeBSD.org) Received: (from jmcneill@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u93Lg5q6022910; Mon, 3 Oct 2016 21:42:05 GMT (envelope-from jmcneill@FreeBSD.org) Message-Id: <201610032142.u93Lg5q6022910@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmcneill set sender to jmcneill@FreeBSD.org using -f From: Jared McNeill Date: Mon, 3 Oct 2016 21:42:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306658 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 21:42:07 -0000 Author: jmcneill Date: Mon Oct 3 21:42:05 2016 New Revision: 306658 URL: https://svnweb.freebsd.org/changeset/base/306658 Log: Clear GT_CTRL_ENABLE to stop the timer. Reviewed by: andrew Modified: head/sys/arm/arm/generic_timer.c Modified: head/sys/arm/arm/generic_timer.c ============================================================================== --- head/sys/arm/arm/generic_timer.c Mon Oct 3 20:48:18 2016 (r306657) +++ head/sys/arm/arm/generic_timer.c Mon Oct 3 21:42:05 2016 (r306658) @@ -259,7 +259,7 @@ arm_tmr_stop(struct eventtimer *et) sc = (struct arm_tmr_softc *)et->et_priv; ctrl = get_ctrl(sc->physical); - ctrl &= GT_CTRL_ENABLE; + ctrl &= ~GT_CTRL_ENABLE; set_ctrl(ctrl, sc->physical); return (0); From owner-svn-src-all@freebsd.org Mon Oct 3 22:11:48 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D07CAF374D; Mon, 3 Oct 2016 22:11:48 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED099D9D; Mon, 3 Oct 2016 22:11:47 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u93MBlYB034122; Mon, 3 Oct 2016 22:11:47 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u93MBkeE034110; Mon, 3 Oct 2016 22:11:46 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201610032211.u93MBkeE034110@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 3 Oct 2016 22:11:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306659 - in stable/10/sys/fs: nfs nfsclient nfsserver X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 22:11:48 -0000 Author: rmacklem Date: Mon Oct 3 22:11:45 2016 New Revision: 306659 URL: https://svnweb.freebsd.org/changeset/base/306659 Log: MFC: r304026 Update the nfsstats structure to include the changes needed by the patch in D1626 plus changes so that it includes counts for NFSv4.1 (and the draft of NFSv4.2). Also, make all the counts uint64_t and add a vers field at the beginning, so that future revisions can easily be implemented. There is code in place to handle the old vesion of the nfsstats structure for backwards binary compatibility. Subsequent commits will update nfsstat(8) to use the new fields. Modified: stable/10/sys/fs/nfs/nfs_commonkrpc.c stable/10/sys/fs/nfs/nfs_commonport.c stable/10/sys/fs/nfs/nfsport.h stable/10/sys/fs/nfs/nfsproto.h stable/10/sys/fs/nfsclient/nfs_clbio.c stable/10/sys/fs/nfsclient/nfs_clcomsubs.c stable/10/sys/fs/nfsclient/nfs_clstate.c stable/10/sys/fs/nfsclient/nfs_clsubs.c stable/10/sys/fs/nfsclient/nfs_clvfsops.c stable/10/sys/fs/nfsclient/nfs_clvnops.c stable/10/sys/fs/nfsserver/nfs_nfsdcache.c stable/10/sys/fs/nfsserver/nfs_nfsdport.c stable/10/sys/fs/nfsserver/nfs_nfsdsocket.c stable/10/sys/fs/nfsserver/nfs_nfsdstate.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfs/nfs_commonkrpc.c ============================================================================== --- stable/10/sys/fs/nfs/nfs_commonkrpc.c Mon Oct 3 21:42:05 2016 (r306658) +++ stable/10/sys/fs/nfs/nfs_commonkrpc.c Mon Oct 3 22:11:45 2016 (r306659) @@ -90,7 +90,7 @@ uint32_t nfscl_nfs4_done_probes[NFSV41_N NFSSTATESPINLOCK; NFSREQSPINLOCK; NFSDLOCKMUTEX; -extern struct nfsstats newnfsstats; +extern struct nfsstatsv1 nfsstatsv1; extern struct nfsreqhead nfsd_reqq; extern int nfscl_ticks; extern void (*ncl_call_invalcaches)(struct vnode *); @@ -643,7 +643,7 @@ newnfs_request(struct nfsrv_descript *nd procnum = NFSV4PROC_COMPOUND; if (nmp != NULL) { - NFSINCRGLOBAL(newnfsstats.rpcrequests); + NFSINCRGLOBAL(nfsstatsv1.rpcrequests); /* Map the procnum to the old NFSv2 one, as required. */ if ((nd->nd_flag & ND_NFSV2) != 0) { @@ -763,18 +763,18 @@ tryagain: if (stat == RPC_SUCCESS) { error = 0; } else if (stat == RPC_TIMEDOUT) { - NFSINCRGLOBAL(newnfsstats.rpctimeouts); + NFSINCRGLOBAL(nfsstatsv1.rpctimeouts); error = ETIMEDOUT; } else if (stat == RPC_VERSMISMATCH) { - NFSINCRGLOBAL(newnfsstats.rpcinvalid); + NFSINCRGLOBAL(nfsstatsv1.rpcinvalid); error = EOPNOTSUPP; } else if (stat == RPC_PROGVERSMISMATCH) { - NFSINCRGLOBAL(newnfsstats.rpcinvalid); + NFSINCRGLOBAL(nfsstatsv1.rpcinvalid); error = EPROTONOSUPPORT; } else if (stat == RPC_INTR) { error = EINTR; } else { - NFSINCRGLOBAL(newnfsstats.rpcinvalid); + NFSINCRGLOBAL(nfsstatsv1.rpcinvalid); error = EACCES; } if (error) { Modified: stable/10/sys/fs/nfs/nfs_commonport.c ============================================================================== --- stable/10/sys/fs/nfs/nfs_commonport.c Mon Oct 3 21:42:05 2016 (r306658) +++ stable/10/sys/fs/nfs/nfs_commonport.c Mon Oct 3 22:11:45 2016 (r306659) @@ -58,7 +58,7 @@ extern void (*nfsd_call_recall)(struct v extern int nfsrv_useacl; struct mount nfsv4root_mnt; int newnfs_numnfsd = 0; -struct nfsstats newnfsstats; +struct nfsstatsv1 nfsstatsv1; int nfs_numnfscbd = 0; int nfscl_debuglevel = 0; char nfsv4_callbackaddr[INET6_ADDRSTRLEN]; @@ -69,6 +69,7 @@ void (*ncl_call_invalcaches)(struct vnod static int nfs_realign_test; static int nfs_realign_count; +static struct ext_nfsstats oldnfsstats; SYSCTL_NODE(_vfs, OID_AUTO, nfs, CTLFLAG_RW, 0, "New NFS filesystem"); SYSCTL_INT(_vfs_nfs, OID_AUTO, realign_test, CTLFLAG_RW, &nfs_realign_test, @@ -447,9 +448,12 @@ nfssvc_nfscommon(struct thread *td, stru static int nfssvc_call(struct thread *p, struct nfssvc_args *uap, struct ucred *cred) { - int error = EINVAL; + int error = EINVAL, i, j; struct nfsd_idargs nid; struct nfsd_oidargs onid; + struct { + int vers; /* Just the first field of nfsstats. */ + } nfsstatver; if (uap->flag & NFSSVC_IDNAME) { if ((uap->flag & NFSSVC_NEWSTRUCT) != 0) @@ -473,63 +477,157 @@ nfssvc_call(struct thread *p, struct nfs error = nfssvc_idname(&nid); goto out; } else if (uap->flag & NFSSVC_GETSTATS) { - error = copyout(&newnfsstats, - CAST_USER_ADDR_T(uap->argp), sizeof (newnfsstats)); + if ((uap->flag & NFSSVC_NEWSTRUCT) == 0) { + /* Copy fields to the old ext_nfsstat structure. */ + oldnfsstats.attrcache_hits = + nfsstatsv1.attrcache_hits; + oldnfsstats.attrcache_misses = + nfsstatsv1.attrcache_misses; + oldnfsstats.lookupcache_hits = + nfsstatsv1.lookupcache_hits; + oldnfsstats.lookupcache_misses = + nfsstatsv1.lookupcache_misses; + oldnfsstats.direofcache_hits = + nfsstatsv1.direofcache_hits; + oldnfsstats.direofcache_misses = + nfsstatsv1.direofcache_misses; + oldnfsstats.accesscache_hits = + nfsstatsv1.accesscache_hits; + oldnfsstats.accesscache_misses = + nfsstatsv1.accesscache_misses; + oldnfsstats.biocache_reads = + nfsstatsv1.biocache_reads; + oldnfsstats.read_bios = + nfsstatsv1.read_bios; + oldnfsstats.read_physios = + nfsstatsv1.read_physios; + oldnfsstats.biocache_writes = + nfsstatsv1.biocache_writes; + oldnfsstats.write_bios = + nfsstatsv1.write_bios; + oldnfsstats.write_physios = + nfsstatsv1.write_physios; + oldnfsstats.biocache_readlinks = + nfsstatsv1.biocache_readlinks; + oldnfsstats.readlink_bios = + nfsstatsv1.readlink_bios; + oldnfsstats.biocache_readdirs = + nfsstatsv1.biocache_readdirs; + oldnfsstats.readdir_bios = + nfsstatsv1.readdir_bios; + for (i = 0; i < NFSV4_NPROCS; i++) + oldnfsstats.rpccnt[i] = nfsstatsv1.rpccnt[i]; + oldnfsstats.rpcretries = nfsstatsv1.rpcretries; + for (i = 0; i < NFSV4OP_NOPS; i++) + oldnfsstats.srvrpccnt[i] = + nfsstatsv1.srvrpccnt[i]; + for (i = NFSV42_NOPS, j = NFSV4OP_NOPS; + i < NFSV42_NOPS + NFSV4OP_FAKENOPS; i++, j++) + oldnfsstats.srvrpccnt[j] = + nfsstatsv1.srvrpccnt[i]; + oldnfsstats.srvrpc_errs = nfsstatsv1.srvrpc_errs; + oldnfsstats.srv_errs = nfsstatsv1.srv_errs; + oldnfsstats.rpcrequests = nfsstatsv1.rpcrequests; + oldnfsstats.rpctimeouts = nfsstatsv1.rpctimeouts; + oldnfsstats.rpcunexpected = nfsstatsv1.rpcunexpected; + oldnfsstats.rpcinvalid = nfsstatsv1.rpcinvalid; + oldnfsstats.srvcache_inproghits = + nfsstatsv1.srvcache_inproghits; + oldnfsstats.srvcache_idemdonehits = + nfsstatsv1.srvcache_idemdonehits; + oldnfsstats.srvcache_nonidemdonehits = + nfsstatsv1.srvcache_nonidemdonehits; + oldnfsstats.srvcache_misses = + nfsstatsv1.srvcache_misses; + oldnfsstats.srvcache_tcppeak = + nfsstatsv1.srvcache_tcppeak; + oldnfsstats.srvcache_size = nfsstatsv1.srvcache_size; + oldnfsstats.srvclients = nfsstatsv1.srvclients; + oldnfsstats.srvopenowners = nfsstatsv1.srvopenowners; + oldnfsstats.srvopens = nfsstatsv1.srvopens; + oldnfsstats.srvlockowners = nfsstatsv1.srvlockowners; + oldnfsstats.srvlocks = nfsstatsv1.srvlocks; + oldnfsstats.srvdelegates = nfsstatsv1.srvdelegates; + for (i = 0; i < NFSV4OP_CBNOPS; i++) + oldnfsstats.cbrpccnt[i] = + nfsstatsv1.cbrpccnt[i]; + oldnfsstats.clopenowners = nfsstatsv1.clopenowners; + oldnfsstats.clopens = nfsstatsv1.clopens; + oldnfsstats.cllockowners = nfsstatsv1.cllockowners; + oldnfsstats.cllocks = nfsstatsv1.cllocks; + oldnfsstats.cldelegates = nfsstatsv1.cldelegates; + oldnfsstats.cllocalopenowners = + nfsstatsv1.cllocalopenowners; + oldnfsstats.cllocalopens = nfsstatsv1.cllocalopens; + oldnfsstats.cllocallockowners = + nfsstatsv1.cllocallockowners; + oldnfsstats.cllocallocks = nfsstatsv1.cllocallocks; + error = copyout(&oldnfsstats, uap->argp, + sizeof (oldnfsstats)); + } else { + error = copyin(uap->argp, &nfsstatver, + sizeof(nfsstatver)); + if (error == 0 && nfsstatver.vers != NFSSTATS_V1) + error = EPERM; + if (error == 0) + error = copyout(&nfsstatsv1, uap->argp, + sizeof (nfsstatsv1)); + } if (error == 0) { if ((uap->flag & NFSSVC_ZEROCLTSTATS) != 0) { - newnfsstats.attrcache_hits = 0; - newnfsstats.attrcache_misses = 0; - newnfsstats.lookupcache_hits = 0; - newnfsstats.lookupcache_misses = 0; - newnfsstats.direofcache_hits = 0; - newnfsstats.direofcache_misses = 0; - newnfsstats.accesscache_hits = 0; - newnfsstats.accesscache_misses = 0; - newnfsstats.biocache_reads = 0; - newnfsstats.read_bios = 0; - newnfsstats.read_physios = 0; - newnfsstats.biocache_writes = 0; - newnfsstats.write_bios = 0; - newnfsstats.write_physios = 0; - newnfsstats.biocache_readlinks = 0; - newnfsstats.readlink_bios = 0; - newnfsstats.biocache_readdirs = 0; - newnfsstats.readdir_bios = 0; - newnfsstats.rpcretries = 0; - newnfsstats.rpcrequests = 0; - newnfsstats.rpctimeouts = 0; - newnfsstats.rpcunexpected = 0; - newnfsstats.rpcinvalid = 0; - bzero(newnfsstats.rpccnt, - sizeof(newnfsstats.rpccnt)); + nfsstatsv1.attrcache_hits = 0; + nfsstatsv1.attrcache_misses = 0; + nfsstatsv1.lookupcache_hits = 0; + nfsstatsv1.lookupcache_misses = 0; + nfsstatsv1.direofcache_hits = 0; + nfsstatsv1.direofcache_misses = 0; + nfsstatsv1.accesscache_hits = 0; + nfsstatsv1.accesscache_misses = 0; + nfsstatsv1.biocache_reads = 0; + nfsstatsv1.read_bios = 0; + nfsstatsv1.read_physios = 0; + nfsstatsv1.biocache_writes = 0; + nfsstatsv1.write_bios = 0; + nfsstatsv1.write_physios = 0; + nfsstatsv1.biocache_readlinks = 0; + nfsstatsv1.readlink_bios = 0; + nfsstatsv1.biocache_readdirs = 0; + nfsstatsv1.readdir_bios = 0; + nfsstatsv1.rpcretries = 0; + nfsstatsv1.rpcrequests = 0; + nfsstatsv1.rpctimeouts = 0; + nfsstatsv1.rpcunexpected = 0; + nfsstatsv1.rpcinvalid = 0; + bzero(nfsstatsv1.rpccnt, + sizeof(nfsstatsv1.rpccnt)); } if ((uap->flag & NFSSVC_ZEROSRVSTATS) != 0) { - newnfsstats.srvrpc_errs = 0; - newnfsstats.srv_errs = 0; - newnfsstats.srvcache_inproghits = 0; - newnfsstats.srvcache_idemdonehits = 0; - newnfsstats.srvcache_nonidemdonehits = 0; - newnfsstats.srvcache_misses = 0; - newnfsstats.srvcache_tcppeak = 0; - newnfsstats.srvclients = 0; - newnfsstats.srvopenowners = 0; - newnfsstats.srvopens = 0; - newnfsstats.srvlockowners = 0; - newnfsstats.srvlocks = 0; - newnfsstats.srvdelegates = 0; - newnfsstats.clopenowners = 0; - newnfsstats.clopens = 0; - newnfsstats.cllockowners = 0; - newnfsstats.cllocks = 0; - newnfsstats.cldelegates = 0; - newnfsstats.cllocalopenowners = 0; - newnfsstats.cllocalopens = 0; - newnfsstats.cllocallockowners = 0; - newnfsstats.cllocallocks = 0; - bzero(newnfsstats.srvrpccnt, - sizeof(newnfsstats.srvrpccnt)); - bzero(newnfsstats.cbrpccnt, - sizeof(newnfsstats.cbrpccnt)); + nfsstatsv1.srvrpc_errs = 0; + nfsstatsv1.srv_errs = 0; + nfsstatsv1.srvcache_inproghits = 0; + nfsstatsv1.srvcache_idemdonehits = 0; + nfsstatsv1.srvcache_nonidemdonehits = 0; + nfsstatsv1.srvcache_misses = 0; + nfsstatsv1.srvcache_tcppeak = 0; + nfsstatsv1.srvclients = 0; + nfsstatsv1.srvopenowners = 0; + nfsstatsv1.srvopens = 0; + nfsstatsv1.srvlockowners = 0; + nfsstatsv1.srvlocks = 0; + nfsstatsv1.srvdelegates = 0; + nfsstatsv1.clopenowners = 0; + nfsstatsv1.clopens = 0; + nfsstatsv1.cllockowners = 0; + nfsstatsv1.cllocks = 0; + nfsstatsv1.cldelegates = 0; + nfsstatsv1.cllocalopenowners = 0; + nfsstatsv1.cllocalopens = 0; + nfsstatsv1.cllocallockowners = 0; + nfsstatsv1.cllocallocks = 0; + bzero(nfsstatsv1.srvrpccnt, + sizeof(nfsstatsv1.srvrpccnt)); + bzero(nfsstatsv1.cbrpccnt, + sizeof(nfsstatsv1.cbrpccnt)); } } goto out; Modified: stable/10/sys/fs/nfs/nfsport.h ============================================================================== --- stable/10/sys/fs/nfs/nfsport.h Mon Oct 3 21:42:05 2016 (r306658) +++ stable/10/sys/fs/nfs/nfsport.h Mon Oct 3 22:11:45 2016 (r306659) @@ -55,6 +55,7 @@ #include #include #include +#include #include #include #include @@ -253,24 +254,26 @@ /* * Must be one more than last op#. + * NFSv4.2 isn't implemented yet, but define the op# limit for it. */ #define NFSV41_NOPS 59 +#define NFSV42_NOPS 72 /* Quirky case if the illegal op code */ #define NFSV4OP_OPILLEGAL 10044 /* - * Fake NFSV4OP_xxx used for nfsstat. Start at NFSV4OP_NOPS. + * Fake NFSV4OP_xxx used for nfsstat. Start at NFSV42_NOPS. */ -#define NFSV4OP_SYMLINK (NFSV4OP_NOPS) -#define NFSV4OP_MKDIR (NFSV4OP_NOPS + 1) -#define NFSV4OP_RMDIR (NFSV4OP_NOPS + 2) -#define NFSV4OP_READDIRPLUS (NFSV4OP_NOPS + 3) -#define NFSV4OP_MKNOD (NFSV4OP_NOPS + 4) -#define NFSV4OP_FSSTAT (NFSV4OP_NOPS + 5) -#define NFSV4OP_FSINFO (NFSV4OP_NOPS + 6) -#define NFSV4OP_PATHCONF (NFSV4OP_NOPS + 7) -#define NFSV4OP_V3CREATE (NFSV4OP_NOPS + 8) +#define NFSV4OP_SYMLINK (NFSV42_NOPS) +#define NFSV4OP_MKDIR (NFSV42_NOPS + 1) +#define NFSV4OP_RMDIR (NFSV42_NOPS + 2) +#define NFSV4OP_READDIRPLUS (NFSV42_NOPS + 3) +#define NFSV4OP_MKNOD (NFSV42_NOPS + 4) +#define NFSV4OP_FSSTAT (NFSV42_NOPS + 5) +#define NFSV4OP_FSINFO (NFSV42_NOPS + 6) +#define NFSV4OP_PATHCONF (NFSV42_NOPS + 7) +#define NFSV4OP_V3CREATE (NFSV42_NOPS + 8) /* * This is the count of the fake operations listed above. @@ -284,12 +287,12 @@ #define NFSV4OP_CBRECALL 4 /* - * Must be one greater than the last Callback Operation#. + * Must be one greater than the last Callback Operation# for NFSv4.0. */ #define NFSV4OP_CBNOPS 5 /* - * Additional Callback Ops for NFSv4.1 only. Not yet in nfsstats. + * Additional Callback Ops for NFSv4.1 only. */ #define NFSV4OP_CBLAYOUTRECALL 5 #define NFSV4OP_CBNOTIFY 6 @@ -302,6 +305,9 @@ #define NFSV4OP_CBNOTIFYLOCK 13 #define NFSV4OP_CBNOTIFYDEVID 14 +#define NFSV41_CBNOPS 15 +#define NFSV42_CBNOPS 16 + /* * The lower numbers -> 21 are used by NFSv2 and v3. These define higher * numbers used by NFSv4. @@ -359,7 +365,72 @@ #endif /* NFS_V3NPROCS */ /* - * Stats structure + * New stats structure. + * The vers field will be set to NFSSTATS_V1 by the caller. + */ +#define NFSSTATS_V1 1 +struct nfsstatsv1 { + int vers; /* Set to version requested by caller. */ + uint64_t attrcache_hits; + uint64_t attrcache_misses; + uint64_t lookupcache_hits; + uint64_t lookupcache_misses; + uint64_t direofcache_hits; + uint64_t direofcache_misses; + uint64_t accesscache_hits; + uint64_t accesscache_misses; + uint64_t biocache_reads; + uint64_t read_bios; + uint64_t read_physios; + uint64_t biocache_writes; + uint64_t write_bios; + uint64_t write_physios; + uint64_t biocache_readlinks; + uint64_t readlink_bios; + uint64_t biocache_readdirs; + uint64_t readdir_bios; + uint64_t rpccnt[NFSV41_NPROCS + 15]; + uint64_t rpcretries; + uint64_t srvrpccnt[NFSV42_NOPS + NFSV4OP_FAKENOPS]; + uint64_t srvrpc_errs; + uint64_t srv_errs; + uint64_t rpcrequests; + uint64_t rpctimeouts; + uint64_t rpcunexpected; + uint64_t rpcinvalid; + uint64_t srvcache_inproghits; + uint64_t srvcache_idemdonehits; + uint64_t srvcache_nonidemdonehits; + uint64_t srvcache_misses; + uint64_t srvcache_tcppeak; + int srvcache_size; /* Updated by atomic_xx_int(). */ + uint64_t srvclients; + uint64_t srvopenowners; + uint64_t srvopens; + uint64_t srvlockowners; + uint64_t srvlocks; + uint64_t srvdelegates; + uint64_t cbrpccnt[NFSV42_CBNOPS]; + uint64_t clopenowners; + uint64_t clopens; + uint64_t cllockowners; + uint64_t cllocks; + uint64_t cldelegates; + uint64_t cllocalopenowners; + uint64_t cllocalopens; + uint64_t cllocallockowners; + uint64_t cllocallocks; + uint64_t srvstartcnt; + uint64_t srvdonecnt; + uint64_t srvbytes[NFSV42_NOPS + NFSV4OP_FAKENOPS]; + uint64_t srvops[NFSV42_NOPS + NFSV4OP_FAKENOPS]; + struct bintime srvduration[NFSV42_NOPS + NFSV4OP_FAKENOPS]; + struct bintime busyfrom; + struct bintime busytime; +}; + +/* + * Old stats structure. */ struct ext_nfsstats { int attrcache_hits; @@ -415,11 +486,6 @@ struct ext_nfsstats { #ifdef _KERNEL /* - * Define the ext_nfsstats as nfsstats for the kernel code. - */ -#define nfsstats ext_nfsstats - -/* * Define NFS_NPROCS as NFSV4_NPROCS for the experimental kernel code. */ #ifndef NFS_NPROCS Modified: stable/10/sys/fs/nfs/nfsproto.h ============================================================================== --- stable/10/sys/fs/nfs/nfsproto.h Mon Oct 3 21:42:05 2016 (r306658) +++ stable/10/sys/fs/nfs/nfsproto.h Mon Oct 3 22:11:45 2016 (r306659) @@ -345,10 +345,10 @@ /* * NFSPROC_NOOP is a fake op# that can't be the same as any V2/3/4 Procedure - * or Operation#. Since the NFS V4 Op #s go higher, use NFSV41_NOPS, which + * or Operation#. Since the NFS V4 Op #s go higher, use NFSV42_NOPS, which * is one greater than the highest Op#. */ -#define NFSPROC_NOOP NFSV41_NOPS +#define NFSPROC_NOOP NFSV42_NOPS /* Actual Version 2 procedure numbers */ #define NFSV2PROC_NULL 0 Modified: stable/10/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clbio.c Mon Oct 3 21:42:05 2016 (r306658) +++ stable/10/sys/fs/nfsclient/nfs_clbio.c Mon Oct 3 22:11:45 2016 (r306659) @@ -62,7 +62,7 @@ __FBSDID("$FreeBSD$"); #include extern int newnfs_directio_allow_mmap; -extern struct nfsstats newnfsstats; +extern struct nfsstatsv1 nfsstatsv1; extern struct mtx ncl_iod_mutex; extern int ncl_numasync; extern enum nfsiod_state ncl_iodwant[NFS_MAXASYNCDAEMON]; @@ -482,7 +482,7 @@ ncl_bioread(struct vnode *vp, struct uio switch (vp->v_type) { case VREG: - NFSINCRGLOBAL(newnfsstats.biocache_reads); + NFSINCRGLOBAL(nfsstatsv1.biocache_reads); lbn = uio->uio_offset / biosize; on = uio->uio_offset - (lbn * biosize); @@ -559,7 +559,7 @@ ncl_bioread(struct vnode *vp, struct uio n = MIN((unsigned)(bcount - on), uio->uio_resid); break; case VLNK: - NFSINCRGLOBAL(newnfsstats.biocache_readlinks); + NFSINCRGLOBAL(nfsstatsv1.biocache_readlinks); bp = nfs_getcacheblk(vp, (daddr_t)0, NFS_MAXPATHLEN, td); if (!bp) { error = newnfs_sigintr(nmp, td); @@ -579,7 +579,7 @@ ncl_bioread(struct vnode *vp, struct uio on = 0; break; case VDIR: - NFSINCRGLOBAL(newnfsstats.biocache_readdirs); + NFSINCRGLOBAL(nfsstatsv1.biocache_readdirs); if (np->n_direofoffset && uio->uio_offset >= np->n_direofoffset) { return (0); @@ -1008,7 +1008,7 @@ ncl_write(struct vop_write_args *ap) } } - NFSINCRGLOBAL(newnfsstats.biocache_writes); + NFSINCRGLOBAL(nfsstatsv1.biocache_writes); lbn = uio->uio_offset / biosize; on = uio->uio_offset - (lbn * biosize); n = MIN((unsigned)(biosize - on), uio->uio_resid); @@ -1622,7 +1622,7 @@ ncl_doio(struct vnode *vp, struct buf *b switch (vp->v_type) { case VREG: uiop->uio_offset = ((off_t)bp->b_blkno) * DEV_BSIZE; - NFSINCRGLOBAL(newnfsstats.read_bios); + NFSINCRGLOBAL(nfsstatsv1.read_bios); error = ncl_readrpc(vp, uiop, cr); if (!error) { @@ -1657,11 +1657,11 @@ ncl_doio(struct vnode *vp, struct buf *b break; case VLNK: uiop->uio_offset = (off_t)0; - NFSINCRGLOBAL(newnfsstats.readlink_bios); + NFSINCRGLOBAL(nfsstatsv1.readlink_bios); error = ncl_readlinkrpc(vp, uiop, cr); break; case VDIR: - NFSINCRGLOBAL(newnfsstats.readdir_bios); + NFSINCRGLOBAL(nfsstatsv1.readdir_bios); uiop->uio_offset = ((u_quad_t)bp->b_lblkno) * NFS_DIRBLKSIZ; if ((nmp->nm_flag & NFSMNT_RDIRPLUS) != 0) { error = ncl_readdirplusrpc(vp, uiop, cr, td); @@ -1723,7 +1723,7 @@ ncl_doio(struct vnode *vp, struct buf *b + bp->b_dirtyoff; io.iov_base = (char *)bp->b_data + bp->b_dirtyoff; uiop->uio_rw = UIO_WRITE; - NFSINCRGLOBAL(newnfsstats.write_bios); + NFSINCRGLOBAL(nfsstatsv1.write_bios); if ((bp->b_flags & (B_ASYNC | B_NEEDCOMMIT | B_NOCACHE | B_CLUSTER)) == B_ASYNC) iomode = NFSWRITE_UNSTABLE; Modified: stable/10/sys/fs/nfsclient/nfs_clcomsubs.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clcomsubs.c Mon Oct 3 21:42:05 2016 (r306658) +++ stable/10/sys/fs/nfsclient/nfs_clcomsubs.c Mon Oct 3 22:11:45 2016 (r306659) @@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$"); #ifndef APPLEKEXT #include -extern struct nfsstats newnfsstats; +extern struct nfsstatsv1 nfsstatsv1; extern struct nfsv4_opflag nfsv4_opflag[NFSV41_NOPS]; extern int ncl_mbuf_mlen; extern enum vtype newnv2tov_type[8]; @@ -241,8 +241,8 @@ nfscl_reqstart(struct nfsrv_descript *nd } else { (void) nfsm_fhtom(nd, nfhp, fhlen, 0); } - if (procnum < NFSV4_NPROCS) - NFSINCRGLOBAL(newnfsstats.rpccnt[procnum]); + if (procnum < NFSV41_NPROCS) + NFSINCRGLOBAL(nfsstatsv1.rpccnt[procnum]); } #ifndef APPLE Modified: stable/10/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clstate.c Mon Oct 3 21:42:05 2016 (r306658) +++ stable/10/sys/fs/nfsclient/nfs_clstate.c Mon Oct 3 22:11:45 2016 (r306659) @@ -84,7 +84,7 @@ __FBSDID("$FreeBSD$"); /* * Global variables */ -extern struct nfsstats newnfsstats; +extern struct nfsstatsv1 nfsstatsv1; extern struct nfsreqhead nfsd_reqq; extern u_int32_t newnfs_false, newnfs_true; extern int nfscl_debuglevel; @@ -343,10 +343,10 @@ nfscl_newopen(struct nfsclclient *clp, s nowp->nfsow_defunct = 0; nfscl_lockinit(&nowp->nfsow_rwlock); if (dp != NULL) { - newnfsstats.cllocalopenowners++; + nfsstatsv1.cllocalopenowners++; LIST_INSERT_HEAD(&dp->nfsdl_owner, nowp, nfsow_list); } else { - newnfsstats.clopenowners++; + nfsstatsv1.clopenowners++; LIST_INSERT_HEAD(&clp->nfsc_owner, nowp, nfsow_list); } owp = *owpp = nowp; @@ -380,9 +380,9 @@ nfscl_newopen(struct nfsclclient *clp, s TAILQ_INSERT_HEAD(&clp->nfsc_deleg, dp, nfsdl_list); dp->nfsdl_timestamp = NFSD_MONOSEC + 120; - newnfsstats.cllocalopens++; + nfsstatsv1.cllocalopens++; } else { - newnfsstats.clopens++; + nfsstatsv1.clopens++; } LIST_INSERT_HEAD(&owp->nfsow_open, nop, nfso_list); *opp = nop; @@ -430,7 +430,7 @@ nfscl_deleg(mount_t mp, struct nfsclclie LIST_INSERT_HEAD(NFSCLDELEGHASH(clp, nfhp, fhlen), dp, nfsdl_hash); dp->nfsdl_timestamp = NFSD_MONOSEC + 120; - newnfsstats.cldelegates++; + nfsstatsv1.cldelegates++; nfscl_delegcnt++; } else { /* @@ -1071,10 +1071,10 @@ nfscl_getbytelock(vnode_t vp, u_int64_t LIST_INIT(&nlp->nfsl_lock); if (donelocally) { nlp->nfsl_open = NULL; - newnfsstats.cllocallockowners++; + nfsstatsv1.cllocallockowners++; } else { nlp->nfsl_open = op; - newnfsstats.cllockowners++; + nfsstatsv1.cllockowners++; } LIST_INSERT_HEAD(lhp, nlp, nfsl_list); lp = nlp; @@ -1402,9 +1402,9 @@ nfscl_freeopen(struct nfsclopen *op, int nfscl_freealllocks(&op->nfso_lock, local); FREE((caddr_t)op, M_NFSCLOPEN); if (local) - newnfsstats.cllocalopens--; + nfsstatsv1.cllocalopens--; else - newnfsstats.clopens--; + nfsstatsv1.clopens--; } /* @@ -1483,9 +1483,9 @@ nfscl_freeopenowner(struct nfsclowner *o LIST_REMOVE(owp, nfsow_list); FREE((caddr_t)owp, M_NFSCLOWNER); if (local) - newnfsstats.cllocalopenowners--; + nfsstatsv1.cllocalopenowners--; else - newnfsstats.clopenowners--; + nfsstatsv1.clopenowners--; } /* @@ -1502,9 +1502,9 @@ nfscl_freelockowner(struct nfscllockowne } FREE((caddr_t)lp, M_NFSCLLOCKOWNER); if (local) - newnfsstats.cllocallockowners--; + nfsstatsv1.cllocallockowners--; else - newnfsstats.cllockowners--; + nfsstatsv1.cllockowners--; } /* @@ -1517,9 +1517,9 @@ nfscl_freelock(struct nfscllock *lop, in LIST_REMOVE(lop, nfslo_list); FREE((caddr_t)lop, M_NFSCLLOCK); if (local) - newnfsstats.cllocallocks--; + nfsstatsv1.cllocallocks--; else - newnfsstats.cllocks--; + nfsstatsv1.cllocks--; } /* @@ -1553,7 +1553,7 @@ nfscl_freedeleg(struct nfscldeleghead *h TAILQ_REMOVE(hdp, dp, nfsdl_list); LIST_REMOVE(dp, nfsdl_hash); FREE((caddr_t)dp, M_NFSCLDELEG); - newnfsstats.cldelegates--; + nfsstatsv1.cldelegates--; nfscl_delegcnt--; } @@ -1621,18 +1621,18 @@ nfscl_expireclient(struct nfsclclient *c LIST_REMOVE(op, nfso_list); op->nfso_own = towp; LIST_INSERT_HEAD(&towp->nfsow_open, op, nfso_list); - newnfsstats.cllocalopens--; - newnfsstats.clopens++; + nfsstatsv1.cllocalopens--; + nfsstatsv1.clopens++; } } else { /* Just add the openowner to the client list */ LIST_REMOVE(owp, nfsow_list); owp->nfsow_clp = clp; LIST_INSERT_HEAD(&clp->nfsc_owner, owp, nfsow_list); - newnfsstats.cllocalopenowners--; - newnfsstats.clopenowners++; - newnfsstats.cllocalopens--; - newnfsstats.clopens++; + nfsstatsv1.cllocalopenowners--; + nfsstatsv1.clopenowners++; + nfsstatsv1.cllocalopens--; + nfsstatsv1.clopens++; } } owp = nowp; @@ -2282,9 +2282,9 @@ nfscl_insertlock(struct nfscllockowner * else LIST_INSERT_AFTER(insert_lop, new_lop, nfslo_list); if (local) - newnfsstats.cllocallocks++; + nfsstatsv1.cllocallocks++; else - newnfsstats.cllocks++; + nfsstatsv1.cllocks++; } /* @@ -2571,7 +2571,7 @@ tryagain: LIST_REMOVE(dp, nfsdl_hash); TAILQ_INSERT_HEAD(&dh, dp, nfsdl_list); nfscl_delegcnt--; - newnfsstats.cldelegates--; + nfsstatsv1.cldelegates--; } NFSLOCKCLSTATE(); } @@ -2612,7 +2612,7 @@ tryagain: LIST_REMOVE(dp, nfsdl_hash); TAILQ_INSERT_HEAD(&dh, dp, nfsdl_list); nfscl_delegcnt--; - newnfsstats.cldelegates--; + nfsstatsv1.cldelegates--; } } dp = ndp; @@ -3215,8 +3215,8 @@ nfscl_docb(struct nfsrv_descript *nd, NF break; } nd->nd_procnum = op; - if (op < NFSV4OP_CBNOPS) - newnfsstats.cbrpccnt[nd->nd_procnum]++; + if (op < NFSV41_CBNOPS) + nfsstatsv1.cbrpccnt[nd->nd_procnum]++; switch (op) { case NFSV4OP_CBGETATTR: NFSCL_DEBUG(4, "cbgetattr\n"); Modified: stable/10/sys/fs/nfsclient/nfs_clsubs.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clsubs.c Mon Oct 3 21:42:05 2016 (r306658) +++ stable/10/sys/fs/nfsclient/nfs_clsubs.c Mon Oct 3 22:11:45 2016 (r306659) @@ -85,7 +85,7 @@ extern enum nfsiod_state ncl_iodwant[NFS extern struct nfsmount *ncl_iodmount[NFS_MAXASYNCDAEMON]; extern int ncl_numasync; extern unsigned int ncl_iodmax; -extern struct nfsstats newnfsstats; +extern struct nfsstatsv1 nfsstatsv1; struct task ncl_nfsiodnew_task; @@ -221,12 +221,12 @@ ncl_getattrcache(struct vnode *vp, struc if ((time_second - np->n_attrstamp) >= timeo && (mustflush != 0 || np->n_attrstamp == 0)) { - newnfsstats.attrcache_misses++; + nfsstatsv1.attrcache_misses++; mtx_unlock(&np->n_mtx); KDTRACE_NFS_ATTRCACHE_GET_MISS(vp); return( ENOENT); } - newnfsstats.attrcache_hits++; + nfsstatsv1.attrcache_hits++; if (vap->va_size != np->n_size) { if (vap->va_type == VREG) { if (np->n_flag & NMODIFIED) { Modified: stable/10/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clvfsops.c Mon Oct 3 21:42:05 2016 (r306658) +++ stable/10/sys/fs/nfsclient/nfs_clvfsops.c Mon Oct 3 22:11:45 2016 (r306659) @@ -78,7 +78,6 @@ FEATURE(nfscl, "NFSv4 client"); extern int nfscl_ticks; extern struct timeval nfsboottime; -extern struct nfsstats newnfsstats; extern int nfsrv_useacl; extern int nfscl_debuglevel; extern enum nfsiod_state ncl_iodwant[NFS_MAXASYNCDAEMON]; Modified: stable/10/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clvnops.c Mon Oct 3 21:42:05 2016 (r306658) +++ stable/10/sys/fs/nfsclient/nfs_clvnops.c Mon Oct 3 22:11:45 2016 (r306659) @@ -101,7 +101,7 @@ uint32_t nfscl_accesscache_load_done_id; #define TRUE 1 #define FALSE 0 -extern struct nfsstats newnfsstats; +extern struct nfsstatsv1 nfsstatsv1; extern int nfsrv_useacl; extern int nfscl_debuglevel; MALLOC_DECLARE(M_NEWNFSREQ); @@ -259,14 +259,6 @@ int newnfs_directio_allow_mmap = 1; SYSCTL_INT(_vfs_nfs, OID_AUTO, nfs_directio_allow_mmap, CTLFLAG_RW, &newnfs_directio_allow_mmap, 0, "Enable mmaped IO on file with O_DIRECT opens"); -#if 0 -SYSCTL_INT(_vfs_nfs, OID_AUTO, access_cache_hits, CTLFLAG_RD, - &newnfsstats.accesscache_hits, 0, "NFS ACCESS cache hit count"); - -SYSCTL_INT(_vfs_nfs, OID_AUTO, access_cache_misses, CTLFLAG_RD, - &newnfsstats.accesscache_misses, 0, "NFS ACCESS cache miss count"); -#endif - #define NFSACCESS_ALL (NFSACCESS_READ | NFSACCESS_MODIFY \ | NFSACCESS_EXTEND | NFSACCESS_EXECUTE \ | NFSACCESS_DELETE | NFSACCESS_LOOKUP) @@ -419,7 +411,7 @@ nfs_access(struct vop_access_args *ap) if (time_second < (np->n_accesscache[i].stamp + nfsaccess_cache_timeout) && (np->n_accesscache[i].mode & mode) == mode) { - NFSINCRGLOBAL(newnfsstats.accesscache_hits); + NFSINCRGLOBAL(nfsstatsv1.accesscache_hits); gotahit = 1; } break; @@ -438,7 +430,7 @@ nfs_access(struct vop_access_args *ap) /* * Either a no, or a don't know. Go to the wire. */ - NFSINCRGLOBAL(newnfsstats.accesscache_misses); + NFSINCRGLOBAL(nfsstatsv1.accesscache_misses); error = nfs34_access_otw(vp, wmode, ap->a_td, ap->a_cred, &rmode); if (!error && @@ -858,7 +850,7 @@ nfs_getattr(struct vop_getattr_args *ap) if (NFS_ISV34(vp) && nfs_prime_access_cache && nfsaccess_cache_timeout > 0) { - NFSINCRGLOBAL(newnfsstats.accesscache_misses); + NFSINCRGLOBAL(nfsstatsv1.accesscache_misses); nfs34_access_otw(vp, NFSACCESS_ALL, td, ap->a_cred, NULL); if (ncl_getattrcache(vp, ap->a_vap) == 0) { nfscl_deleggetmodtime(vp, &ap->a_vap->va_mtime); @@ -1115,7 +1107,7 @@ nfs_lookup(struct vop_lookup_args *ap) ((u_int)(ticks - ncticks) < (nmp->nm_nametimeo * hz) && VOP_GETATTR(newvp, &vattr, cnp->cn_cred) == 0 && timespeccmp(&vattr.va_ctime, &nctime, ==))) { - NFSINCRGLOBAL(newnfsstats.lookupcache_hits); + NFSINCRGLOBAL(nfsstatsv1.lookupcache_hits); if (cnp->cn_nameiop != LOOKUP && (flags & ISLASTCN)) cnp->cn_flags |= SAVENAME; @@ -1142,7 +1134,7 @@ nfs_lookup(struct vop_lookup_args *ap) if ((u_int)(ticks - ncticks) < (nmp->nm_negnametimeo * hz) && VOP_GETATTR(dvp, &vattr, cnp->cn_cred) == 0 && timespeccmp(&vattr.va_mtime, &nctime, ==)) { - NFSINCRGLOBAL(newnfsstats.lookupcache_hits); + NFSINCRGLOBAL(nfsstatsv1.lookupcache_hits); return (ENOENT); } cache_purge_negative(dvp); @@ -1150,7 +1142,7 @@ nfs_lookup(struct vop_lookup_args *ap) error = 0; newvp = NULLVP; - NFSINCRGLOBAL(newnfsstats.lookupcache_misses); + NFSINCRGLOBAL(nfsstatsv1.lookupcache_misses); error = nfsrpc_lookup(dvp, cnp->cn_nameptr, cnp->cn_namelen, cnp->cn_cred, td, &dnfsva, &nfsva, &nfhp, &attrflag, &dattrflag, NULL); @@ -2228,7 +2220,7 @@ nfs_readdir(struct vop_readdir_args *ap) if ((NFS_ISV4(vp) && np->n_change == vattr.va_filerev) || !NFS_TIMESPEC_COMPARE(&np->n_mtime, &vattr.va_mtime)) { mtx_unlock(&np->n_mtx); - NFSINCRGLOBAL(newnfsstats.direofcache_hits); + NFSINCRGLOBAL(nfsstatsv1.direofcache_hits); if (ap->a_eofflag != NULL) *ap->a_eofflag = 1; return (0); @@ -2255,7 +2247,7 @@ nfs_readdir(struct vop_readdir_args *ap) error = ncl_bioread(vp, uio, 0, ap->a_cred); if (!error && uio->uio_resid == tresid) { - NFSINCRGLOBAL(newnfsstats.direofcache_misses); + NFSINCRGLOBAL(nfsstatsv1.direofcache_misses); if (ap->a_eofflag != NULL) *ap->a_eofflag = 1; } Modified: stable/10/sys/fs/nfsserver/nfs_nfsdcache.c ============================================================================== --- stable/10/sys/fs/nfsserver/nfs_nfsdcache.c Mon Oct 3 21:42:05 2016 (r306658) +++ stable/10/sys/fs/nfsserver/nfs_nfsdcache.c Mon Oct 3 22:11:45 2016 (r306659) @@ -159,7 +159,7 @@ __FBSDID("$FreeBSD$"); #ifndef APPLEKEXT #include -extern struct nfsstats newnfsstats; +extern struct nfsstatsv1 nfsstatsv1; extern struct mtx nfsrc_udpmtx; extern struct nfsrchash_bucket nfsrchash_table[NFSRVCACHE_HASHSIZE]; extern struct nfsrchash_bucket nfsrcahash_table[NFSRVCACHE_HASHSIZE]; @@ -318,8 +318,8 @@ nfsrvd_initcache(void) TAILQ_INIT(&nfsrvudplru); nfsrc_tcpsavedreplies = 0; nfsrc_udpcachesize = 0; - newnfsstats.srvcache_tcppeak = 0; - newnfsstats.srvcache_size = 0; + nfsstatsv1.srvcache_tcppeak = 0; + nfsstatsv1.srvcache_size = 0; } /* @@ -395,14 +395,14 @@ loop: TAILQ_REMOVE(&nfsrvudplru, rp, rc_lru); TAILQ_INSERT_TAIL(&nfsrvudplru, rp, rc_lru); if (rp->rc_flag & RC_INPROG) { - newnfsstats.srvcache_inproghits++; + nfsstatsv1.srvcache_inproghits++; mtx_unlock(mutex); ret = RC_DROPIT; } else if (rp->rc_flag & RC_REPSTATUS) { /* * V2 only. */ - newnfsstats.srvcache_nonidemdonehits++; + nfsstatsv1.srvcache_nonidemdonehits++; mtx_unlock(mutex); nfsrvd_rephead(nd); *(nd->nd_errp) = rp->rc_status; @@ -410,7 +410,7 @@ loop: rp->rc_timestamp = NFSD_MONOSEC + NFSRVCACHE_UDPTIMEOUT; } else if (rp->rc_flag & RC_REPMBUF) { - newnfsstats.srvcache_nonidemdonehits++; + nfsstatsv1.srvcache_nonidemdonehits++; mtx_unlock(mutex); nd->nd_mreq = m_copym(rp->rc_reply, 0, M_COPYALL, M_WAITOK); @@ -425,8 +425,8 @@ loop: goto out; } } - newnfsstats.srvcache_misses++; - atomic_add_int(&newnfsstats.srvcache_size, 1); + nfsstatsv1.srvcache_misses++; + atomic_add_int(&nfsstatsv1.srvcache_size, 1); nfsrc_udpcachesize++; newrp->rc_flag |= RC_INPROG; @@ -480,7 +480,7 @@ nfsrvd_updatecache(struct nfsrv_descript * Reply from cache is a special case returned by nfsrv_checkseqid(). */ if (nd->nd_repstat == NFSERR_REPLYFROMCACHE) { - newnfsstats.srvcache_nonidemdonehits++; + nfsstatsv1.srvcache_nonidemdonehits++; mtx_unlock(mutex); nd->nd_repstat = 0; if (nd->nd_mreq) @@ -519,8 +519,8 @@ nfsrvd_updatecache(struct nfsrv_descript if (!(rp->rc_flag & RC_UDP)) { atomic_add_int(&nfsrc_tcpsavedreplies, 1); if (nfsrc_tcpsavedreplies > - newnfsstats.srvcache_tcppeak) - newnfsstats.srvcache_tcppeak = + nfsstatsv1.srvcache_tcppeak) + nfsstatsv1.srvcache_tcppeak = nfsrc_tcpsavedreplies; } mtx_unlock(mutex); @@ -678,7 +678,7 @@ tryagain: panic("nfs tcp cache0"); rp->rc_flag |= RC_LOCKED; if (rp->rc_flag & RC_INPROG) { - newnfsstats.srvcache_inproghits++; + nfsstatsv1.srvcache_inproghits++; mtx_unlock(mutex); if (newrp->rc_sockref == rp->rc_sockref) nfsrc_marksametcpconn(rp->rc_sockref); @@ -687,7 +687,7 @@ tryagain: /* * V2 only. */ - newnfsstats.srvcache_nonidemdonehits++; + nfsstatsv1.srvcache_nonidemdonehits++; mtx_unlock(mutex); if (newrp->rc_sockref == rp->rc_sockref) nfsrc_marksametcpconn(rp->rc_sockref); @@ -696,7 +696,7 @@ tryagain: *(nd->nd_errp) = rp->rc_status; rp->rc_timestamp = NFSD_MONOSEC + nfsrc_tcptimeout; } else if (rp->rc_flag & RC_REPMBUF) { - newnfsstats.srvcache_nonidemdonehits++; + nfsstatsv1.srvcache_nonidemdonehits++; mtx_unlock(mutex); if (newrp->rc_sockref == rp->rc_sockref) nfsrc_marksametcpconn(rp->rc_sockref); @@ -711,8 +711,8 @@ tryagain: free((caddr_t)newrp, M_NFSRVCACHE); goto out; } - newnfsstats.srvcache_misses++; - atomic_add_int(&newnfsstats.srvcache_size, 1); + nfsstatsv1.srvcache_misses++; + atomic_add_int(&nfsstatsv1.srvcache_size, 1); /* * For TCP, multiple entries for a key are allowed, so don't @@ -801,7 +801,7 @@ nfsrc_freecache(struct nfsrvcache *rp) atomic_add_int(&nfsrc_tcpsavedreplies, -1); } FREE((caddr_t)rp, M_NFSRVCACHE); - atomic_add_int(&newnfsstats.srvcache_size, -1); + atomic_add_int(&nfsstatsv1.srvcache_size, -1); } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Oct 3 22:42:25 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2149AAF3E8B; Mon, 3 Oct 2016 22:42:25 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6D3EFFC; Mon, 3 Oct 2016 22:42:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u93MgOHH046103; Mon, 3 Oct 2016 22:42:24 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u93MgNSZ046098; Mon, 3 Oct 2016 22:42:23 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201610032242.u93MgNSZ046098@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 3 Oct 2016 22:42:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306660 - in stable/11/sys: conf dev/cxgbe modules/cxgbe/if_cxgbe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 22:42:25 -0000 Author: jhb Date: Mon Oct 3 22:42:23 2016 New Revision: 306660 URL: https://svnweb.freebsd.org/changeset/base/306660 Log: MFC 303205,303722,305032,305752: Create VF devices on Chelsio T4/T5 NICs. 303205: Add a driver to create VF devices on Chelsio T4/T5 NICs. Chelsio NICs are a bit unique compared to some other NICs in that they expose different functionality on different physical functions. In particular, PF4 is used to manage the NIC interfaces ('t4nex' and 't5nex'). However, PF4 is not able to create VF devices. Instead, VFs are only supported by physical functions 0 through 3. This commit adds 't4iov' and 't5iov' drivers that attach to PF0-3. One extra wrinkle is that the iov devices cannot enable SR-IOV until the firwmare has been initialized by the main PF4 driver. To handle this case, a new t4_if kobj interface has been added to permit cross-calls between the PF drivers. The PF4 driver notifies sibling drivers when it is fully attached. It also requests sibling drivers to detach before it detaches. Sibling drivers query the PF4 driver during their attach routine to see if it is attached. If not, the sibling drivers defer their attach actions until the PF4 driver informs them it is attached. VF devices are associated with a single port on the NIC. VF devices created from PF0 are associated with the first port on the NIC, VFs from PF1 are associated with the second port, etc. VF devices can only be created from a PF device that has an associated port. Thus, on a 2-port card, VFs are only supported on PF0 and PF1. 303722: Use the port device name for the iov device for Chelsio T4/T5 cards. Chelsio T4/T5 adapters are multifunction cards. The main driver uses physical function 4 (PF4). However, VF devices for SR-IOV are only supported on physical functions 0 through 3, where PF0 creates VFs tied to port 0, etc. The t4iov/t5iov driver was previously added to create VF devices for ports that are present on each adapter. This change uses the recently added pci_iov_attach_name() function to name the character device in /dev/iov after the associated port on the card (e.g. /dev/iov/cxl0 is used to create VFs that share the cxl0 port). With this in place, mark the t4iov/t5iov devices quiet to prevent them from cluttering dmesg. 305032: Use device_verbose() to undo device_quiet() when detaching from t[45]iovX. The device quiet flag is not automatically reset on detach, so it is inherited by other device drivers (e.g. when switching a device driver over to ppt for PCI pass through). Cope with this behavior by explicitly marking the device verbose during detach so that the next driver can make its own decision. 305752: Remove explicit device_verbose() from the t4iov driver detach routine now that this case is handled generically. Sponsored by: Chelsio Communications Added: stable/11/sys/dev/cxgbe/t4_if.m - copied, changed from r303205, head/sys/dev/cxgbe/t4_if.m stable/11/sys/dev/cxgbe/t4_iov.c - copied, changed from r303205, head/sys/dev/cxgbe/t4_iov.c Modified: stable/11/sys/conf/files stable/11/sys/dev/cxgbe/t4_main.c stable/11/sys/modules/cxgbe/if_cxgbe/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/files ============================================================================== --- stable/11/sys/conf/files Mon Oct 3 22:11:45 2016 (r306659) +++ stable/11/sys/conf/files Mon Oct 3 22:42:23 2016 (r306660) @@ -1244,6 +1244,8 @@ dev/cxgb/sys/uipc_mvec.c optional cxgb p compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/cxgb_t3fw.c optional cxgb cxgb_t3fw \ compile-with "${NORMAL_C} -I$S/dev/cxgb" +dev/cxgbe/t4_iov.c optional cxgbe pci \ + compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_mp_ring.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_main.c optional cxgbe pci \ Copied and modified: stable/11/sys/dev/cxgbe/t4_if.m (from r303205, head/sys/dev/cxgbe/t4_if.m) ============================================================================== --- head/sys/dev/cxgbe/t4_if.m Fri Jul 22 22:46:41 2016 (r303205, copy source) +++ stable/11/sys/dev/cxgbe/t4_if.m Mon Oct 3 22:42:23 2016 (r306660) @@ -55,11 +55,11 @@ METHOD int detach_child { device_t dev; }; -# Called by a driver to query the PF4 driver for the unit number to use -# for a given port. If the port is not enabled on the adapter, this -# will fail. -METHOD int read_port_unit { +# Called by a driver to query the PF4 driver for the child device +# associated with a given port. If the port is not enabled on the adapter, +# this will fail. +METHOD int read_port_device { device_t dev; int port; - int *unit; + device_t *child; }; Copied and modified: stable/11/sys/dev/cxgbe/t4_iov.c (from r303205, head/sys/dev/cxgbe/t4_iov.c) ============================================================================== --- head/sys/dev/cxgbe/t4_iov.c Fri Jul 22 22:46:41 2016 (r303205, copy source) +++ stable/11/sys/dev/cxgbe/t4_iov.c Mon Oct 3 22:42:23 2016 (r306660) @@ -104,6 +104,7 @@ t4iov_probe(device_t dev) for (i = 0; i < nitems(t4iov_pciids); i++) { if (d == t4iov_pciids[i].device) { device_set_desc(dev, t4iov_pciids[i].desc); + device_quiet(dev); return (BUS_PROBE_DEFAULT); } } @@ -120,6 +121,7 @@ t5iov_probe(device_t dev) for (i = 0; i < nitems(t5iov_pciids); i++) { if (d == t5iov_pciids[i].device) { device_set_desc(dev, t5iov_pciids[i].desc); + device_quiet(dev); return (BUS_PROBE_DEFAULT); } } @@ -148,25 +150,27 @@ t4iov_attach_child(device_t dev) #ifdef PCI_IOV nvlist_t *pf_schema, *vf_schema; #endif - int error, unit; + device_t pdev; + int error; sc = device_get_softc(dev); MPASS(!sc->sc_attached); /* * PF0-3 are associated with a specific port on the NIC (PF0 - * with port 0, etc.). Ask the PF4 driver for the unit number - * for this function's associated port to determine if the port - * is present. + * with port 0, etc.). Ask the PF4 driver for the device for + * this function's associated port to determine if the port is + * present. */ - error = T4_READ_PORT_UNIT(sc->sc_main, pci_get_function(dev), &unit); + error = T4_READ_PORT_DEVICE(sc->sc_main, pci_get_function(dev), &pdev); if (error) return (0); #ifdef PCI_IOV pf_schema = pci_iov_schema_alloc_node(); vf_schema = pci_iov_schema_alloc_node(); - error = pci_iov_attach(dev, pf_schema, vf_schema); + error = pci_iov_attach_name(dev, pf_schema, vf_schema, "%s", + device_get_nameunit(pdev)); if (error) { device_printf(dev, "Failed to initialize SR-IOV: %d\n", error); return (0); @@ -205,10 +209,14 @@ static int t4iov_detach(device_t dev) { struct t4iov_softc *sc; + int error; sc = device_get_softc(dev); - if (sc->sc_attached) - return (t4iov_detach_child(dev)); + if (sc->sc_attached) { + error = t4iov_detach_child(dev); + if (error) + return (error); + } return (0); } Modified: stable/11/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_main.c Mon Oct 3 22:11:45 2016 (r306659) +++ stable/11/sys/dev/cxgbe/t4_main.c Mon Oct 3 22:42:23 2016 (r306660) @@ -76,16 +76,22 @@ __FBSDID("$FreeBSD$"); #include "t4_ioctl.h" #include "t4_l2t.h" #include "t4_mp_ring.h" +#include "t4_if.h" /* T4 bus driver interface */ static int t4_probe(device_t); static int t4_attach(device_t); static int t4_detach(device_t); +static int t4_ready(device_t); +static int t4_read_port_device(device_t, int, device_t *); static device_method_t t4_methods[] = { DEVMETHOD(device_probe, t4_probe), DEVMETHOD(device_attach, t4_attach), DEVMETHOD(device_detach, t4_detach), + DEVMETHOD(t4_is_main_ready, t4_ready), + DEVMETHOD(t4_read_port_device, t4_read_port_device), + DEVMETHOD_END }; static driver_t t4_driver = { @@ -147,6 +153,9 @@ static device_method_t t5_methods[] = { DEVMETHOD(device_attach, t4_attach), DEVMETHOD(device_detach, t4_detach), + DEVMETHOD(t4_is_main_ready, t4_ready), + DEVMETHOD(t4_read_port_device, t4_read_port_device), + DEVMETHOD_END }; static driver_t t5_driver = { @@ -533,6 +542,7 @@ static int set_sched_queue(struct adapte static int toe_capability(struct vi_info *, int); #endif static int mod_event(module_t, int, void *); +static int notify_siblings(device_t, int); struct { uint16_t device; @@ -1062,6 +1072,8 @@ t4_attach(device_t dev) t4_set_desc(sc); + notify_siblings(dev, 0); + done: if (rc != 0 && sc->cdev) { /* cdev was created and so cxgbetool works; recover that way. */ @@ -1078,6 +1090,57 @@ done: return (rc); } +static int +t4_ready(device_t dev) +{ + struct adapter *sc; + + sc = device_get_softc(dev); + if (sc->flags & FW_OK) + return (0); + return (ENXIO); +} + +static int +t4_read_port_device(device_t dev, int port, device_t *child) +{ + struct adapter *sc; + struct port_info *pi; + + sc = device_get_softc(dev); + if (port < 0 || port >= MAX_NPORTS) + return (EINVAL); + pi = sc->port[port]; + if (pi == NULL || pi->dev == NULL) + return (ENXIO); + *child = pi->dev; + return (0); +} + +static int +notify_siblings(device_t dev, int detaching) +{ + device_t sibling; + int error, i; + + error = 0; + for (i = 0; i < PCI_FUNCMAX; i++) { + if (i == pci_get_function(dev)) + continue; + sibling = pci_find_dbsf(pci_get_domain(dev), pci_get_bus(dev), + pci_get_slot(dev), i); + if (sibling == NULL || !device_is_attached(sibling)) + continue; + if (detaching) + error = T4_DETACH_CHILD(sibling); + else + (void)T4_ATTACH_CHILD(sibling); + if (error) + break; + } + return (error); +} + /* * Idempotent */ @@ -1090,6 +1153,13 @@ t4_detach(device_t dev) sc = device_get_softc(dev); + rc = notify_siblings(dev, 1); + if (rc) { + device_printf(dev, + "failed to detach sibling devices: %d\n", rc); + return (rc); + } + if (sc->flags & FULL_INIT_DONE) t4_intr_disable(sc); Modified: stable/11/sys/modules/cxgbe/if_cxgbe/Makefile ============================================================================== --- stable/11/sys/modules/cxgbe/if_cxgbe/Makefile Mon Oct 3 22:11:45 2016 (r306659) +++ stable/11/sys/modules/cxgbe/if_cxgbe/Makefile Mon Oct 3 22:42:23 2016 (r306660) @@ -13,8 +13,10 @@ SRCS+= opt_inet.h SRCS+= opt_inet6.h SRCS+= opt_ofed.h SRCS+= opt_rss.h -SRCS+= pci_if.h +SRCS+= pci_if.h pci_iov_if.h +SRCS+= t4_if.c t4_if.h SRCS+= t4_hw.c +SRCS+= t4_iov.c SRCS+= t4_l2t.c SRCS+= t4_main.c SRCS+= t4_mp_ring.c From owner-svn-src-all@freebsd.org Mon Oct 3 23:15:45 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 974FBAF4701; Mon, 3 Oct 2016 23:15:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66A93F97; Mon, 3 Oct 2016 23:15:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u93NFicD057534; Mon, 3 Oct 2016 23:15:44 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u93NFiHE057529; Mon, 3 Oct 2016 23:15:44 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201610032315.u93NFiHE057529@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 3 Oct 2016 23:15:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306661 - in stable/11/sys/dev/cxgbe: . tom X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 23:15:45 -0000 Author: jhb Date: Mon Oct 3 23:15:44 2016 New Revision: 306661 URL: https://svnweb.freebsd.org/changeset/base/306661 Log: MFC 303405: Add support for zero-copy aio_write() on TOE sockets. AIO write requests for a TOE socket on a Chelsio T4+ adapter can now DMA directly from the user-supplied buffer. This is implemented by wiring the pages backing the user-supplied buffer and queueing special mbufs backed by raw VM pages to the socket buffer. The TOE code recognizes these special mbufs and builds a sglist from the VM page array associated with the mbuf when queueing a work request to the TOE. Because these mbufs do not have an associated virtual address, m_data is not valid. Thus, the AIO handler does not invoke sosend() directly for these mbufs but instead inlines portions of sosend_generic() and tcp_usr_send(). An aiotx_buffer structure is used to describe the user buffer (e.g. it holds the array of VM pages and a reference to the AIO job). The special mbufs reference this structure via m_ext. Note that a single job might be split across multiple mbufs (e.g. if it is larger than the socket buffer size). The 'ext_arg2' member of each mbuf gives an offset relative to the backing aiotx_buffer. The AIO job associated with an aiotx_buffer structure is completed when the last reference to the structure is released. Zero-copy aio_write()'s for connections associated with a given adapter can be enabled/disabled at runtime via the 'dev.t[45]nex.N.toe.tx_zcopy' sysctl. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/offload.h stable/11/sys/dev/cxgbe/t4_main.c stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c stable/11/sys/dev/cxgbe/tom/t4_tom.c stable/11/sys/dev/cxgbe/tom/t4_tom.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/offload.h ============================================================================== --- stable/11/sys/dev/cxgbe/offload.h Mon Oct 3 22:42:23 2016 (r306660) +++ stable/11/sys/dev/cxgbe/offload.h Mon Oct 3 23:15:44 2016 (r306661) @@ -147,6 +147,7 @@ struct tom_tunables { int ddp; int rx_coalesce; int tx_align; + int tx_zcopy; }; #ifdef TCP_OFFLOAD Modified: stable/11/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_main.c Mon Oct 3 22:42:23 2016 (r306660) +++ stable/11/sys/dev/cxgbe/t4_main.c Mon Oct 3 23:15:44 2016 (r306661) @@ -4864,6 +4864,11 @@ t4_sysctls(struct adapter *sc) SYSCTL_ADD_INT(ctx, children, OID_AUTO, "tx_align", CTLFLAG_RW, &sc->tt.tx_align, 0, "chop and align payload"); + sc->tt.tx_zcopy = 0; + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "tx_zcopy", + CTLFLAG_RW, &sc->tt.tx_zcopy, 0, + "Enable zero-copy aio_write(2)"); + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "timer_tick", CTLTYPE_STRING | CTLFLAG_RD, sc, 0, sysctl_tp_tick, "A", "TP timer tick (us)"); Modified: stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c Mon Oct 3 22:42:23 2016 (r306660) +++ stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c Mon Oct 3 23:15:44 2016 (r306661) @@ -32,15 +32,18 @@ __FBSDID("$FreeBSD$"); #ifdef TCP_OFFLOAD #include -#include +#include +#include #include #include #include +#include #include #include #include #include #include +#include #include #include #include @@ -51,6 +54,14 @@ __FBSDID("$FreeBSD$"); #include #include +#include + +#include +#include +#include +#include +#include + #include "common/common.h" #include "common/t4_msg.h" #include "common/t4_regs.h" @@ -71,6 +82,34 @@ VNET_DECLARE(int, tcp_autorcvbuf_inc); VNET_DECLARE(int, tcp_autorcvbuf_max); #define V_tcp_autorcvbuf_max VNET(tcp_autorcvbuf_max) +#define IS_AIOTX_MBUF(m) \ + ((m)->m_flags & M_EXT && (m)->m_ext.ext_flags & EXT_FLAG_AIOTX) + +static void t4_aiotx_cancel(struct kaiocb *job); +static void t4_aiotx_queue_toep(struct toepcb *toep); + +static size_t +aiotx_mbuf_pgoff(struct mbuf *m) +{ + struct aiotx_buffer *ab; + + MPASS(IS_AIOTX_MBUF(m)); + ab = m->m_ext.ext_arg1; + return ((ab->ps.offset + (uintptr_t)m->m_ext.ext_arg2) % PAGE_SIZE); +} + +static vm_page_t * +aiotx_mbuf_pages(struct mbuf *m) +{ + struct aiotx_buffer *ab; + int npages; + + MPASS(IS_AIOTX_MBUF(m)); + ab = m->m_ext.ext_arg1; + npages = (ab->ps.offset + (uintptr_t)m->m_ext.ext_arg2) / PAGE_SIZE; + return (ab->ps.pages + npages); +} + void send_flowc_wr(struct toepcb *toep, struct flowc_tx_params *ftxp) { @@ -519,7 +558,11 @@ write_tx_sgl(void *dst, struct mbuf *sta i = -1; for (m = start; m != stop; m = m->m_next) { - rc = sglist_append(&sg, mtod(m, void *), m->m_len); + if (IS_AIOTX_MBUF(m)) + rc = sglist_append_vmpages(&sg, aiotx_mbuf_pages(m), + aiotx_mbuf_pgoff(m), m->m_len); + else + rc = sglist_append(&sg, mtod(m, void *), m->m_len); if (__predict_false(rc != 0)) panic("%s: sglist_append %d", __func__, rc); @@ -579,6 +622,7 @@ t4_push_frames(struct adapter *sc, struc struct sockbuf *sb = &so->so_snd; int tx_credits, shove, compl, sowwakeup; struct ofld_tx_sdesc *txsd = &toep->txsd[toep->txsd_pidx]; + bool aiotx_mbuf_seen; INP_WLOCK_ASSERT(inp); KASSERT(toep->flags & TPF_FLOWC_WR_SENT, @@ -589,6 +633,10 @@ t4_push_frames(struct adapter *sc, struc toep->ulp_mode == ULP_MODE_RDMA, ("%s: ulp_mode %u for toep %p", __func__, toep->ulp_mode, toep)); +#ifdef VERBOSE_TRACES + CTR4(KTR_CXGBE, "%s: tid %d toep flags %#x tp flags %#x drop %d", + __func__, toep->tid, toep->flags, tp->t_flags); +#endif if (__predict_false(toep->flags & TPF_ABORT_SHUTDOWN)) return; @@ -618,8 +666,15 @@ t4_push_frames(struct adapter *sc, struc plen = 0; nsegs = 0; max_nsegs_1mbuf = 0; /* max # of SGL segments in any one mbuf */ + aiotx_mbuf_seen = false; for (m = sndptr; m != NULL; m = m->m_next) { - int n = sglist_count(mtod(m, void *), m->m_len); + int n; + + if (IS_AIOTX_MBUF(m)) + n = sglist_count_vmpages(aiotx_mbuf_pages(m), + aiotx_mbuf_pgoff(m), m->m_len); + else + n = sglist_count(mtod(m, void *), m->m_len); nsegs += n; plen += m->m_len; @@ -631,9 +686,13 @@ t4_push_frames(struct adapter *sc, struc if (plen == 0) { /* Too few credits */ toep->flags |= TPF_TX_SUSPENDED; - if (sowwakeup) + if (sowwakeup) { + if (!TAILQ_EMPTY( + &toep->aiotx_jobq)) + t4_aiotx_queue_toep( + toep); sowwakeup_locked(so); - else + } else SOCKBUF_UNLOCK(sb); SOCKBUF_UNLOCK_ASSERT(sb); return; @@ -641,6 +700,8 @@ t4_push_frames(struct adapter *sc, struc break; } + if (IS_AIOTX_MBUF(m)) + aiotx_mbuf_seen = true; if (max_nsegs_1mbuf < n) max_nsegs_1mbuf = n; sb_sndptr = m; /* new sb->sb_sndptr if all goes well */ @@ -670,9 +731,11 @@ t4_push_frames(struct adapter *sc, struc else sowwakeup = 1; /* room available */ } - if (sowwakeup) + if (sowwakeup) { + if (!TAILQ_EMPTY(&toep->aiotx_jobq)) + t4_aiotx_queue_toep(toep); sowwakeup_locked(so); - else + } else SOCKBUF_UNLOCK(sb); SOCKBUF_UNLOCK_ASSERT(sb); @@ -687,7 +750,7 @@ t4_push_frames(struct adapter *sc, struc panic("%s: excess tx.", __func__); shove = m == NULL && !(tp->t_flags & TF_MORETOCOME); - if (plen <= max_imm) { + if (plen <= max_imm && !aiotx_mbuf_seen) { /* Immediate data tx */ @@ -1616,6 +1679,9 @@ do_fw4_ack(struct sge_iq *iq, const stru } } +#ifdef VERBOSE_TRACES + CTR3(KTR_CXGBE, "%s: tid %d credits %u", __func__, tid, credits); +#endif so = inp->inp_socket; txsd = &toep->txsd[toep->txsd_cidx]; plen = 0; @@ -1642,6 +1708,10 @@ do_fw4_ack(struct sge_iq *iq, const stru if (toep->flags & TPF_TX_SUSPENDED && toep->tx_credits >= toep->tx_total / 4) { +#ifdef VERBOSE_TRACES + CTR2(KTR_CXGBE, "%s: tid %d calling t4_push_frames", __func__, + tid); +#endif toep->flags &= ~TPF_TX_SUSPENDED; if (toep->ulp_mode == ULP_MODE_ISCSI) t4_push_pdus(sc, toep, plen); @@ -1668,7 +1738,13 @@ do_fw4_ack(struct sge_iq *iq, const stru sowwakeup_locked(so); /* unlocks so_snd */ rqdrop_locked(&toep->ulp_pdu_reclaimq, plen); } else { +#ifdef VERBOSE_TRACES + CTR3(KTR_CXGBE, "%s: tid %d dropped %d bytes", __func__, + tid, plen); +#endif sbdrop_locked(sb, plen); + if (!TAILQ_EMPTY(&toep->aiotx_jobq)) + t4_aiotx_queue_toep(toep); sowwakeup_locked(so); /* unlocks so_snd */ } SOCKBUF_UNLOCK_ASSERT(sb); @@ -1768,4 +1844,397 @@ t4_uninit_cpl_io_handlers(void) t4_register_cpl_handler(CPL_RX_DATA, do_rx_data); t4_register_cpl_handler(CPL_FW4_ACK, do_fw4_ack); } + +/* + * Use the 'backend3' field in AIO jobs to store the amount of data + * sent by the AIO job so far and the 'backend4' field to hold an + * error that should be reported when the job is completed. + */ +#define aio_sent backend3 +#define aio_error backend4 + +#define jobtotid(job) \ + (((struct toepcb *)(so_sototcpcb((job)->fd_file->f_data)->t_toe))->tid) + +static void +free_aiotx_buffer(struct aiotx_buffer *ab) +{ + struct kaiocb *job; + long status; + int error; + + if (refcount_release(&ab->refcount) == 0) + return; + + job = ab->job; + error = job->aio_error; + status = job->aio_sent; + vm_page_unhold_pages(ab->ps.pages, ab->ps.npages); + free(ab, M_CXGBE); +#ifdef VERBOSE_TRACES + CTR5(KTR_CXGBE, "%s: tid %d completed %p len %ld, error %d", __func__, + jobtotid(job), job, status, error); +#endif + if (error == ECANCELED && status != 0) + error = 0; + if (error == ECANCELED) + aio_cancel(job); + else if (error) + aio_complete(job, -1, error); + else + aio_complete(job, status, 0); +} + +static void +t4_aiotx_mbuf_free(struct mbuf *m, void *buffer, void *arg) +{ + struct aiotx_buffer *ab = buffer; + +#ifdef VERBOSE_TRACES + CTR3(KTR_CXGBE, "%s: completed %d bytes for tid %d", __func__, + m->m_len, jobtotid(ab->job)); +#endif + free_aiotx_buffer(ab); +} + +/* + * Hold the buffer backing an AIO request and return an AIO transmit + * buffer. + */ +static int +hold_aio(struct kaiocb *job) +{ + struct aiotx_buffer *ab; + struct vmspace *vm; + vm_map_t map; + vm_offset_t start, end, pgoff; + int n; + + MPASS(job->backend1 == NULL); + + /* + * The AIO subsystem will cancel and drain all requests before + * permitting a process to exit or exec, so p_vmspace should + * be stable here. + */ + vm = job->userproc->p_vmspace; + map = &vm->vm_map; + start = (uintptr_t)job->uaiocb.aio_buf; + pgoff = start & PAGE_MASK; + end = round_page(start + job->uaiocb.aio_nbytes); + start = trunc_page(start); + n = atop(end - start); + + ab = malloc(sizeof(*ab) + n * sizeof(vm_page_t), M_CXGBE, M_WAITOK | + M_ZERO); + refcount_init(&ab->refcount, 1); + ab->ps.pages = (vm_page_t *)(ab + 1); + ab->ps.npages = vm_fault_quick_hold_pages(map, start, end - start, + VM_PROT_WRITE, ab->ps.pages, n); + if (ab->ps.npages < 0) { + free(ab, M_CXGBE); + return (EFAULT); + } + + KASSERT(ab->ps.npages == n, + ("hold_aio: page count mismatch: %d vs %d", ab->ps.npages, n)); + + ab->ps.offset = pgoff; + ab->ps.len = job->uaiocb.aio_nbytes; + ab->job = job; + job->backend1 = ab; +#ifdef VERBOSE_TRACES + CTR5(KTR_CXGBE, "%s: tid %d, new pageset %p for job %p, npages %d", + __func__, jobtotid(job), &ab->ps, job, ab->ps.npages); +#endif + return (0); +} + +static void +t4_aiotx_process_job(struct toepcb *toep, struct socket *so, struct kaiocb *job) +{ + struct adapter *sc; + struct sockbuf *sb; + struct file *fp; + struct aiotx_buffer *ab; + struct inpcb *inp; + struct tcpcb *tp; + struct mbuf *m; + int error; + bool moretocome, sendmore; + + sc = td_adapter(toep->td); + sb = &so->so_snd; + SOCKBUF_UNLOCK(sb); + fp = job->fd_file; + ab = job->backend1; + m = NULL; + +#ifdef MAC + error = mac_socket_check_send(fp->f_cred, so); + if (error != 0) + goto out; +#endif + + if (ab == NULL) { + error = hold_aio(job); + if (error != 0) + goto out; + ab = job->backend1; + } + + /* Inline sosend_generic(). */ + + job->msgsnd = 1; + + error = sblock(sb, SBL_WAIT); + MPASS(error == 0); + +sendanother: + m = m_get(M_WAITOK, MT_DATA); + + SOCKBUF_LOCK(sb); + if (so->so_snd.sb_state & SBS_CANTSENDMORE) { + SOCKBUF_UNLOCK(sb); + sbunlock(sb); + if ((so->so_options & SO_NOSIGPIPE) == 0) { + PROC_LOCK(job->userproc); + kern_psignal(job->userproc, SIGPIPE); + PROC_UNLOCK(job->userproc); + } + error = EPIPE; + goto out; + } + if (so->so_error) { + error = so->so_error; + so->so_error = 0; + SOCKBUF_UNLOCK(sb); + sbunlock(sb); + goto out; + } + if ((so->so_state & SS_ISCONNECTED) == 0) { + SOCKBUF_UNLOCK(sb); + sbunlock(sb); + error = ENOTCONN; + goto out; + } + if (sbspace(sb) < sb->sb_lowat) { + MPASS(job->aio_sent == 0 || !(so->so_state & SS_NBIO)); + + /* + * Don't block if there is too little room in the socket + * buffer. Instead, requeue the request. + */ + if (!aio_set_cancel_function(job, t4_aiotx_cancel)) { + SOCKBUF_UNLOCK(sb); + sbunlock(sb); + error = ECANCELED; + goto out; + } + TAILQ_INSERT_HEAD(&toep->aiotx_jobq, job, list); + SOCKBUF_UNLOCK(sb); + sbunlock(sb); + goto out; + } + + /* + * Write as much data as the socket permits, but no more than a + * a single sndbuf at a time. + */ + m->m_len = sbspace(sb); + if (m->m_len > ab->ps.len - job->aio_sent) { + m->m_len = ab->ps.len - job->aio_sent; + moretocome = false; + } else + moretocome = true; + if (m->m_len > sc->tt.sndbuf) { + m->m_len = sc->tt.sndbuf; + sendmore = true; + } else + sendmore = false; + + if (!TAILQ_EMPTY(&toep->aiotx_jobq)) + moretocome = true; + SOCKBUF_UNLOCK(sb); + MPASS(m->m_len != 0); + + /* Inlined tcp_usr_send(). */ + + inp = toep->inp; + INP_WLOCK(inp); + if (inp->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) { + INP_WUNLOCK(inp); + sbunlock(sb); + error = ECONNRESET; + goto out; + } + + refcount_acquire(&ab->refcount); + m_extadd(m, NULL, ab->ps.len, t4_aiotx_mbuf_free, ab, + (void *)(uintptr_t)job->aio_sent, 0, EXT_NET_DRV); + m->m_ext.ext_flags |= EXT_FLAG_AIOTX; + job->aio_sent += m->m_len; + + sbappendstream(sb, m, 0); + m = NULL; + + if (!(inp->inp_flags & INP_DROPPED)) { + tp = intotcpcb(inp); + if (moretocome) + tp->t_flags |= TF_MORETOCOME; + error = tp->t_fb->tfb_tcp_output(tp); + if (moretocome) + tp->t_flags &= ~TF_MORETOCOME; + } + + INP_WUNLOCK(inp); + if (sendmore) + goto sendanother; + sbunlock(sb); + + if (error) + goto out; + + /* + * If this is a non-blocking socket and the request has not + * been fully completed, requeue it until the socket is ready + * again. + */ + if (job->aio_sent < job->uaiocb.aio_nbytes && + !(so->so_state & SS_NBIO)) { + SOCKBUF_LOCK(sb); + if (!aio_set_cancel_function(job, t4_aiotx_cancel)) { + SOCKBUF_UNLOCK(sb); + error = ECANCELED; + goto out; + } + TAILQ_INSERT_HEAD(&toep->aiotx_jobq, job, list); + return; + } + + /* + * If the request will not be requeued, drop a reference on + * the the aiotx buffer. Any mbufs in flight should still + * contain a reference, but this drops the reference that the + * job owns while it is waiting to queue mbufs to the socket. + */ + free_aiotx_buffer(ab); + +out: + if (error) { + if (ab != NULL) { + job->aio_error = error; + free_aiotx_buffer(ab); + } else { + MPASS(job->aio_sent == 0); + aio_complete(job, -1, error); + } + } + if (m != NULL) + m_free(m); + SOCKBUF_LOCK(sb); +} + +static void +t4_aiotx_task(void *context, int pending) +{ + struct toepcb *toep = context; + struct inpcb *inp = toep->inp; + struct socket *so = inp->inp_socket; + struct kaiocb *job; + + CURVNET_SET(so->so_vnet); + SOCKBUF_LOCK(&so->so_snd); + while (!TAILQ_EMPTY(&toep->aiotx_jobq) && sowriteable(so)) { + job = TAILQ_FIRST(&toep->aiotx_jobq); + TAILQ_REMOVE(&toep->aiotx_jobq, job, list); + if (!aio_clear_cancel_function(job)) + continue; + + t4_aiotx_process_job(toep, so, job); + } + toep->aiotx_task_active = false; + SOCKBUF_UNLOCK(&so->so_snd); + CURVNET_RESTORE(); + + free_toepcb(toep); +} + +static void +t4_aiotx_queue_toep(struct toepcb *toep) +{ + + SOCKBUF_LOCK_ASSERT(&toep->inp->inp_socket->so_snd); +#ifdef VERBOSE_TRACES + CTR3(KTR_CXGBE, "%s: queueing aiotx task for tid %d, active = %s", + __func__, toep->tid, toep->aiotx_task_active ? "true" : "false"); +#endif + if (toep->aiotx_task_active) + return; + toep->aiotx_task_active = true; + hold_toepcb(toep); + soaio_enqueue(&toep->aiotx_task); +} + +static void +t4_aiotx_cancel(struct kaiocb *job) +{ + struct aiotx_buffer *ab; + struct socket *so; + struct sockbuf *sb; + struct tcpcb *tp; + struct toepcb *toep; + + so = job->fd_file->f_data; + tp = so_sototcpcb(so); + toep = tp->t_toe; + MPASS(job->uaiocb.aio_lio_opcode == LIO_WRITE); + sb = &so->so_snd; + + SOCKBUF_LOCK(sb); + if (!aio_cancel_cleared(job)) + TAILQ_REMOVE(&toep->aiotx_jobq, job, list); + SOCKBUF_UNLOCK(sb); + + ab = job->backend1; + if (ab != NULL) + free_aiotx_buffer(ab); + else + aio_cancel(job); +} + +int +t4_aio_queue_aiotx(struct socket *so, struct kaiocb *job) +{ + struct tcpcb *tp = so_sototcpcb(so); + struct toepcb *toep = tp->t_toe; + struct adapter *sc = td_adapter(toep->td); + + /* This only handles writes. */ + if (job->uaiocb.aio_lio_opcode != LIO_WRITE) + return (EOPNOTSUPP); + + if (!sc->tt.tx_zcopy) + return (EOPNOTSUPP); + + SOCKBUF_LOCK(&so->so_snd); +#ifdef VERBOSE_TRACES + CTR2(KTR_CXGBE, "%s: queueing %p", __func__, job); +#endif + if (!aio_set_cancel_function(job, t4_aiotx_cancel)) + panic("new job was cancelled"); + TAILQ_INSERT_TAIL(&toep->aiotx_jobq, job, list); + if (sowriteable(so)) + t4_aiotx_queue_toep(toep); + SOCKBUF_UNLOCK(&so->so_snd); + return (0); +} + +void +aiotx_init_toep(struct toepcb *toep) +{ + + TAILQ_INIT(&toep->aiotx_jobq); + TASK_INIT(&toep->aiotx_task, 0, t4_aiotx_task, toep); +} #endif Modified: stable/11/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_tom.c Mon Oct 3 22:42:23 2016 (r306660) +++ stable/11/sys/dev/cxgbe/tom/t4_tom.c Mon Oct 3 23:15:44 2016 (r306661) @@ -68,11 +68,11 @@ __FBSDID("$FreeBSD$"); #include "tom/t4_tom_l2t.h" #include "tom/t4_tom.h" -static struct protosw ddp_protosw; -static struct pr_usrreqs ddp_usrreqs; +static struct protosw toe_protosw; +static struct pr_usrreqs toe_usrreqs; -static struct protosw ddp6_protosw; -static struct pr_usrreqs ddp6_usrreqs; +static struct protosw toe6_protosw; +static struct pr_usrreqs toe6_usrreqs; /* Module ops */ static int t4_tom_mod_load(void); @@ -167,6 +167,7 @@ alloc_toepcb(struct vi_info *vi, int txq toep->txsd_avail = txsd_total; toep->txsd_pidx = 0; toep->txsd_cidx = 0; + aiotx_init_toep(toep); ddp_init_toep(toep); return (toep); @@ -217,12 +218,10 @@ offload_socket(struct socket *so, struct sb = &so->so_rcv; SOCKBUF_LOCK(sb); sb->sb_flags |= SB_NOCOALESCE; - if (toep->ulp_mode == ULP_MODE_TCPDDP) { - if (inp->inp_vflag & INP_IPV6) - so->so_proto = &ddp6_protosw; - else - so->so_proto = &ddp_protosw; - } + if (inp->inp_vflag & INP_IPV6) + so->so_proto = &toe6_protosw; + else + so->so_proto = &toe_protosw; SOCKBUF_UNLOCK(sb); /* Update TCP PCB */ @@ -1120,6 +1119,22 @@ t4_tom_ifaddr_event(void *arg __unused, } static int +t4_aio_queue_tom(struct socket *so, struct kaiocb *job) +{ + struct tcpcb *tp = so_sototcpcb(so); + struct toepcb *toep = tp->t_toe; + int error; + + if (toep->ulp_mode == ULP_MODE_TCPDDP) { + error = t4_aio_queue_ddp(so, job); + if (error != EOPNOTSUPP) + return (error); + } + + return (t4_aio_queue_aiotx(so, job)); +} + +static int t4_tom_mod_load(void) { int rc; @@ -1137,18 +1152,18 @@ t4_tom_mod_load(void) tcp_protosw = pffindproto(PF_INET, IPPROTO_TCP, SOCK_STREAM); if (tcp_protosw == NULL) return (ENOPROTOOPT); - bcopy(tcp_protosw, &ddp_protosw, sizeof(ddp_protosw)); - bcopy(tcp_protosw->pr_usrreqs, &ddp_usrreqs, sizeof(ddp_usrreqs)); - ddp_usrreqs.pru_aio_queue = t4_aio_queue_ddp; - ddp_protosw.pr_usrreqs = &ddp_usrreqs; + bcopy(tcp_protosw, &toe_protosw, sizeof(toe_protosw)); + bcopy(tcp_protosw->pr_usrreqs, &toe_usrreqs, sizeof(toe_usrreqs)); + toe_usrreqs.pru_aio_queue = t4_aio_queue_tom; + toe_protosw.pr_usrreqs = &toe_usrreqs; tcp6_protosw = pffindproto(PF_INET6, IPPROTO_TCP, SOCK_STREAM); if (tcp6_protosw == NULL) return (ENOPROTOOPT); - bcopy(tcp6_protosw, &ddp6_protosw, sizeof(ddp6_protosw)); - bcopy(tcp6_protosw->pr_usrreqs, &ddp6_usrreqs, sizeof(ddp6_usrreqs)); - ddp6_usrreqs.pru_aio_queue = t4_aio_queue_ddp; - ddp6_protosw.pr_usrreqs = &ddp6_usrreqs; + bcopy(tcp6_protosw, &toe6_protosw, sizeof(toe6_protosw)); + bcopy(tcp6_protosw->pr_usrreqs, &toe6_usrreqs, sizeof(toe6_usrreqs)); + toe6_usrreqs.pru_aio_queue = t4_aio_queue_tom; + toe6_protosw.pr_usrreqs = &toe6_usrreqs; TIMEOUT_TASK_INIT(taskqueue_thread, &clip_task, 0, t4_clip_task, NULL); ifaddr_evhandler = EVENTHANDLER_REGISTER(ifaddr_event, Modified: stable/11/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_tom.h Mon Oct 3 22:42:23 2016 (r306660) +++ stable/11/sys/dev/cxgbe/tom/t4_tom.h Mon Oct 3 23:15:44 2016 (r306661) @@ -102,6 +102,8 @@ TAILQ_HEAD(pagesetq, pageset); #define PS_WIRED 0x0001 /* Pages wired rather than held. */ #define PS_PPODS_WRITTEN 0x0002 /* Page pods written to the card. */ +#define EXT_FLAG_AIOTX EXT_FLAG_VENDOR1 + struct ddp_buffer { struct pageset *ps; @@ -109,6 +111,12 @@ struct ddp_buffer { int cancel_pending; }; +struct aiotx_buffer { + struct pageset ps; + struct kaiocb *job; + int refcount; +}; + struct toepcb { TAILQ_ENTRY(toepcb) link; /* toep_list */ u_int flags; /* miscellaneous flags */ @@ -151,6 +159,10 @@ struct toepcb { struct kaiocb *ddp_queueing; struct mtx ddp_lock; + TAILQ_HEAD(, kaiocb) aiotx_jobq; + struct task aiotx_task; + bool aiotx_task_active; + /* Tx software descriptor */ uint8_t txsd_total; uint8_t txsd_pidx; @@ -313,6 +325,8 @@ int do_abort_rpl_synqe(struct sge_iq *, void t4_offload_socket(struct toedev *, void *, struct socket *); /* t4_cpl_io.c */ +void aiotx_init_toep(struct toepcb *); +int t4_aio_queue_aiotx(struct socket *, struct kaiocb *); void t4_init_cpl_io_handlers(void); void t4_uninit_cpl_io_handlers(void); void send_abort_rpl(struct adapter *, struct sge_wrq *, int , int); From owner-svn-src-all@freebsd.org Mon Oct 3 23:16:39 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EDDF2AF476B; Mon, 3 Oct 2016 23:16:39 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7BB4164; Mon, 3 Oct 2016 23:16:39 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u93NGcR6057618; Mon, 3 Oct 2016 23:16:38 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u93NGcgC057617; Mon, 3 Oct 2016 23:16:38 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201610032316.u93NGcgC057617@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 3 Oct 2016 23:16:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306662 - stable/11/sys/dev/pci X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 23:16:40 -0000 Author: jhb Date: Mon Oct 3 23:16:38 2016 New Revision: 306662 URL: https://svnweb.freebsd.org/changeset/base/306662 Log: MFC 306126: Fix invalid vendor ID constant (typo). During a bus rescan the check for an invalid vendor ID of a subfunction used the wrong constant. Modified: stable/11/sys/dev/pci/pci.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/pci/pci.c ============================================================================== --- stable/11/sys/dev/pci/pci.c Mon Oct 3 23:15:44 2016 (r306661) +++ stable/11/sys/dev/pci/pci.c Mon Oct 3 23:16:38 2016 (r306662) @@ -3970,7 +3970,7 @@ pci_rescan_method(device_t dev) if (hdrtype & PCIM_MFDEV) pcifunchigh = PCIB_MAXFUNCS(pcib); for (f = 0; f <= pcifunchigh; f++) { - if (REG(PCIR_VENDOR, 2) == 0xfff) + if (REG(PCIR_VENDOR, 2) == 0xffff) continue; /* From owner-svn-src-all@freebsd.org Mon Oct 3 23:17:59 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F459AF47E9; Mon, 3 Oct 2016 23:17:59 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48A60313; Mon, 3 Oct 2016 23:17:59 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u93NHwOv057712; Mon, 3 Oct 2016 23:17:58 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u93NHvuW057700; Mon, 3 Oct 2016 23:17:57 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201610032317.u93NHvuW057700@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 3 Oct 2016 23:17:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306663 - in stable/10/sys/fs: nfs nfsclient nfsserver X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 23:17:59 -0000 Author: rmacklem Date: Mon Oct 3 23:17:57 2016 New Revision: 306663 URL: https://svnweb.freebsd.org/changeset/base/306663 Log: Revert r306659 since the userland changes won't merge and this would break the build. Modified: stable/10/sys/fs/nfs/nfs_commonkrpc.c stable/10/sys/fs/nfs/nfs_commonport.c stable/10/sys/fs/nfs/nfsport.h stable/10/sys/fs/nfs/nfsproto.h stable/10/sys/fs/nfsclient/nfs_clbio.c stable/10/sys/fs/nfsclient/nfs_clcomsubs.c stable/10/sys/fs/nfsclient/nfs_clstate.c stable/10/sys/fs/nfsclient/nfs_clsubs.c stable/10/sys/fs/nfsclient/nfs_clvfsops.c stable/10/sys/fs/nfsclient/nfs_clvnops.c stable/10/sys/fs/nfsserver/nfs_nfsdcache.c stable/10/sys/fs/nfsserver/nfs_nfsdport.c stable/10/sys/fs/nfsserver/nfs_nfsdsocket.c stable/10/sys/fs/nfsserver/nfs_nfsdstate.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfs/nfs_commonkrpc.c ============================================================================== --- stable/10/sys/fs/nfs/nfs_commonkrpc.c Mon Oct 3 23:16:38 2016 (r306662) +++ stable/10/sys/fs/nfs/nfs_commonkrpc.c Mon Oct 3 23:17:57 2016 (r306663) @@ -90,7 +90,7 @@ uint32_t nfscl_nfs4_done_probes[NFSV41_N NFSSTATESPINLOCK; NFSREQSPINLOCK; NFSDLOCKMUTEX; -extern struct nfsstatsv1 nfsstatsv1; +extern struct nfsstats newnfsstats; extern struct nfsreqhead nfsd_reqq; extern int nfscl_ticks; extern void (*ncl_call_invalcaches)(struct vnode *); @@ -643,7 +643,7 @@ newnfs_request(struct nfsrv_descript *nd procnum = NFSV4PROC_COMPOUND; if (nmp != NULL) { - NFSINCRGLOBAL(nfsstatsv1.rpcrequests); + NFSINCRGLOBAL(newnfsstats.rpcrequests); /* Map the procnum to the old NFSv2 one, as required. */ if ((nd->nd_flag & ND_NFSV2) != 0) { @@ -763,18 +763,18 @@ tryagain: if (stat == RPC_SUCCESS) { error = 0; } else if (stat == RPC_TIMEDOUT) { - NFSINCRGLOBAL(nfsstatsv1.rpctimeouts); + NFSINCRGLOBAL(newnfsstats.rpctimeouts); error = ETIMEDOUT; } else if (stat == RPC_VERSMISMATCH) { - NFSINCRGLOBAL(nfsstatsv1.rpcinvalid); + NFSINCRGLOBAL(newnfsstats.rpcinvalid); error = EOPNOTSUPP; } else if (stat == RPC_PROGVERSMISMATCH) { - NFSINCRGLOBAL(nfsstatsv1.rpcinvalid); + NFSINCRGLOBAL(newnfsstats.rpcinvalid); error = EPROTONOSUPPORT; } else if (stat == RPC_INTR) { error = EINTR; } else { - NFSINCRGLOBAL(nfsstatsv1.rpcinvalid); + NFSINCRGLOBAL(newnfsstats.rpcinvalid); error = EACCES; } if (error) { Modified: stable/10/sys/fs/nfs/nfs_commonport.c ============================================================================== --- stable/10/sys/fs/nfs/nfs_commonport.c Mon Oct 3 23:16:38 2016 (r306662) +++ stable/10/sys/fs/nfs/nfs_commonport.c Mon Oct 3 23:17:57 2016 (r306663) @@ -58,7 +58,7 @@ extern void (*nfsd_call_recall)(struct v extern int nfsrv_useacl; struct mount nfsv4root_mnt; int newnfs_numnfsd = 0; -struct nfsstatsv1 nfsstatsv1; +struct nfsstats newnfsstats; int nfs_numnfscbd = 0; int nfscl_debuglevel = 0; char nfsv4_callbackaddr[INET6_ADDRSTRLEN]; @@ -69,7 +69,6 @@ void (*ncl_call_invalcaches)(struct vnod static int nfs_realign_test; static int nfs_realign_count; -static struct ext_nfsstats oldnfsstats; SYSCTL_NODE(_vfs, OID_AUTO, nfs, CTLFLAG_RW, 0, "New NFS filesystem"); SYSCTL_INT(_vfs_nfs, OID_AUTO, realign_test, CTLFLAG_RW, &nfs_realign_test, @@ -448,12 +447,9 @@ nfssvc_nfscommon(struct thread *td, stru static int nfssvc_call(struct thread *p, struct nfssvc_args *uap, struct ucred *cred) { - int error = EINVAL, i, j; + int error = EINVAL; struct nfsd_idargs nid; struct nfsd_oidargs onid; - struct { - int vers; /* Just the first field of nfsstats. */ - } nfsstatver; if (uap->flag & NFSSVC_IDNAME) { if ((uap->flag & NFSSVC_NEWSTRUCT) != 0) @@ -477,157 +473,63 @@ nfssvc_call(struct thread *p, struct nfs error = nfssvc_idname(&nid); goto out; } else if (uap->flag & NFSSVC_GETSTATS) { - if ((uap->flag & NFSSVC_NEWSTRUCT) == 0) { - /* Copy fields to the old ext_nfsstat structure. */ - oldnfsstats.attrcache_hits = - nfsstatsv1.attrcache_hits; - oldnfsstats.attrcache_misses = - nfsstatsv1.attrcache_misses; - oldnfsstats.lookupcache_hits = - nfsstatsv1.lookupcache_hits; - oldnfsstats.lookupcache_misses = - nfsstatsv1.lookupcache_misses; - oldnfsstats.direofcache_hits = - nfsstatsv1.direofcache_hits; - oldnfsstats.direofcache_misses = - nfsstatsv1.direofcache_misses; - oldnfsstats.accesscache_hits = - nfsstatsv1.accesscache_hits; - oldnfsstats.accesscache_misses = - nfsstatsv1.accesscache_misses; - oldnfsstats.biocache_reads = - nfsstatsv1.biocache_reads; - oldnfsstats.read_bios = - nfsstatsv1.read_bios; - oldnfsstats.read_physios = - nfsstatsv1.read_physios; - oldnfsstats.biocache_writes = - nfsstatsv1.biocache_writes; - oldnfsstats.write_bios = - nfsstatsv1.write_bios; - oldnfsstats.write_physios = - nfsstatsv1.write_physios; - oldnfsstats.biocache_readlinks = - nfsstatsv1.biocache_readlinks; - oldnfsstats.readlink_bios = - nfsstatsv1.readlink_bios; - oldnfsstats.biocache_readdirs = - nfsstatsv1.biocache_readdirs; - oldnfsstats.readdir_bios = - nfsstatsv1.readdir_bios; - for (i = 0; i < NFSV4_NPROCS; i++) - oldnfsstats.rpccnt[i] = nfsstatsv1.rpccnt[i]; - oldnfsstats.rpcretries = nfsstatsv1.rpcretries; - for (i = 0; i < NFSV4OP_NOPS; i++) - oldnfsstats.srvrpccnt[i] = - nfsstatsv1.srvrpccnt[i]; - for (i = NFSV42_NOPS, j = NFSV4OP_NOPS; - i < NFSV42_NOPS + NFSV4OP_FAKENOPS; i++, j++) - oldnfsstats.srvrpccnt[j] = - nfsstatsv1.srvrpccnt[i]; - oldnfsstats.srvrpc_errs = nfsstatsv1.srvrpc_errs; - oldnfsstats.srv_errs = nfsstatsv1.srv_errs; - oldnfsstats.rpcrequests = nfsstatsv1.rpcrequests; - oldnfsstats.rpctimeouts = nfsstatsv1.rpctimeouts; - oldnfsstats.rpcunexpected = nfsstatsv1.rpcunexpected; - oldnfsstats.rpcinvalid = nfsstatsv1.rpcinvalid; - oldnfsstats.srvcache_inproghits = - nfsstatsv1.srvcache_inproghits; - oldnfsstats.srvcache_idemdonehits = - nfsstatsv1.srvcache_idemdonehits; - oldnfsstats.srvcache_nonidemdonehits = - nfsstatsv1.srvcache_nonidemdonehits; - oldnfsstats.srvcache_misses = - nfsstatsv1.srvcache_misses; - oldnfsstats.srvcache_tcppeak = - nfsstatsv1.srvcache_tcppeak; - oldnfsstats.srvcache_size = nfsstatsv1.srvcache_size; - oldnfsstats.srvclients = nfsstatsv1.srvclients; - oldnfsstats.srvopenowners = nfsstatsv1.srvopenowners; - oldnfsstats.srvopens = nfsstatsv1.srvopens; - oldnfsstats.srvlockowners = nfsstatsv1.srvlockowners; - oldnfsstats.srvlocks = nfsstatsv1.srvlocks; - oldnfsstats.srvdelegates = nfsstatsv1.srvdelegates; - for (i = 0; i < NFSV4OP_CBNOPS; i++) - oldnfsstats.cbrpccnt[i] = - nfsstatsv1.cbrpccnt[i]; - oldnfsstats.clopenowners = nfsstatsv1.clopenowners; - oldnfsstats.clopens = nfsstatsv1.clopens; - oldnfsstats.cllockowners = nfsstatsv1.cllockowners; - oldnfsstats.cllocks = nfsstatsv1.cllocks; - oldnfsstats.cldelegates = nfsstatsv1.cldelegates; - oldnfsstats.cllocalopenowners = - nfsstatsv1.cllocalopenowners; - oldnfsstats.cllocalopens = nfsstatsv1.cllocalopens; - oldnfsstats.cllocallockowners = - nfsstatsv1.cllocallockowners; - oldnfsstats.cllocallocks = nfsstatsv1.cllocallocks; - error = copyout(&oldnfsstats, uap->argp, - sizeof (oldnfsstats)); - } else { - error = copyin(uap->argp, &nfsstatver, - sizeof(nfsstatver)); - if (error == 0 && nfsstatver.vers != NFSSTATS_V1) - error = EPERM; - if (error == 0) - error = copyout(&nfsstatsv1, uap->argp, - sizeof (nfsstatsv1)); - } + error = copyout(&newnfsstats, + CAST_USER_ADDR_T(uap->argp), sizeof (newnfsstats)); if (error == 0) { if ((uap->flag & NFSSVC_ZEROCLTSTATS) != 0) { - nfsstatsv1.attrcache_hits = 0; - nfsstatsv1.attrcache_misses = 0; - nfsstatsv1.lookupcache_hits = 0; - nfsstatsv1.lookupcache_misses = 0; - nfsstatsv1.direofcache_hits = 0; - nfsstatsv1.direofcache_misses = 0; - nfsstatsv1.accesscache_hits = 0; - nfsstatsv1.accesscache_misses = 0; - nfsstatsv1.biocache_reads = 0; - nfsstatsv1.read_bios = 0; - nfsstatsv1.read_physios = 0; - nfsstatsv1.biocache_writes = 0; - nfsstatsv1.write_bios = 0; - nfsstatsv1.write_physios = 0; - nfsstatsv1.biocache_readlinks = 0; - nfsstatsv1.readlink_bios = 0; - nfsstatsv1.biocache_readdirs = 0; - nfsstatsv1.readdir_bios = 0; - nfsstatsv1.rpcretries = 0; - nfsstatsv1.rpcrequests = 0; - nfsstatsv1.rpctimeouts = 0; - nfsstatsv1.rpcunexpected = 0; - nfsstatsv1.rpcinvalid = 0; - bzero(nfsstatsv1.rpccnt, - sizeof(nfsstatsv1.rpccnt)); + newnfsstats.attrcache_hits = 0; + newnfsstats.attrcache_misses = 0; + newnfsstats.lookupcache_hits = 0; + newnfsstats.lookupcache_misses = 0; + newnfsstats.direofcache_hits = 0; + newnfsstats.direofcache_misses = 0; + newnfsstats.accesscache_hits = 0; + newnfsstats.accesscache_misses = 0; + newnfsstats.biocache_reads = 0; + newnfsstats.read_bios = 0; + newnfsstats.read_physios = 0; + newnfsstats.biocache_writes = 0; + newnfsstats.write_bios = 0; + newnfsstats.write_physios = 0; + newnfsstats.biocache_readlinks = 0; + newnfsstats.readlink_bios = 0; + newnfsstats.biocache_readdirs = 0; + newnfsstats.readdir_bios = 0; + newnfsstats.rpcretries = 0; + newnfsstats.rpcrequests = 0; + newnfsstats.rpctimeouts = 0; + newnfsstats.rpcunexpected = 0; + newnfsstats.rpcinvalid = 0; + bzero(newnfsstats.rpccnt, + sizeof(newnfsstats.rpccnt)); } if ((uap->flag & NFSSVC_ZEROSRVSTATS) != 0) { - nfsstatsv1.srvrpc_errs = 0; - nfsstatsv1.srv_errs = 0; - nfsstatsv1.srvcache_inproghits = 0; - nfsstatsv1.srvcache_idemdonehits = 0; - nfsstatsv1.srvcache_nonidemdonehits = 0; - nfsstatsv1.srvcache_misses = 0; - nfsstatsv1.srvcache_tcppeak = 0; - nfsstatsv1.srvclients = 0; - nfsstatsv1.srvopenowners = 0; - nfsstatsv1.srvopens = 0; - nfsstatsv1.srvlockowners = 0; - nfsstatsv1.srvlocks = 0; - nfsstatsv1.srvdelegates = 0; - nfsstatsv1.clopenowners = 0; - nfsstatsv1.clopens = 0; - nfsstatsv1.cllockowners = 0; - nfsstatsv1.cllocks = 0; - nfsstatsv1.cldelegates = 0; - nfsstatsv1.cllocalopenowners = 0; - nfsstatsv1.cllocalopens = 0; - nfsstatsv1.cllocallockowners = 0; - nfsstatsv1.cllocallocks = 0; - bzero(nfsstatsv1.srvrpccnt, - sizeof(nfsstatsv1.srvrpccnt)); - bzero(nfsstatsv1.cbrpccnt, - sizeof(nfsstatsv1.cbrpccnt)); + newnfsstats.srvrpc_errs = 0; + newnfsstats.srv_errs = 0; + newnfsstats.srvcache_inproghits = 0; + newnfsstats.srvcache_idemdonehits = 0; + newnfsstats.srvcache_nonidemdonehits = 0; + newnfsstats.srvcache_misses = 0; + newnfsstats.srvcache_tcppeak = 0; + newnfsstats.srvclients = 0; + newnfsstats.srvopenowners = 0; + newnfsstats.srvopens = 0; + newnfsstats.srvlockowners = 0; + newnfsstats.srvlocks = 0; + newnfsstats.srvdelegates = 0; + newnfsstats.clopenowners = 0; + newnfsstats.clopens = 0; + newnfsstats.cllockowners = 0; + newnfsstats.cllocks = 0; + newnfsstats.cldelegates = 0; + newnfsstats.cllocalopenowners = 0; + newnfsstats.cllocalopens = 0; + newnfsstats.cllocallockowners = 0; + newnfsstats.cllocallocks = 0; + bzero(newnfsstats.srvrpccnt, + sizeof(newnfsstats.srvrpccnt)); + bzero(newnfsstats.cbrpccnt, + sizeof(newnfsstats.cbrpccnt)); } } goto out; Modified: stable/10/sys/fs/nfs/nfsport.h ============================================================================== --- stable/10/sys/fs/nfs/nfsport.h Mon Oct 3 23:16:38 2016 (r306662) +++ stable/10/sys/fs/nfs/nfsport.h Mon Oct 3 23:17:57 2016 (r306663) @@ -55,7 +55,6 @@ #include #include #include -#include #include #include #include @@ -254,26 +253,24 @@ /* * Must be one more than last op#. - * NFSv4.2 isn't implemented yet, but define the op# limit for it. */ #define NFSV41_NOPS 59 -#define NFSV42_NOPS 72 /* Quirky case if the illegal op code */ #define NFSV4OP_OPILLEGAL 10044 /* - * Fake NFSV4OP_xxx used for nfsstat. Start at NFSV42_NOPS. + * Fake NFSV4OP_xxx used for nfsstat. Start at NFSV4OP_NOPS. */ -#define NFSV4OP_SYMLINK (NFSV42_NOPS) -#define NFSV4OP_MKDIR (NFSV42_NOPS + 1) -#define NFSV4OP_RMDIR (NFSV42_NOPS + 2) -#define NFSV4OP_READDIRPLUS (NFSV42_NOPS + 3) -#define NFSV4OP_MKNOD (NFSV42_NOPS + 4) -#define NFSV4OP_FSSTAT (NFSV42_NOPS + 5) -#define NFSV4OP_FSINFO (NFSV42_NOPS + 6) -#define NFSV4OP_PATHCONF (NFSV42_NOPS + 7) -#define NFSV4OP_V3CREATE (NFSV42_NOPS + 8) +#define NFSV4OP_SYMLINK (NFSV4OP_NOPS) +#define NFSV4OP_MKDIR (NFSV4OP_NOPS + 1) +#define NFSV4OP_RMDIR (NFSV4OP_NOPS + 2) +#define NFSV4OP_READDIRPLUS (NFSV4OP_NOPS + 3) +#define NFSV4OP_MKNOD (NFSV4OP_NOPS + 4) +#define NFSV4OP_FSSTAT (NFSV4OP_NOPS + 5) +#define NFSV4OP_FSINFO (NFSV4OP_NOPS + 6) +#define NFSV4OP_PATHCONF (NFSV4OP_NOPS + 7) +#define NFSV4OP_V3CREATE (NFSV4OP_NOPS + 8) /* * This is the count of the fake operations listed above. @@ -287,12 +284,12 @@ #define NFSV4OP_CBRECALL 4 /* - * Must be one greater than the last Callback Operation# for NFSv4.0. + * Must be one greater than the last Callback Operation#. */ #define NFSV4OP_CBNOPS 5 /* - * Additional Callback Ops for NFSv4.1 only. + * Additional Callback Ops for NFSv4.1 only. Not yet in nfsstats. */ #define NFSV4OP_CBLAYOUTRECALL 5 #define NFSV4OP_CBNOTIFY 6 @@ -305,9 +302,6 @@ #define NFSV4OP_CBNOTIFYLOCK 13 #define NFSV4OP_CBNOTIFYDEVID 14 -#define NFSV41_CBNOPS 15 -#define NFSV42_CBNOPS 16 - /* * The lower numbers -> 21 are used by NFSv2 and v3. These define higher * numbers used by NFSv4. @@ -365,72 +359,7 @@ #endif /* NFS_V3NPROCS */ /* - * New stats structure. - * The vers field will be set to NFSSTATS_V1 by the caller. - */ -#define NFSSTATS_V1 1 -struct nfsstatsv1 { - int vers; /* Set to version requested by caller. */ - uint64_t attrcache_hits; - uint64_t attrcache_misses; - uint64_t lookupcache_hits; - uint64_t lookupcache_misses; - uint64_t direofcache_hits; - uint64_t direofcache_misses; - uint64_t accesscache_hits; - uint64_t accesscache_misses; - uint64_t biocache_reads; - uint64_t read_bios; - uint64_t read_physios; - uint64_t biocache_writes; - uint64_t write_bios; - uint64_t write_physios; - uint64_t biocache_readlinks; - uint64_t readlink_bios; - uint64_t biocache_readdirs; - uint64_t readdir_bios; - uint64_t rpccnt[NFSV41_NPROCS + 15]; - uint64_t rpcretries; - uint64_t srvrpccnt[NFSV42_NOPS + NFSV4OP_FAKENOPS]; - uint64_t srvrpc_errs; - uint64_t srv_errs; - uint64_t rpcrequests; - uint64_t rpctimeouts; - uint64_t rpcunexpected; - uint64_t rpcinvalid; - uint64_t srvcache_inproghits; - uint64_t srvcache_idemdonehits; - uint64_t srvcache_nonidemdonehits; - uint64_t srvcache_misses; - uint64_t srvcache_tcppeak; - int srvcache_size; /* Updated by atomic_xx_int(). */ - uint64_t srvclients; - uint64_t srvopenowners; - uint64_t srvopens; - uint64_t srvlockowners; - uint64_t srvlocks; - uint64_t srvdelegates; - uint64_t cbrpccnt[NFSV42_CBNOPS]; - uint64_t clopenowners; - uint64_t clopens; - uint64_t cllockowners; - uint64_t cllocks; - uint64_t cldelegates; - uint64_t cllocalopenowners; - uint64_t cllocalopens; - uint64_t cllocallockowners; - uint64_t cllocallocks; - uint64_t srvstartcnt; - uint64_t srvdonecnt; - uint64_t srvbytes[NFSV42_NOPS + NFSV4OP_FAKENOPS]; - uint64_t srvops[NFSV42_NOPS + NFSV4OP_FAKENOPS]; - struct bintime srvduration[NFSV42_NOPS + NFSV4OP_FAKENOPS]; - struct bintime busyfrom; - struct bintime busytime; -}; - -/* - * Old stats structure. + * Stats structure */ struct ext_nfsstats { int attrcache_hits; @@ -486,6 +415,11 @@ struct ext_nfsstats { #ifdef _KERNEL /* + * Define the ext_nfsstats as nfsstats for the kernel code. + */ +#define nfsstats ext_nfsstats + +/* * Define NFS_NPROCS as NFSV4_NPROCS for the experimental kernel code. */ #ifndef NFS_NPROCS Modified: stable/10/sys/fs/nfs/nfsproto.h ============================================================================== --- stable/10/sys/fs/nfs/nfsproto.h Mon Oct 3 23:16:38 2016 (r306662) +++ stable/10/sys/fs/nfs/nfsproto.h Mon Oct 3 23:17:57 2016 (r306663) @@ -345,10 +345,10 @@ /* * NFSPROC_NOOP is a fake op# that can't be the same as any V2/3/4 Procedure - * or Operation#. Since the NFS V4 Op #s go higher, use NFSV42_NOPS, which + * or Operation#. Since the NFS V4 Op #s go higher, use NFSV41_NOPS, which * is one greater than the highest Op#. */ -#define NFSPROC_NOOP NFSV42_NOPS +#define NFSPROC_NOOP NFSV41_NOPS /* Actual Version 2 procedure numbers */ #define NFSV2PROC_NULL 0 Modified: stable/10/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clbio.c Mon Oct 3 23:16:38 2016 (r306662) +++ stable/10/sys/fs/nfsclient/nfs_clbio.c Mon Oct 3 23:17:57 2016 (r306663) @@ -62,7 +62,7 @@ __FBSDID("$FreeBSD$"); #include extern int newnfs_directio_allow_mmap; -extern struct nfsstatsv1 nfsstatsv1; +extern struct nfsstats newnfsstats; extern struct mtx ncl_iod_mutex; extern int ncl_numasync; extern enum nfsiod_state ncl_iodwant[NFS_MAXASYNCDAEMON]; @@ -482,7 +482,7 @@ ncl_bioread(struct vnode *vp, struct uio switch (vp->v_type) { case VREG: - NFSINCRGLOBAL(nfsstatsv1.biocache_reads); + NFSINCRGLOBAL(newnfsstats.biocache_reads); lbn = uio->uio_offset / biosize; on = uio->uio_offset - (lbn * biosize); @@ -559,7 +559,7 @@ ncl_bioread(struct vnode *vp, struct uio n = MIN((unsigned)(bcount - on), uio->uio_resid); break; case VLNK: - NFSINCRGLOBAL(nfsstatsv1.biocache_readlinks); + NFSINCRGLOBAL(newnfsstats.biocache_readlinks); bp = nfs_getcacheblk(vp, (daddr_t)0, NFS_MAXPATHLEN, td); if (!bp) { error = newnfs_sigintr(nmp, td); @@ -579,7 +579,7 @@ ncl_bioread(struct vnode *vp, struct uio on = 0; break; case VDIR: - NFSINCRGLOBAL(nfsstatsv1.biocache_readdirs); + NFSINCRGLOBAL(newnfsstats.biocache_readdirs); if (np->n_direofoffset && uio->uio_offset >= np->n_direofoffset) { return (0); @@ -1008,7 +1008,7 @@ ncl_write(struct vop_write_args *ap) } } - NFSINCRGLOBAL(nfsstatsv1.biocache_writes); + NFSINCRGLOBAL(newnfsstats.biocache_writes); lbn = uio->uio_offset / biosize; on = uio->uio_offset - (lbn * biosize); n = MIN((unsigned)(biosize - on), uio->uio_resid); @@ -1622,7 +1622,7 @@ ncl_doio(struct vnode *vp, struct buf *b switch (vp->v_type) { case VREG: uiop->uio_offset = ((off_t)bp->b_blkno) * DEV_BSIZE; - NFSINCRGLOBAL(nfsstatsv1.read_bios); + NFSINCRGLOBAL(newnfsstats.read_bios); error = ncl_readrpc(vp, uiop, cr); if (!error) { @@ -1657,11 +1657,11 @@ ncl_doio(struct vnode *vp, struct buf *b break; case VLNK: uiop->uio_offset = (off_t)0; - NFSINCRGLOBAL(nfsstatsv1.readlink_bios); + NFSINCRGLOBAL(newnfsstats.readlink_bios); error = ncl_readlinkrpc(vp, uiop, cr); break; case VDIR: - NFSINCRGLOBAL(nfsstatsv1.readdir_bios); + NFSINCRGLOBAL(newnfsstats.readdir_bios); uiop->uio_offset = ((u_quad_t)bp->b_lblkno) * NFS_DIRBLKSIZ; if ((nmp->nm_flag & NFSMNT_RDIRPLUS) != 0) { error = ncl_readdirplusrpc(vp, uiop, cr, td); @@ -1723,7 +1723,7 @@ ncl_doio(struct vnode *vp, struct buf *b + bp->b_dirtyoff; io.iov_base = (char *)bp->b_data + bp->b_dirtyoff; uiop->uio_rw = UIO_WRITE; - NFSINCRGLOBAL(nfsstatsv1.write_bios); + NFSINCRGLOBAL(newnfsstats.write_bios); if ((bp->b_flags & (B_ASYNC | B_NEEDCOMMIT | B_NOCACHE | B_CLUSTER)) == B_ASYNC) iomode = NFSWRITE_UNSTABLE; Modified: stable/10/sys/fs/nfsclient/nfs_clcomsubs.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clcomsubs.c Mon Oct 3 23:16:38 2016 (r306662) +++ stable/10/sys/fs/nfsclient/nfs_clcomsubs.c Mon Oct 3 23:17:57 2016 (r306663) @@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$"); #ifndef APPLEKEXT #include -extern struct nfsstatsv1 nfsstatsv1; +extern struct nfsstats newnfsstats; extern struct nfsv4_opflag nfsv4_opflag[NFSV41_NOPS]; extern int ncl_mbuf_mlen; extern enum vtype newnv2tov_type[8]; @@ -241,8 +241,8 @@ nfscl_reqstart(struct nfsrv_descript *nd } else { (void) nfsm_fhtom(nd, nfhp, fhlen, 0); } - if (procnum < NFSV41_NPROCS) - NFSINCRGLOBAL(nfsstatsv1.rpccnt[procnum]); + if (procnum < NFSV4_NPROCS) + NFSINCRGLOBAL(newnfsstats.rpccnt[procnum]); } #ifndef APPLE Modified: stable/10/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clstate.c Mon Oct 3 23:16:38 2016 (r306662) +++ stable/10/sys/fs/nfsclient/nfs_clstate.c Mon Oct 3 23:17:57 2016 (r306663) @@ -84,7 +84,7 @@ __FBSDID("$FreeBSD$"); /* * Global variables */ -extern struct nfsstatsv1 nfsstatsv1; +extern struct nfsstats newnfsstats; extern struct nfsreqhead nfsd_reqq; extern u_int32_t newnfs_false, newnfs_true; extern int nfscl_debuglevel; @@ -343,10 +343,10 @@ nfscl_newopen(struct nfsclclient *clp, s nowp->nfsow_defunct = 0; nfscl_lockinit(&nowp->nfsow_rwlock); if (dp != NULL) { - nfsstatsv1.cllocalopenowners++; + newnfsstats.cllocalopenowners++; LIST_INSERT_HEAD(&dp->nfsdl_owner, nowp, nfsow_list); } else { - nfsstatsv1.clopenowners++; + newnfsstats.clopenowners++; LIST_INSERT_HEAD(&clp->nfsc_owner, nowp, nfsow_list); } owp = *owpp = nowp; @@ -380,9 +380,9 @@ nfscl_newopen(struct nfsclclient *clp, s TAILQ_INSERT_HEAD(&clp->nfsc_deleg, dp, nfsdl_list); dp->nfsdl_timestamp = NFSD_MONOSEC + 120; - nfsstatsv1.cllocalopens++; + newnfsstats.cllocalopens++; } else { - nfsstatsv1.clopens++; + newnfsstats.clopens++; } LIST_INSERT_HEAD(&owp->nfsow_open, nop, nfso_list); *opp = nop; @@ -430,7 +430,7 @@ nfscl_deleg(mount_t mp, struct nfsclclie LIST_INSERT_HEAD(NFSCLDELEGHASH(clp, nfhp, fhlen), dp, nfsdl_hash); dp->nfsdl_timestamp = NFSD_MONOSEC + 120; - nfsstatsv1.cldelegates++; + newnfsstats.cldelegates++; nfscl_delegcnt++; } else { /* @@ -1071,10 +1071,10 @@ nfscl_getbytelock(vnode_t vp, u_int64_t LIST_INIT(&nlp->nfsl_lock); if (donelocally) { nlp->nfsl_open = NULL; - nfsstatsv1.cllocallockowners++; + newnfsstats.cllocallockowners++; } else { nlp->nfsl_open = op; - nfsstatsv1.cllockowners++; + newnfsstats.cllockowners++; } LIST_INSERT_HEAD(lhp, nlp, nfsl_list); lp = nlp; @@ -1402,9 +1402,9 @@ nfscl_freeopen(struct nfsclopen *op, int nfscl_freealllocks(&op->nfso_lock, local); FREE((caddr_t)op, M_NFSCLOPEN); if (local) - nfsstatsv1.cllocalopens--; + newnfsstats.cllocalopens--; else - nfsstatsv1.clopens--; + newnfsstats.clopens--; } /* @@ -1483,9 +1483,9 @@ nfscl_freeopenowner(struct nfsclowner *o LIST_REMOVE(owp, nfsow_list); FREE((caddr_t)owp, M_NFSCLOWNER); if (local) - nfsstatsv1.cllocalopenowners--; + newnfsstats.cllocalopenowners--; else - nfsstatsv1.clopenowners--; + newnfsstats.clopenowners--; } /* @@ -1502,9 +1502,9 @@ nfscl_freelockowner(struct nfscllockowne } FREE((caddr_t)lp, M_NFSCLLOCKOWNER); if (local) - nfsstatsv1.cllocallockowners--; + newnfsstats.cllocallockowners--; else - nfsstatsv1.cllockowners--; + newnfsstats.cllockowners--; } /* @@ -1517,9 +1517,9 @@ nfscl_freelock(struct nfscllock *lop, in LIST_REMOVE(lop, nfslo_list); FREE((caddr_t)lop, M_NFSCLLOCK); if (local) - nfsstatsv1.cllocallocks--; + newnfsstats.cllocallocks--; else - nfsstatsv1.cllocks--; + newnfsstats.cllocks--; } /* @@ -1553,7 +1553,7 @@ nfscl_freedeleg(struct nfscldeleghead *h TAILQ_REMOVE(hdp, dp, nfsdl_list); LIST_REMOVE(dp, nfsdl_hash); FREE((caddr_t)dp, M_NFSCLDELEG); - nfsstatsv1.cldelegates--; + newnfsstats.cldelegates--; nfscl_delegcnt--; } @@ -1621,18 +1621,18 @@ nfscl_expireclient(struct nfsclclient *c LIST_REMOVE(op, nfso_list); op->nfso_own = towp; LIST_INSERT_HEAD(&towp->nfsow_open, op, nfso_list); - nfsstatsv1.cllocalopens--; - nfsstatsv1.clopens++; + newnfsstats.cllocalopens--; + newnfsstats.clopens++; } } else { /* Just add the openowner to the client list */ LIST_REMOVE(owp, nfsow_list); owp->nfsow_clp = clp; LIST_INSERT_HEAD(&clp->nfsc_owner, owp, nfsow_list); - nfsstatsv1.cllocalopenowners--; - nfsstatsv1.clopenowners++; - nfsstatsv1.cllocalopens--; - nfsstatsv1.clopens++; + newnfsstats.cllocalopenowners--; + newnfsstats.clopenowners++; + newnfsstats.cllocalopens--; + newnfsstats.clopens++; } } owp = nowp; @@ -2282,9 +2282,9 @@ nfscl_insertlock(struct nfscllockowner * else LIST_INSERT_AFTER(insert_lop, new_lop, nfslo_list); if (local) - nfsstatsv1.cllocallocks++; + newnfsstats.cllocallocks++; else - nfsstatsv1.cllocks++; + newnfsstats.cllocks++; } /* @@ -2571,7 +2571,7 @@ tryagain: LIST_REMOVE(dp, nfsdl_hash); TAILQ_INSERT_HEAD(&dh, dp, nfsdl_list); nfscl_delegcnt--; - nfsstatsv1.cldelegates--; + newnfsstats.cldelegates--; } NFSLOCKCLSTATE(); } @@ -2612,7 +2612,7 @@ tryagain: LIST_REMOVE(dp, nfsdl_hash); TAILQ_INSERT_HEAD(&dh, dp, nfsdl_list); nfscl_delegcnt--; - nfsstatsv1.cldelegates--; + newnfsstats.cldelegates--; } } dp = ndp; @@ -3215,8 +3215,8 @@ nfscl_docb(struct nfsrv_descript *nd, NF break; } nd->nd_procnum = op; - if (op < NFSV41_CBNOPS) - nfsstatsv1.cbrpccnt[nd->nd_procnum]++; + if (op < NFSV4OP_CBNOPS) + newnfsstats.cbrpccnt[nd->nd_procnum]++; switch (op) { case NFSV4OP_CBGETATTR: NFSCL_DEBUG(4, "cbgetattr\n"); Modified: stable/10/sys/fs/nfsclient/nfs_clsubs.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clsubs.c Mon Oct 3 23:16:38 2016 (r306662) +++ stable/10/sys/fs/nfsclient/nfs_clsubs.c Mon Oct 3 23:17:57 2016 (r306663) @@ -85,7 +85,7 @@ extern enum nfsiod_state ncl_iodwant[NFS extern struct nfsmount *ncl_iodmount[NFS_MAXASYNCDAEMON]; extern int ncl_numasync; extern unsigned int ncl_iodmax; -extern struct nfsstatsv1 nfsstatsv1; +extern struct nfsstats newnfsstats; struct task ncl_nfsiodnew_task; @@ -221,12 +221,12 @@ ncl_getattrcache(struct vnode *vp, struc if ((time_second - np->n_attrstamp) >= timeo && (mustflush != 0 || np->n_attrstamp == 0)) { - nfsstatsv1.attrcache_misses++; + newnfsstats.attrcache_misses++; mtx_unlock(&np->n_mtx); KDTRACE_NFS_ATTRCACHE_GET_MISS(vp); return( ENOENT); } - nfsstatsv1.attrcache_hits++; + newnfsstats.attrcache_hits++; if (vap->va_size != np->n_size) { if (vap->va_type == VREG) { if (np->n_flag & NMODIFIED) { Modified: stable/10/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clvfsops.c Mon Oct 3 23:16:38 2016 (r306662) +++ stable/10/sys/fs/nfsclient/nfs_clvfsops.c Mon Oct 3 23:17:57 2016 (r306663) @@ -78,6 +78,7 @@ FEATURE(nfscl, "NFSv4 client"); extern int nfscl_ticks; extern struct timeval nfsboottime; +extern struct nfsstats newnfsstats; extern int nfsrv_useacl; extern int nfscl_debuglevel; extern enum nfsiod_state ncl_iodwant[NFS_MAXASYNCDAEMON]; Modified: stable/10/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clvnops.c Mon Oct 3 23:16:38 2016 (r306662) +++ stable/10/sys/fs/nfsclient/nfs_clvnops.c Mon Oct 3 23:17:57 2016 (r306663) @@ -101,7 +101,7 @@ uint32_t nfscl_accesscache_load_done_id; #define TRUE 1 #define FALSE 0 -extern struct nfsstatsv1 nfsstatsv1; +extern struct nfsstats newnfsstats; extern int nfsrv_useacl; extern int nfscl_debuglevel; MALLOC_DECLARE(M_NEWNFSREQ); @@ -259,6 +259,14 @@ int newnfs_directio_allow_mmap = 1; SYSCTL_INT(_vfs_nfs, OID_AUTO, nfs_directio_allow_mmap, CTLFLAG_RW, &newnfs_directio_allow_mmap, 0, "Enable mmaped IO on file with O_DIRECT opens"); +#if 0 +SYSCTL_INT(_vfs_nfs, OID_AUTO, access_cache_hits, CTLFLAG_RD, + &newnfsstats.accesscache_hits, 0, "NFS ACCESS cache hit count"); + +SYSCTL_INT(_vfs_nfs, OID_AUTO, access_cache_misses, CTLFLAG_RD, + &newnfsstats.accesscache_misses, 0, "NFS ACCESS cache miss count"); +#endif + #define NFSACCESS_ALL (NFSACCESS_READ | NFSACCESS_MODIFY \ | NFSACCESS_EXTEND | NFSACCESS_EXECUTE \ | NFSACCESS_DELETE | NFSACCESS_LOOKUP) @@ -411,7 +419,7 @@ nfs_access(struct vop_access_args *ap) if (time_second < (np->n_accesscache[i].stamp + nfsaccess_cache_timeout) && (np->n_accesscache[i].mode & mode) == mode) { - NFSINCRGLOBAL(nfsstatsv1.accesscache_hits); + NFSINCRGLOBAL(newnfsstats.accesscache_hits); gotahit = 1; } break; @@ -430,7 +438,7 @@ nfs_access(struct vop_access_args *ap) /* * Either a no, or a don't know. Go to the wire. */ - NFSINCRGLOBAL(nfsstatsv1.accesscache_misses); + NFSINCRGLOBAL(newnfsstats.accesscache_misses); error = nfs34_access_otw(vp, wmode, ap->a_td, ap->a_cred, &rmode); if (!error && @@ -850,7 +858,7 @@ nfs_getattr(struct vop_getattr_args *ap) if (NFS_ISV34(vp) && nfs_prime_access_cache && nfsaccess_cache_timeout > 0) { - NFSINCRGLOBAL(nfsstatsv1.accesscache_misses); + NFSINCRGLOBAL(newnfsstats.accesscache_misses); nfs34_access_otw(vp, NFSACCESS_ALL, td, ap->a_cred, NULL); if (ncl_getattrcache(vp, ap->a_vap) == 0) { nfscl_deleggetmodtime(vp, &ap->a_vap->va_mtime); @@ -1107,7 +1115,7 @@ nfs_lookup(struct vop_lookup_args *ap) ((u_int)(ticks - ncticks) < (nmp->nm_nametimeo * hz) && VOP_GETATTR(newvp, &vattr, cnp->cn_cred) == 0 && timespeccmp(&vattr.va_ctime, &nctime, ==))) { - NFSINCRGLOBAL(nfsstatsv1.lookupcache_hits); + NFSINCRGLOBAL(newnfsstats.lookupcache_hits); if (cnp->cn_nameiop != LOOKUP && (flags & ISLASTCN)) cnp->cn_flags |= SAVENAME; @@ -1134,7 +1142,7 @@ nfs_lookup(struct vop_lookup_args *ap) if ((u_int)(ticks - ncticks) < (nmp->nm_negnametimeo * hz) && VOP_GETATTR(dvp, &vattr, cnp->cn_cred) == 0 && timespeccmp(&vattr.va_mtime, &nctime, ==)) { - NFSINCRGLOBAL(nfsstatsv1.lookupcache_hits); + NFSINCRGLOBAL(newnfsstats.lookupcache_hits); return (ENOENT); } cache_purge_negative(dvp); @@ -1142,7 +1150,7 @@ nfs_lookup(struct vop_lookup_args *ap) error = 0; newvp = NULLVP; - NFSINCRGLOBAL(nfsstatsv1.lookupcache_misses); + NFSINCRGLOBAL(newnfsstats.lookupcache_misses); error = nfsrpc_lookup(dvp, cnp->cn_nameptr, cnp->cn_namelen, cnp->cn_cred, td, &dnfsva, &nfsva, &nfhp, &attrflag, &dattrflag, NULL); @@ -2220,7 +2228,7 @@ nfs_readdir(struct vop_readdir_args *ap) if ((NFS_ISV4(vp) && np->n_change == vattr.va_filerev) || !NFS_TIMESPEC_COMPARE(&np->n_mtime, &vattr.va_mtime)) { mtx_unlock(&np->n_mtx); - NFSINCRGLOBAL(nfsstatsv1.direofcache_hits); + NFSINCRGLOBAL(newnfsstats.direofcache_hits); if (ap->a_eofflag != NULL) *ap->a_eofflag = 1; return (0); @@ -2247,7 +2255,7 @@ nfs_readdir(struct vop_readdir_args *ap) error = ncl_bioread(vp, uio, 0, ap->a_cred); if (!error && uio->uio_resid == tresid) { - NFSINCRGLOBAL(nfsstatsv1.direofcache_misses); + NFSINCRGLOBAL(newnfsstats.direofcache_misses); if (ap->a_eofflag != NULL) *ap->a_eofflag = 1; } Modified: stable/10/sys/fs/nfsserver/nfs_nfsdcache.c ============================================================================== --- stable/10/sys/fs/nfsserver/nfs_nfsdcache.c Mon Oct 3 23:16:38 2016 (r306662) +++ stable/10/sys/fs/nfsserver/nfs_nfsdcache.c Mon Oct 3 23:17:57 2016 (r306663) @@ -159,7 +159,7 @@ __FBSDID("$FreeBSD$"); #ifndef APPLEKEXT #include -extern struct nfsstatsv1 nfsstatsv1; +extern struct nfsstats newnfsstats; extern struct mtx nfsrc_udpmtx; extern struct nfsrchash_bucket nfsrchash_table[NFSRVCACHE_HASHSIZE]; extern struct nfsrchash_bucket nfsrcahash_table[NFSRVCACHE_HASHSIZE]; @@ -318,8 +318,8 @@ nfsrvd_initcache(void) TAILQ_INIT(&nfsrvudplru); nfsrc_tcpsavedreplies = 0; nfsrc_udpcachesize = 0; - nfsstatsv1.srvcache_tcppeak = 0; - nfsstatsv1.srvcache_size = 0; + newnfsstats.srvcache_tcppeak = 0; + newnfsstats.srvcache_size = 0; } /* @@ -395,14 +395,14 @@ loop: TAILQ_REMOVE(&nfsrvudplru, rp, rc_lru); TAILQ_INSERT_TAIL(&nfsrvudplru, rp, rc_lru); if (rp->rc_flag & RC_INPROG) { - nfsstatsv1.srvcache_inproghits++; + newnfsstats.srvcache_inproghits++; mtx_unlock(mutex); ret = RC_DROPIT; } else if (rp->rc_flag & RC_REPSTATUS) { /* * V2 only. */ - nfsstatsv1.srvcache_nonidemdonehits++; + newnfsstats.srvcache_nonidemdonehits++; mtx_unlock(mutex); nfsrvd_rephead(nd); *(nd->nd_errp) = rp->rc_status; @@ -410,7 +410,7 @@ loop: rp->rc_timestamp = NFSD_MONOSEC + NFSRVCACHE_UDPTIMEOUT; } else if (rp->rc_flag & RC_REPMBUF) { - nfsstatsv1.srvcache_nonidemdonehits++; + newnfsstats.srvcache_nonidemdonehits++; mtx_unlock(mutex); nd->nd_mreq = m_copym(rp->rc_reply, 0, M_COPYALL, M_WAITOK); @@ -425,8 +425,8 @@ loop: goto out; } } - nfsstatsv1.srvcache_misses++; - atomic_add_int(&nfsstatsv1.srvcache_size, 1); + newnfsstats.srvcache_misses++; + atomic_add_int(&newnfsstats.srvcache_size, 1); nfsrc_udpcachesize++; newrp->rc_flag |= RC_INPROG; @@ -480,7 +480,7 @@ nfsrvd_updatecache(struct nfsrv_descript * Reply from cache is a special case returned by nfsrv_checkseqid(). */ if (nd->nd_repstat == NFSERR_REPLYFROMCACHE) { - nfsstatsv1.srvcache_nonidemdonehits++; + newnfsstats.srvcache_nonidemdonehits++; mtx_unlock(mutex); nd->nd_repstat = 0; if (nd->nd_mreq) @@ -519,8 +519,8 @@ nfsrvd_updatecache(struct nfsrv_descript if (!(rp->rc_flag & RC_UDP)) { atomic_add_int(&nfsrc_tcpsavedreplies, 1); if (nfsrc_tcpsavedreplies > - nfsstatsv1.srvcache_tcppeak) - nfsstatsv1.srvcache_tcppeak = + newnfsstats.srvcache_tcppeak) + newnfsstats.srvcache_tcppeak = nfsrc_tcpsavedreplies; } mtx_unlock(mutex); @@ -678,7 +678,7 @@ tryagain: panic("nfs tcp cache0"); rp->rc_flag |= RC_LOCKED; if (rp->rc_flag & RC_INPROG) { - nfsstatsv1.srvcache_inproghits++; + newnfsstats.srvcache_inproghits++; mtx_unlock(mutex); if (newrp->rc_sockref == rp->rc_sockref) nfsrc_marksametcpconn(rp->rc_sockref); @@ -687,7 +687,7 @@ tryagain: /* * V2 only. */ - nfsstatsv1.srvcache_nonidemdonehits++; + newnfsstats.srvcache_nonidemdonehits++; mtx_unlock(mutex); if (newrp->rc_sockref == rp->rc_sockref) nfsrc_marksametcpconn(rp->rc_sockref); @@ -696,7 +696,7 @@ tryagain: *(nd->nd_errp) = rp->rc_status; rp->rc_timestamp = NFSD_MONOSEC + nfsrc_tcptimeout; } else if (rp->rc_flag & RC_REPMBUF) { - nfsstatsv1.srvcache_nonidemdonehits++; + newnfsstats.srvcache_nonidemdonehits++; mtx_unlock(mutex); if (newrp->rc_sockref == rp->rc_sockref) nfsrc_marksametcpconn(rp->rc_sockref); @@ -711,8 +711,8 @@ tryagain: free((caddr_t)newrp, M_NFSRVCACHE); goto out; } - nfsstatsv1.srvcache_misses++; - atomic_add_int(&nfsstatsv1.srvcache_size, 1); + newnfsstats.srvcache_misses++; + atomic_add_int(&newnfsstats.srvcache_size, 1); /* * For TCP, multiple entries for a key are allowed, so don't @@ -801,7 +801,7 @@ nfsrc_freecache(struct nfsrvcache *rp) atomic_add_int(&nfsrc_tcpsavedreplies, -1); } FREE((caddr_t)rp, M_NFSRVCACHE); - atomic_add_int(&nfsstatsv1.srvcache_size, -1); + atomic_add_int(&newnfsstats.srvcache_size, -1); } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Oct 3 23:49:08 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A409AF4DAA; Mon, 3 Oct 2016 23:49:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C39FE1B9; Mon, 3 Oct 2016 23:49:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u93Nn7b2068994; Mon, 3 Oct 2016 23:49:07 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u93Nn6Ld068983; Mon, 3 Oct 2016 23:49:06 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201610032349.u93Nn6Ld068983@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 3 Oct 2016 23:49:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306664 - in stable/11: share/man/man4 sys/arm/conf sys/conf sys/dev/cxgbe sys/dev/cxgbe/common sys/dev/cxgbe/iw_cxgbe sys/modules/cxgbe sys/modules/cxgbe/if_cxgbev sys/modules/cxgbe/if... X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 23:49:08 -0000 Author: jhb Date: Mon Oct 3 23:49:05 2016 New Revision: 306664 URL: https://svnweb.freebsd.org/changeset/base/306664 Log: MFC 303522,303647,303860,303880,304168,304169,304170,304479,304485,305549: Chelsio T4/T5 VF driver. 303522: Various fixes to the t4/5nex character device. - Remove null open/close methods. - Don't set d_flags to 0 explicitly. - Remove t5_cdevsw as the .d_name member isn't really used and doesn't warrant a separate cdevsw just for the name. - Use ENOTTY as the error value for an unknown ioctl request. - Use make_dev_s() to close race with setting si_drv1. 303647: Store the offset of the KDOORBELL and GTS registers in the softc. VF devices use a different register layout than PF devices. Storing the offset in a value in the softc allows code to be shared between the PF and VF drivers. 303860: Reserve an adapter flag IS_VF to mark VF devices vs PF devices. 303880: Track the base absolute ID of ingress and egress queues. Use this to map an absolute queue ID to a logical queue ID in interrupt handlers. For the regular cxgbe/cxl drivers this should be a no-op as the base absolute ID should be zero. VF devices have a non-zero base absolute ID and require this change. While here, export the absolute ID of egress queues via a sysctl. 304168: Make SGE parameter handling more VF-friendly. Add fields to hold the SGE control register and free list buffer sizes to the sge_params structure. Populate these new fields in t4_init_sge_params() for PF devices and change t4_read_chip_settings() to pull these values out of the params structure instead of reading registers directly. This will permit t4_read_chip_settings() to be reused for VF devices which cannot read SGE registers directly. While here, move the call to t4_init_sge_params() to get_params__post_init(). The VF driver will populate the SGE parameters structure via a different method before calling t4_read_chip_settings(). 304169: Update mailbox writes to work with VF devices. - Use alternate register locations for the data and control registers for VFs. - Do a dummy read to force the writes to the mailbox data registers to post before the write to the control register on VFs. - Do not check the PCI-e firmware register for errors on VFs. 304170: Add support for register dumps on VF devices. - Add handling of VF register sets to t4_get_regs_len() and t4_get_regs(). - While here, use t4_get_regs_len() in the ioctl handler for regdump instead of inlining it. 304479: Add structures for VF-specific adapter parameters. While here, mark which parameters are PF-specific and which are VF-specific. 304485: Reorder sysctls so that nodes shared with the VF driver are added first. This permits a single early return for VF devices in the routines that add sysctl nodes. 305549: Chelsio T4/T5 VF driver. The cxgbev/cxlv driver supports Virtual Function devices for Chelsio T4 and T4 adapters. The VF devices share most of their code with the existing PF4 driver (cxgbe/cxl) and as such the VF device driver currently depends on the PF4 driver. Similar to the cxgbe/cxl drivers, the VF driver includes a t4vf/t5vf PCI device driver that attaches to the VF device. It then creates child cxgbev/cxlv devices representing ports assigned to the VF. By default, the PF driver assigns a single port to each VF. t4vf_hw.c contains VF-specific routines from the shared code used to fetch VF-specific parameters from the firmware. t4_vf.c contains the VF-specific PCI device driver and includes its own attach routine. VF devices are required to use a different firmware request when transmitting packets (which in turn requires a different CPL message to encapsulate messages). This alternate firmware request does not permit chaining multiple packets in a single message, so each packet results in a firmware request. In addition, the different CPL message requires more detailed information when enabling hardware checksums, so parse_pkt() on VF devices must examine L2 and L3 headers for all packets (not just TSO packets) for VF devices. Finally, L2 checksums on non-UDP/non-TCP packets do not work reliably (the firmware trashes the IPv4 fragment field), so IPv4 checksums for such packets are calculated in software. Most of the other changes in the non-VF-specific code are to expose various variables and functions private to the PF driver so that they can be used by the VF driver. Note that a limited subset of cxgbetool functions are supported on VF devices including register dumps, scheduler classes, and clearing of statistics. In addition, TOE is not supported on VF devices, only for the PF interfaces. Sponsored by: Chelsio Communications Added: stable/11/share/man/man4/cxgbev.4 - copied unchanged from r305549, head/share/man/man4/cxgbev.4 stable/11/sys/dev/cxgbe/common/t4vf_hw.c - copied unchanged from r305549, head/sys/dev/cxgbe/common/t4vf_hw.c stable/11/sys/dev/cxgbe/if_cxlv.c - copied unchanged from r305549, head/sys/dev/cxgbe/if_cxlv.c stable/11/sys/dev/cxgbe/t4_vf.c - copied unchanged from r305549, head/sys/dev/cxgbe/t4_vf.c stable/11/sys/modules/cxgbe/if_cxgbev/ - copied from r305549, head/sys/modules/cxgbe/if_cxgbev/ stable/11/sys/modules/cxgbe/if_cxlv/ - copied from r305549, head/sys/modules/cxgbe/if_cxlv/ Modified: stable/11/share/man/man4/Makefile stable/11/share/man/man4/cxgbe.4 stable/11/sys/arm/conf/NOTES stable/11/sys/conf/NOTES stable/11/sys/conf/files stable/11/sys/dev/cxgbe/adapter.h stable/11/sys/dev/cxgbe/common/common.h stable/11/sys/dev/cxgbe/common/t4_hw.c stable/11/sys/dev/cxgbe/iw_cxgbe/cq.c stable/11/sys/dev/cxgbe/iw_cxgbe/qp.c stable/11/sys/dev/cxgbe/t4_main.c stable/11/sys/dev/cxgbe/t4_netmap.c stable/11/sys/dev/cxgbe/t4_sge.c stable/11/sys/modules/cxgbe/Makefile stable/11/sys/powerpc/conf/NOTES Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/Makefile ============================================================================== --- stable/11/share/man/man4/Makefile Mon Oct 3 23:17:57 2016 (r306663) +++ stable/11/share/man/man4/Makefile Mon Oct 3 23:49:05 2016 (r306664) @@ -113,6 +113,7 @@ MAN= aac.4 \ cue.4 \ cxgb.4 \ cxgbe.4 \ + cxgbev.4 \ cy.4 \ cyapa.4 \ da.4 \ @@ -607,6 +608,9 @@ MLINKS+=cxgb.4 if_cxgb.4 MLINKS+=cxgbe.4 if_cxgbe.4 \ cxgbe.4 cxl.4 \ cxgbe.4 if_cxl.4 +MLINKS+=cxgbev.4 if_cxgbev.4 \ + cxgbev.4 cxlv.4 \ + cxgbev.4 if_cxlv.4 MLINKS+=dc.4 if_dc.4 MLINKS+=de.4 if_de.4 MLINKS+=disc.4 if_disc.4 Modified: stable/11/share/man/man4/cxgbe.4 ============================================================================== --- stable/11/share/man/man4/cxgbe.4 Mon Oct 3 23:17:57 2016 (r306663) +++ stable/11/share/man/man4/cxgbe.4 Mon Oct 3 23:49:05 2016 (r306664) @@ -77,8 +77,7 @@ For more information on configuring this .Sh HARDWARE The .Nm -driver supports 40Gb, 10Gb and 1Gb Ethernet adapters based on the T5 ASIC -(ports will be named cxl): +driver supports 40Gb, 10Gb and 1Gb Ethernet adapters based on the T5 ASIC: .Pp .Bl -bullet -compact .It @@ -320,6 +319,7 @@ email all the specific information relat .Xr altq 4 , .Xr arp 4 , .Xr cxgb 4 , +.Xr cxgbev 4 , .Xr netintro 4 , .Xr ng_ether 4 , .Xr ifconfig 8 Copied: stable/11/share/man/man4/cxgbev.4 (from r305549, head/share/man/man4/cxgbev.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/share/man/man4/cxgbev.4 Mon Oct 3 23:49:05 2016 (r306664, copy of r305549, head/share/man/man4/cxgbev.4) @@ -0,0 +1,290 @@ +.\" Copyright (c) 2011-2016, Chelsio Inc +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are met: +.\" +.\" 1. Redistributions of source code must retain the above copyright notice, +.\" this list of conditions and the following disclaimer. +.\" +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" 3. Neither the name of the Chelsio Inc 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 THE COPYRIGHT OWNER 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. +.\" +.\" * Other names and brands may be claimed as the property of others. +.\" +.\" $FreeBSD$ +.\" +.Dd August 22, 2016 +.Dt CXGBEV 4 +.Os +.Sh NAME +.Nm cxgbev +.Nd "Chelsio T4 and T5 based 40Gb, 10Gb, and 1Gb Ethernet VF driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device cxgbe" +.Cd "device cxgbev" +.Ed +.Pp +To load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_cxgbev_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for Virtual Functions on PCI Express Ethernet adapters +based on the Chelsio Terminator 4 and Terminator 5 ASICs (T4 and T5). +The driver supports Jumbo Frames, Transmit/Receive checksum offload, +TCP segmentation offload (TSO), Large Receive Offload (LRO), VLAN +tag insertion/extraction, VLAN checksum offload, VLAN TSO, and +Receive Side Steering (RSS). +For further hardware information and questions related to hardware +requirements, see +.Pa http://www.chelsio.com/ . +.Pp +Note that ports of T5 VFs are named cxlv and attach to a t5vf parent device +(in contrast to ports named cxgbev that attach to a t4vf parent for a T4 VF). +Loader tunables with the hw.cxgbe prefix apply to both T4 and T5 VFs. +The Physical Function driver for T4 and T5 adapters shares these tunables. +The sysctl MIBs are at dev.t5vf and dev.cxlv for T5 cards and at dev.t4vf and +dev.cxgbev for T4 cards. +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver supports Virtual Functions on 40Gb, 10Gb and 1Gb Ethernet adapters +based on the T5 ASIC: +.Pp +.Bl -bullet -compact +.It +Chelsio T580-CR +.It +Chelsio T580-LP-CR +.It +Chelsio T580-LP-SO-CR +.It +Chelsio T560-CR +.It +Chelsio T540-CR +.It +Chelsio T540-LP-CR +.It +Chelsio T522-CR +.It +Chelsio T520-LL-CR +.It +Chelsio T520-CR +.It +Chelsio T520-SO +.It +Chelsio T520-BT +.It +Chelsio T504-BT +.El +.Pp +The +.Nm +driver supports Virtual Functions on 10Gb and 1Gb Ethernet adapters based +on the T4 ASIC: +.Pp +.Bl -bullet -compact +.It +Chelsio T420-CR +.It +Chelsio T422-CR +.It +Chelsio T440-CR +.It +Chelsio T420-BCH +.It +Chelsio T440-BCH +.It +Chelsio T440-CH +.It +Chelsio T420-SO +.It +Chelsio T420-CX +.It +Chelsio T420-BT +.It +Chelsio T404-BT +.El +.Sh LOADER TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt before booting the kernel or stored in +.Xr loader.conf 5 . +.Bl -tag -width indent +.It Va hw.cxgbe.ntxq10g +The number of tx queues to use for a 10Gb or 40Gb port. +The default is 16 or the number +of CPU cores in the system, whichever is less. +.It Va hw.cxgbe.nrxq10g +The number of rx queues to use for a 10Gb or 40Gb port. +The default is 8 or the number +of CPU cores in the system, whichever is less. +.It Va hw.cxgbe.ntxq1g +The number of tx queues to use for a 1Gb port. +The default is 4 or the number +of CPU cores in the system, whichever is less. +.It Va hw.cxgbe.nrxq1g +The number of rx queues to use for a 1Gb port. +The default is 2 or the number +of CPU cores in the system, whichever is less. +.It Va hw.cxgbe.holdoff_timer_idx_10G +.It Va hw.cxgbe.holdoff_timer_idx_1G +The timer index value to use to delay interrupts. +The holdoff timer list has the values 1, 5, 10, 50, 100, and 200 +by default (all values are in microseconds) and the index selects a +value from this list. +The default value is 1 which means the timer value is 5us. +Different interfaces can be assigned different values at any time via the +dev.cxgbev.X.holdoff_tmr_idx or dev.cxlv.X.holdoff_tmr_idx sysctl. +.It Va hw.cxgbe.holdoff_pktc_idx_10G +.It Va hw.cxgbe.holdoff_pktc_idx_1G +The packet-count index value to use to delay interrupts. +The packet-count list has the values 1, 8, 16, and 32 by default +and the index selects a value from this list. +The default value is -1 which means packet counting is disabled and interrupts +are generated based solely on the holdoff timer value. +Different interfaces can be assigned different values via the +dev.cxgbev.X.holdoff_pktc_idx or dev.cxlv.X.holdoff_pktc_idx sysctl. +This sysctl works only when the interface has never been marked up (as done by +ifconfig up). +.It Va hw.cxgbe.qsize_txq +The size, in number of entries, of the descriptor ring used for a tx +queue. +A buf_ring of the same size is also allocated for additional +software queuing. +See +.Xr ifnet 9 . +The default value is 1024. +Different interfaces can be assigned different values via the +dev.cxgbev.X.qsize_txq sysctl or dev.cxlv.X.qsize_txq sysctl. +This sysctl works only when the interface has never been marked up (as done by +ifconfig up). +.It Va hw.cxgbe.qsize_rxq +The size, in number of entries, of the descriptor ring used for an +rx queue. +The default value is 1024. +Different interfaces can be assigned different values via the +dev.cxgbev.X.qsize_rxq or dev.cxlv.X.qsize_rxq sysctl. +This sysctl works only when the interface has never been marked up (as done by +ifconfig up). +.It Va hw.cxgbe.interrupt_types +The interrupt types that the driver is allowed to use. +Bit 0 represents INTx (line interrupts), bit 1 MSI, bit 2 MSI-X. +The default is 7 (all allowed). +The driver will select the best possible type out of the allowed types by +itself. +.It Va hw.cxgbe.fl_pktshift +The number of bytes of padding inserted before the beginning of an Ethernet +frame in the receive buffer. +The default value of 2 ensures that the Ethernet payload (usually the IP header) +is at a 4 byte aligned address. +0-7 are all valid values. +.It Va hw.cxgbe.fl_pad +A non-zero value ensures that writes from the hardware to a receive buffer are +padded up to the specified boundary. +The default is -1 which lets the driver pick a pad boundary. +0 disables trailer padding completely. +.It Va hw.cxgbe.buffer_packing +Allow the hardware to deliver multiple frames in the same receive buffer +opportunistically. +The default is -1 which lets the driver decide. +0 or 1 explicitly disable or enable this feature. +.It Va hw.cxgbe.allow_mbufs_in_cluster +1 allows the driver to lay down one or more mbufs within the receive buffer +opportunistically. +This is the default. +0 prohibits the driver from doing so. +.It Va hw.cxgbe.largest_rx_cluster +.It Va hw.cxgbe.safest_rx_cluster +Sizes of rx clusters. +Each of these must be set to one of the sizes available +(usually 2048, 4096, 9216, and 16384) and largest_rx_cluster must be greater +than or equal to safest_rx_cluster. +The defaults are 16384 and 4096 respectively. +The driver will never attempt to allocate a receive buffer larger than +largest_rx_cluster and will fall back to allocating buffers of +safest_rx_cluster size if an allocation larger than safest_rx_cluster fails. +Note that largest_rx_cluster merely establishes a ceiling -- the driver is +allowed to allocate buffers of smaller sizes. +.El +.Pp +Certain settings and resources for Virtual Functions are dictated +by the parent Physical Function driver. +For example, the Physical Function driver limits the number of queues a +Virtual Function is permitted to use. +Some of these limits can be adjusted in the firmware configuration file +used with the Physical Function driver. +.Pp +The PAUSE settings on the port of a Virtual Function are inherited from +the settings of the same port on the Physical Function. +Virtual Functions cannot modify the setting and track changes made to +the associated port's setting by the Physical Function driver. +.Pp +Receive queues on a Virtual Function always drop packets in response to +congestion +.Po +equivalent to setting +.Va hw.cxgbe.cong_drop +to 1 +.Pc . +.Pp +The VF driver currently depends on the PF driver. +As a result, loading the VF driver will also load the PF driver as a +dependency. +.Sh SUPPORT +For general information and support, +go to the Chelsio support website at: +.Pa http://www.chelsio.com/ . +.Pp +If an issue is identified with this driver with a supported adapter, +email all the specific information related to the issue to +.Aq Mt support@chelsio.com . +.Sh SEE ALSO +.Xr altq 4 , +.Xr arp 4 , +.Xr cxgbe 4 , +.Xr netintro 4 , +.Xr ng_ether 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 12.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Navdeep Parhar Aq Mt np@FreeBSD.org +and +.An John Baldwin Aq Mt jhb@FreeBSD.org . Modified: stable/11/sys/arm/conf/NOTES ============================================================================== --- stable/11/sys/arm/conf/NOTES Mon Oct 3 23:17:57 2016 (r306663) +++ stable/11/sys/arm/conf/NOTES Mon Oct 3 23:49:05 2016 (r306664) @@ -80,6 +80,7 @@ nodevice star_saver nodevice warp_saver nodevice cxgbe +nodevice cxgbev nodevice snd_cmi # Modified: stable/11/sys/conf/NOTES ============================================================================== --- stable/11/sys/conf/NOTES Mon Oct 3 23:17:57 2016 (r306663) +++ stable/11/sys/conf/NOTES Mon Oct 3 23:49:05 2016 (r306664) @@ -1949,6 +1949,7 @@ device xmphy # XaQti XMAC II # (and SMC COM90c66 in '56 compatibility mode) adapters. # cxgb: Chelsio T3 based 1GbE/10GbE PCIe Ethernet adapters. # cxgbe:Chelsio T4 and T5 based 1GbE/10GbE/40GbE PCIe Ethernet adapters. +# cxgbev: Chelsio T4 and T5 based PCIe Virtual Functions. # dc: Support for PCI fast ethernet adapters based on the DEC/Intel 21143 # and various workalikes including: # the ADMtek AL981 Comet and AN985 Centaur, the ASIX Electronics @@ -2132,6 +2133,7 @@ device wb # Winbond W89C840F device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'') # PCI Ethernet NICs. +device cxgbev # Chelsio T4 and T5 1GbE/10GbE/40GbE VF device de # DEC/Intel DC21x4x (``Tulip'') device em # Intel Pro/1000 Gigabit Ethernet device igb # Intel Pro/1000 PCIE Gigabit Ethernet Modified: stable/11/sys/conf/files ============================================================================== --- stable/11/sys/conf/files Mon Oct 3 23:17:57 2016 (r306663) +++ stable/11/sys/conf/files Mon Oct 3 23:49:05 2016 (r306664) @@ -1258,8 +1258,12 @@ dev/cxgbe/t4_l2t.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_tracer.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" +dev/cxgbe/t4_vf.c optional cxgbev pci \ + compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/common/t4_hw.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" +dev/cxgbe/common/t4vf_hw.c optional cxgbev pci \ + compile-with "${NORMAL_C} -I$S/dev/cxgbe" t4fw_cfg.c optional cxgbe \ compile-with "${AWK} -f $S/tools/fw_stub.awk t4fw_cfg.fw:t4fw_cfg t4fw_cfg_uwire.fw:t4fw_cfg_uwire t4fw.fw:t4fw -mt4fw_cfg -c${.TARGET}" \ no-implicit-rule before-depend local \ Modified: stable/11/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/11/sys/dev/cxgbe/adapter.h Mon Oct 3 23:17:57 2016 (r306663) +++ stable/11/sys/dev/cxgbe/adapter.h Mon Oct 3 23:49:05 2016 (r306664) @@ -195,6 +195,7 @@ enum { ADAP_SYSCTL_CTX = (1 << 4), /* TOM_INIT_DONE= (1 << 5), No longer used */ BUF_PACKING_OK = (1 << 6), + IS_VF = (1 << 7), CXGBE_BUSY = (1 << 9), @@ -429,6 +430,7 @@ enum {DOORBELL_UDB, DOORBELL_WCWR, DOORB struct sge_eq { unsigned int flags; /* MUST be first */ unsigned int cntxt_id; /* SGE context id for the eq */ + unsigned int abs_id; /* absolute SGE id for the eq */ struct mtx eq_lock; struct tx_desc *desc; /* KVA of descriptor ring */ @@ -737,8 +739,10 @@ struct sge { struct sge_nm_txq *nm_txq; /* netmap tx queues */ struct sge_nm_rxq *nm_rxq; /* netmap rx queues */ - uint16_t iq_start; - int eq_start; + uint16_t iq_start; /* first cntxt_id */ + uint16_t iq_base; /* first abs_id */ + int eq_start; /* first cntxt_id */ + int eq_base; /* first abs_id */ struct sge_iq **iqmap; /* iq->cntxt_id to iq mapping */ struct sge_eq **eqmap; /* eq->cntxt_id to eq mapping */ @@ -781,6 +785,8 @@ struct adapter { struct sge_rxq *rxq; struct sge_nm_rxq *nm_rxq; } __aligned(CACHE_LINE_SIZE) *irq; + int sge_gts_reg; + int sge_kdoorbell_reg; bus_dma_tag_t dmat; /* Parent DMA tag */ @@ -938,6 +944,9 @@ struct adapter { /* One for errors, one for firmware events */ #define T4_EXTRA_INTR 2 +/* One for firmware events */ +#define T4VF_EXTRA_INTR 1 + static inline uint32_t t4_read_reg(struct adapter *sc, uint32_t reg) { @@ -1072,13 +1081,34 @@ t4_use_ldst(struct adapter *sc) } /* t4_main.c */ +extern int t4_ntxq10g; +extern int t4_nrxq10g; +extern int t4_ntxq1g; +extern int t4_nrxq1g; +extern int t4_intr_types; +extern int t4_tmr_idx_10g; +extern int t4_pktc_idx_10g; +extern int t4_tmr_idx_1g; +extern int t4_pktc_idx_1g; +extern unsigned int t4_qsize_rxq; +extern unsigned int t4_qsize_txq; +extern device_method_t cxgbe_methods[]; + int t4_os_find_pci_capability(struct adapter *, int); int t4_os_pci_save_state(struct adapter *); int t4_os_pci_restore_state(struct adapter *); void t4_os_portmod_changed(const struct adapter *, int); void t4_os_link_changed(struct adapter *, int, int, int); void t4_iterate(void (*)(struct adapter *, void *), void *); +void t4_add_adapter(struct adapter *); +int t4_detach_common(device_t); int t4_filter_rpl(struct sge_iq *, const struct rss_header *, struct mbuf *); +int t4_map_bars_0_and_4(struct adapter *); +int t4_map_bar_2(struct adapter *); +int t4_set_sched_class(struct adapter *, struct t4_sched_params *); +int t4_set_sched_queue(struct adapter *, struct t4_sched_queue *); +int t4_setup_intr_handlers(struct adapter *); +void t4_sysctls(struct adapter *); int begin_synchronized_op(struct adapter *, struct vi_info *, int, char *); void doom_vi(struct adapter *, struct vi_info *); void end_synchronized_op(struct adapter *, int); @@ -1119,7 +1149,7 @@ void t4_intr_err(void *); void t4_intr_evt(void *); void t4_wrq_tx_locked(struct adapter *, struct sge_wrq *, struct wrqe *); void t4_update_fl_bufsize(struct ifnet *); -int parse_pkt(struct mbuf **); +int parse_pkt(struct adapter *, struct mbuf **); void *start_wrq_wr(struct sge_wrq *, int, struct wrq_cookie *); void commit_wrq_wr(struct sge_wrq *, void *, struct wrq_cookie *); int tnl_cong(struct port_info *, int); Modified: stable/11/sys/dev/cxgbe/common/common.h ============================================================================== --- stable/11/sys/dev/cxgbe/common/common.h Mon Oct 3 23:17:57 2016 (r306663) +++ stable/11/sys/dev/cxgbe/common/common.h Mon Oct 3 23:49:05 2016 (r306664) @@ -215,6 +215,8 @@ struct sge_params { int pad_boundary; int pack_boundary; int fl_pktshift; + u32 sge_control; + u32 sge_fl_buffer_size[SGE_FLBUF_SIZES]; }; struct tp_params { @@ -278,12 +280,52 @@ struct chip_params { u16 mps_tcam_size; }; +/* VF-only parameters. */ + +/* + * Global Receive Side Scaling (RSS) parameters in host-native format. + */ +struct rss_params { + unsigned int mode; /* RSS mode */ + union { + struct { + u_int synmapen:1; /* SYN Map Enable */ + u_int syn4tupenipv6:1; /* enable hashing 4-tuple IPv6 SYNs */ + u_int syn2tupenipv6:1; /* enable hashing 2-tuple IPv6 SYNs */ + u_int syn4tupenipv4:1; /* enable hashing 4-tuple IPv4 SYNs */ + u_int syn2tupenipv4:1; /* enable hashing 2-tuple IPv4 SYNs */ + u_int ofdmapen:1; /* Offload Map Enable */ + u_int tnlmapen:1; /* Tunnel Map Enable */ + u_int tnlalllookup:1; /* Tunnel All Lookup */ + u_int hashtoeplitz:1; /* use Toeplitz hash */ + } basicvirtual; + } u; +}; + +/* + * Maximum resources provisioned for a PCI VF. + */ +struct vf_resources { + unsigned int nvi; /* N virtual interfaces */ + unsigned int neq; /* N egress Qs */ + unsigned int nethctrl; /* N egress ETH or CTRL Qs */ + unsigned int niqflint; /* N ingress Qs/w free list(s) & intr */ + unsigned int niq; /* N ingress Qs */ + unsigned int tc; /* PCI-E traffic class */ + unsigned int pmask; /* port access rights mask */ + unsigned int nexactf; /* N exact MPS filters */ + unsigned int r_caps; /* read capabilities */ + unsigned int wx_caps; /* write/execute capabilities */ +}; + struct adapter_params { struct sge_params sge; - struct tp_params tp; + struct tp_params tp; /* PF-only */ struct vpd_params vpd; struct pci_params pci; - struct devlog_params devlog; + struct devlog_params devlog; /* PF-only */ + struct rss_params rss; /* VF-only */ + struct vf_resources vfres; /* VF-only */ unsigned int sf_size; /* serial flash size in bytes */ unsigned int sf_nsec; /* # of flash sectors */ @@ -509,6 +551,7 @@ int t4_get_fw_version(struct adapter *ad int t4_get_tp_version(struct adapter *adapter, u32 *vers); int t4_get_exprom_version(struct adapter *adapter, u32 *vers); int t4_init_hw(struct adapter *adapter, u32 fw_params); +const struct chip_params *t4_get_chip_params(int chipid); int t4_prep_adapter(struct adapter *adapter, u8 *buf); int t4_shutdown_adapter(struct adapter *adapter); int t4_init_devlog_params(struct adapter *adapter, int fw_attach); @@ -716,4 +759,32 @@ int t4_config_watchdog(struct adapter *a int t4_get_devlog_level(struct adapter *adapter, unsigned int *level); int t4_set_devlog_level(struct adapter *adapter, unsigned int level); void t4_sge_decode_idma_state(struct adapter *adapter, int state); + +static inline int t4vf_query_params(struct adapter *adapter, + unsigned int nparams, const u32 *params, + u32 *vals) +{ + return t4_query_params(adapter, 0, 0, 0, nparams, params, vals); +} + +static inline int t4vf_set_params(struct adapter *adapter, + unsigned int nparams, const u32 *params, + const u32 *vals) +{ + return t4_set_params(adapter, 0, 0, 0, nparams, params, vals); +} + +static inline int t4vf_wr_mbox(struct adapter *adap, const void *cmd, + int size, void *rpl) +{ + return t4_wr_mbox(adap, adap->mbox, cmd, size, rpl); +} + +int t4vf_wait_dev_ready(struct adapter *adapter); +int t4vf_fw_reset(struct adapter *adapter); +int t4vf_get_sge_params(struct adapter *adapter); +int t4vf_get_rss_glb_config(struct adapter *adapter); +int t4vf_get_vfres(struct adapter *adapter); +int t4vf_prep_adapter(struct adapter *adapter); + #endif /* __CHELSIO_COMMON_H */ Modified: stable/11/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/11/sys/dev/cxgbe/common/t4_hw.c Mon Oct 3 23:17:57 2016 (r306663) +++ stable/11/sys/dev/cxgbe/common/t4_hw.c Mon Oct 3 23:49:05 2016 (r306664) @@ -289,6 +289,14 @@ int t4_wr_mbox_meat_timeout(struct adapt if ((size & 15) || size > MBOX_LEN) return -EINVAL; + if (adap->flags & IS_VF) { + if (is_t6(adap)) + data_reg = FW_T6VF_MBDATA_BASE_ADDR; + else + data_reg = FW_T4VF_MBDATA_BASE_ADDR; + ctl_reg = VF_CIM_REG(A_CIM_VF_EXT_MAILBOX_CTRL); + } + /* * If we have a negative timeout, that implies that we can't sleep. */ @@ -343,6 +351,22 @@ int t4_wr_mbox_meat_timeout(struct adapt for (i = 0; i < size; i += 8, p++) t4_write_reg64(adap, data_reg + i, be64_to_cpu(*p)); + if (adap->flags & IS_VF) { + /* + * For the VFs, the Mailbox Data "registers" are + * actually backed by T4's "MA" interface rather than + * PL Registers (as is the case for the PFs). Because + * these are in different coherency domains, the write + * to the VF's PL-register-backed Mailbox Control can + * race in front of the writes to the MA-backed VF + * Mailbox Data "registers". So we need to do a + * read-back on at least one byte of the VF Mailbox + * Data registers before doing the write to the VF + * Mailbox Control register. + */ + t4_read_reg(adap, data_reg); + } + CH_DUMP_MBOX(adap, mbox, data_reg); t4_write_reg(adap, ctl_reg, F_MBMSGVALID | V_MBOWNER(X_MBOWNER_FW)); @@ -355,10 +379,13 @@ int t4_wr_mbox_meat_timeout(struct adapt * Loop waiting for the reply; bail out if we time out or the firmware * reports an error. */ - for (i = 0; - !((pcie_fw = t4_read_reg(adap, A_PCIE_FW)) & F_PCIE_FW_ERR) && - i < timeout; - i += ms) { + pcie_fw = 0; + for (i = 0; i < timeout; i += ms) { + if (!(adap->flags & IS_VF)) { + pcie_fw = t4_read_reg(adap, A_PCIE_FW); + if (pcie_fw & F_PCIE_FW_ERR) + break; + } if (sleep_ok) { ms = delay[delay_idx]; /* last element may repeat */ if (delay_idx < ARRAY_SIZE(delay) - 1) @@ -698,10 +725,14 @@ unsigned int t4_get_regs_len(struct adap switch (chip_version) { case CHELSIO_T4: + if (adapter->flags & IS_VF) + return FW_T4VF_REGMAP_SIZE; return T4_REGMAP_SIZE; case CHELSIO_T5: case CHELSIO_T6: + if (adapter->flags & IS_VF) + return FW_T4VF_REGMAP_SIZE; return T5_REGMAP_SIZE; } @@ -1180,6 +1211,18 @@ void t4_get_regs(struct adapter *adap, u 0x27e00, 0x27e04, }; + static const unsigned int t4vf_reg_ranges[] = { + VF_SGE_REG(A_SGE_VF_KDOORBELL), VF_SGE_REG(A_SGE_VF_GTS), + VF_MPS_REG(A_MPS_VF_CTL), + VF_MPS_REG(A_MPS_VF_STAT_RX_VF_ERR_FRAMES_H), + VF_PL_REG(A_PL_VF_WHOAMI), VF_PL_REG(A_PL_VF_WHOAMI), + VF_CIM_REG(A_CIM_VF_EXT_MAILBOX_CTRL), + VF_CIM_REG(A_CIM_VF_EXT_MAILBOX_STATUS), + FW_T4VF_MBDATA_BASE_ADDR, + FW_T4VF_MBDATA_BASE_ADDR + + ((NUM_CIM_PF_MAILBOX_DATA_INSTANCES - 1) * 4), + }; + static const unsigned int t5_reg_ranges[] = { 0x1008, 0x10c0, 0x10cc, 0x10f8, @@ -1955,6 +1998,18 @@ void t4_get_regs(struct adapter *adap, u 0x51300, 0x51308, }; + static const unsigned int t5vf_reg_ranges[] = { + VF_SGE_REG(A_SGE_VF_KDOORBELL), VF_SGE_REG(A_SGE_VF_GTS), + VF_MPS_REG(A_MPS_VF_CTL), + VF_MPS_REG(A_MPS_VF_STAT_RX_VF_ERR_FRAMES_H), + VF_PL_REG(A_PL_VF_WHOAMI), VF_PL_REG(A_PL_VF_REVISION), + VF_CIM_REG(A_CIM_VF_EXT_MAILBOX_CTRL), + VF_CIM_REG(A_CIM_VF_EXT_MAILBOX_STATUS), + FW_T4VF_MBDATA_BASE_ADDR, + FW_T4VF_MBDATA_BASE_ADDR + + ((NUM_CIM_PF_MAILBOX_DATA_INSTANCES - 1) * 4), + }; + static const unsigned int t6_reg_ranges[] = { 0x1008, 0x101c, 0x1024, 0x10a8, @@ -2532,6 +2587,18 @@ void t4_get_regs(struct adapter *adap, u 0x51300, 0x51324, }; + static const unsigned int t6vf_reg_ranges[] = { + VF_SGE_REG(A_SGE_VF_KDOORBELL), VF_SGE_REG(A_SGE_VF_GTS), + VF_MPS_REG(A_MPS_VF_CTL), + VF_MPS_REG(A_MPS_VF_STAT_RX_VF_ERR_FRAMES_H), + VF_PL_REG(A_PL_VF_WHOAMI), VF_PL_REG(A_PL_VF_REVISION), + VF_CIM_REG(A_CIM_VF_EXT_MAILBOX_CTRL), + VF_CIM_REG(A_CIM_VF_EXT_MAILBOX_STATUS), + FW_T6VF_MBDATA_BASE_ADDR, + FW_T6VF_MBDATA_BASE_ADDR + + ((NUM_CIM_PF_MAILBOX_DATA_INSTANCES - 1) * 4), + }; + u32 *buf_end = (u32 *)(buf + buf_size); const unsigned int *reg_ranges; int reg_ranges_size, range; @@ -2543,18 +2610,33 @@ void t4_get_regs(struct adapter *adap, u */ switch (chip_version) { case CHELSIO_T4: - reg_ranges = t4_reg_ranges; - reg_ranges_size = ARRAY_SIZE(t4_reg_ranges); + if (adap->flags & IS_VF) { + reg_ranges = t4vf_reg_ranges; + reg_ranges_size = ARRAY_SIZE(t4vf_reg_ranges); + } else { + reg_ranges = t4_reg_ranges; + reg_ranges_size = ARRAY_SIZE(t4_reg_ranges); + } break; case CHELSIO_T5: - reg_ranges = t5_reg_ranges; - reg_ranges_size = ARRAY_SIZE(t5_reg_ranges); + if (adap->flags & IS_VF) { + reg_ranges = t5vf_reg_ranges; + reg_ranges_size = ARRAY_SIZE(t5vf_reg_ranges); + } else { + reg_ranges = t5_reg_ranges; + reg_ranges_size = ARRAY_SIZE(t5_reg_ranges); + } break; case CHELSIO_T6: - reg_ranges = t6_reg_ranges; - reg_ranges_size = ARRAY_SIZE(t6_reg_ranges); + if (adap->flags & IS_VF) { + reg_ranges = t6vf_reg_ranges; + reg_ranges_size = ARRAY_SIZE(t6vf_reg_ranges); + } else { + reg_ranges = t6_reg_ranges; + reg_ranges_size = ARRAY_SIZE(t6_reg_ranges); + } break; default: @@ -7416,7 +7498,7 @@ static void set_pcie_completion_timeout( } } -static const struct chip_params *get_chip_params(int chipid) +const struct chip_params *t4_get_chip_params(int chipid) { static const struct chip_params chip_params[] = { { @@ -7495,7 +7577,7 @@ int t4_prep_adapter(struct adapter *adap } } - adapter->chip_params = get_chip_params(chip_id(adapter)); + adapter->chip_params = t4_get_chip_params(chip_id(adapter)); if (adapter->chip_params == NULL) return -EINVAL; @@ -7644,6 +7726,7 @@ int t4_init_sge_params(struct adapter *a { u32 r; struct sge_params *sp = &adapter->params.sge; + unsigned i; r = t4_read_reg(adapter, A_SGE_INGRESS_RX_THRESHOLD); sp->counter_val[0] = G_THRESHOLD_0(r); @@ -7686,6 +7769,7 @@ int t4_init_sge_params(struct adapter *a sp->page_shift = (r & M_HOSTPAGESIZEPF0) + 10; r = t4_read_reg(adapter, A_SGE_CONTROL); + sp->sge_control = r; sp->spg_len = r & F_EGRSTATUSPAGESIZE ? 128 : 64; sp->fl_pktshift = G_PKTSHIFT(r); sp->pad_boundary = 1 << (G_INGPADBOUNDARY(r) + 5); @@ -7698,6 +7782,9 @@ int t4_init_sge_params(struct adapter *a else sp->pack_boundary = 1 << (G_INGPACKBOUNDARY(r) + 5); } + for (i = 0; i < SGE_FLBUF_SIZES; i++) + sp->sge_fl_buffer_size[i] = t4_read_reg(adapter, + A_SGE_FL_BUFFER_SIZE0 + (4 * i)); return 0; } Copied: stable/11/sys/dev/cxgbe/common/t4vf_hw.c (from r305549, head/sys/dev/cxgbe/common/t4vf_hw.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/sys/dev/cxgbe/common/t4vf_hw.c Mon Oct 3 23:49:05 2016 (r306664, copy of r305549, head/sys/dev/cxgbe/common/t4vf_hw.c) @@ -0,0 +1,376 @@ +/*- + * Copyright (c) 2016 Chelsio Communications, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "common.h" +#include "t4_regs.h" + +#undef msleep +#define msleep(x) do { \ + if (cold) \ + DELAY((x) * 1000); \ + else \ + pause("t4hw", (x) * hz / 1000); \ +} while (0) + +/* + * Wait for the device to become ready (signified by our "who am I" register + * returning a value other than all 1's). Return an error if it doesn't + * become ready ... + */ +int t4vf_wait_dev_ready(struct adapter *adapter) +{ + const u32 whoami = VF_PL_REG(A_PL_VF_WHOAMI); + const u32 notready1 = 0xffffffff; + const u32 notready2 = 0xeeeeeeee; + u32 val; + + val = t4_read_reg(adapter, whoami); + if (val != notready1 && val != notready2) + return 0; + msleep(500); + val = t4_read_reg(adapter, whoami); + if (val != notready1 && val != notready2) + return 0; + else + return -EIO; +} + + +/** + * t4vf_fw_reset - issue a reset to FW + * @adapter: the adapter + * + * Issues a reset command to FW. For a Physical Function this would + * result in the Firmware reseting all of its state. For a Virtual + * Function this just resets the state associated with the VF. + */ +int t4vf_fw_reset(struct adapter *adapter) +{ + struct fw_reset_cmd cmd; + + memset(&cmd, 0, sizeof(cmd)); + cmd.op_to_write = cpu_to_be32(V_FW_CMD_OP(FW_RESET_CMD) | + F_FW_CMD_WRITE); + cmd.retval_len16 = cpu_to_be32(V_FW_CMD_LEN16(FW_LEN16(cmd))); + return t4vf_wr_mbox(adapter, &cmd, sizeof(cmd), NULL); +} + +/** + * t4vf_get_sge_params - retrieve adapter Scatter gather Engine parameters + * @adapter: the adapter + * + * Retrieves various core SGE parameters in the form of hardware SGE + * register values. The caller is responsible for decoding these as + * needed. The SGE parameters are stored in @adapter->params.sge. + */ +int t4vf_get_sge_params(struct adapter *adapter) +{ + struct sge_params *sp = &adapter->params.sge; + u32 params[7], vals[7]; + u32 whoami; + unsigned int pf, s_hps; + int i, v; + + params[0] = (V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_REG) | + V_FW_PARAMS_PARAM_XYZ(A_SGE_CONTROL)); + params[1] = (V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_REG) | + V_FW_PARAMS_PARAM_XYZ(A_SGE_HOST_PAGE_SIZE)); + params[2] = (V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_REG) | + V_FW_PARAMS_PARAM_XYZ(A_SGE_TIMER_VALUE_0_AND_1)); + params[3] = (V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_REG) | + V_FW_PARAMS_PARAM_XYZ(A_SGE_TIMER_VALUE_2_AND_3)); + params[4] = (V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_REG) | + V_FW_PARAMS_PARAM_XYZ(A_SGE_TIMER_VALUE_4_AND_5)); + params[5] = (V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_REG) | + V_FW_PARAMS_PARAM_XYZ(A_SGE_CONM_CTRL)); + params[6] = (V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_REG) | + V_FW_PARAMS_PARAM_XYZ(A_SGE_INGRESS_RX_THRESHOLD)); + v = t4vf_query_params(adapter, 7, params, vals); + if (v != FW_SUCCESS) + return v; + + sp->sge_control = vals[0]; + sp->counter_val[0] = G_THRESHOLD_0(vals[6]); + sp->counter_val[1] = G_THRESHOLD_1(vals[6]); + sp->counter_val[2] = G_THRESHOLD_2(vals[6]); + sp->counter_val[3] = G_THRESHOLD_3(vals[6]); + sp->timer_val[0] = core_ticks_to_us(adapter, G_TIMERVALUE0(vals[2])); + sp->timer_val[1] = core_ticks_to_us(adapter, G_TIMERVALUE1(vals[2])); + sp->timer_val[2] = core_ticks_to_us(adapter, G_TIMERVALUE2(vals[3])); + sp->timer_val[3] = core_ticks_to_us(adapter, G_TIMERVALUE3(vals[3])); + sp->timer_val[4] = core_ticks_to_us(adapter, G_TIMERVALUE4(vals[4])); + sp->timer_val[5] = core_ticks_to_us(adapter, G_TIMERVALUE5(vals[4])); + + sp->fl_starve_threshold = G_EGRTHRESHOLD(vals[5]) * 2 + 1; + if (is_t4(adapter)) + sp->fl_starve_threshold2 = sp->fl_starve_threshold; + else + sp->fl_starve_threshold2 = G_EGRTHRESHOLDPACKING(vals[5]) * 2 + + 1; + + /* + * We need the Queues/Page and Host Page Size for our VF. + * This is based on the PF from which we're instantiated. + */ + whoami = t4_read_reg(adapter, VF_PL_REG(A_PL_VF_WHOAMI)); + pf = G_SOURCEPF(whoami); + + s_hps = (S_HOSTPAGESIZEPF0 + + (S_HOSTPAGESIZEPF1 - S_HOSTPAGESIZEPF0) * pf); + sp->page_shift = ((vals[1] >> s_hps) & M_HOSTPAGESIZEPF0) + 10; + + for (i = 0; i < SGE_FLBUF_SIZES; i++) { + params[0] = (V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_REG) | + V_FW_PARAMS_PARAM_XYZ(A_SGE_FL_BUFFER_SIZE0 + (4 * i))); + v = t4vf_query_params(adapter, 1, params, vals); + if (v != FW_SUCCESS) + return v; + + sp->sge_fl_buffer_size[i] = vals[0]; + } + + /* + * T4 uses a single control field to specify both the PCIe Padding and + * Packing Boundary. T5 introduced the ability to specify these + * separately with the Padding Boundary in SGE_CONTROL and and Packing + * Boundary in SGE_CONTROL2. So for T5 and later we need to grab + * SGE_CONTROL in order to determine how ingress packet data will be + * laid out in Packed Buffer Mode. Unfortunately, older versions of + * the firmware won't let us retrieve SGE_CONTROL2 so if we get a + * failure grabbing it we throw an error since we can't figure out the + * right value. + */ + sp->spg_len = sp->sge_control & F_EGRSTATUSPAGESIZE ? 128 : 64; + sp->fl_pktshift = G_PKTSHIFT(sp->sge_control); + sp->pad_boundary = 1 << (G_INGPADBOUNDARY(sp->sge_control) + 5); + if (is_t4(adapter)) + sp->pack_boundary = sp->pad_boundary; + else { + params[0] = (V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_REG) | + V_FW_PARAMS_PARAM_XYZ(A_SGE_CONTROL2)); + v = t4vf_query_params(adapter, 1, params, vals); + if (v != FW_SUCCESS) { + CH_ERR(adapter, "Unable to get SGE Control2; " + "probably old firmware.\n"); + return v; + } + if (G_INGPACKBOUNDARY(vals[0]) == 0) + sp->pack_boundary = 16; + else + sp->pack_boundary = 1 << (G_INGPACKBOUNDARY(vals[0]) + + 5); + } + + /* + * For T5 and later we want to use the new BAR2 Doorbells. + * Unfortunately, older firmware didn't allow the this register to be + * read. + */ + if (!is_t4(adapter)) { + unsigned int s_qpp; + + params[0] = (V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_REG) | + V_FW_PARAMS_PARAM_XYZ(A_SGE_EGRESS_QUEUES_PER_PAGE_VF)); + params[1] = (V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_REG) | + V_FW_PARAMS_PARAM_XYZ(A_SGE_INGRESS_QUEUES_PER_PAGE_VF)); + v = t4vf_query_params(adapter, 2, params, vals); + if (v != FW_SUCCESS) { + CH_WARN(adapter, "Unable to get VF SGE Queues/Page; " + "probably old firmware.\n"); + return v; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Oct 3 23:56:53 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30776AF4F26; Mon, 3 Oct 2016 23:56:53 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0AB6D845; Mon, 3 Oct 2016 23:56:52 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id u93NukuB072967 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 3 Oct 2016 16:56:46 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id u93NukN9072966; Mon, 3 Oct 2016 16:56:46 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 3 Oct 2016 16:56:46 -0700 From: Gleb Smirnoff To: "George V. Neville-Neil" Cc: "Ngie Cooper (yaneurabeya)" , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Subject: Re: svn commit: r305307 - head/tools/tools/crypto Message-ID: <20161003235646.GK23123@FreeBSD.org> References: <201609022135.u82LZX7k014837@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 23:56:53 -0000 George, On Fri, Sep 02, 2016 at 02:43:00PM -0700, Ngie Cooper (yaneurabeya) wrote: N> > Author: gnn N> > Date: Fri Sep 2 21:35:32 2016 N> > New Revision: 305307 N> > URL: https://svnweb.freebsd.org/changeset/base/305307 N> N> … N> N> > +crypto="/tank/users/gnn/Repos/svn/FreeBSD.HEAD/tools/tools/crypto/cryptotest” N> N> Why is your zpool hardcoded here :)? Can you please address Ngie's comment? Should be "./cryptotest" probably. -- Totus tuus, Glebius. From owner-svn-src-all@freebsd.org Tue Oct 4 00:55:08 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53086AF24EB; Tue, 4 Oct 2016 00:55:08 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-oi0-x22a.google.com (mail-oi0-x22a.google.com [IPv6:2607:f8b0:4003:c06::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 11DB27AF; Tue, 4 Oct 2016 00:55:08 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-oi0-x22a.google.com with SMTP id n132so154650315oih.1; Mon, 03 Oct 2016 17:55:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=194uM64PKEzy/K70qI8rid/7GdCtRtuS/583OVtxXh4=; b=CSPRduHK5Qg3r6YkrcG32GbQQ9bbQDB5ah6EHwXh9d6Byw5rjzgl3A39uw7nD3Tfqw mh0YRTRIrwjOmoZpwISJMp0+j7A/FBvaCJjeJRWV5P9ru7Pcr1CxJd/IN3mLKZ+IfmAO 0CCPdALdTD2wcHj4OdHVPOBHp/C7rWJ6KkFL13YQWwt8G2HKFwtxRgnWp4Ydis5JPap2 UlTe5g+kBF9Gv4nSxzPiwidA2TW0hST/Wodaj7wK5t1wvkqTynvs2b8CmYqyuTkOQ5/3 HQu81qJsOBoccNmpe/BcTWqgW5LZjumOM1MtYOa35AQhts/wPcYbqB0b6k0vOsxfOutN RLIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=194uM64PKEzy/K70qI8rid/7GdCtRtuS/583OVtxXh4=; b=OHMbig4AYWrZOeD0FVLIz5KuFjr7wYp24HPxVAE/N0dkmucoFty+iXRutUewv8YRjk /rWIIl6QR5ygGkzeGgNaiZZ4z7jjMt6UrT00DQQTA3cic5IGeESCgN/XZjJlGYV/i+HK +mMh6MjsxGWLAUMNiZNhFIJn6tEJz8BTJ0npWRJL0+NKYB15t3K4ZbeWYLQ/xD+YQxpJ ecxs9NB85B6AFK9NENaIfvTTYFNdq5BpgE2nq64aSS1JWbz3lolQZHCUiuqTib2fQVei tvlnlRFQDSxxyx6c0Tmj7qyhYZlx9Wmn7pCUHzLcMVxVZ7FVmwjdO61yLYuZO0AIl0FL FxdQ== X-Gm-Message-State: AA6/9Rkv8YnBDLA6E8z67hUEaVVCN48hcKhwbfNdGOdiOOIux29G+xU4oxc0uwsP9MWlWw== X-Received: by 10.157.31.124 with SMTP id x57mr98289otx.154.1475542507313; Mon, 03 Oct 2016 17:55:07 -0700 (PDT) Received: from [100.175.10.185] ([172.56.6.138]) by smtp.gmail.com with ESMTPSA id j15sm288878otd.17.2016.10.03.17.55.06 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 03 Oct 2016 17:55:06 -0700 (PDT) Content-Type: text/plain; charset=cp932 Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r305307 - head/tools/tools/crypto From: Ngie Cooper X-Mailer: iPhone Mail (13G36) In-Reply-To: <20161003235646.GK23123@FreeBSD.org> Date: Tue, 4 Oct 2016 09:55:03 +0900 Cc: "George V. Neville-Neil" , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Content-Transfer-Encoding: quoted-printable Message-Id: References: <201609022135.u82LZX7k014837@repo.freebsd.org> <20161003235646.GK23123@FreeBSD.org> To: Gleb Smirnoff X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 00:55:08 -0000 > On Oct 4, 2016, at 08:56, Gleb Smirnoff wrote: >=20 > George, >=20 > On Fri, Sep 02, 2016 at 02:43:00PM -0700, Ngie Cooper (yaneurabeya) wrote:= > N> > Author: gnn > N> > Date: Fri Sep 2 21:35:32 2016 > N> > New Revision: 305307 > N> > URL: https://svnweb.freebsd.org/changeset/base/305307 > N>=20 > N> =81c > N>=20 > N> > +crypto=3D"/tank/users/gnn/Repos/svn/FreeBSD.HEAD/tools/tools/crypto/= cryptotest=81h > N>=20 > N> Why is your zpool hardcoded here :)? >=20 > Can you please address Ngie's comment? >=20 > Should be "./cryptotest" probably. Hi Glebius, George replied to me (I think directly) agreeing with my concern. The is= sue just hasn't been fixed yet. I'll add this to a short list of items that need to be covered when I re= turn from Japan on Friday, if it's not resolved before then. Thanks! -Ngie= From owner-svn-src-all@freebsd.org Tue Oct 4 08:09:26 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8EC6AF4118; Tue, 4 Oct 2016 08:09:26 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F85CA83; Tue, 4 Oct 2016 08:09:26 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9489PNN056281; Tue, 4 Oct 2016 08:09:25 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9489P0r056280; Tue, 4 Oct 2016 08:09:25 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201610040809.u9489P0r056280@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 4 Oct 2016 08:09:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306665 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 08:09:26 -0000 Author: avg Date: Tue Oct 4 08:09:25 2016 New Revision: 306665 URL: https://svnweb.freebsd.org/changeset/base/306665 Log: zfs: fix a wrong assertion for extended attributes For the extended attributes the order between z_teardown_lock and the vnode lock is different. The bug was triggered only with DIAGNOSTIC turned on. This fix is developed in cooperation with avos. PR: 213112 Reported by: avos Tested by: avos MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Oct 3 23:49:05 2016 (r306664) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Oct 4 08:09:25 2016 (r306665) @@ -1454,7 +1454,8 @@ zfs_lookup_lock(vnode_t *dvp, vnode_t *v ASSERT_VOP_LOCKED(dvp, __func__); #ifdef DIAGNOSTIC - ASSERT(!RRM_LOCK_HELD(&zfsvfs->z_teardown_lock)); + if ((zdp->z_pflags & ZFS_XATTR) == 0) + VERIFY(!RRM_LOCK_HELD(&zfsvfs->z_teardown_lock)); #endif if (name[0] == 0 || (name[0] == '.' && name[1] == 0)) { @@ -5973,13 +5974,15 @@ zfs_lock(ap) vp = ap->a_vp; flags = ap->a_flags; if ((flags & LK_INTERLOCK) == 0 && (flags & LK_NOWAIT) == 0 && - (vp->v_iflag & VI_DOOMED) == 0 && (zp = vp->v_data) != NULL) { + (vp->v_iflag & VI_DOOMED) == 0 && (zp = vp->v_data) != NULL && + (zp->z_pflags & ZFS_XATTR) == 0) { zfsvfs = zp->z_zfsvfs; VERIFY(!RRM_LOCK_HELD(&zfsvfs->z_teardown_lock)); } err = vop_stdlock(ap); if ((flags & LK_INTERLOCK) != 0 && (flags & LK_NOWAIT) == 0 && - (vp->v_iflag & VI_DOOMED) == 0 && (zp = vp->v_data) != NULL) { + (vp->v_iflag & VI_DOOMED) == 0 && (zp = vp->v_data) != NULL && + (zp->z_pflags & ZFS_XATTR) == 0) { zfsvfs = zp->z_zfsvfs; VERIFY(!RRM_LOCK_HELD(&zfsvfs->z_teardown_lock)); } From owner-svn-src-all@freebsd.org Tue Oct 4 09:14:49 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE914AF48C0; Tue, 4 Oct 2016 09:14:49 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEEF7EB6; Tue, 4 Oct 2016 09:14:49 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u949EmIv082580; Tue, 4 Oct 2016 09:14:48 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u949EmAv082579; Tue, 4 Oct 2016 09:14:48 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201610040914.u949EmAv082579@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Tue, 4 Oct 2016 09:14:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306666 - head/sys/arm/nvidia X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 09:14:50 -0000 Author: mmel Date: Tue Oct 4 09:14:48 2016 New Revision: 306666 URL: https://svnweb.freebsd.org/changeset/base/306666 Log: TEGRA: Fix PCIe link timeout. MFC after: 2 weeks Modified: head/sys/arm/nvidia/tegra_pcie.c Modified: head/sys/arm/nvidia/tegra_pcie.c ============================================================================== --- head/sys/arm/nvidia/tegra_pcie.c Tue Oct 4 08:09:25 2016 (r306665) +++ head/sys/arm/nvidia/tegra_pcie.c Tue Oct 4 09:14:48 2016 (r306666) @@ -201,7 +201,8 @@ __FBSDID("$FreeBSD$"); #define RP_LINK_CONTROL_STATUS_DL_LINK_ACTIVE 0x20000000 #define RP_LINK_CONTROL_STATUS_LINKSTAT_MASK 0x3fff0000 -#define TEGRA_PCIE_LINKUP_TIMEOUT 200 +/* Wait 50 ms (per port) for link. */ +#define TEGRA_PCIE_LINKUP_TIMEOUT 50000 #define TEGRA_PCIB_MSI_ENABLE @@ -1160,6 +1161,7 @@ tegra_pcib_wait_for_link(struct tegra_pc RP_VEND_XP, 4); if (reg & RP_VEND_XP_DL_UP) break; + DELAY(1); } if (i <= 0) @@ -1171,6 +1173,7 @@ tegra_pcib_wait_for_link(struct tegra_pc if (reg & RP_LINK_CONTROL_STATUS_DL_LINK_ACTIVE) break; + DELAY(1); } if (i <= 0) return (ETIMEDOUT); From owner-svn-src-all@freebsd.org Tue Oct 4 09:51:55 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6DD99AF3749; Tue, 4 Oct 2016 09:51:55 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3068389E; Tue, 4 Oct 2016 09:51:55 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u949psTm094124; Tue, 4 Oct 2016 09:51:54 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u949psoU094123; Tue, 4 Oct 2016 09:51:54 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201610040951.u949psoU094123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Tue, 4 Oct 2016 09:51:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306667 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 09:51:55 -0000 Author: mmel Date: Tue Oct 4 09:51:54 2016 New Revision: 306667 URL: https://svnweb.freebsd.org/changeset/base/306667 Log: ARM: Add atomic_swap_64(). It's need by linuxkpi and drm-next-4.7. MFC after: 2 weeks Modified: head/sys/arm/include/atomic-v6.h Modified: head/sys/arm/include/atomic-v6.h ============================================================================== --- head/sys/arm/include/atomic-v6.h Tue Oct 4 09:14:48 2016 (r306666) +++ head/sys/arm/include/atomic-v6.h Tue Oct 4 09:51:54 2016 (r306667) @@ -660,6 +660,26 @@ atomic_swap_32(volatile uint32_t *p, uin return (ret); } +static __inline uint64_t +atomic_swap_64(volatile uint64_t *p, uint64_t v) +{ + uint64_t ret; + uint32_t exflag; + + __asm __volatile( + "1: ldrexd %Q[ret], %R[ret], [%[ptr]] \n" + " strexd %[exf], %Q[val], %R[val], [%[ptr]] \n" + " teq %[exf], #0 \n" + " it ne \n" + " bne 1b \n" + : [ret] "=&r" (ret), + [exf] "=&r" (exflag) + : [val] "r" (v), + [ptr] "r" (p) + : "cc", "memory"); + return (ret); +} + #undef ATOMIC_ACQ_REL #undef ATOMIC_ACQ_REL_LONG From owner-svn-src-all@freebsd.org Tue Oct 4 09:59:38 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7903AF3AEF; Tue, 4 Oct 2016 09:59:38 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74D64DA1; Tue, 4 Oct 2016 09:59:38 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u949xbcZ098070; Tue, 4 Oct 2016 09:59:37 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u949xbOR098069; Tue, 4 Oct 2016 09:59:37 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201610040959.u949xbOR098069@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Tue, 4 Oct 2016 09:59:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306668 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 09:59:38 -0000 Author: mmel Date: Tue Oct 4 09:59:37 2016 New Revision: 306668 URL: https://svnweb.freebsd.org/changeset/base/306668 Log: ARM: Add mising early clobber modifier in atomic_swap_32(). MFC after: 2 weeks Modified: head/sys/arm/include/atomic-v6.h Modified: head/sys/arm/include/atomic-v6.h ============================================================================== --- head/sys/arm/include/atomic-v6.h Tue Oct 4 09:51:54 2016 (r306667) +++ head/sys/arm/include/atomic-v6.h Tue Oct 4 09:59:37 2016 (r306668) @@ -652,7 +652,7 @@ atomic_swap_32(volatile uint32_t *p, uin " teq %[exf], #0 \n" " it ne \n" " bne 1b \n" - : [ret] "=r" (ret), + : [ret] "=&r" (ret), [exf] "=&r" (exflag) : [val] "r" (v), [ptr] "r" (p) From owner-svn-src-all@freebsd.org Tue Oct 4 11:44:24 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA9ADAF5884; Tue, 4 Oct 2016 11:44:24 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA665E9F; Tue, 4 Oct 2016 11:44:24 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u94BiOuC039677; Tue, 4 Oct 2016 11:44:24 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u94BiLB9039654; Tue, 4 Oct 2016 11:44:21 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201610041144.u94BiLB9039654@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Tue, 4 Oct 2016 11:44:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r306669 - in vendor/libarchive/dist: . cat/test cpio/test examples/minitar libarchive libarchive/test tar tar/test X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 11:44:24 -0000 Author: mm Date: Tue Oct 4 11:44:21 2016 New Revision: 306669 URL: https://svnweb.freebsd.org/changeset/base/306669 Log: Update vendor/libarchive to git 024be27d1b299c030e8841bed3002ee07ba9eedc Important vendor bugfixes (relevant to FreeBSD): #747: Out of bounds read in mtree parser #761: heap-based buffer overflow in read_Header (7-zip) #784: Invalid file on bsdtar command line results in internal errors (1) PR: 213092 (1) Obtained from: https://github.com/libarchive/libarchive Added: vendor/libarchive/dist/libarchive/test/test_read_format_mtree_crash747.c (contents, props changed) vendor/libarchive/dist/libarchive/test/test_read_format_mtree_crash747.mtree.bz2.uu Modified: vendor/libarchive/dist/Makefile.am vendor/libarchive/dist/cat/test/main.c vendor/libarchive/dist/cat/test/test.h vendor/libarchive/dist/cpio/test/main.c vendor/libarchive/dist/cpio/test/test.h vendor/libarchive/dist/examples/minitar/minitar.c vendor/libarchive/dist/libarchive/archive_read_support_format_7zip.c vendor/libarchive/dist/libarchive/archive_read_support_format_mtree.c vendor/libarchive/dist/libarchive/test/CMakeLists.txt vendor/libarchive/dist/libarchive/test/main.c vendor/libarchive/dist/libarchive/test/test_acl_freebsd_nfs4.c vendor/libarchive/dist/libarchive/test/test_read_set_format.c vendor/libarchive/dist/tar/subst.c vendor/libarchive/dist/tar/test/main.c vendor/libarchive/dist/tar/test/test.h vendor/libarchive/dist/tar/test/test_option_H_upper.c vendor/libarchive/dist/tar/test/test_option_L_upper.c vendor/libarchive/dist/tar/test/test_option_U_upper.c vendor/libarchive/dist/tar/test/test_option_n.c vendor/libarchive/dist/tar/write.c Modified: vendor/libarchive/dist/Makefile.am ============================================================================== --- vendor/libarchive/dist/Makefile.am Tue Oct 4 09:59:37 2016 (r306668) +++ vendor/libarchive/dist/Makefile.am Tue Oct 4 11:44:21 2016 (r306669) @@ -449,6 +449,7 @@ libarchive_test_SOURCES= \ libarchive/test/test_read_format_lha_bugfix_0.c \ libarchive/test/test_read_format_lha_filename.c \ libarchive/test/test_read_format_mtree.c \ + libarchive/test/test_read_format_mtree_crash747.c \ libarchive/test/test_read_format_pax_bz2.c \ libarchive/test/test_read_format_rar.c \ libarchive/test/test_read_format_rar_encryption_data.c \ Modified: vendor/libarchive/dist/cat/test/main.c ============================================================================== --- vendor/libarchive/dist/cat/test/main.c Tue Oct 4 09:59:37 2016 (r306668) +++ vendor/libarchive/dist/cat/test/main.c Tue Oct 4 11:44:21 2016 (r306669) @@ -1360,6 +1360,31 @@ assertion_file_birthtime_recent(const ch return assertion_file_time(file, line, pathname, 0, 0, 'b', 1); } +/* Verify mode of 'pathname'. */ +int +assertion_file_mode(const char *file, int line, const char *pathname, int expected_mode) +{ + int mode; + int r; + + assertion_count(file, line); +#if defined(_WIN32) && !defined(__CYGWIN__) + failure_start(file, line, "assertFileMode not yet implemented for Windows"); +#else + { + struct stat st; + r = lstat(pathname, &st); + mode = (int)(st.st_mode & 0777); + } + if (r == 0 && mode == expected_mode) + return (1); + failure_start(file, line, "File %s has mode %o, expected %o", + pathname, mode, expected_mode); +#endif + failure_finish(NULL); + return (0); +} + /* Verify mtime of 'pathname'. */ int assertion_file_mtime(const char *file, int line, @@ -1578,8 +1603,12 @@ assertion_make_dir(const char *file, int if (0 == _mkdir(dirname)) return (1); #else - if (0 == mkdir(dirname, mode)) - return (1); + if (0 == mkdir(dirname, mode)) { + if (0 == chmod(dirname, mode)) { + assertion_file_mode(file, line, dirname, mode); + return (1); + } + } #endif failure_start(file, line, "Could not create directory %s", dirname); failure_finish(NULL); @@ -1628,6 +1657,11 @@ assertion_make_file(const char *file, in failure_finish(NULL); return (0); } + if (0 != chmod(path, mode)) { + failure_start(file, line, "Could not chmod %s", path); + failure_finish(NULL); + return (0); + } if (contents != NULL) { ssize_t wsize; @@ -1644,6 +1678,7 @@ assertion_make_file(const char *file, in } } close(fd); + assertion_file_mode(file, line, path, mode); return (1); #endif } Modified: vendor/libarchive/dist/cat/test/test.h ============================================================================== --- vendor/libarchive/dist/cat/test/test.h Tue Oct 4 09:59:37 2016 (r306668) +++ vendor/libarchive/dist/cat/test/test.h Tue Oct 4 11:44:21 2016 (r306669) @@ -241,6 +241,7 @@ int assertion_file_birthtime_recent(cons int assertion_file_contains_lines_any_order(const char *, int, const char *, const char **); int assertion_file_contents(const char *, int, const void *, int, const char *); int assertion_file_exists(const char *, int, const char *); +int assertion_file_mode(const char *, int, const char *, int); int assertion_file_mtime(const char *, int, const char *, long, long); int assertion_file_mtime_recent(const char *, int, const char *); int assertion_file_nlinks(const char *, int, const char *, int); Modified: vendor/libarchive/dist/cpio/test/main.c ============================================================================== --- vendor/libarchive/dist/cpio/test/main.c Tue Oct 4 09:59:37 2016 (r306668) +++ vendor/libarchive/dist/cpio/test/main.c Tue Oct 4 11:44:21 2016 (r306669) @@ -1361,6 +1361,31 @@ assertion_file_birthtime_recent(const ch return assertion_file_time(file, line, pathname, 0, 0, 'b', 1); } +/* Verify mode of 'pathname'. */ +int +assertion_file_mode(const char *file, int line, const char *pathname, int expected_mode) +{ + int mode; + int r; + + assertion_count(file, line); +#if defined(_WIN32) && !defined(__CYGWIN__) + failure_start(file, line, "assertFileMode not yet implemented for Windows"); +#else + { + struct stat st; + r = lstat(pathname, &st); + mode = (int)(st.st_mode & 0777); + } + if (r == 0 && mode == expected_mode) + return (1); + failure_start(file, line, "File %s has mode %o, expected %o", + pathname, mode, expected_mode); +#endif + failure_finish(NULL); + return (0); +} + /* Verify mtime of 'pathname'. */ int assertion_file_mtime(const char *file, int line, @@ -1579,8 +1604,12 @@ assertion_make_dir(const char *file, int if (0 == _mkdir(dirname)) return (1); #else - if (0 == mkdir(dirname, mode)) - return (1); + if (0 == mkdir(dirname, mode)) { + if (0 == chmod(dirname, mode)) { + assertion_file_mode(file, line, dirname, mode); + return (1); + } + } #endif failure_start(file, line, "Could not create directory %s", dirname); failure_finish(NULL); @@ -1629,6 +1658,11 @@ assertion_make_file(const char *file, in failure_finish(NULL); return (0); } + if (0 != chmod(path, mode)) { + failure_start(file, line, "Could not chmod %s", path); + failure_finish(NULL); + return (0); + } if (contents != NULL) { ssize_t wsize; @@ -1645,6 +1679,7 @@ assertion_make_file(const char *file, in } } close(fd); + assertion_file_mode(file, line, path, mode); return (1); #endif } Modified: vendor/libarchive/dist/cpio/test/test.h ============================================================================== --- vendor/libarchive/dist/cpio/test/test.h Tue Oct 4 09:59:37 2016 (r306668) +++ vendor/libarchive/dist/cpio/test/test.h Tue Oct 4 11:44:21 2016 (r306669) @@ -241,6 +241,7 @@ int assertion_file_birthtime_recent(cons int assertion_file_contains_lines_any_order(const char *, int, const char *, const char **); int assertion_file_contents(const char *, int, const void *, int, const char *); int assertion_file_exists(const char *, int, const char *); +int assertion_file_mode(const char *, int, const char *, int); int assertion_file_mtime(const char *, int, const char *, long, long); int assertion_file_mtime_recent(const char *, int, const char *); int assertion_file_nlinks(const char *, int, const char *, int); Modified: vendor/libarchive/dist/examples/minitar/minitar.c ============================================================================== --- vendor/libarchive/dist/examples/minitar/minitar.c Tue Oct 4 09:59:37 2016 (r306668) +++ vendor/libarchive/dist/examples/minitar/minitar.c Tue Oct 4 11:44:21 2016 (r306669) @@ -222,7 +222,6 @@ static void create(const char *filename, int compress, const char **argv) { struct archive *a; - struct archive *disk; struct archive_entry *entry; ssize_t len; int fd; @@ -253,12 +252,11 @@ create(const char *filename, int compres filename = NULL; archive_write_open_filename(a, filename); - disk = archive_read_disk_new(); -#ifndef NO_LOOKUP - archive_read_disk_set_standard_lookup(disk); -#endif while (*argv != NULL) { struct archive *disk = archive_read_disk_new(); +#ifndef NO_LOOKUP + archive_read_disk_set_standard_lookup(disk); +#endif int r; r = archive_read_disk_open(disk, *argv); Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_7zip.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_7zip.c Tue Oct 4 09:59:37 2016 (r306668) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_7zip.c Tue Oct 4 11:44:21 2016 (r306669) @@ -2431,6 +2431,8 @@ read_Header(struct archive_read *a, stru switch (type) { case kEmptyStream: + if (h->emptyStreamBools != NULL) + return (-1); h->emptyStreamBools = calloc((size_t)zip->numFiles, sizeof(*h->emptyStreamBools)); if (h->emptyStreamBools == NULL) @@ -2451,6 +2453,8 @@ read_Header(struct archive_read *a, stru return (-1); break; } + if (h->emptyFileBools != NULL) + return (-1); h->emptyFileBools = calloc(empty_streams, sizeof(*h->emptyFileBools)); if (h->emptyFileBools == NULL) @@ -2465,6 +2469,8 @@ read_Header(struct archive_read *a, stru return (-1); break; } + if (h->antiBools != NULL) + return (-1); h->antiBools = calloc(empty_streams, sizeof(*h->antiBools)); if (h->antiBools == NULL) @@ -2491,6 +2497,8 @@ read_Header(struct archive_read *a, stru if ((ll & 1) || ll < zip->numFiles * 4) return (-1); + if (zip->entry_names != NULL) + return (-1); zip->entry_names = malloc(ll); if (zip->entry_names == NULL) return (-1); @@ -2543,6 +2551,8 @@ read_Header(struct archive_read *a, stru if ((p = header_bytes(a, 2)) == NULL) return (-1); allAreDefined = *p; + if (h->attrBools != NULL) + return (-1); h->attrBools = calloc((size_t)zip->numFiles, sizeof(*h->attrBools)); if (h->attrBools == NULL) Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_mtree.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_mtree.c Tue Oct 4 09:59:37 2016 (r306668) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_mtree.c Tue Oct 4 11:44:21 2016 (r306669) @@ -301,6 +301,15 @@ get_line_size(const char *b, ssize_t ava return (avail); } +/* + * <---------------- ravail ---------------------> + * <-- diff ------> <--- avail -----------------> + * <---- len -----------> + * | Previous lines | line being parsed nl extra | + * ^ + * b + * + */ static ssize_t next_line(struct archive_read *a, const char **b, ssize_t *avail, ssize_t *ravail, ssize_t *nl) @@ -339,7 +348,7 @@ next_line(struct archive_read *a, *b += diff; *avail -= diff; tested = len;/* Skip some bytes we already determinated. */ - len = get_line_size(*b, *avail, nl); + len = get_line_size(*b + len, *avail - len, nl); if (len >= 0) len += tested; } Modified: vendor/libarchive/dist/libarchive/test/CMakeLists.txt ============================================================================== --- vendor/libarchive/dist/libarchive/test/CMakeLists.txt Tue Oct 4 09:59:37 2016 (r306668) +++ vendor/libarchive/dist/libarchive/test/CMakeLists.txt Tue Oct 4 11:44:21 2016 (r306669) @@ -138,6 +138,7 @@ IF(ENABLE_TEST) test_read_format_lha_bugfix_0.c test_read_format_lha_filename.c test_read_format_mtree.c + test_read_format_mtree_crash747.c test_read_format_pax_bz2.c test_read_format_rar.c test_read_format_rar_encryption_data.c Modified: vendor/libarchive/dist/libarchive/test/main.c ============================================================================== --- vendor/libarchive/dist/libarchive/test/main.c Tue Oct 4 09:59:37 2016 (r306668) +++ vendor/libarchive/dist/libarchive/test/main.c Tue Oct 4 11:44:21 2016 (r306669) @@ -1607,8 +1607,12 @@ assertion_make_dir(const char *file, int if (0 == _mkdir(dirname)) return (1); #else - if (0 == mkdir(dirname, mode)) - return (1); + if (0 == mkdir(dirname, mode)) { + if (0 == chmod(dirname, mode)) { + assertion_file_mode(file, line, dirname, mode); + return (1); + } + } #endif failure_start(file, line, "Could not create directory %s", dirname); failure_finish(NULL); @@ -1657,6 +1661,11 @@ assertion_make_file(const char *file, in failure_finish(NULL); return (0); } + if (0 != chmod(path, mode)) { + failure_start(file, line, "Could not chmod %s", path); + failure_finish(NULL); + return (0); + } if (contents != NULL) { ssize_t wsize; @@ -1673,6 +1682,7 @@ assertion_make_file(const char *file, in } } close(fd); + assertion_file_mode(file, line, path, mode); return (1); #endif } Modified: vendor/libarchive/dist/libarchive/test/test_acl_freebsd_nfs4.c ============================================================================== --- vendor/libarchive/dist/libarchive/test/test_acl_freebsd_nfs4.c Tue Oct 4 09:59:37 2016 (r306668) +++ vendor/libarchive/dist/libarchive/test/test_acl_freebsd_nfs4.c Tue Oct 4 11:44:21 2016 (r306669) @@ -93,7 +93,7 @@ static struct myacl_t acls_reg[] = { static struct myacl_t acls_dir[] = { /* For this test, we need to be able to read and write the ACL. */ - { ARCHIVE_ENTRY_ACL_TYPE_ALLOW, ARCHIVE_ENTRY_ACL_READ_ACL, + { ARCHIVE_ENTRY_ACL_TYPE_ALLOW, ARCHIVE_ENTRY_ACL_READ_DATA | ARCHIVE_ENTRY_ACL_READ_ACL, ARCHIVE_ENTRY_ACL_USER_OBJ, -1, ""}, /* An entry for each type. */ Added: vendor/libarchive/dist/libarchive/test/test_read_format_mtree_crash747.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libarchive/dist/libarchive/test/test_read_format_mtree_crash747.c Tue Oct 4 11:44:21 2016 (r306669) @@ -0,0 +1,44 @@ +/*- + * Copyright (c) 2003-2016 Tim Kientzle + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``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(S) BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "test.h" + + +/* + * Reproduce the crash reported in Github Issue #747. + */ +DEFINE_TEST(test_read_format_mtree_crash747) +{ + const char *reffile = "test_read_format_mtree_crash747.mtree.bz2"; + struct archive *a; + + extract_reference_file(reffile); + + assert((a = archive_read_new()) != NULL); + assertEqualIntA(a, ARCHIVE_OK, archive_read_support_filter_bzip2(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_mtree(a)); + assertEqualIntA(a, ARCHIVE_FATAL, archive_read_open_filename(a, reffile, 10240)); + assertEqualInt(ARCHIVE_OK, archive_read_free(a)); +} + Added: vendor/libarchive/dist/libarchive/test/test_read_format_mtree_crash747.mtree.bz2.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libarchive/dist/libarchive/test/test_read_format_mtree_crash747.mtree.bz2.uu Tue Oct 4 11:44:21 2016 (r306669) @@ -0,0 +1,6 @@ +begin 600 test_read_format_mtree_crash747.mtree.bz2 +M0EIH.3%!62936:OH@(@``'/[@,`0`@!``'^```)A@9\`$`@@`'4)049!IIH! +MM021-0,F@&@6````9%>$(K!GIC*XFR0`$```J0+:$XP```!D-F)H[#SE9+2' +4+E"L=ASXUI%R(I"HD'ZA(5?1`Q`` +` +end Modified: vendor/libarchive/dist/libarchive/test/test_read_set_format.c ============================================================================== --- vendor/libarchive/dist/libarchive/test/test_read_set_format.c Tue Oct 4 09:59:37 2016 (r306668) +++ vendor/libarchive/dist/libarchive/test/test_read_set_format.c Tue Oct 4 11:44:21 2016 (r306669) @@ -204,7 +204,7 @@ DEFINE_TEST(test_read_append_filter_wron /* * If we have "bunzip2 -q", try using that. */ - if (!canRunCommand("bunzip2 -V")) { + if (!canRunCommand("bunzip2 -h")) { skipping("Can't run bunzip2 program on this platform"); return; } Modified: vendor/libarchive/dist/tar/subst.c ============================================================================== --- vendor/libarchive/dist/tar/subst.c Tue Oct 4 09:59:37 2016 (r306668) +++ vendor/libarchive/dist/tar/subst.c Tue Oct 4 11:44:21 2016 (r306669) @@ -84,6 +84,7 @@ add_substitution(struct bsdtar *bsdtar, if (rule == NULL) lafe_errc(1, errno, "Out of memory"); rule->next = NULL; + rule->result = NULL; if (subst->last_rule == NULL) subst->first_rule = rule; Modified: vendor/libarchive/dist/tar/test/main.c ============================================================================== --- vendor/libarchive/dist/tar/test/main.c Tue Oct 4 09:59:37 2016 (r306668) +++ vendor/libarchive/dist/tar/test/main.c Tue Oct 4 11:44:21 2016 (r306669) @@ -130,6 +130,13 @@ __FBSDID("$FreeBSD: src/usr.bin/tar/test # include #endif +mode_t umasked(mode_t expected_mode) +{ + mode_t mode = umask(0); + umask(mode); + return expected_mode & ~mode; +} + /* Path to working directory for current test */ const char *testworkdir; #ifdef PROGRAM @@ -1361,6 +1368,31 @@ assertion_file_birthtime_recent(const ch return assertion_file_time(file, line, pathname, 0, 0, 'b', 1); } +/* Verify mode of 'pathname'. */ +int +assertion_file_mode(const char *file, int line, const char *pathname, int expected_mode) +{ + int mode; + int r; + + assertion_count(file, line); +#if defined(_WIN32) && !defined(__CYGWIN__) + failure_start(file, line, "assertFileMode not yet implemented for Windows"); +#else + { + struct stat st; + r = lstat(pathname, &st); + mode = (int)(st.st_mode & 0777); + } + if (r == 0 && mode == expected_mode) + return (1); + failure_start(file, line, "File %s has mode %o, expected %o", + pathname, mode, expected_mode); +#endif + failure_finish(NULL); + return (0); +} + /* Verify mtime of 'pathname'. */ int assertion_file_mtime(const char *file, int line, @@ -1579,8 +1611,12 @@ assertion_make_dir(const char *file, int if (0 == _mkdir(dirname)) return (1); #else - if (0 == mkdir(dirname, mode)) - return (1); + if (0 == mkdir(dirname, mode)) { + if (0 == chmod(dirname, mode)) { + assertion_file_mode(file, line, dirname, mode); + return (1); + } + } #endif failure_start(file, line, "Could not create directory %s", dirname); failure_finish(NULL); @@ -1629,6 +1665,11 @@ assertion_make_file(const char *file, in failure_finish(NULL); return (0); } + if (0 != chmod(path, mode)) { + failure_start(file, line, "Could not chmod %s", path); + failure_finish(NULL); + return (0); + } if (contents != NULL) { ssize_t wsize; @@ -1645,6 +1686,7 @@ assertion_make_file(const char *file, in } } close(fd); + assertion_file_mode(file, line, path, mode); return (1); #endif } Modified: vendor/libarchive/dist/tar/test/test.h ============================================================================== --- vendor/libarchive/dist/tar/test/test.h Tue Oct 4 09:59:37 2016 (r306668) +++ vendor/libarchive/dist/tar/test/test.h Tue Oct 4 11:44:21 2016 (r306669) @@ -241,6 +241,7 @@ int assertion_file_birthtime_recent(cons int assertion_file_contains_lines_any_order(const char *, int, const char *, const char **); int assertion_file_contents(const char *, int, const void *, int, const char *); int assertion_file_exists(const char *, int, const char *); +int assertion_file_mode(const char *, int, const char *, int); int assertion_file_mtime(const char *, int, const char *, long, long); int assertion_file_mtime_recent(const char *, int, const char *); int assertion_file_nlinks(const char *, int, const char *, int); @@ -326,6 +327,9 @@ void copy_reference_file(const char *); */ void extract_reference_files(const char **); +/* Subtract umask from mode */ +mode_t umasked(mode_t expected_mode); + /* Path to working directory for current test */ extern const char *testworkdir; Modified: vendor/libarchive/dist/tar/test/test_option_H_upper.c ============================================================================== --- vendor/libarchive/dist/tar/test/test_option_H_upper.c Tue Oct 4 09:59:37 2016 (r306668) +++ vendor/libarchive/dist/tar/test/test_option_H_upper.c Tue Oct 4 11:44:21 2016 (r306669) @@ -83,10 +83,10 @@ DEFINE_TEST(test_option_H_upper) assertChdir("test3"); assertEqualInt(0, systemf("%s -xf archive.tar >c.out 2>c.err", testprog)); - assertIsDir("ld1", 0755); + assertIsDir("ld1", umasked(0755)); assertIsSymlink("d1/linkX", "fileX"); assertIsSymlink("d1/link1", "file1"); - assertIsReg("link2", 0644); + assertIsReg("link2", umasked(0644)); assertIsSymlink("linkY", "d1/fileY"); assertChdir(".."); } Modified: vendor/libarchive/dist/tar/test/test_option_L_upper.c ============================================================================== --- vendor/libarchive/dist/tar/test/test_option_L_upper.c Tue Oct 4 09:59:37 2016 (r306668) +++ vendor/libarchive/dist/tar/test/test_option_L_upper.c Tue Oct 4 11:44:21 2016 (r306669) @@ -69,10 +69,10 @@ DEFINE_TEST(test_option_L_upper) assertChdir("test2"); assertEqualInt(0, systemf("%s -xf archive.tar >c.out 2>c.err", testprog)); - assertIsDir("ld1", 0755); - assertIsReg("d1/link1", 0644); + assertIsDir("ld1", umasked(0755)); + assertIsReg("d1/link1", umasked(0644)); assertIsSymlink("d1/linkX", "fileX"); - assertIsReg("link2", 0644); + assertIsReg("link2", umasked(0644)); assertIsSymlink("linkY", "d1/fileY"); assertChdir(".."); @@ -83,10 +83,10 @@ DEFINE_TEST(test_option_L_upper) assertChdir("test3"); assertEqualInt(0, systemf("%s -xf archive.tar >c.out 2>c.err", testprog)); - assertIsDir("ld1", 0755); - assertIsReg("d1/link1", 0644); + assertIsDir("ld1", umasked(0755)); + assertIsReg("d1/link1", umasked(0644)); assertIsSymlink("d1/linkX", "fileX"); - assertIsReg("link2", 0644); + assertIsReg("link2", umasked(0644)); assertIsSymlink("linkY", "d1/fileY"); assertChdir(".."); } Modified: vendor/libarchive/dist/tar/test/test_option_U_upper.c ============================================================================== --- vendor/libarchive/dist/tar/test/test_option_U_upper.c Tue Oct 4 09:59:37 2016 (r306668) +++ vendor/libarchive/dist/tar/test/test_option_U_upper.c Tue Oct 4 11:44:21 2016 (r306669) @@ -135,7 +135,7 @@ DEFINE_TEST(test_option_U_upper) assertMakeSymlink("d1/file1", "d1/realfile1"); assertEqualInt(0, systemf("%s -xf ../archive.tar d1/file1 >test.out 2>test.err", testprog)); - assertIsReg("d1/file1", 0644); + assertIsReg("d1/file1", umasked(0644)); assertFileContents("d1/file1", 8, "d1/file1"); assertFileContents("realfile1", 9, "d1/realfile1"); assertEmptyFile("test.out"); @@ -150,7 +150,7 @@ DEFINE_TEST(test_option_U_upper) assertMakeSymlink("d1/file1", "d1/realfile1"); assertEqualInt(0, systemf("%s -xPUf ../archive.tar d1/file1 >test.out 2>test.err", testprog)); - assertIsReg("d1/file1", 0644); + assertIsReg("d1/file1", umasked(0644)); assertFileContents("d1/file1", 8, "d1/file1"); assertFileContents("realfile1", 9, "d1/realfile1"); assertEmptyFile("test.out"); Modified: vendor/libarchive/dist/tar/test/test_option_n.c ============================================================================== --- vendor/libarchive/dist/tar/test/test_option_n.c Tue Oct 4 09:59:37 2016 (r306668) +++ vendor/libarchive/dist/tar/test/test_option_n.c Tue Oct 4 11:44:21 2016 (r306669) @@ -55,7 +55,7 @@ DEFINE_TEST(test_option_n) systemf("%s -xf archive.tar >x.out 2>x.err", testprog)); assertEmptyFile("x.out"); assertEmptyFile("x.err"); - assertIsDir("d1", 0755); + assertIsDir("d1", umasked(0755)); assertFileNotExists("d1/file1"); assertChdir(".."); } Modified: vendor/libarchive/dist/tar/write.c ============================================================================== --- vendor/libarchive/dist/tar/write.c Tue Oct 4 09:59:37 2016 (r306668) +++ vendor/libarchive/dist/tar/write.c Tue Oct 4 11:44:21 2016 (r306669) @@ -886,6 +886,8 @@ write_hierarchy(struct bsdtar *bsdtar, s "%s", archive_error_string(disk)); if (r == ARCHIVE_FATAL || r == ARCHIVE_FAILED) { bsdtar->return_value = 1; + archive_entry_free(entry); + archive_read_close(disk); return; } else if (r < ARCHIVE_WARN) continue; From owner-svn-src-all@freebsd.org Tue Oct 4 11:56:49 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D59C2AF5B3B; Tue, 4 Oct 2016 11:56:49 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C33E812; Tue, 4 Oct 2016 11:56:49 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u94Bum3s043776; Tue, 4 Oct 2016 11:56:48 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u94Bukd6043756; Tue, 4 Oct 2016 11:56:46 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201610041156.u94Bukd6043756@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Tue, 4 Oct 2016 11:56:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306670 - in head: contrib/libarchive/cat/test contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/libarchive/libarchive/test contrib/libarchive/tar contrib/libarchive/ta... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 11:56:49 -0000 Author: mm Date: Tue Oct 4 11:56:46 2016 New Revision: 306670 URL: https://svnweb.freebsd.org/changeset/base/306670 Log: MFV r306669: Sync libarchive with vendor including security fixes. Important vendor bugfixes (relevant to FreeBSD): #747: Out of bounds read in mtree parser #761: heap-based buffer overflow in read_Header (7-zip) #784: Invalid file on bsdtar command line results in internal errors (1) PR: 213092 (1) MFC after: 1 week Added: head/contrib/libarchive/libarchive/test/test_read_format_mtree_crash747.c - copied unchanged from r306669, vendor/libarchive/dist/libarchive/test/test_read_format_mtree_crash747.c head/contrib/libarchive/libarchive/test/test_read_format_mtree_crash747.mtree.bz2.uu - copied unchanged from r306669, vendor/libarchive/dist/libarchive/test/test_read_format_mtree_crash747.mtree.bz2.uu Modified: head/contrib/libarchive/cat/test/main.c head/contrib/libarchive/cat/test/test.h head/contrib/libarchive/cpio/test/main.c head/contrib/libarchive/cpio/test/test.h head/contrib/libarchive/libarchive/archive_read_support_format_7zip.c head/contrib/libarchive/libarchive/archive_read_support_format_mtree.c head/contrib/libarchive/libarchive/test/main.c head/contrib/libarchive/libarchive/test/test_acl_freebsd_nfs4.c head/contrib/libarchive/libarchive/test/test_read_set_format.c head/contrib/libarchive/tar/subst.c head/contrib/libarchive/tar/test/main.c head/contrib/libarchive/tar/test/test.h head/contrib/libarchive/tar/test/test_option_H_upper.c head/contrib/libarchive/tar/test/test_option_L_upper.c head/contrib/libarchive/tar/test/test_option_U_upper.c head/contrib/libarchive/tar/test/test_option_n.c head/contrib/libarchive/tar/write.c head/lib/libarchive/tests/Makefile Directory Properties: head/contrib/libarchive/ (props changed) Modified: head/contrib/libarchive/cat/test/main.c ============================================================================== --- head/contrib/libarchive/cat/test/main.c Tue Oct 4 11:44:21 2016 (r306669) +++ head/contrib/libarchive/cat/test/main.c Tue Oct 4 11:56:46 2016 (r306670) @@ -1360,6 +1360,31 @@ assertion_file_birthtime_recent(const ch return assertion_file_time(file, line, pathname, 0, 0, 'b', 1); } +/* Verify mode of 'pathname'. */ +int +assertion_file_mode(const char *file, int line, const char *pathname, int expected_mode) +{ + int mode; + int r; + + assertion_count(file, line); +#if defined(_WIN32) && !defined(__CYGWIN__) + failure_start(file, line, "assertFileMode not yet implemented for Windows"); +#else + { + struct stat st; + r = lstat(pathname, &st); + mode = (int)(st.st_mode & 0777); + } + if (r == 0 && mode == expected_mode) + return (1); + failure_start(file, line, "File %s has mode %o, expected %o", + pathname, mode, expected_mode); +#endif + failure_finish(NULL); + return (0); +} + /* Verify mtime of 'pathname'. */ int assertion_file_mtime(const char *file, int line, @@ -1578,8 +1603,12 @@ assertion_make_dir(const char *file, int if (0 == _mkdir(dirname)) return (1); #else - if (0 == mkdir(dirname, mode)) - return (1); + if (0 == mkdir(dirname, mode)) { + if (0 == chmod(dirname, mode)) { + assertion_file_mode(file, line, dirname, mode); + return (1); + } + } #endif failure_start(file, line, "Could not create directory %s", dirname); failure_finish(NULL); @@ -1628,6 +1657,11 @@ assertion_make_file(const char *file, in failure_finish(NULL); return (0); } + if (0 != chmod(path, mode)) { + failure_start(file, line, "Could not chmod %s", path); + failure_finish(NULL); + return (0); + } if (contents != NULL) { ssize_t wsize; @@ -1644,6 +1678,7 @@ assertion_make_file(const char *file, in } } close(fd); + assertion_file_mode(file, line, path, mode); return (1); #endif } Modified: head/contrib/libarchive/cat/test/test.h ============================================================================== --- head/contrib/libarchive/cat/test/test.h Tue Oct 4 11:44:21 2016 (r306669) +++ head/contrib/libarchive/cat/test/test.h Tue Oct 4 11:56:46 2016 (r306670) @@ -241,6 +241,7 @@ int assertion_file_birthtime_recent(cons int assertion_file_contains_lines_any_order(const char *, int, const char *, const char **); int assertion_file_contents(const char *, int, const void *, int, const char *); int assertion_file_exists(const char *, int, const char *); +int assertion_file_mode(const char *, int, const char *, int); int assertion_file_mtime(const char *, int, const char *, long, long); int assertion_file_mtime_recent(const char *, int, const char *); int assertion_file_nlinks(const char *, int, const char *, int); Modified: head/contrib/libarchive/cpio/test/main.c ============================================================================== --- head/contrib/libarchive/cpio/test/main.c Tue Oct 4 11:44:21 2016 (r306669) +++ head/contrib/libarchive/cpio/test/main.c Tue Oct 4 11:56:46 2016 (r306670) @@ -1361,6 +1361,31 @@ assertion_file_birthtime_recent(const ch return assertion_file_time(file, line, pathname, 0, 0, 'b', 1); } +/* Verify mode of 'pathname'. */ +int +assertion_file_mode(const char *file, int line, const char *pathname, int expected_mode) +{ + int mode; + int r; + + assertion_count(file, line); +#if defined(_WIN32) && !defined(__CYGWIN__) + failure_start(file, line, "assertFileMode not yet implemented for Windows"); +#else + { + struct stat st; + r = lstat(pathname, &st); + mode = (int)(st.st_mode & 0777); + } + if (r == 0 && mode == expected_mode) + return (1); + failure_start(file, line, "File %s has mode %o, expected %o", + pathname, mode, expected_mode); +#endif + failure_finish(NULL); + return (0); +} + /* Verify mtime of 'pathname'. */ int assertion_file_mtime(const char *file, int line, @@ -1579,8 +1604,12 @@ assertion_make_dir(const char *file, int if (0 == _mkdir(dirname)) return (1); #else - if (0 == mkdir(dirname, mode)) - return (1); + if (0 == mkdir(dirname, mode)) { + if (0 == chmod(dirname, mode)) { + assertion_file_mode(file, line, dirname, mode); + return (1); + } + } #endif failure_start(file, line, "Could not create directory %s", dirname); failure_finish(NULL); @@ -1629,6 +1658,11 @@ assertion_make_file(const char *file, in failure_finish(NULL); return (0); } + if (0 != chmod(path, mode)) { + failure_start(file, line, "Could not chmod %s", path); + failure_finish(NULL); + return (0); + } if (contents != NULL) { ssize_t wsize; @@ -1645,6 +1679,7 @@ assertion_make_file(const char *file, in } } close(fd); + assertion_file_mode(file, line, path, mode); return (1); #endif } Modified: head/contrib/libarchive/cpio/test/test.h ============================================================================== --- head/contrib/libarchive/cpio/test/test.h Tue Oct 4 11:44:21 2016 (r306669) +++ head/contrib/libarchive/cpio/test/test.h Tue Oct 4 11:56:46 2016 (r306670) @@ -241,6 +241,7 @@ int assertion_file_birthtime_recent(cons int assertion_file_contains_lines_any_order(const char *, int, const char *, const char **); int assertion_file_contents(const char *, int, const void *, int, const char *); int assertion_file_exists(const char *, int, const char *); +int assertion_file_mode(const char *, int, const char *, int); int assertion_file_mtime(const char *, int, const char *, long, long); int assertion_file_mtime_recent(const char *, int, const char *); int assertion_file_nlinks(const char *, int, const char *, int); Modified: head/contrib/libarchive/libarchive/archive_read_support_format_7zip.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_7zip.c Tue Oct 4 11:44:21 2016 (r306669) +++ head/contrib/libarchive/libarchive/archive_read_support_format_7zip.c Tue Oct 4 11:56:46 2016 (r306670) @@ -2431,6 +2431,8 @@ read_Header(struct archive_read *a, stru switch (type) { case kEmptyStream: + if (h->emptyStreamBools != NULL) + return (-1); h->emptyStreamBools = calloc((size_t)zip->numFiles, sizeof(*h->emptyStreamBools)); if (h->emptyStreamBools == NULL) @@ -2451,6 +2453,8 @@ read_Header(struct archive_read *a, stru return (-1); break; } + if (h->emptyFileBools != NULL) + return (-1); h->emptyFileBools = calloc(empty_streams, sizeof(*h->emptyFileBools)); if (h->emptyFileBools == NULL) @@ -2465,6 +2469,8 @@ read_Header(struct archive_read *a, stru return (-1); break; } + if (h->antiBools != NULL) + return (-1); h->antiBools = calloc(empty_streams, sizeof(*h->antiBools)); if (h->antiBools == NULL) @@ -2491,6 +2497,8 @@ read_Header(struct archive_read *a, stru if ((ll & 1) || ll < zip->numFiles * 4) return (-1); + if (zip->entry_names != NULL) + return (-1); zip->entry_names = malloc(ll); if (zip->entry_names == NULL) return (-1); @@ -2543,6 +2551,8 @@ read_Header(struct archive_read *a, stru if ((p = header_bytes(a, 2)) == NULL) return (-1); allAreDefined = *p; + if (h->attrBools != NULL) + return (-1); h->attrBools = calloc((size_t)zip->numFiles, sizeof(*h->attrBools)); if (h->attrBools == NULL) Modified: head/contrib/libarchive/libarchive/archive_read_support_format_mtree.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_mtree.c Tue Oct 4 11:44:21 2016 (r306669) +++ head/contrib/libarchive/libarchive/archive_read_support_format_mtree.c Tue Oct 4 11:56:46 2016 (r306670) @@ -301,6 +301,15 @@ get_line_size(const char *b, ssize_t ava return (avail); } +/* + * <---------------- ravail ---------------------> + * <-- diff ------> <--- avail -----------------> + * <---- len -----------> + * | Previous lines | line being parsed nl extra | + * ^ + * b + * + */ static ssize_t next_line(struct archive_read *a, const char **b, ssize_t *avail, ssize_t *ravail, ssize_t *nl) @@ -339,7 +348,7 @@ next_line(struct archive_read *a, *b += diff; *avail -= diff; tested = len;/* Skip some bytes we already determinated. */ - len = get_line_size(*b, *avail, nl); + len = get_line_size(*b + len, *avail - len, nl); if (len >= 0) len += tested; } Modified: head/contrib/libarchive/libarchive/test/main.c ============================================================================== --- head/contrib/libarchive/libarchive/test/main.c Tue Oct 4 11:44:21 2016 (r306669) +++ head/contrib/libarchive/libarchive/test/main.c Tue Oct 4 11:56:46 2016 (r306670) @@ -1607,8 +1607,12 @@ assertion_make_dir(const char *file, int if (0 == _mkdir(dirname)) return (1); #else - if (0 == mkdir(dirname, mode)) - return (1); + if (0 == mkdir(dirname, mode)) { + if (0 == chmod(dirname, mode)) { + assertion_file_mode(file, line, dirname, mode); + return (1); + } + } #endif failure_start(file, line, "Could not create directory %s", dirname); failure_finish(NULL); @@ -1657,6 +1661,11 @@ assertion_make_file(const char *file, in failure_finish(NULL); return (0); } + if (0 != chmod(path, mode)) { + failure_start(file, line, "Could not chmod %s", path); + failure_finish(NULL); + return (0); + } if (contents != NULL) { ssize_t wsize; @@ -1673,6 +1682,7 @@ assertion_make_file(const char *file, in } } close(fd); + assertion_file_mode(file, line, path, mode); return (1); #endif } Modified: head/contrib/libarchive/libarchive/test/test_acl_freebsd_nfs4.c ============================================================================== --- head/contrib/libarchive/libarchive/test/test_acl_freebsd_nfs4.c Tue Oct 4 11:44:21 2016 (r306669) +++ head/contrib/libarchive/libarchive/test/test_acl_freebsd_nfs4.c Tue Oct 4 11:56:46 2016 (r306670) @@ -93,7 +93,7 @@ static struct myacl_t acls_reg[] = { static struct myacl_t acls_dir[] = { /* For this test, we need to be able to read and write the ACL. */ - { ARCHIVE_ENTRY_ACL_TYPE_ALLOW, ARCHIVE_ENTRY_ACL_READ_ACL, + { ARCHIVE_ENTRY_ACL_TYPE_ALLOW, ARCHIVE_ENTRY_ACL_READ_DATA | ARCHIVE_ENTRY_ACL_READ_ACL, ARCHIVE_ENTRY_ACL_USER_OBJ, -1, ""}, /* An entry for each type. */ Copied: head/contrib/libarchive/libarchive/test/test_read_format_mtree_crash747.c (from r306669, vendor/libarchive/dist/libarchive/test/test_read_format_mtree_crash747.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/libarchive/libarchive/test/test_read_format_mtree_crash747.c Tue Oct 4 11:56:46 2016 (r306670, copy of r306669, vendor/libarchive/dist/libarchive/test/test_read_format_mtree_crash747.c) @@ -0,0 +1,44 @@ +/*- + * Copyright (c) 2003-2016 Tim Kientzle + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``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(S) BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "test.h" + + +/* + * Reproduce the crash reported in Github Issue #747. + */ +DEFINE_TEST(test_read_format_mtree_crash747) +{ + const char *reffile = "test_read_format_mtree_crash747.mtree.bz2"; + struct archive *a; + + extract_reference_file(reffile); + + assert((a = archive_read_new()) != NULL); + assertEqualIntA(a, ARCHIVE_OK, archive_read_support_filter_bzip2(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_mtree(a)); + assertEqualIntA(a, ARCHIVE_FATAL, archive_read_open_filename(a, reffile, 10240)); + assertEqualInt(ARCHIVE_OK, archive_read_free(a)); +} + Copied: head/contrib/libarchive/libarchive/test/test_read_format_mtree_crash747.mtree.bz2.uu (from r306669, vendor/libarchive/dist/libarchive/test/test_read_format_mtree_crash747.mtree.bz2.uu) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/libarchive/libarchive/test/test_read_format_mtree_crash747.mtree.bz2.uu Tue Oct 4 11:56:46 2016 (r306670, copy of r306669, vendor/libarchive/dist/libarchive/test/test_read_format_mtree_crash747.mtree.bz2.uu) @@ -0,0 +1,6 @@ +begin 600 test_read_format_mtree_crash747.mtree.bz2 +M0EIH.3%!62936:OH@(@``'/[@,`0`@!``'^```)A@9\`$`@@`'4)049!IIH! +MM021-0,F@&@6````9%>$(K!GIC*XFR0`$```J0+:$XP```!D-F)H[#SE9+2' +4+E"L=ASXUI%R(I"HD'ZA(5?1`Q`` +` +end Modified: head/contrib/libarchive/libarchive/test/test_read_set_format.c ============================================================================== --- head/contrib/libarchive/libarchive/test/test_read_set_format.c Tue Oct 4 11:44:21 2016 (r306669) +++ head/contrib/libarchive/libarchive/test/test_read_set_format.c Tue Oct 4 11:56:46 2016 (r306670) @@ -204,7 +204,7 @@ DEFINE_TEST(test_read_append_filter_wron /* * If we have "bunzip2 -q", try using that. */ - if (!canRunCommand("bunzip2 -V")) { + if (!canRunCommand("bunzip2 -h")) { skipping("Can't run bunzip2 program on this platform"); return; } Modified: head/contrib/libarchive/tar/subst.c ============================================================================== --- head/contrib/libarchive/tar/subst.c Tue Oct 4 11:44:21 2016 (r306669) +++ head/contrib/libarchive/tar/subst.c Tue Oct 4 11:56:46 2016 (r306670) @@ -84,6 +84,7 @@ add_substitution(struct bsdtar *bsdtar, if (rule == NULL) lafe_errc(1, errno, "Out of memory"); rule->next = NULL; + rule->result = NULL; if (subst->last_rule == NULL) subst->first_rule = rule; Modified: head/contrib/libarchive/tar/test/main.c ============================================================================== --- head/contrib/libarchive/tar/test/main.c Tue Oct 4 11:44:21 2016 (r306669) +++ head/contrib/libarchive/tar/test/main.c Tue Oct 4 11:56:46 2016 (r306670) @@ -130,6 +130,13 @@ __FBSDID("$FreeBSD$"); # include #endif +mode_t umasked(mode_t expected_mode) +{ + mode_t mode = umask(0); + umask(mode); + return expected_mode & ~mode; +} + /* Path to working directory for current test */ const char *testworkdir; #ifdef PROGRAM @@ -1361,6 +1368,31 @@ assertion_file_birthtime_recent(const ch return assertion_file_time(file, line, pathname, 0, 0, 'b', 1); } +/* Verify mode of 'pathname'. */ +int +assertion_file_mode(const char *file, int line, const char *pathname, int expected_mode) +{ + int mode; + int r; + + assertion_count(file, line); +#if defined(_WIN32) && !defined(__CYGWIN__) + failure_start(file, line, "assertFileMode not yet implemented for Windows"); +#else + { + struct stat st; + r = lstat(pathname, &st); + mode = (int)(st.st_mode & 0777); + } + if (r == 0 && mode == expected_mode) + return (1); + failure_start(file, line, "File %s has mode %o, expected %o", + pathname, mode, expected_mode); +#endif + failure_finish(NULL); + return (0); +} + /* Verify mtime of 'pathname'. */ int assertion_file_mtime(const char *file, int line, @@ -1579,8 +1611,12 @@ assertion_make_dir(const char *file, int if (0 == _mkdir(dirname)) return (1); #else - if (0 == mkdir(dirname, mode)) - return (1); + if (0 == mkdir(dirname, mode)) { + if (0 == chmod(dirname, mode)) { + assertion_file_mode(file, line, dirname, mode); + return (1); + } + } #endif failure_start(file, line, "Could not create directory %s", dirname); failure_finish(NULL); @@ -1629,6 +1665,11 @@ assertion_make_file(const char *file, in failure_finish(NULL); return (0); } + if (0 != chmod(path, mode)) { + failure_start(file, line, "Could not chmod %s", path); + failure_finish(NULL); + return (0); + } if (contents != NULL) { ssize_t wsize; @@ -1645,6 +1686,7 @@ assertion_make_file(const char *file, in } } close(fd); + assertion_file_mode(file, line, path, mode); return (1); #endif } Modified: head/contrib/libarchive/tar/test/test.h ============================================================================== --- head/contrib/libarchive/tar/test/test.h Tue Oct 4 11:44:21 2016 (r306669) +++ head/contrib/libarchive/tar/test/test.h Tue Oct 4 11:56:46 2016 (r306670) @@ -241,6 +241,7 @@ int assertion_file_birthtime_recent(cons int assertion_file_contains_lines_any_order(const char *, int, const char *, const char **); int assertion_file_contents(const char *, int, const void *, int, const char *); int assertion_file_exists(const char *, int, const char *); +int assertion_file_mode(const char *, int, const char *, int); int assertion_file_mtime(const char *, int, const char *, long, long); int assertion_file_mtime_recent(const char *, int, const char *); int assertion_file_nlinks(const char *, int, const char *, int); @@ -326,6 +327,9 @@ void copy_reference_file(const char *); */ void extract_reference_files(const char **); +/* Subtract umask from mode */ +mode_t umasked(mode_t expected_mode); + /* Path to working directory for current test */ extern const char *testworkdir; Modified: head/contrib/libarchive/tar/test/test_option_H_upper.c ============================================================================== --- head/contrib/libarchive/tar/test/test_option_H_upper.c Tue Oct 4 11:44:21 2016 (r306669) +++ head/contrib/libarchive/tar/test/test_option_H_upper.c Tue Oct 4 11:56:46 2016 (r306670) @@ -83,10 +83,10 @@ DEFINE_TEST(test_option_H_upper) assertChdir("test3"); assertEqualInt(0, systemf("%s -xf archive.tar >c.out 2>c.err", testprog)); - assertIsDir("ld1", 0755); + assertIsDir("ld1", umasked(0755)); assertIsSymlink("d1/linkX", "fileX"); assertIsSymlink("d1/link1", "file1"); - assertIsReg("link2", 0644); + assertIsReg("link2", umasked(0644)); assertIsSymlink("linkY", "d1/fileY"); assertChdir(".."); } Modified: head/contrib/libarchive/tar/test/test_option_L_upper.c ============================================================================== --- head/contrib/libarchive/tar/test/test_option_L_upper.c Tue Oct 4 11:44:21 2016 (r306669) +++ head/contrib/libarchive/tar/test/test_option_L_upper.c Tue Oct 4 11:56:46 2016 (r306670) @@ -69,10 +69,10 @@ DEFINE_TEST(test_option_L_upper) assertChdir("test2"); assertEqualInt(0, systemf("%s -xf archive.tar >c.out 2>c.err", testprog)); - assertIsDir("ld1", 0755); - assertIsReg("d1/link1", 0644); + assertIsDir("ld1", umasked(0755)); + assertIsReg("d1/link1", umasked(0644)); assertIsSymlink("d1/linkX", "fileX"); - assertIsReg("link2", 0644); + assertIsReg("link2", umasked(0644)); assertIsSymlink("linkY", "d1/fileY"); assertChdir(".."); @@ -83,10 +83,10 @@ DEFINE_TEST(test_option_L_upper) assertChdir("test3"); assertEqualInt(0, systemf("%s -xf archive.tar >c.out 2>c.err", testprog)); - assertIsDir("ld1", 0755); - assertIsReg("d1/link1", 0644); + assertIsDir("ld1", umasked(0755)); + assertIsReg("d1/link1", umasked(0644)); assertIsSymlink("d1/linkX", "fileX"); - assertIsReg("link2", 0644); + assertIsReg("link2", umasked(0644)); assertIsSymlink("linkY", "d1/fileY"); assertChdir(".."); } Modified: head/contrib/libarchive/tar/test/test_option_U_upper.c ============================================================================== --- head/contrib/libarchive/tar/test/test_option_U_upper.c Tue Oct 4 11:44:21 2016 (r306669) +++ head/contrib/libarchive/tar/test/test_option_U_upper.c Tue Oct 4 11:56:46 2016 (r306670) @@ -135,7 +135,7 @@ DEFINE_TEST(test_option_U_upper) assertMakeSymlink("d1/file1", "d1/realfile1"); assertEqualInt(0, systemf("%s -xf ../archive.tar d1/file1 >test.out 2>test.err", testprog)); - assertIsReg("d1/file1", 0644); + assertIsReg("d1/file1", umasked(0644)); assertFileContents("d1/file1", 8, "d1/file1"); assertFileContents("realfile1", 9, "d1/realfile1"); assertEmptyFile("test.out"); @@ -150,7 +150,7 @@ DEFINE_TEST(test_option_U_upper) assertMakeSymlink("d1/file1", "d1/realfile1"); assertEqualInt(0, systemf("%s -xPUf ../archive.tar d1/file1 >test.out 2>test.err", testprog)); - assertIsReg("d1/file1", 0644); + assertIsReg("d1/file1", umasked(0644)); assertFileContents("d1/file1", 8, "d1/file1"); assertFileContents("realfile1", 9, "d1/realfile1"); assertEmptyFile("test.out"); Modified: head/contrib/libarchive/tar/test/test_option_n.c ============================================================================== --- head/contrib/libarchive/tar/test/test_option_n.c Tue Oct 4 11:44:21 2016 (r306669) +++ head/contrib/libarchive/tar/test/test_option_n.c Tue Oct 4 11:56:46 2016 (r306670) @@ -55,7 +55,7 @@ DEFINE_TEST(test_option_n) systemf("%s -xf archive.tar >x.out 2>x.err", testprog)); assertEmptyFile("x.out"); assertEmptyFile("x.err"); - assertIsDir("d1", 0755); + assertIsDir("d1", umasked(0755)); assertFileNotExists("d1/file1"); assertChdir(".."); } Modified: head/contrib/libarchive/tar/write.c ============================================================================== --- head/contrib/libarchive/tar/write.c Tue Oct 4 11:44:21 2016 (r306669) +++ head/contrib/libarchive/tar/write.c Tue Oct 4 11:56:46 2016 (r306670) @@ -886,6 +886,8 @@ write_hierarchy(struct bsdtar *bsdtar, s "%s", archive_error_string(disk)); if (r == ARCHIVE_FATAL || r == ARCHIVE_FAILED) { bsdtar->return_value = 1; + archive_entry_free(entry); + archive_read_close(disk); return; } else if (r < ARCHIVE_WARN) continue; Modified: head/lib/libarchive/tests/Makefile ============================================================================== --- head/lib/libarchive/tests/Makefile Tue Oct 4 11:44:21 2016 (r306669) +++ head/lib/libarchive/tests/Makefile Tue Oct 4 11:56:46 2016 (r306670) @@ -151,6 +151,7 @@ TESTS_SRCS= \ test_read_format_lha_bugfix_0.c \ test_read_format_lha_filename.c \ test_read_format_mtree.c \ + test_read_format_mtree_crash747.c \ test_read_format_pax_bz2.c \ test_read_format_rar.c \ test_read_format_rar_encryption_data.c \ @@ -466,6 +467,7 @@ ${PACKAGE}FILES+= test_read_format_lha_l ${PACKAGE}FILES+= test_read_format_lha_lh7.lzh.uu ${PACKAGE}FILES+= test_read_format_lha_withjunk.lzh.uu ${PACKAGE}FILES+= test_read_format_mtree.mtree.uu +${PACKAGE}FILES+= test_read_format_mtree_crash747.mtree.bz2.uu ${PACKAGE}FILES+= test_read_format_mtree_nomagic.mtree.uu ${PACKAGE}FILES+= test_read_format_mtree_nomagic2.mtree.uu ${PACKAGE}FILES+= test_read_format_mtree_nomagic3.mtree.uu From owner-svn-src-all@freebsd.org Tue Oct 4 12:01:09 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E23BAAF4308; Tue, 4 Oct 2016 12:01:09 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B289ADCF; Tue, 4 Oct 2016 12:01:09 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u94C18NA044611; Tue, 4 Oct 2016 12:01:08 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u94C183F044609; Tue, 4 Oct 2016 12:01:08 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201610041201.u94C183F044609@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 4 Oct 2016 12:01:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306671 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 12:01:10 -0000 Author: andrew Date: Tue Oct 4 12:01:08 2016 New Revision: 306671 URL: https://svnweb.freebsd.org/changeset/base/306671 Log: Read the Multiprocessing Extensions bit from the Multiprocessor Affinity register. Sponsored by: ABT Systems Ltd X-Differential Revision: https://reviews.freebsd.org/D8092 Modified: head/sys/arm/arm/cpuinfo.c head/sys/arm/include/cpuinfo.h Modified: head/sys/arm/arm/cpuinfo.c ============================================================================== --- head/sys/arm/arm/cpuinfo.c Tue Oct 4 11:56:46 2016 (r306670) +++ head/sys/arm/arm/cpuinfo.c Tue Oct 4 12:01:08 2016 (r306671) @@ -131,6 +131,8 @@ cpuinfo_init(void) cpuinfo.generic_timer_ext = (cpuinfo.id_pfr1 >> 16) & 0xF; cpuinfo.virtualization_ext = (cpuinfo.id_pfr1 >> 12) & 0xF; cpuinfo.security_ext = (cpuinfo.id_pfr1 >> 4) & 0xF; + /* mpidr */ + cpuinfo.mp_ext = (cpuinfo.mpidr >> 31u) & 0x1; /* L1 Cache sizes */ if (CPU_CT_FORMAT(cpuinfo.ctr) == CPU_CT_ARMV7) { Modified: head/sys/arm/include/cpuinfo.h ============================================================================== --- head/sys/arm/include/cpuinfo.h Tue Oct 4 11:56:46 2016 (r306670) +++ head/sys/arm/include/cpuinfo.h Tue Oct 4 12:01:08 2016 (r306671) @@ -105,6 +105,9 @@ struct cpuinfo { int dcache_line_mask; int icache_line_size; int icache_line_mask; + + /* mpidr */ + int mp_ext; }; extern struct cpuinfo cpuinfo; From owner-svn-src-all@freebsd.org Tue Oct 4 12:25:48 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 279BAAF4D2C; Tue, 4 Oct 2016 12:25:48 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9D0DFCD; Tue, 4 Oct 2016 12:25:47 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u94CPl6v055168; Tue, 4 Oct 2016 12:25:47 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u94CPi8v055141; Tue, 4 Oct 2016 12:25:44 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201610041225.u94CPi8v055141@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 4 Oct 2016 12:25:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306672 - in head/sys: arm/allwinner arm/altera/socfpga arm/amlogic/aml8726 arm/annapurna/alpine arm/arm arm/broadcom/bcm2835 arm/conf arm/freescale/imx arm/freescale/vybrid arm/include... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 12:25:48 -0000 Author: andrew Date: Tue Oct 4 12:25:44 2016 New Revision: 306672 URL: https://svnweb.freebsd.org/changeset/base/306672 Log: Split CPU_CORTEXA into CPU_CORTEXA8, for the Cortex-A8, and CPU_CORTEXA_MP, for later Cortex-A CPUs that support the Multiprocessor Extensions. This will be needed to support both in a single GENERIC kernel while still being able to only build for a single SoC. Reviewed by: mmel Relnotes: yes Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D8138 Modified: head/sys/arm/allwinner/std.allwinner head/sys/arm/allwinner/std.allwinner_up head/sys/arm/altera/socfpga/std.socfpga head/sys/arm/amlogic/aml8726/std.aml8726 head/sys/arm/annapurna/alpine/std.alpine head/sys/arm/arm/cpufunc.c head/sys/arm/arm/elf_trampoline.c head/sys/arm/broadcom/bcm2835/std.bcm2836 head/sys/arm/conf/GENERIC head/sys/arm/freescale/imx/std.imx51 head/sys/arm/freescale/imx/std.imx53 head/sys/arm/freescale/imx/std.imx6 head/sys/arm/freescale/vybrid/std.vybrid head/sys/arm/include/cpuconf.h head/sys/arm/include/cpufunc.h head/sys/arm/include/intr.h head/sys/arm/mv/armada38x/std.armada38x head/sys/arm/nvidia/tegra124/std.tegra124 head/sys/arm/qemu/std.virt head/sys/arm/rockchip/std.rk30xx head/sys/arm/samsung/exynos/std.exynos5250 head/sys/arm/samsung/exynos/std.exynos5420 head/sys/arm/ti/am335x/std.am335x head/sys/arm/ti/omap4/std.omap4 head/sys/arm/ti/std.ti head/sys/arm/xilinx/std.zynq7 head/sys/conf/files.arm head/sys/conf/options.arm Modified: head/sys/arm/allwinner/std.allwinner ============================================================================== --- head/sys/arm/allwinner/std.allwinner Tue Oct 4 12:01:08 2016 (r306671) +++ head/sys/arm/allwinner/std.allwinner Tue Oct 4 12:25:44 2016 (r306672) @@ -1,7 +1,7 @@ # Allwinner common options #$FreeBSD$ -cpu CPU_CORTEXA +cpu CPU_CORTEXA_MP machine arm armv6 makeoptions CONF_CFLAGS="-march=armv7a" Modified: head/sys/arm/allwinner/std.allwinner_up ============================================================================== --- head/sys/arm/allwinner/std.allwinner_up Tue Oct 4 12:01:08 2016 (r306671) +++ head/sys/arm/allwinner/std.allwinner_up Tue Oct 4 12:25:44 2016 (r306672) @@ -1,7 +1,7 @@ # Allwinner Uniprocessor common options #$FreeBSD$ -cpu CPU_CORTEXA +cpu CPU_CORTEXA8 machine arm armv6 makeoptions CONF_CFLAGS="-march=armv7a" Modified: head/sys/arm/altera/socfpga/std.socfpga ============================================================================== --- head/sys/arm/altera/socfpga/std.socfpga Tue Oct 4 12:01:08 2016 (r306671) +++ head/sys/arm/altera/socfpga/std.socfpga Tue Oct 4 12:25:44 2016 (r306672) @@ -1,6 +1,6 @@ # $FreeBSD$ -cpu CPU_CORTEXA +cpu CPU_CORTEXA_MP machine arm armv6 makeoptions CONF_CFLAGS="-march=armv7a" Modified: head/sys/arm/amlogic/aml8726/std.aml8726 ============================================================================== --- head/sys/arm/amlogic/aml8726/std.aml8726 Tue Oct 4 12:01:08 2016 (r306671) +++ head/sys/arm/amlogic/aml8726/std.aml8726 Tue Oct 4 12:25:44 2016 (r306672) @@ -1,6 +1,6 @@ # $FreeBSD$ -cpu CPU_CORTEXA +cpu CPU_CORTEXA_MP machine arm armv6 makeoptions CONF_CFLAGS="-march=armv7a" Modified: head/sys/arm/annapurna/alpine/std.alpine ============================================================================== --- head/sys/arm/annapurna/alpine/std.alpine Tue Oct 4 12:01:08 2016 (r306671) +++ head/sys/arm/annapurna/alpine/std.alpine Tue Oct 4 12:25:44 2016 (r306672) @@ -1,6 +1,6 @@ # $FreeBSD$ -cpu CPU_CORTEXA +cpu CPU_CORTEXA_MP machine arm armv6 makeoptions CONF_CFLAGS="-march=armv7a -DAL_HAVE_TYPES" Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Tue Oct 4 12:01:08 2016 (r306671) +++ head/sys/arm/arm/cpufunc.c Tue Oct 4 12:25:44 2016 (r306672) @@ -438,7 +438,7 @@ struct cpu_functions arm1176_cpufuncs = }; #endif /*CPU_ARM1176 */ -#if defined(CPU_CORTEXA) || defined(CPU_KRAIT) +#if defined(CPU_CORTEXA8) || defined(CPU_CORTEXA_MP) || defined(CPU_KRAIT) struct cpu_functions cortexa_cpufuncs = { /* MMU functions */ .cf_control = cpufunc_control, @@ -463,7 +463,7 @@ struct cpu_functions cortexa_cpufuncs = /* Soft functions */ .cf_setup = cortexa_setup }; -#endif /* CPU_CORTEXA */ +#endif /* CPU_CORTEXA8 || CPU_CORTEXA_MP || CPU_KRAIT */ /* * Global constants also used by locore.s @@ -481,7 +481,7 @@ u_int cpu_reset_needs_v4_MMU_disable; /* defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ defined(CPU_FA526) || defined(CPU_MV_PJ4B) || \ defined(CPU_XSCALE_81342) || \ - defined(CPU_CORTEXA) || defined(CPU_KRAIT) + defined(CPU_CORTEXA8) || defined(CPU_CORTEXA_MP) || defined(CPU_KRAIT) /* Global cache line sizes, use 32 as default */ int arm_dcache_min_line_size = 32; @@ -672,7 +672,7 @@ set_cpufuncs() goto out; } #endif /* CPU_ARM1176 */ -#if defined(CPU_CORTEXA) || defined(CPU_KRAIT) +#if defined(CPU_CORTEXA8) || defined(CPU_CORTEXA_MP) || defined(CPU_KRAIT) switch(cputype & CPU_ID_SCHEME_MASK) { case CPU_ID_CORTEXA5: case CPU_ID_CORTEXA7: @@ -690,7 +690,7 @@ set_cpufuncs() default: break; } -#endif /* CPU_CORTEXA */ +#endif /* CPU_CORTEXA8 || CPU_CORTEXA_MP || CPU_KRAIT */ #if defined(CPU_MV_PJ4B) if (cputype == CPU_ID_MV88SV581X_V7 || @@ -843,7 +843,7 @@ arm10_setup(void) #if defined(CPU_ARM1176) \ || defined(CPU_MV_PJ4B) \ - || defined(CPU_CORTEXA) || defined(CPU_KRAIT) + || defined(CPU_CORTEXA8) || defined(CPU_CORTEXA_MP) || defined(CPU_KRAIT) static __inline void cpu_scc_setup_ccnt(void) { @@ -913,7 +913,7 @@ pj4bv7_setup(void) } #endif /* CPU_MV_PJ4B */ -#if defined(CPU_CORTEXA) || defined(CPU_KRAIT) +#if defined(CPU_CORTEXA8) || defined(CPU_CORTEXA_MP) || defined(CPU_KRAIT) void cortexa_setup(void) @@ -921,7 +921,7 @@ cortexa_setup(void) cpu_scc_setup_ccnt(); } -#endif /* CPU_CORTEXA */ +#endif /* CPU_CORTEXA8 || CPU_CORTEXA_MP || CPU_KRAIT */ #if defined(CPU_FA526) void Modified: head/sys/arm/arm/elf_trampoline.c ============================================================================== --- head/sys/arm/arm/elf_trampoline.c Tue Oct 4 12:01:08 2016 (r306671) +++ head/sys/arm/arm/elf_trampoline.c Tue Oct 4 12:25:44 2016 (r306672) @@ -88,7 +88,7 @@ extern void xscalec3_l2cache_purge(void) #elif defined(SOC_MV_KIRKWOOD) || defined(SOC_MV_DISCOVERY) #define cpu_l2cache_wbinv_all sheeva_l2cache_wbinv_all extern void sheeva_l2cache_wbinv_all(void); -#elif defined(CPU_CORTEXA) || defined(CPU_KRAIT) +#elif defined(CPU_CORTEXA8) || defined(CPU_CORTEXA_MP) || defined(CPU_KRAIT) #define cpu_idcache_wbinv_all armv7_idcache_wbinv_all #define cpu_l2cache_wbinv_all() #else Modified: head/sys/arm/broadcom/bcm2835/std.bcm2836 ============================================================================== --- head/sys/arm/broadcom/bcm2835/std.bcm2836 Tue Oct 4 12:01:08 2016 (r306671) +++ head/sys/arm/broadcom/bcm2835/std.bcm2836 Tue Oct 4 12:25:44 2016 (r306672) @@ -1,7 +1,7 @@ # $FreeBSD$ machine arm armv6 -cpu CPU_CORTEXA +cpu CPU_CORTEXA_MP makeoptions CONF_CFLAGS="-march=armv7a" options SOC_BCM2836 Modified: head/sys/arm/conf/GENERIC ============================================================================== --- head/sys/arm/conf/GENERIC Tue Oct 4 12:01:08 2016 (r306671) +++ head/sys/arm/conf/GENERIC Tue Oct 4 12:25:44 2016 (r306672) @@ -20,7 +20,7 @@ ident GENERIC -cpu CPU_CORTEXA +cpu CPU_CORTEXA_MP machine arm armv6 makeoptions CONF_CFLAGS="-march=armv7a" Modified: head/sys/arm/freescale/imx/std.imx51 ============================================================================== --- head/sys/arm/freescale/imx/std.imx51 Tue Oct 4 12:01:08 2016 (r306671) +++ head/sys/arm/freescale/imx/std.imx51 Tue Oct 4 12:25:44 2016 (r306672) @@ -1,6 +1,6 @@ # $FreeBSD$ machine arm armv6 -cpu CPU_CORTEXA +cpu CPU_CORTEXA8 makeoptions CONF_CFLAGS="-march=armv7a" options KERNVIRTADDR=0xc0100000 Modified: head/sys/arm/freescale/imx/std.imx53 ============================================================================== --- head/sys/arm/freescale/imx/std.imx53 Tue Oct 4 12:01:08 2016 (r306671) +++ head/sys/arm/freescale/imx/std.imx53 Tue Oct 4 12:25:44 2016 (r306672) @@ -1,6 +1,6 @@ # $FreeBSD$ machine arm armv6 -cpu CPU_CORTEXA +cpu CPU_CORTEXA8 makeoptions CONF_CFLAGS="-march=armv7a" options KERNVIRTADDR=0xc0100000 Modified: head/sys/arm/freescale/imx/std.imx6 ============================================================================== --- head/sys/arm/freescale/imx/std.imx6 Tue Oct 4 12:01:08 2016 (r306671) +++ head/sys/arm/freescale/imx/std.imx6 Tue Oct 4 12:25:44 2016 (r306672) @@ -1,6 +1,6 @@ # $FreeBSD$ machine arm armv6 -cpu CPU_CORTEXA +cpu CPU_CORTEXA_MP makeoptions CONF_CFLAGS="-march=armv7a" options KERNVIRTADDR = 0xc2000000 Modified: head/sys/arm/freescale/vybrid/std.vybrid ============================================================================== --- head/sys/arm/freescale/vybrid/std.vybrid Tue Oct 4 12:01:08 2016 (r306671) +++ head/sys/arm/freescale/vybrid/std.vybrid Tue Oct 4 12:25:44 2016 (r306672) @@ -1,6 +1,6 @@ # $FreeBSD$ -cpu CPU_CORTEXA +cpu CPU_CORTEXA_MP machine arm armv6 makeoptions CONF_CFLAGS="-march=armv7a" Modified: head/sys/arm/include/cpuconf.h ============================================================================== --- head/sys/arm/include/cpuconf.h Tue Oct 4 12:01:08 2016 (r306671) +++ head/sys/arm/include/cpuconf.h Tue Oct 4 12:25:44 2016 (r306672) @@ -56,7 +56,8 @@ defined(CPU_XSCALE_PXA2X0) + \ defined(CPU_FA526) + \ defined(CPU_XSCALE_IXP425)) + \ - defined(CPU_CORTEXA) + \ + defined(CPU_CORTEXA8) + \ + defined(CPU_CORTEXA_MP) + \ defined(CPU_KRAIT) + \ defined(CPU_MV_PJ4B) @@ -85,7 +86,8 @@ #endif #endif -#if defined(CPU_CORTEXA) || defined(CPU_KRAIT) || defined(CPU_MV_PJ4B) +#if defined(CPU_CORTEXA8) || defined(CPU_CORTEXA_MP) || \ + defined(CPU_KRAIT) || defined(CPU_MV_PJ4B) #define ARM_ARCH_7A 1 #else #define ARM_ARCH_7A 0 @@ -155,7 +157,8 @@ #define ARM_MMU_V6 0 #endif -#if defined(CPU_CORTEXA) || defined(CPU_KRAIT) || defined(CPU_MV_PJ4B) +#if defined(CPU_CORTEXA8) || defined(CPU_CORTEXA_MP) || \ + defined(CPU_KRAIT) || defined(CPU_MV_PJ4B) #define ARM_MMU_V7 1 #else #define ARM_MMU_V7 0 Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Tue Oct 4 12:01:08 2016 (r306671) +++ head/sys/arm/include/cpufunc.h Tue Oct 4 12:25:44 2016 (r306672) @@ -278,7 +278,8 @@ void sheeva_l2cache_wbinv_all (void); #if defined(CPU_MV_PJ4B) void armv6_idcache_wbinv_all (void); #endif -#if defined(CPU_MV_PJ4B) || defined(CPU_CORTEXA) || defined(CPU_KRAIT) +#if defined(CPU_CORTEXA8) || defined(CPU_CORTEXA_MP) || \ + defined(CPU_MV_PJ4B) || defined(CPU_KRAIT) void armv7_setttb (u_int); void armv7_idcache_wbinv_all (void); void armv7_cpu_sleep (int); Modified: head/sys/arm/include/intr.h ============================================================================== --- head/sys/arm/include/intr.h Tue Oct 4 12:01:08 2016 (r306671) +++ head/sys/arm/include/intr.h Tue Oct 4 12:25:44 2016 (r306672) @@ -76,7 +76,7 @@ int intr_pic_ipi_setup(u_int, const char #elif defined(CPU_ARM9) || defined(SOC_MV_KIRKWOOD) || \ defined(CPU_XSCALE_IXP435) #define NIRQ 64 -#elif defined(CPU_CORTEXA) +#elif defined(CPU_CORTEXA8) || defined(CPU_CORTEXA_MP) #define NIRQ 1020 #elif defined(CPU_KRAIT) #define NIRQ 288 Modified: head/sys/arm/mv/armada38x/std.armada38x ============================================================================== --- head/sys/arm/mv/armada38x/std.armada38x Tue Oct 4 12:01:08 2016 (r306671) +++ head/sys/arm/mv/armada38x/std.armada38x Tue Oct 4 12:25:44 2016 (r306672) @@ -1,7 +1,7 @@ # $FreeBSD$ files "../mv/armada38x/files.armada38x" files "../mv/files.mv" -cpu CPU_CORTEXA +cpu CPU_CORTEXA_MP machine arm armv6 makeoptions CONF_CFLAGS="-march=armv7a" Modified: head/sys/arm/nvidia/tegra124/std.tegra124 ============================================================================== --- head/sys/arm/nvidia/tegra124/std.tegra124 Tue Oct 4 12:01:08 2016 (r306671) +++ head/sys/arm/nvidia/tegra124/std.tegra124 Tue Oct 4 12:25:44 2016 (r306672) @@ -1,5 +1,5 @@ # $FreeBSD$ -cpu CPU_CORTEXA +cpu CPU_CORTEXA_MP machine arm armv6 makeoptions CONF_CFLAGS="-march=armv7a" Modified: head/sys/arm/qemu/std.virt ============================================================================== --- head/sys/arm/qemu/std.virt Tue Oct 4 12:01:08 2016 (r306671) +++ head/sys/arm/qemu/std.virt Tue Oct 4 12:25:44 2016 (r306672) @@ -1,6 +1,6 @@ # $FreeBSD$ machine arm armv6 -cpu CPU_CORTEXA +cpu CPU_CORTEXA_MP makeoptions CONF_CFLAGS="-march=armv7a" options KERNVIRTADDR = 0xc1000000 Modified: head/sys/arm/rockchip/std.rk30xx ============================================================================== --- head/sys/arm/rockchip/std.rk30xx Tue Oct 4 12:01:08 2016 (r306671) +++ head/sys/arm/rockchip/std.rk30xx Tue Oct 4 12:25:44 2016 (r306672) @@ -1,7 +1,7 @@ # Rockchip rk30xx common options #$FreeBSD$ -cpu CPU_CORTEXA +cpu CPU_CORTEXA_MP machine arm armv6 makeoptions CONF_CFLAGS="-march=armv7a" Modified: head/sys/arm/samsung/exynos/std.exynos5250 ============================================================================== --- head/sys/arm/samsung/exynos/std.exynos5250 Tue Oct 4 12:01:08 2016 (r306671) +++ head/sys/arm/samsung/exynos/std.exynos5250 Tue Oct 4 12:25:44 2016 (r306672) @@ -1,6 +1,6 @@ # $FreeBSD$ -cpu CPU_CORTEXA +cpu CPU_CORTEXA_MP machine arm armv6 makeoptions CONF_CFLAGS="-march=armv7a" Modified: head/sys/arm/samsung/exynos/std.exynos5420 ============================================================================== --- head/sys/arm/samsung/exynos/std.exynos5420 Tue Oct 4 12:01:08 2016 (r306671) +++ head/sys/arm/samsung/exynos/std.exynos5420 Tue Oct 4 12:25:44 2016 (r306672) @@ -1,6 +1,6 @@ # $FreeBSD$ -cpu CPU_CORTEXA +cpu CPU_CORTEXA_MP machine arm armv6 makeoptions CONF_CFLAGS="-march=armv7a" Modified: head/sys/arm/ti/am335x/std.am335x ============================================================================== --- head/sys/arm/ti/am335x/std.am335x Tue Oct 4 12:01:08 2016 (r306671) +++ head/sys/arm/ti/am335x/std.am335x Tue Oct 4 12:25:44 2016 (r306672) @@ -3,6 +3,8 @@ files "../ti/am335x/files.am335x" include "../ti/std.ti" +cpu CPU_CORTEXA8 + options KERNVIRTADDR=0xc0200000 # Used in ldscript.arm makeoptions KERNVIRTADDR=0xc0200000 Modified: head/sys/arm/ti/omap4/std.omap4 ============================================================================== --- head/sys/arm/ti/omap4/std.omap4 Tue Oct 4 12:01:08 2016 (r306671) +++ head/sys/arm/ti/omap4/std.omap4 Tue Oct 4 12:25:44 2016 (r306672) @@ -3,6 +3,8 @@ files "../ti/omap4/files.omap4" include "../ti/std.ti" +cpu CPU_CORTEXA_MP + options KERNVIRTADDR=0xc0200000 # Used in ldscript.arm makeoptions KERNVIRTADDR=0xc0200000 Modified: head/sys/arm/ti/std.ti ============================================================================== --- head/sys/arm/ti/std.ti Tue Oct 4 12:01:08 2016 (r306671) +++ head/sys/arm/ti/std.ti Tue Oct 4 12:25:44 2016 (r306672) @@ -1,6 +1,5 @@ # $FreeBSD$ -cpu CPU_CORTEXA machine arm armv6 makeoptions CONF_CFLAGS="-march=armv7a" Modified: head/sys/arm/xilinx/std.zynq7 ============================================================================== --- head/sys/arm/xilinx/std.zynq7 Tue Oct 4 12:01:08 2016 (r306671) +++ head/sys/arm/xilinx/std.zynq7 Tue Oct 4 12:25:44 2016 (r306672) @@ -3,7 +3,7 @@ # # $FreeBSD$ -cpu CPU_CORTEXA +cpu CPU_CORTEXA_MP machine arm armv6 makeoptions CONF_CFLAGS="-march=armv7a" Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Tue Oct 4 12:01:08 2016 (r306671) +++ head/sys/conf/files.arm Tue Oct 4 12:25:44 2016 (r306672) @@ -32,7 +32,7 @@ arm/arm/cpufunc_asm_arm11x6.S optional c arm/arm/cpufunc_asm_armv4.S optional cpu_arm9 | cpu_arm9e | cpu_fa526 | cpu_xscale_pxa2x0 | cpu_xscale_ixp425 | cpu_xscale_81342 arm/arm/cpufunc_asm_armv5_ec.S optional cpu_arm9e arm/arm/cpufunc_asm_armv6.S optional cpu_arm1176 -arm/arm/cpufunc_asm_armv7.S optional cpu_cortexa | cpu_krait | cpu_mv_pj4b +arm/arm/cpufunc_asm_armv7.S optional cpu_cortexa8 | cpu_cortexa_mp | cpu_krait | cpu_mv_pj4b arm/arm/cpufunc_asm_fa526.S optional cpu_fa526 arm/arm/cpufunc_asm_pj4b.S optional cpu_mv_pj4b arm/arm/cpufunc_asm_sheeva.S optional cpu_arm9e Modified: head/sys/conf/options.arm ============================================================================== --- head/sys/conf/options.arm Tue Oct 4 12:01:08 2016 (r306671) +++ head/sys/conf/options.arm Tue Oct 4 12:25:44 2016 (r306672) @@ -10,7 +10,8 @@ COUNTS_PER_SEC opt_timer.h CPU_ARM9 opt_global.h CPU_ARM9E opt_global.h CPU_ARM1176 opt_global.h -CPU_CORTEXA opt_global.h +CPU_CORTEXA8 opt_global.h # Support the Cortex-A8 (no MP extensions) +CPU_CORTEXA_MP opt_global.h # Support Cortex-A CPUs with MP extensions CPU_KRAIT opt_global.h CPU_FA526 opt_global.h CPU_MV_PJ4B opt_global.h From owner-svn-src-all@freebsd.org Tue Oct 4 13:33:45 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2672FAF3344; Tue, 4 Oct 2016 13:33:45 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9E44A7B; Tue, 4 Oct 2016 13:33:44 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u94DXi2Q081524; Tue, 4 Oct 2016 13:33:44 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u94DXihv081523; Tue, 4 Oct 2016 13:33:44 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201610041333.u94DXihv081523@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Tue, 4 Oct 2016 13:33:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306673 - head/lib/libcapsicum X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 13:33:45 -0000 Author: oshogbo Date: Tue Oct 4 13:33:43 2016 New Revision: 306673 URL: https://svnweb.freebsd.org/changeset/base/306673 Log: libcapsicum: limit stderr Don't limit stdout twice, instead limit stderr. Pointed out by: rpokala@ Modified: head/lib/libcapsicum/capsicum_helpers.h Modified: head/lib/libcapsicum/capsicum_helpers.h ============================================================================== --- head/lib/libcapsicum/capsicum_helpers.h Tue Oct 4 12:25:44 2016 (r306672) +++ head/lib/libcapsicum/capsicum_helpers.h Tue Oct 4 13:33:43 2016 (r306673) @@ -96,7 +96,7 @@ caph_limit_stdio(void) { if (caph_limit_stdin() == -1 || caph_limit_stdout() == -1 || - caph_limit_stdout() == -1) { + caph_limit_stderr() == -1) { return (-1); } From owner-svn-src-all@freebsd.org Tue Oct 4 15:23:04 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39233AF3E14; Tue, 4 Oct 2016 15:23:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C54AE13; Tue, 4 Oct 2016 15:23:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u94FN3oh023614; Tue, 4 Oct 2016 15:23:03 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u94FN3Dk023613; Tue, 4 Oct 2016 15:23:03 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201610041523.u94FN3Dk023613@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 4 Oct 2016 15:23:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306674 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 15:23:04 -0000 Author: kib Date: Tue Oct 4 15:23:03 2016 New Revision: 306674 URL: https://svnweb.freebsd.org/changeset/base/306674 Log: Style. Reviewed by: emaste Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/kern/imgact_elf.c Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Tue Oct 4 13:33:43 2016 (r306673) +++ head/sys/kern/imgact_elf.c Tue Oct 4 15:23:03 2016 (r306674) @@ -454,7 +454,7 @@ __elfN(map_insert)(vm_map_t map, vm_obje rv = vm_map_find(map, NULL, 0, &start, end - start, 0, VMFS_NO_SPACE, prot | VM_PROT_WRITE, VM_PROT_ALL, 0); - if (rv) + if (rv != KERN_SUCCESS) return (rv); if (object == NULL) return (KERN_SUCCESS); @@ -469,9 +469,8 @@ __elfN(map_insert)(vm_map_t map, vm_obje error = copyout((caddr_t)sf_buf_kva(sf) + off, (caddr_t)start, sz); vm_imgact_unmap_page(sf); - if (error) { + if (error != 0) return (KERN_FAILURE); - } offset += sz; } rv = KERN_SUCCESS; From owner-svn-src-all@freebsd.org Tue Oct 4 16:27:37 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6864EAF4511; Tue, 4 Oct 2016 16:27:37 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34CC178B; Tue, 4 Oct 2016 16:27:37 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u94GRaiP047832; Tue, 4 Oct 2016 16:27:36 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u94GRaij047828; Tue, 4 Oct 2016 16:27:36 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201610041627.u94GRaij047828@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 4 Oct 2016 16:27:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306675 - head/sys/mips/atheros/ar531x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 16:27:37 -0000 Author: adrian Date: Tue Oct 4 16:27:36 2016 New Revision: 306675 URL: https://svnweb.freebsd.org/changeset/base/306675 Log: [ar531x] add initial port for the AR231x/531x series of SoCs. These are older MIPS4kc parts from Atheros. They typically ran at sub-200MHz and have 11bg, 11a, or 11abg wifi MAC/PHYs integrated. This port is the initial non-wifi pieces required to bring up the chip. I'll commit the redboot and other pieces later, and then hopefully(!) wifi support will follow. Submitted by: Mori Hiroki Differential Revision: https://reviews.freebsd.org/D7237 Added: head/sys/mips/atheros/ar531x/ head/sys/mips/atheros/ar531x/apb.c (contents, props changed) head/sys/mips/atheros/ar531x/apbvar.h (contents, props changed) head/sys/mips/atheros/ar531x/ar5312_chip.c (contents, props changed) head/sys/mips/atheros/ar531x/ar5312_chip.h (contents, props changed) head/sys/mips/atheros/ar531x/ar5312reg.h (contents, props changed) head/sys/mips/atheros/ar531x/ar5315_chip.c (contents, props changed) head/sys/mips/atheros/ar531x/ar5315_chip.h (contents, props changed) head/sys/mips/atheros/ar531x/ar5315_cpudef.h (contents, props changed) head/sys/mips/atheros/ar531x/ar5315_gpio.c (contents, props changed) head/sys/mips/atheros/ar531x/ar5315_gpiovar.h (contents, props changed) head/sys/mips/atheros/ar531x/ar5315_machdep.c (contents, props changed) head/sys/mips/atheros/ar531x/ar5315_setup.c (contents, props changed) head/sys/mips/atheros/ar531x/ar5315_setup.h (contents, props changed) head/sys/mips/atheros/ar531x/ar5315_spi.c (contents, props changed) head/sys/mips/atheros/ar531x/ar5315_wdog.c (contents, props changed) head/sys/mips/atheros/ar531x/ar5315reg.h (contents, props changed) head/sys/mips/atheros/ar531x/arspireg.h (contents, props changed) head/sys/mips/atheros/ar531x/files.ar5315 (contents, props changed) head/sys/mips/atheros/ar531x/if_are.c (contents, props changed) head/sys/mips/atheros/ar531x/if_arereg.h (contents, props changed) head/sys/mips/atheros/ar531x/uart_bus_ar5315.c (contents, props changed) head/sys/mips/atheros/ar531x/uart_cpu_ar5315.c (contents, props changed) Added: head/sys/mips/atheros/ar531x/apb.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/atheros/ar531x/apb.c Tue Oct 4 16:27:36 2016 (r306675) @@ -0,0 +1,756 @@ +/*- + * Copyright (c) 2016, Hiroki Mori + * Copyright (c) 2009, Oleksandr Tymoshenko + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "opt_platform.h" +#include "opt_ar531x.h" + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#ifdef INTRNG +#include +#else +#include +#endif + +#ifdef INTRNG +#include "pic_if.h" + +#define PIC_INTR_ISRC(sc, irq) (&(sc)->pic_irqs[(irq)].isrc) +#endif + +#include +#include +#include +#include + +#ifdef AR531X_APB_DEBUG +#define dprintf printf +#else +#define dprintf(x, arg...) +#endif /* AR531X_APB_DEBUG */ + +static int apb_activate_resource(device_t, device_t, int, int, + struct resource *); +static device_t apb_add_child(device_t, u_int, const char *, int); +static struct resource * + apb_alloc_resource(device_t, device_t, int, int *, rman_res_t, + rman_res_t, rman_res_t, u_int); +static int apb_attach(device_t); +static int apb_deactivate_resource(device_t, device_t, int, int, + struct resource *); +static struct resource_list * + apb_get_resource_list(device_t, device_t); +static void apb_hinted_child(device_t, const char *, int); +static int apb_filter(void *); +static int apb_probe(device_t); +static int apb_release_resource(device_t, device_t, int, int, + struct resource *); +#ifndef INTRNG +static int apb_setup_intr(device_t, device_t, struct resource *, int, + driver_filter_t *, driver_intr_t *, void *, void **); +static int apb_teardown_intr(device_t, device_t, struct resource *, + void *); +#endif + +static void +apb_mask_irq(void *source) +{ + unsigned int irq = (unsigned int)source; + uint32_t reg; + + if(ar531x_soc >= AR531X_SOC_AR5315) { + reg = ATH_READ_REG(AR5315_SYSREG_BASE + + AR5315_SYSREG_MISC_INTMASK); + ATH_WRITE_REG(AR5315_SYSREG_BASE + + AR5315_SYSREG_MISC_INTMASK, reg & ~(1 << irq)); + } else { + reg = ATH_READ_REG(AR5312_SYSREG_BASE + + AR5312_SYSREG_MISC_INTMASK); + ATH_WRITE_REG(AR5312_SYSREG_BASE + + AR5312_SYSREG_MISC_INTMASK, reg & ~(1 << irq)); + } +} + +static void +apb_unmask_irq(void *source) +{ + uint32_t reg; + unsigned int irq = (unsigned int)source; + + if(ar531x_soc >= AR531X_SOC_AR5315) { + reg = ATH_READ_REG(AR5315_SYSREG_BASE + + AR5315_SYSREG_MISC_INTMASK); + ATH_WRITE_REG(AR5315_SYSREG_BASE + + AR5315_SYSREG_MISC_INTMASK, reg | (1 << irq)); + } else { + reg = ATH_READ_REG(AR5312_SYSREG_BASE + + AR5312_SYSREG_MISC_INTMASK); + ATH_WRITE_REG(AR5312_SYSREG_BASE + + AR5312_SYSREG_MISC_INTMASK, reg | (1 << irq)); + } +} + +#ifdef INTRNG +static int +apb_pic_register_isrcs(struct apb_softc *sc) +{ + int error; + uint32_t irq; + struct intr_irqsrc *isrc; + const char *name; + + name = device_get_nameunit(sc->apb_dev); + for (irq = 0; irq < APB_NIRQS; irq++) { + sc->pic_irqs[irq].irq = irq; + isrc = PIC_INTR_ISRC(sc, irq); + error = intr_isrc_register(isrc, sc->apb_dev, 0, "%s", name); + if (error != 0) { + /* XXX call intr_isrc_deregister */ + device_printf(sc->apb_dev, "%s failed", __func__); + return (error); + } + } + + return (0); +} + +static inline intptr_t +pic_xref(device_t dev) +{ + return (0); +} +#endif + +static int +apb_probe(device_t dev) +{ +#ifdef INTRNG + device_set_desc(dev, "APB Bus bridge INTRNG"); +#else + device_set_desc(dev, "APB Bus bridge"); +#endif + + return (0); +} + +static int +apb_attach(device_t dev) +{ + struct apb_softc *sc = device_get_softc(dev); +#ifdef INTRNG + intptr_t xref = pic_xref(dev); + int miscirq; +#else + int rid = 0; +#endif + + sc->apb_dev = dev; + + sc->apb_mem_rman.rm_type = RMAN_ARRAY; + sc->apb_mem_rman.rm_descr = "APB memory window"; + + if(ar531x_soc >= AR531X_SOC_AR5315) { + if (rman_init(&sc->apb_mem_rman) != 0 || + rman_manage_region(&sc->apb_mem_rman, + AR5315_APB_BASE, + AR5315_APB_BASE + AR5315_APB_SIZE - 1) != 0) + panic("apb_attach: failed to set up memory rman"); + } else { + if (rman_init(&sc->apb_mem_rman) != 0 || + rman_manage_region(&sc->apb_mem_rman, + AR5312_APB_BASE, + AR5312_APB_BASE + AR5312_APB_SIZE - 1) != 0) + panic("apb_attach: failed to set up memory rman"); + } + + sc->apb_irq_rman.rm_type = RMAN_ARRAY; + sc->apb_irq_rman.rm_descr = "APB IRQ"; + + if (rman_init(&sc->apb_irq_rman) != 0 || + rman_manage_region(&sc->apb_irq_rman, + APB_IRQ_BASE, APB_IRQ_END) != 0) + panic("apb_attach: failed to set up IRQ rman"); + +#ifndef INTRNG + if ((sc->sc_misc_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, + RF_SHAREABLE | RF_ACTIVE)) == NULL) { + device_printf(dev, "unable to allocate IRQ resource\n"); + return (ENXIO); + } + + if ((bus_setup_intr(dev, sc->sc_misc_irq, INTR_TYPE_MISC, + apb_filter, NULL, sc, &sc->sc_misc_ih))) { + device_printf(dev, + "WARNING: unable to register interrupt handler\n"); + return (ENXIO); + } +#else + /* Register the interrupts */ + if (apb_pic_register_isrcs(sc) != 0) { + device_printf(dev, "could not register PIC ISRCs\n"); + return (ENXIO); + } + + /* + * Now, when everything is initialized, it's right time to + * register interrupt controller to interrupt framefork. + */ + if (intr_pic_register(dev, xref) == NULL) { + device_printf(dev, "could not register PIC\n"); + return (ENXIO); + } + + if(ar531x_soc >= AR531X_SOC_AR5315) { + miscirq = AR5315_CPU_IRQ_MISC; + } else { + miscirq = AR5312_IRQ_MISC; + } + cpu_establish_hardintr("aric", apb_filter, NULL, sc, miscirq, + INTR_TYPE_MISC, NULL); +#endif + + /* mask all misc interrupt */ + if(ar531x_soc >= AR531X_SOC_AR5315) { + ATH_WRITE_REG(AR5315_SYSREG_BASE + + AR5315_SYSREG_MISC_INTMASK, 0); + } else { + ATH_WRITE_REG(AR5312_SYSREG_BASE + + AR5312_SYSREG_MISC_INTMASK, 0); + } + + bus_generic_probe(dev); + bus_enumerate_hinted_children(dev); + bus_generic_attach(dev); + + return (0); +} + +static struct resource * +apb_alloc_resource(device_t bus, device_t child, int type, int *rid, + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) +{ + struct apb_softc *sc = device_get_softc(bus); + struct apb_ivar *ivar = device_get_ivars(child); + struct resource *rv; + struct resource_list_entry *rle; + struct rman *rm; + int isdefault, needactivate, passthrough; + + isdefault = (RMAN_IS_DEFAULT_RANGE(start, end)); + needactivate = flags & RF_ACTIVE; + /* + * Pass memory requests to nexus device + */ + passthrough = (device_get_parent(child) != bus); + rle = NULL; + + dprintf("%s: entry (%p, %p, %d, %d, %p, %p, %jd, %d)\n", + __func__, bus, child, type, *rid, (void *)(intptr_t)start, + (void *)(intptr_t)end, count, flags); + + if (passthrough) + return (BUS_ALLOC_RESOURCE(device_get_parent(bus), child, type, + rid, start, end, count, flags)); + + /* + * If this is an allocation of the "default" range for a given RID, + * and we know what the resources for this device are (ie. they aren't + * maintained by a child bus), then work out the start/end values. + */ + + if (isdefault) { + rle = resource_list_find(&ivar->resources, type, *rid); + if (rle == NULL) { + return (NULL); + } + + if (rle->res != NULL) { + panic("%s: resource entry is busy", __func__); + } + start = rle->start; + end = rle->end; + count = rle->count; + + dprintf("%s: default resource (%p, %p, %jd)\n", + __func__, (void *)(intptr_t)start, + (void *)(intptr_t)end, count); + } + + switch (type) { + case SYS_RES_IRQ: + rm = &sc->apb_irq_rman; + break; + case SYS_RES_MEMORY: + rm = &sc->apb_mem_rman; + break; + default: + printf("%s: unknown resource type %d\n", __func__, type); + return (0); + } + + rv = rman_reserve_resource(rm, start, end, count, flags, child); + if (rv == 0) { + printf("%s: could not reserve resource %d\n", __func__, type); + return (0); + } + + rman_set_rid(rv, *rid); + + if (needactivate) { + if (bus_activate_resource(child, type, *rid, rv)) { + printf("%s: could not activate resource\n", __func__); + rman_release_resource(rv); + return (0); + } + } + + return (rv); +} + +static int +apb_activate_resource(device_t bus, device_t child, int type, int rid, + struct resource *r) +{ + + /* XXX: should we mask/unmask IRQ here? */ + return (BUS_ACTIVATE_RESOURCE(device_get_parent(bus), child, + type, rid, r)); +} + +static int +apb_deactivate_resource(device_t bus, device_t child, int type, int rid, + struct resource *r) +{ + + /* XXX: should we mask/unmask IRQ here? */ + return (BUS_DEACTIVATE_RESOURCE(device_get_parent(bus), child, + type, rid, r)); +} + +static int +apb_release_resource(device_t dev, device_t child, int type, + int rid, struct resource *r) +{ + struct resource_list *rl; + struct resource_list_entry *rle; + + rl = apb_get_resource_list(dev, child); + if (rl == NULL) + return (EINVAL); + rle = resource_list_find(rl, type, rid); + if (rle == NULL) + return (EINVAL); + rman_release_resource(r); + rle->res = NULL; + + return (0); +} + + +static int +apb_setup_intr(device_t bus, device_t child, struct resource *ires, + int flags, driver_filter_t *filt, driver_intr_t *handler, + void *arg, void **cookiep) +{ + struct apb_softc *sc = device_get_softc(bus); + int error; + int irq; +#ifndef INTRNG + struct intr_event *event; +#endif + +#ifdef INTRNG + struct intr_irqsrc *isrc; + const char *name; + + if ((rman_get_flags(ires) & RF_SHAREABLE) == 0) + flags |= INTR_EXCL; + + irq = rman_get_start(ires); + isrc = PIC_INTR_ISRC(sc, irq); + if(isrc->isrc_event == 0) { + error = intr_event_create(&isrc->isrc_event, (void *)irq, + 0, irq, apb_mask_irq, apb_unmask_irq, + NULL, NULL, "apb intr%d:", irq); + if(error != 0) + return(error); + } + name = device_get_nameunit(child); + error = intr_event_add_handler(isrc->isrc_event, name, filt, handler, + arg, intr_priority(flags), flags, cookiep); + return(error); +#else + irq = rman_get_start(ires); + + if (irq > APB_IRQ_END) + panic("%s: bad irq %d", __func__, irq); + + event = sc->sc_eventstab[irq]; + if (event == NULL) { + error = intr_event_create(&event, (void *)irq, 0, irq, + apb_mask_irq, apb_unmask_irq, + NULL, NULL, + "apb intr%d:", irq); + + if (error == 0) { + sc->sc_eventstab[irq] = event; + sc->sc_intr_counter[irq] = + mips_intrcnt_create(event->ie_name); + } + else + return (error); + } + + intr_event_add_handler(event, device_get_nameunit(child), filt, + handler, arg, intr_priority(flags), flags, cookiep); + mips_intrcnt_setname(sc->sc_intr_counter[irq], event->ie_fullname); + + apb_unmask_irq((void*)irq); + + return (0); +#endif +} + +#ifndef INTRNG +static int +apb_teardown_intr(device_t dev, device_t child, struct resource *ires, + void *cookie) +{ +#ifdef INTRNG + return (intr_teardown_irq(child, ires, cookie)); +#else + struct apb_softc *sc = device_get_softc(dev); + int irq, result; + + irq = rman_get_start(ires); + if (irq > APB_IRQ_END) + panic("%s: bad irq %d", __func__, irq); + + if (sc->sc_eventstab[irq] == NULL) + panic("Trying to teardown unoccupied IRQ"); + + apb_mask_irq((void*)irq); + + result = intr_event_remove_handler(cookie); + if (!result) + sc->sc_eventstab[irq] = NULL; + + return (result); +#endif +} + + +static int +apb_filter(void *arg) +{ + struct apb_softc *sc = arg; + struct intr_event *event; + uint32_t reg, irq; + + if(ar531x_soc >= AR531X_SOC_AR5315) + reg = ATH_READ_REG(AR5315_SYSREG_BASE + + AR5315_SYSREG_MISC_INTSTAT); + else + reg = ATH_READ_REG(AR5312_SYSREG_BASE + + AR5312_SYSREG_MISC_INTSTAT); + + for (irq = 0; irq < APB_NIRQS; irq++) { + if (reg & (1 << irq)) { + + if(ar531x_soc >= AR531X_SOC_AR5315) { + ATH_WRITE_REG(AR5315_SYSREG_BASE + + AR5315_SYSREG_MISC_INTSTAT, + reg & ~(1 << irq)); + } else { + ATH_WRITE_REG(AR5312_SYSREG_BASE + + AR5312_SYSREG_MISC_INTSTAT, + reg & ~(1 << irq)); + } + + event = sc->sc_eventstab[irq]; + if (!event || TAILQ_EMPTY(&event->ie_handlers)) { + if(irq == 1 && ar531x_soc < AR531X_SOC_AR5315) { + ATH_READ_REG(AR5312_SYSREG_BASE + + AR5312_SYSREG_AHBPERR); + ATH_READ_REG(AR5312_SYSREG_BASE + + AR5312_SYSREG_AHBDMAE); + } + /* Ignore non handle interrupts */ + if (irq != 0 && irq != 6) + printf("Stray APB IRQ %d\n", irq); + + continue; + } + + intr_event_handle(event, PCPU_GET(curthread)->td_intr_frame); + mips_intrcnt_inc(sc->sc_intr_counter[irq]); + } + } + + return (FILTER_HANDLED); +} +#else +static int +apb_filter(void *arg) +{ + struct apb_softc *sc = arg; + struct thread *td; + uint32_t i, intr; + + td = curthread; + /* Workaround: do not inflate intr nesting level */ + td->td_intr_nesting_level--; + + if(ar531x_soc >= AR531X_SOC_AR5315) + intr = ATH_READ_REG(AR5315_SYSREG_BASE + + AR5315_SYSREG_MISC_INTSTAT); + else + intr = ATH_READ_REG(AR5312_SYSREG_BASE + + AR5312_SYSREG_MISC_INTSTAT); + + while ((i = fls(intr)) != 0) { + i--; + intr &= ~(1u << i); + + if(i == 1 && ar531x_soc < AR531X_SOC_AR5315) { + ATH_READ_REG(AR5312_SYSREG_BASE + + AR5312_SYSREG_AHBPERR); + ATH_READ_REG(AR5312_SYSREG_BASE + + AR5312_SYSREG_AHBDMAE); + } + + if (intr_isrc_dispatch(PIC_INTR_ISRC(sc, i), + curthread->td_intr_frame) != 0) { + device_printf(sc->apb_dev, + "Stray interrupt %u detected\n", i); + apb_mask_irq((void*)i); + continue; + } + } + + KASSERT(i == 0, ("all interrupts handled")); + + td->td_intr_nesting_level++; + + return (FILTER_HANDLED); + +} + +#endif + +static void +apb_hinted_child(device_t bus, const char *dname, int dunit) +{ + device_t child; + long maddr; + int msize; + int irq; + int result; + int mem_hints_count; + + child = BUS_ADD_CHILD(bus, 0, dname, dunit); + + /* + * Set hard-wired resources for hinted child using + * specific RIDs. + */ + mem_hints_count = 0; + if (resource_long_value(dname, dunit, "maddr", &maddr) == 0) + mem_hints_count++; + if (resource_int_value(dname, dunit, "msize", &msize) == 0) + mem_hints_count++; + + /* check if all info for mem resource has been provided */ + if ((mem_hints_count > 0) && (mem_hints_count < 2)) { + printf("Either maddr or msize hint is missing for %s%d\n", + dname, dunit); + } else if (mem_hints_count) { + result = bus_set_resource(child, SYS_RES_MEMORY, 0, + maddr, msize); + if (result != 0) + device_printf(bus, + "warning: bus_set_resource() failed\n"); + } + + if (resource_int_value(dname, dunit, "irq", &irq) == 0) { + result = bus_set_resource(child, SYS_RES_IRQ, 0, irq, 1); + if (result != 0) + device_printf(bus, + "warning: bus_set_resource() failed\n"); + } +} + +static device_t +apb_add_child(device_t bus, u_int order, const char *name, int unit) +{ + device_t child; + struct apb_ivar *ivar; + + ivar = malloc(sizeof(struct apb_ivar), M_DEVBUF, M_WAITOK | M_ZERO); + if (ivar == NULL) { + printf("Failed to allocate ivar\n"); + return (0); + } + resource_list_init(&ivar->resources); + + child = device_add_child_ordered(bus, order, name, unit); + if (child == NULL) { + printf("Can't add child %s%d ordered\n", name, unit); + return (0); + } + + device_set_ivars(child, ivar); + + return (child); +} + +/* + * Helper routine for bus_generic_rl_get_resource/bus_generic_rl_set_resource + * Provides pointer to resource_list for these routines + */ +static struct resource_list * +apb_get_resource_list(device_t dev, device_t child) +{ + struct apb_ivar *ivar; + + ivar = device_get_ivars(child); + return (&(ivar->resources)); +} + +#ifdef INTRNG +static void +apb_pic_enable_intr(device_t dev, struct intr_irqsrc *isrc) +{ + u_int irq; + + irq = ((struct apb_pic_irqsrc *)isrc)->irq; + apb_unmask_irq((void*)irq); +} + +static void +apb_pic_disable_intr(device_t dev, struct intr_irqsrc *isrc) +{ + u_int irq; + + irq = ((struct apb_pic_irqsrc *)isrc)->irq; + apb_mask_irq((void*)irq); +} + +static void +apb_pic_pre_ithread(device_t dev, struct intr_irqsrc *isrc) +{ + apb_pic_disable_intr(dev, isrc); +} + +static void +apb_pic_post_ithread(device_t dev, struct intr_irqsrc *isrc) +{ + apb_pic_enable_intr(dev, isrc); +} + +static void +apb_pic_post_filter(device_t dev, struct intr_irqsrc *isrc) +{ + uint32_t reg, irq; + + irq = ((struct apb_pic_irqsrc *)isrc)->irq; + if(ar531x_soc >= AR531X_SOC_AR5315) { + reg = ATH_READ_REG(AR5315_SYSREG_BASE + + AR5315_SYSREG_MISC_INTSTAT); + ATH_WRITE_REG(AR5315_SYSREG_BASE + AR5315_SYSREG_MISC_INTSTAT, + reg & ~(1 << irq)); + } else { + reg = ATH_READ_REG(AR5312_SYSREG_BASE + + AR5312_SYSREG_MISC_INTSTAT); + ATH_WRITE_REG(AR5312_SYSREG_BASE + AR5312_SYSREG_MISC_INTSTAT, + reg & ~(1 << irq)); + } +} + +static int +apb_pic_map_intr(device_t dev, struct intr_map_data *data, + struct intr_irqsrc **isrcp) +{ + return (ENOTSUP); +} + +#endif + +static device_method_t apb_methods[] = { + DEVMETHOD(bus_activate_resource, apb_activate_resource), + DEVMETHOD(bus_add_child, apb_add_child), + DEVMETHOD(bus_alloc_resource, apb_alloc_resource), + DEVMETHOD(bus_deactivate_resource, apb_deactivate_resource), + DEVMETHOD(bus_get_resource_list, apb_get_resource_list), + DEVMETHOD(bus_hinted_child, apb_hinted_child), + DEVMETHOD(bus_release_resource, apb_release_resource), + DEVMETHOD(device_attach, apb_attach), + DEVMETHOD(device_probe, apb_probe), + DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), + DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), +#ifdef INTRNG + DEVMETHOD(pic_disable_intr, apb_pic_disable_intr), + DEVMETHOD(pic_enable_intr, apb_pic_enable_intr), + DEVMETHOD(pic_map_intr, apb_pic_map_intr), + DEVMETHOD(pic_post_filter, apb_pic_post_filter), + DEVMETHOD(pic_post_ithread, apb_pic_post_ithread), + DEVMETHOD(pic_pre_ithread, apb_pic_pre_ithread), + +// DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), +#else + DEVMETHOD(bus_teardown_intr, apb_teardown_intr), +#endif + DEVMETHOD(bus_setup_intr, apb_setup_intr), + + DEVMETHOD_END +}; + +static driver_t apb_driver = { + "apb", + apb_methods, + sizeof(struct apb_softc), +}; +static devclass_t apb_devclass; + +EARLY_DRIVER_MODULE(apb, nexus, apb_driver, apb_devclass, 0, 0, + BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE); Added: head/sys/mips/atheros/ar531x/apbvar.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/atheros/ar531x/apbvar.h Tue Oct 4 16:27:36 2016 (r306675) @@ -0,0 +1,63 @@ +/*- + * Copyright (c) 2009, Oleksandr Tymoshenko + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _APBVAR_H_ +#define _APBVAR_H_ + +#define APB_IRQ_BASE 0 +#define APB_IRQ_END 31 +#define APB_NIRQS 32 + +struct apb_pic_irqsrc { + struct intr_irqsrc isrc; + u_int irq; +}; + +struct apb_softc { + device_t apb_dev; + struct rman apb_irq_rman; + struct rman apb_mem_rman; + /* IRQ events structs for child devices */ + struct intr_event *sc_eventstab[APB_NIRQS]; +#ifndef INTRNG + mips_intrcnt_t sc_intr_counter[APB_NIRQS]; +#endif + /* Resources and cookies for MIPS CPU INTs */ + struct resource *sc_misc_irq; + void *sc_misc_ih; +#ifdef INTRNG + struct apb_pic_irqsrc pic_irqs[APB_NIRQS]; +#endif +}; + +struct apb_ivar { + struct resource_list resources; +}; + +#endif /* _APBVAR_H_ */ Added: head/sys/mips/atheros/ar531x/ar5312_chip.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/atheros/ar531x/ar5312_chip.c Tue Oct 4 16:27:36 2016 (r306675) @@ -0,0 +1,209 @@ +/*- + * Copyright (c) 2016 Hiroki Mori + * Copyright (c) 2010 Adrian Chadd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_ddb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +static void +ar5312_chip_detect_mem_size(void) +{ + uint32_t memsize; + uint32_t memcfg, bank0, bank1; + + /* + * Determine the memory size as established by system + * firmware. + * + * NB: we allow compile time override + */ + memcfg = ATH_READ_REG(AR5312_SDRAMCTL_BASE + AR5312_SDRAMCTL_MEM_CFG1); + bank0 = __SHIFTOUT(memcfg, AR5312_MEM_CFG1_BANK0); + bank1 = __SHIFTOUT(memcfg, AR5312_MEM_CFG1_BANK1); + + memsize = (bank0 ? (1 << (bank0 + 1)) : 0) + + (bank1 ? (1 << (bank1 + 1)) : 0); + memsize <<= 20; + + realmem = memsize; +} + +static void +ar5312_chip_detect_sys_frequency(void) +{ + uint32_t predivisor; + uint32_t multiplier; + + + const uint32_t clockctl = ATH_READ_REG(AR5312_SYSREG_BASE + AR5312_SYSREG_CLOCKCTL); + if(ar531x_soc == AR531X_SOC_AR5313) { + predivisor = __SHIFTOUT(clockctl, AR2313_CLOCKCTL_PREDIVIDE); + multiplier = __SHIFTOUT(clockctl, AR2313_CLOCKCTL_MULTIPLIER); + } else { + predivisor = __SHIFTOUT(clockctl, AR5312_CLOCKCTL_PREDIVIDE); + multiplier = __SHIFTOUT(clockctl, AR5312_CLOCKCTL_MULTIPLIER); + } + + const uint32_t divisor = (0x5421 >> (predivisor * 4)) & 15; + + const uint32_t cpufreq = (40000000 / divisor) * multiplier; + + u_ar531x_cpu_freq = cpufreq; + u_ar531x_ahb_freq = cpufreq / 4; + u_ar531x_ddr_freq = 0; +} + +/* + * This does not lock the CPU whilst doing the work! + */ +static void +ar5312_chip_device_reset(void) +{ + ATH_WRITE_REG(AR5312_SYSREG_BASE + AR5312_SYSREG_RESETCTL, + AR5312_RESET_SYSTEM); +} + +static void +ar5312_chip_device_start(void) +{ + uint32_t cfg0, cfg1; + uint32_t bank0, bank1; + uint32_t size0, size1; + + cfg0 = ATH_READ_REG(AR5312_SDRAMCTL_BASE + AR5312_SDRAMCTL_MEM_CFG0); + cfg1 = ATH_READ_REG(AR5312_SDRAMCTL_BASE + AR5312_SDRAMCTL_MEM_CFG1); + + bank0 = __SHIFTOUT(cfg1, AR5312_MEM_CFG1_BANK0); + bank1 = __SHIFTOUT(cfg1, AR5312_MEM_CFG1_BANK1); + + size0 = bank0 ? (1 << (bank0 + 1)) : 0; + size1 = bank1 ? (1 << (bank1 + 1)) : 0; + + size0 <<= 20; + size1 <<= 20; + + printf("SDRMCTL %x %x %x %x\n", cfg0, cfg1, size0, size1); + + ATH_READ_REG(AR5312_SYSREG_BASE + AR5312_SYSREG_AHBPERR); + ATH_READ_REG(AR5312_SYSREG_BASE + AR5312_SYSREG_AHBDMAE); +// ATH_WRITE_REG(AR5312_SYSREG_BASE + AR5312_SYSREG_WDOG_CTL, 0); + ATH_WRITE_REG(AR5312_SYSREG_BASE + AR5312_SYSREG_ENABLE, 0); + + ATH_WRITE_REG(AR5312_SYSREG_BASE+AR5312_SYSREG_ENABLE, + ATH_READ_REG(AR5312_SYSREG_BASE+AR5312_SYSREG_ENABLE) | + AR5312_ENABLE_ENET0 | AR5312_ENABLE_ENET1); + +} + +static int +ar5312_chip_device_stopped(uint32_t mask) +{ + uint32_t reg; + + reg = ATH_READ_REG(AR5312_SYSREG_BASE + AR5312_SYSREG_RESETCTL); + return ((reg & mask) == mask); +} + +static void +ar5312_chip_set_mii_speed(uint32_t unit, uint32_t speed) +{ +} + +/* Speed is either 10, 100 or 1000 */ +static void +ar5312_chip_set_pll_ge(int unit, int speed) +{ +} + +static void +ar5312_chip_ddr_flush_ge(int unit) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Oct 4 16:29:28 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2EAC1AF461E; Tue, 4 Oct 2016 16:29:28 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F061AA46; Tue, 4 Oct 2016 16:29:27 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u94GTRJa047941; Tue, 4 Oct 2016 16:29:27 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u94GTRUj047940; Tue, 4 Oct 2016 16:29:27 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201610041629.u94GTRUj047940@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 4 Oct 2016 16:29:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306676 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 16:29:28 -0000 Author: adrian Date: Tue Oct 4 16:29:26 2016 New Revision: 306676 URL: https://svnweb.freebsd.org/changeset/base/306676 Log: Add AR531x port options. Submitted by: Mori Hiroki Differential Revision: https://reviews.freebsd.org/D7237 Modified: head/sys/conf/options.mips Modified: head/sys/conf/options.mips ============================================================================== --- head/sys/conf/options.mips Tue Oct 4 16:27:36 2016 (r306675) +++ head/sys/conf/options.mips Tue Oct 4 16:29:26 2016 (r306676) @@ -119,6 +119,17 @@ AR71XX_ENV_ROUTERBOOT opt_ar71xx.h AR71XX_ATH_EEPROM opt_ar71xx.h # +# Options for AR531X SOC. AR531X_1ST_GENERATION is AR5311 to AR5314. +# + +AR531X_1ST_GENERATION opt_ar531x.h +AR531X_REALMEM opt_ar531x.h +AR531X_ENV_UBOOT opt_ar531x.h +AR531X_APB_DEBUG opt_ar531x.h +ARE_MDIO opt_ar531x.h +ARE_MII opt_ar531x.h + +# # Options that control the Ralink RT305xF Etherenet MAC. # IF_RT_DEBUG opt_if_rt.h From owner-svn-src-all@freebsd.org Tue Oct 4 16:33:04 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BE85AF48B6; Tue, 4 Oct 2016 16:33:04 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 237C4E52; Tue, 4 Oct 2016 16:33:04 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u94GX3fW051605; Tue, 4 Oct 2016 16:33:03 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u94GX3HL051604; Tue, 4 Oct 2016 16:33:03 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201610041633.u94GX3HL051604@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Tue, 4 Oct 2016 16:33:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306677 - head/sys/boot/geli X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 16:33:04 -0000 Author: allanjude Date: Tue Oct 4 16:33:03 2016 New Revision: 306677 URL: https://svnweb.freebsd.org/changeset/base/306677 Log: GELIBoot may attempt to read past the end of the disk Usually there is some slack after the last partition due to 4k alignment In the 10.3 EC2 images, there was not. EC2 seems to hang if you try to read past the end of the disk in the loader, resulting in an unbootable instance after upgrading to 11.0 PR: 213196 Reported by: Peter Ankerstal Tested by: cperciva Reviewed by: tsoome MFC after: 3 days Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D8144 Modified: head/sys/boot/geli/geliboot.c Modified: head/sys/boot/geli/geliboot.c ============================================================================== --- head/sys/boot/geli/geliboot.c Tue Oct 4 16:29:26 2016 (r306676) +++ head/sys/boot/geli/geliboot.c Tue Oct 4 16:33:03 2016 (r306677) @@ -77,17 +77,25 @@ geli_taste(int read_func(void *vdev, voi int error; off_t alignsector; - alignsector = (lastsector * DEV_BSIZE) & - ~(off_t)(DEV_GELIBOOT_BSIZE - 1); + alignsector = rounddown2(lastsector * DEV_BSIZE, DEV_GELIBOOT_BSIZE); + if (alignsector + DEV_GELIBOOT_BSIZE > ((lastsector + 1) * DEV_BSIZE)) { + /* Don't read past the end of the disk */ + alignsector = (lastsector * DEV_BSIZE) + DEV_BSIZE + - DEV_GELIBOOT_BSIZE; + } error = read_func(NULL, dskp, alignsector, &buf, DEV_GELIBOOT_BSIZE); if (error != 0) { return (error); } - /* Extract the last DEV_BSIZE bytes from the block. */ - error = eli_metadata_decode(buf + (DEV_GELIBOOT_BSIZE - DEV_BSIZE), - &md); + /* Extract the last 4k sector of the disk. */ + error = eli_metadata_decode(buf, &md); if (error != 0) { - return (error); + /* Try the last 512 byte sector instead. */ + error = eli_metadata_decode(buf + + (DEV_GELIBOOT_BSIZE - DEV_BSIZE), &md); + if (error != 0) { + return (error); + } } if (!(md.md_flags & G_ELI_FLAG_GELIBOOT)) { From owner-svn-src-all@freebsd.org Tue Oct 4 16:35:39 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52288AF493F; Tue, 4 Oct 2016 16:35:39 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C604FED; Tue, 4 Oct 2016 16:35:39 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u94GZc13051746; Tue, 4 Oct 2016 16:35:38 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u94GZceA051745; Tue, 4 Oct 2016 16:35:38 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201610041635.u94GZceA051745@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 4 Oct 2016 16:35:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306678 - head/sys/geom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 16:35:39 -0000 Author: adrian Date: Tue Oct 4 16:35:38 2016 New Revision: 306678 URL: https://svnweb.freebsd.org/changeset/base/306678 Log: [geom_redboot] Extend geom_redboot to handle non-zero fis offset. Submitted by: Mori Hiroki Differential Revision: https://reviews.freebsd.org/D7237 Modified: head/sys/geom/geom_redboot.c Modified: head/sys/geom/geom_redboot.c ============================================================================== --- head/sys/geom/geom_redboot.c Tue Oct 4 16:33:03 2016 (r306677) +++ head/sys/geom/geom_redboot.c Tue Oct 4 16:35:38 2016 (r306678) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -246,6 +247,16 @@ g_redboot_taste(struct g_class *mp, stru u_int blksize; /* NB: flash block size stored as stripesize */ u_char *buf; off_t offset; + const char *value; + char *op; + + offset = 0; + if (resource_string_value("redboot", 0, "fisoffset", &value) == 0) { + offset = strtouq(value, &op, 0); + if (*op != '\0') { + offset = 0; + } + } g_trace(G_T_TOPOLOGY, "redboot_taste(%s,%s)", mp->name, pp->name); g_topology_assert(); @@ -278,7 +289,8 @@ g_redboot_taste(struct g_class *mp, stru return (NULL); g_topology_unlock(); head = NULL; - offset = cp->provider->mediasize - blksize; + if(offset == 0) + offset = cp->provider->mediasize - blksize; again: buf = g_read_data(cp, offset, blksize, NULL); if (buf != NULL) From owner-svn-src-all@freebsd.org Tue Oct 4 16:44:41 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 888EAAF4C4D; Tue, 4 Oct 2016 16:44:41 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58EF280E; Tue, 4 Oct 2016 16:44:41 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u94Giew2055593; Tue, 4 Oct 2016 16:44:40 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u94Gie4K055592; Tue, 4 Oct 2016 16:44:40 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201610041644.u94Gie4K055592@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 4 Oct 2016 16:44:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306679 - head/sys/dev/atkbdc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 16:44:41 -0000 Author: glebius Date: Tue Oct 4 16:44:40 2016 New Revision: 306679 URL: https://svnweb.freebsd.org/changeset/base/306679 Log: Fix indentation. CID: 1363671 Modified: head/sys/dev/atkbdc/psm.c Modified: head/sys/dev/atkbdc/psm.c ============================================================================== --- head/sys/dev/atkbdc/psm.c Tue Oct 4 16:35:38 2016 (r306678) +++ head/sys/dev/atkbdc/psm.c Tue Oct 4 16:44:40 2016 (r306679) @@ -2860,7 +2860,7 @@ proc_synaptics(struct psm_softc *sc, pac guest_buttons |= MOUSE_BUTTON1DOWN; if (pb->ipacket[1] & 0x04) guest_buttons |= MOUSE_BUTTON2DOWN; - if (pb->ipacket[1] & 0x02) + if (pb->ipacket[1] & 0x02) guest_buttons |= MOUSE_BUTTON3DOWN; ms->button = touchpad_buttons | guest_buttons; From owner-svn-src-all@freebsd.org Tue Oct 4 17:01:26 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B7E0AF4F92; Tue, 4 Oct 2016 17:01:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E12B0F77; Tue, 4 Oct 2016 17:01:25 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u94H1PSl061124; Tue, 4 Oct 2016 17:01:25 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u94H1OK3061119; Tue, 4 Oct 2016 17:01:24 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201610041701.u94H1OK3061119@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 4 Oct 2016 17:01:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306680 - in head/sys: amd64/amd64 amd64/include i386/include x86/include x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 17:01:26 -0000 Author: kib Date: Tue Oct 4 17:01:24 2016 New Revision: 306680 URL: https://svnweb.freebsd.org/changeset/base/306680 Log: Re-apply r306516 (by cem): Reduce the cost of TLB invalidation on x86 by using per-CPU completion flags Reduce contention during TLB invalidation operations by using a per-CPU completion flag, rather than a single atomically-updated variable. On a Westmere system (2 sockets x 4 cores x 1 threads), dtrace measurements show that smp_tlb_shootdown is about 50% faster with this patch; observations with VTune show that the percentage of time spent in invlrng_single_page on an interrupt (actually doing invalidation, rather than synchronization) increases from 31% with the old mechanism to 71% with the new one. (Running a basic file server workload.) Submitted by: Anton Rang Reviewed by: cem (earlier version) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D8041 Modified: head/sys/amd64/amd64/mp_machdep.c head/sys/amd64/include/pcpu.h head/sys/i386/include/pcpu.h head/sys/x86/include/x86_smp.h head/sys/x86/x86/mp_x86.c Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Tue Oct 4 16:44:40 2016 (r306679) +++ head/sys/amd64/amd64/mp_machdep.c Tue Oct 4 17:01:24 2016 (r306680) @@ -409,6 +409,7 @@ void invltlb_invpcid_handler(void) { struct invpcid_descr d; + uint32_t generation; #ifdef COUNT_XINVLTLB_HITS xhits_gbl[PCPU_GET(cpuid)]++; @@ -417,17 +418,20 @@ invltlb_invpcid_handler(void) (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ + generation = smp_tlb_generation; d.pcid = smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid; d.pad = 0; d.addr = 0; invpcid(&d, smp_tlb_pmap == kernel_pmap ? INVPCID_CTXGLOB : INVPCID_CTX); - atomic_add_int(&smp_tlb_wait, 1); + PCPU_SET(smp_tlb_done, generation); } void invltlb_pcid_handler(void) { + uint32_t generation; + #ifdef COUNT_XINVLTLB_HITS xhits_gbl[PCPU_GET(cpuid)]++; #endif /* COUNT_XINVLTLB_HITS */ @@ -435,6 +439,7 @@ invltlb_pcid_handler(void) (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ + generation = smp_tlb_generation; /* Overlap with serialization */ if (smp_tlb_pmap == kernel_pmap) { invltlb_glob(); } else { @@ -450,5 +455,5 @@ invltlb_pcid_handler(void) smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid); } } - atomic_add_int(&smp_tlb_wait, 1); + PCPU_SET(smp_tlb_done, generation); } Modified: head/sys/amd64/include/pcpu.h ============================================================================== --- head/sys/amd64/include/pcpu.h Tue Oct 4 16:44:40 2016 (r306679) +++ head/sys/amd64/include/pcpu.h Tue Oct 4 17:01:24 2016 (r306680) @@ -65,7 +65,8 @@ u_int pc_vcpu_id; /* Xen vCPU ID */ \ uint32_t pc_pcid_next; \ uint32_t pc_pcid_gen; \ - char __pad[149] /* be divisor of PAGE_SIZE \ + uint32_t pc_smp_tlb_done; /* TLB op acknowledgement */ \ + char __pad[145] /* be divisor of PAGE_SIZE \ after cache alignment */ #define PC_DBREG_CMD_NONE 0 Modified: head/sys/i386/include/pcpu.h ============================================================================== --- head/sys/i386/include/pcpu.h Tue Oct 4 16:44:40 2016 (r306679) +++ head/sys/i386/include/pcpu.h Tue Oct 4 17:01:24 2016 (r306680) @@ -59,7 +59,8 @@ u_int pc_cmci_mask; /* MCx banks for CMCI */ \ u_int pc_vcpu_id; /* Xen vCPU ID */ \ vm_offset_t pc_qmap_addr; /* KVA for temporary mappings */\ - char __pad[229] + uint32_t pc_smp_tlb_done; /* TLB op acknowledgement */ \ + char __pad[225] #ifdef _KERNEL Modified: head/sys/x86/include/x86_smp.h ============================================================================== --- head/sys/x86/include/x86_smp.h Tue Oct 4 16:44:40 2016 (r306679) +++ head/sys/x86/include/x86_smp.h Tue Oct 4 17:01:24 2016 (r306680) @@ -35,7 +35,7 @@ extern volatile int aps_ready; extern struct mtx ap_boot_mtx; extern int cpu_logical; extern int cpu_cores; -extern volatile int smp_tlb_wait; +extern volatile uint32_t smp_tlb_generation; extern struct pmap *smp_tlb_pmap; extern u_int xhits_gbl[]; extern u_int xhits_pg[]; Modified: head/sys/x86/x86/mp_x86.c ============================================================================== --- head/sys/x86/x86/mp_x86.c Tue Oct 4 16:44:40 2016 (r306679) +++ head/sys/x86/x86/mp_x86.c Tue Oct 4 17:01:24 2016 (r306680) @@ -1304,12 +1304,22 @@ cpususpend_handler(void) void invlcache_handler(void) { + uint32_t generation; + #ifdef COUNT_IPIS (*ipi_invlcache_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ + /* + * Reading the generation here allows greater parallelism + * since wbinvd is a serializing instruction. Without the + * temporary, we'd wait for wbinvd to complete, then the read + * would execute, then the dependent write, whuch must then + * complete before return from interrupt. + */ + generation = smp_tlb_generation; wbinvd(); - atomic_add_int(&smp_tlb_wait, 1); + PCPU_SET(smp_tlb_done, generation); } /* @@ -1367,7 +1377,7 @@ SYSINIT(mp_ipi_intrcnt, SI_SUB_INTR, SI_ /* Variables needed for SMP tlb shootdown. */ static vm_offset_t smp_tlb_addr1, smp_tlb_addr2; pmap_t smp_tlb_pmap; -volatile int smp_tlb_wait; +volatile uint32_t smp_tlb_generation; #ifdef __amd64__ #define read_eflags() read_rflags() @@ -1377,15 +1387,16 @@ static void smp_targeted_tlb_shootdown(cpuset_t mask, u_int vector, pmap_t pmap, vm_offset_t addr1, vm_offset_t addr2) { - int cpu, ncpu, othercpus; - - othercpus = mp_ncpus - 1; /* does not shootdown self */ + cpuset_t other_cpus; + volatile uint32_t *p_cpudone; + uint32_t generation; + int cpu; /* * Check for other cpus. Return if none. */ if (CPU_ISFULLSET(&mask)) { - if (othercpus < 1) + if (mp_ncpus <= 1) return; } else { CPU_CLR(PCPU_GET(cpuid), &mask); @@ -1399,23 +1410,28 @@ smp_targeted_tlb_shootdown(cpuset_t mask smp_tlb_addr1 = addr1; smp_tlb_addr2 = addr2; smp_tlb_pmap = pmap; - smp_tlb_wait = 0; + generation = ++smp_tlb_generation; if (CPU_ISFULLSET(&mask)) { - ncpu = othercpus; ipi_all_but_self(vector); + other_cpus = all_cpus; + CPU_CLR(PCPU_GET(cpuid), &other_cpus); } else { - ncpu = 0; + other_cpus = mask; while ((cpu = CPU_FFS(&mask)) != 0) { cpu--; CPU_CLR(cpu, &mask); CTR3(KTR_SMP, "%s: cpu: %d ipi: %x", __func__, cpu, vector); ipi_send_cpu(cpu, vector); - ncpu++; } } - while (smp_tlb_wait < ncpu) - ia32_pause(); + while ((cpu = CPU_FFS(&other_cpus)) != 0) { + cpu--; + CPU_CLR(cpu, &other_cpus); + p_cpudone = &cpuid_to_pcpu[cpu]->pc_smp_tlb_done; + while (*p_cpudone != generation) + ia32_pause(); + } mtx_unlock_spin(&smp_ipi_mtx); } @@ -1473,6 +1489,8 @@ smp_cache_flush(void) void invltlb_handler(void) { + uint32_t generation; + #ifdef COUNT_XINVLTLB_HITS xhits_gbl[PCPU_GET(cpuid)]++; #endif /* COUNT_XINVLTLB_HITS */ @@ -1480,16 +1498,23 @@ invltlb_handler(void) (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ + /* + * Reading the generation here allows greater parallelism + * since invalidating the TLB is a serializing operation. + */ + generation = smp_tlb_generation; if (smp_tlb_pmap == kernel_pmap) invltlb_glob(); else invltlb(); - atomic_add_int(&smp_tlb_wait, 1); + PCPU_SET(smp_tlb_done, generation); } void invlpg_handler(void) { + uint32_t generation; + #ifdef COUNT_XINVLTLB_HITS xhits_pg[PCPU_GET(cpuid)]++; #endif /* COUNT_XINVLTLB_HITS */ @@ -1497,14 +1522,16 @@ invlpg_handler(void) (*ipi_invlpg_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ + generation = smp_tlb_generation; /* Overlap with serialization */ invlpg(smp_tlb_addr1); - atomic_add_int(&smp_tlb_wait, 1); + PCPU_SET(smp_tlb_done, generation); } void invlrng_handler(void) { - vm_offset_t addr; + vm_offset_t addr, addr2; + uint32_t generation; #ifdef COUNT_XINVLTLB_HITS xhits_rng[PCPU_GET(cpuid)]++; @@ -1514,10 +1541,12 @@ invlrng_handler(void) #endif /* COUNT_IPIS */ addr = smp_tlb_addr1; + addr2 = smp_tlb_addr2; + generation = smp_tlb_generation; /* Overlap with serialization */ do { invlpg(addr); addr += PAGE_SIZE; - } while (addr < smp_tlb_addr2); + } while (addr < addr2); - atomic_add_int(&smp_tlb_wait, 1); + PCPU_SET(smp_tlb_done, generation); } From owner-svn-src-all@freebsd.org Tue Oct 4 17:57:31 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 725E2AF5E5D; Tue, 4 Oct 2016 17:57:31 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 36806314; Tue, 4 Oct 2016 17:57:31 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u94HvUBM082418; Tue, 4 Oct 2016 17:57:30 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u94HvUvb082417; Tue, 4 Oct 2016 17:57:30 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201610041757.u94HvUvb082417@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 4 Oct 2016 17:57:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306681 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 17:57:31 -0000 Author: emaste Date: Tue Oct 4 17:57:30 2016 New Revision: 306681 URL: https://svnweb.freebsd.org/changeset/base/306681 Log: ANSIfy inflate.c Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8143 Modified: head/sys/kern/inflate.c Modified: head/sys/kern/inflate.c ============================================================================== --- head/sys/kern/inflate.c Tue Oct 4 17:01:24 2016 (r306680) +++ head/sys/kern/inflate.c Tue Oct 4 17:57:30 2016 (r306681) @@ -411,16 +411,19 @@ static const int dbits = 6; /* bits in b The code with value 256 is special, and the tables are constructed so that no bits beyond that code are fetched when that code is decoded. */ +/* + * Arguments: + * b code lengths in bits (all assumed <= BMAX) + * n number of codes (assumed <= N_MAX) + * s number of simple-valued codes (0..s-1) + * d list of base values for non-simple codes + * e list of extra bits for non-simple codes + * t result: starting table + * m maximum lookup bits, returns actual + */ static int -huft_build(glbl, b, n, s, d, e, t, m) - struct inflate *glbl; - unsigned *b; /* code lengths in bits (all assumed <= BMAX) */ - unsigned n; /* number of codes (assumed <= N_MAX) */ - unsigned s; /* number of simple-valued codes (0..s-1) */ - const ush *d; /* list of base values for non-simple codes */ - const ush *e; /* list of extra bits for non-simple codes */ - struct huft **t; /* result: starting table */ - int *m; /* maximum lookup bits, returns actual */ +huft_build(struct inflate *glbl, unsigned *b, unsigned n, unsigned s, + const ush *d, const ush *e, struct huft **t, int *m) { unsigned a; /* counter for codes of length k */ unsigned c[BMAX + 1]; /* bit length count table */ @@ -614,10 +617,12 @@ huft_build(glbl, b, n, s, d, e, t, m) return y != 0 && g != 1; } +/* + * Arguments: + * t table to free + */ static int -huft_free(glbl, t) - struct inflate *glbl; - struct huft *t; /* table to free */ +huft_free(struct inflate *glbl, struct huft *t) /* Free the malloc'ed tables built by huft_build(), which makes a linked list of the tables it made, with the links in a dummy first entry of each table. */ @@ -636,11 +641,14 @@ huft_free(glbl, t) /* inflate (decompress) the codes in a deflated (compressed) block. Return an error code or zero if it all goes ok. */ +/* + * Arguments: + * tl, td literal/length and distance decoder tables + * bl, bd number of bits decoded by tl[] and td[] + */ static int -inflate_codes(glbl, tl, td, bl, bd) - struct inflate *glbl; - struct huft *tl, *td;/* literal/length and distance decoder tables */ - int bl, bd; /* number of bits decoded by tl[] and td[] */ +inflate_codes(struct inflate *glbl, struct huft *tl, struct huft*td, int bl, + int bd) { register unsigned e; /* table entry flag/number of extra bits */ unsigned n, d; /* length and index for copy */ @@ -733,8 +741,7 @@ inflate_codes(glbl, tl, td, bl, bd) /* "decompress" an inflated type 0 (stored) block. */ static int -inflate_stored(glbl) - struct inflate *glbl; +inflate_stored(struct inflate *glbl) { unsigned n; /* number of bytes in block */ unsigned w; /* current window position */ @@ -780,8 +787,7 @@ inflate_stored(glbl) either replace this with a custom decoder, or at least precompute the Huffman tables. */ static int -inflate_fixed(glbl) - struct inflate *glbl; +inflate_fixed(struct inflate *glbl) { /* if first time, set up tables for fixed blocks */ if (glbl->gz_fixed_tl == (struct huft *) NULL) { @@ -822,8 +828,7 @@ inflate_fixed(glbl) /* decompress an inflated type 2 (dynamic Huffman codes) block. */ static int -inflate_dynamic(glbl) - struct inflate *glbl; +inflate_dynamic(struct inflate *glbl) { int i; /* temporary variables */ unsigned j; @@ -967,10 +972,12 @@ inflate_dynamic(glbl) } /* decompress an inflated block */ +/* + * Arguments: + * e last block flag + */ static int -inflate_block(glbl, e) - struct inflate *glbl; - int *e; /* last block flag */ +inflate_block(struct inflate *glbl, int *e) { unsigned t; /* block type */ register ulg b; /* bit buffer */ @@ -1007,8 +1014,7 @@ inflate_block(glbl, e) /* decompress an inflated entry */ static int -xinflate(glbl) - struct inflate *glbl; +xinflate(struct inflate *glbl) { int e; /* last block flag */ int r; /* result code */ @@ -1040,8 +1046,7 @@ xinflate(glbl) /* Nobody uses this - why not? */ int -inflate(glbl) - struct inflate *glbl; +inflate(struct inflate *glbl) { int i; #ifdef _KERNEL From owner-svn-src-all@freebsd.org Tue Oct 4 18:04:47 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0D52AF5068; Tue, 4 Oct 2016 18:04:47 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93656ADD; Tue, 4 Oct 2016 18:04:47 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u94I4kDa086371; Tue, 4 Oct 2016 18:04:46 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u94I4khd086370; Tue, 4 Oct 2016 18:04:46 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201610041804.u94I4khd086370@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 4 Oct 2016 18:04:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306682 - stable/11/sys/fs/nullfs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 18:04:47 -0000 Author: mjg Date: Tue Oct 4 18:04:46 2016 New Revision: 306682 URL: https://svnweb.freebsd.org/changeset/base/306682 Log: MFC r305659: nullfs: plug vnode ref leak in null_vptocnp The lower vnode is already referenced and nodeget is supposed to consume the reference. Thus the extra vref call was causing a leak. Modified: stable/11/sys/fs/nullfs/null_vnops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nullfs/null_vnops.c ============================================================================== --- stable/11/sys/fs/nullfs/null_vnops.c Tue Oct 4 17:57:30 2016 (r306681) +++ stable/11/sys/fs/nullfs/null_vnops.c Tue Oct 4 18:04:46 2016 (r306682) @@ -896,7 +896,6 @@ null_vptocnp(struct vop_vptocnp_args *ap vn_lock(vp, locked | LK_RETRY); return (ENOENT); } - vref(ldvp); error = null_nodeget(vp->v_mount, ldvp, dvp); if (error == 0) { #ifdef DIAGNOSTIC From owner-svn-src-all@freebsd.org Tue Oct 4 18:07:34 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC671AF512C; Tue, 4 Oct 2016 18:07:34 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4DE4CCD; Tue, 4 Oct 2016 18:07:34 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u94I7Xh9086523; Tue, 4 Oct 2016 18:07:33 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u94I7XWN086522; Tue, 4 Oct 2016 18:07:33 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201610041807.u94I7XWN086522@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 4 Oct 2016 18:07:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306683 - stable/11/sys/netinet6 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 18:07:35 -0000 Author: markj Date: Tue Oct 4 18:07:33 2016 New Revision: 306683 URL: https://svnweb.freebsd.org/changeset/base/306683 Log: MFC r306046: Reduce code duplication around NDP message handlers in icmp6_input(). Modified: stable/11/sys/netinet6/icmp6.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet6/icmp6.c ============================================================================== --- stable/11/sys/netinet6/icmp6.c Tue Oct 4 18:04:46 2016 (r306682) +++ stable/11/sys/netinet6/icmp6.c Tue Oct 4 18:07:33 2016 (r306683) @@ -734,36 +734,19 @@ icmp6_input(struct mbuf **mp, int *offp, goto badcode; if (icmp6len < sizeof(struct nd_router_solicit)) goto badlen; - if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) == NULL) { - /* give up local */ - - /* Send incoming SeND packet to user space. */ - if (send_sendso_input_hook != NULL) { - IP6_EXTHDR_CHECK(m, off, - icmp6len, IPPROTO_DONE); - error = send_sendso_input_hook(m, ifp, - SND_IN, ip6len); - /* -1 == no app on SEND socket */ - if (error == 0) - return (IPPROTO_DONE); - nd6_rs_input(m, off, icmp6len); - } else - nd6_rs_input(m, off, icmp6len); - m = NULL; - goto freeit; - } if (send_sendso_input_hook != NULL) { - IP6_EXTHDR_CHECK(n, off, - icmp6len, IPPROTO_DONE); - error = send_sendso_input_hook(n, ifp, - SND_IN, ip6len); - if (error == 0) + IP6_EXTHDR_CHECK(m, off, icmp6len, IPPROTO_DONE); + error = send_sendso_input_hook(m, ifp, SND_IN, ip6len); + if (error == 0) { + m = NULL; goto freeit; - /* -1 == no app on SEND socket */ - nd6_rs_input(n, off, icmp6len); - } else - nd6_rs_input(n, off, icmp6len); - /* m stays. */ + } + } + n = m_copym(m, 0, M_COPYALL, M_NOWAIT); + nd6_rs_input(m, off, icmp6len); + m = n; + if (m == NULL) + goto freeit; break; case ND_ROUTER_ADVERT: @@ -772,29 +755,18 @@ icmp6_input(struct mbuf **mp, int *offp, goto badcode; if (icmp6len < sizeof(struct nd_router_advert)) goto badlen; - if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) == NULL) { - - /* Send incoming SeND-protected/ND packet to user space. */ - if (send_sendso_input_hook != NULL) { - error = send_sendso_input_hook(m, ifp, - SND_IN, ip6len); - if (error == 0) - return (IPPROTO_DONE); - nd6_ra_input(m, off, icmp6len); - } else - nd6_ra_input(m, off, icmp6len); - m = NULL; - goto freeit; - } if (send_sendso_input_hook != NULL) { - error = send_sendso_input_hook(n, ifp, - SND_IN, ip6len); - if (error == 0) + error = send_sendso_input_hook(m, ifp, SND_IN, ip6len); + if (error == 0) { + m = NULL; goto freeit; - nd6_ra_input(n, off, icmp6len); - } else - nd6_ra_input(n, off, icmp6len); - /* m stays. */ + } + } + n = m_copym(m, 0, M_COPYALL, M_NOWAIT); + nd6_ra_input(m, off, icmp6len); + m = n; + if (m == NULL) + goto freeit; break; case ND_NEIGHBOR_SOLICIT: @@ -803,27 +775,18 @@ icmp6_input(struct mbuf **mp, int *offp, goto badcode; if (icmp6len < sizeof(struct nd_neighbor_solicit)) goto badlen; - if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) == NULL) { - if (send_sendso_input_hook != NULL) { - error = send_sendso_input_hook(m, ifp, - SND_IN, ip6len); - if (error == 0) - return (IPPROTO_DONE); - nd6_ns_input(m, off, icmp6len); - } else - nd6_ns_input(m, off, icmp6len); - m = NULL; - goto freeit; - } if (send_sendso_input_hook != NULL) { - error = send_sendso_input_hook(n, ifp, - SND_IN, ip6len); - if (error == 0) + error = send_sendso_input_hook(m, ifp, SND_IN, ip6len); + if (error == 0) { + m = NULL; goto freeit; - nd6_ns_input(n, off, icmp6len); - } else - nd6_ns_input(n, off, icmp6len); - /* m stays. */ + } + } + n = m_copym(m, 0, M_COPYALL, M_NOWAIT); + nd6_ns_input(m, off, icmp6len); + m = n; + if (m == NULL) + goto freeit; break; case ND_NEIGHBOR_ADVERT: @@ -832,29 +795,18 @@ icmp6_input(struct mbuf **mp, int *offp, goto badcode; if (icmp6len < sizeof(struct nd_neighbor_advert)) goto badlen; - if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) == NULL) { - - /* Send incoming SeND-protected/ND packet to user space. */ - if (send_sendso_input_hook != NULL) { - error = send_sendso_input_hook(m, ifp, - SND_IN, ip6len); - if (error == 0) - return (IPPROTO_DONE); - nd6_na_input(m, off, icmp6len); - } else - nd6_na_input(m, off, icmp6len); - m = NULL; - goto freeit; - } if (send_sendso_input_hook != NULL) { - error = send_sendso_input_hook(n, ifp, - SND_IN, ip6len); - if (error == 0) + error = send_sendso_input_hook(m, ifp, SND_IN, ip6len); + if (error == 0) { + m = NULL; goto freeit; - nd6_na_input(n, off, icmp6len); - } else - nd6_na_input(n, off, icmp6len); - /* m stays. */ + } + } + n = m_copym(m, 0, M_COPYALL, M_NOWAIT); + nd6_na_input(m, off, icmp6len); + m = n; + if (m == NULL) + goto freeit; break; case ND_REDIRECT: @@ -863,27 +815,18 @@ icmp6_input(struct mbuf **mp, int *offp, goto badcode; if (icmp6len < sizeof(struct nd_redirect)) goto badlen; - if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) == NULL) { - if (send_sendso_input_hook != NULL) { - error = send_sendso_input_hook(m, ifp, - SND_IN, ip6len); - if (error == 0) - return (IPPROTO_DONE); - icmp6_redirect_input(m, off); - } else - icmp6_redirect_input(m, off); - m = NULL; - goto freeit; - } if (send_sendso_input_hook != NULL) { - error = send_sendso_input_hook(n, ifp, - SND_IN, ip6len); - if (error == 0) + error = send_sendso_input_hook(m, ifp, SND_IN, ip6len); + if (error == 0) { + m = NULL; goto freeit; - icmp6_redirect_input(n, off); - } else - icmp6_redirect_input(n, off); - /* m stays. */ + } + } + n = m_copym(m, 0, M_COPYALL, M_NOWAIT); + icmp6_redirect_input(m, off); + m = n; + if (m == NULL) + goto freeit; break; case ICMP6_ROUTER_RENUMBERING: From owner-svn-src-all@freebsd.org Tue Oct 4 19:09:21 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B561FAF5056; Tue, 4 Oct 2016 19:09:21 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 869DBE44; Tue, 4 Oct 2016 19:09:21 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id u94J9KkQ015104 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 4 Oct 2016 12:09:20 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id u94J9KGe015103; Tue, 4 Oct 2016 12:09:20 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 4 Oct 2016 12:09:20 -0700 From: Gleb Smirnoff To: Kevin Lo Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r305824 - in head/sys: contrib/ipfilter/netinet kern net netinet netinet6 netipsec sys Message-ID: <20161004190920.GL23123@FreeBSD.org> References: <201609150741.u8F7fmcM059138@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201609150741.u8F7fmcM059138@repo.freebsd.org> User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 19:09:21 -0000 Kevin, On Thu, Sep 15, 2016 at 07:41:48AM +0000, Kevin Lo wrote: K> Log: K> Remove the 4.3BSD compatible macro m_copy(), use m_copym() instead. ... K> Modified: head/sys/contrib/ipfilter/netinet/fil.c K> ============================================================================== K> --- head/sys/contrib/ipfilter/netinet/fil.c Thu Sep 15 02:48:56 2016 (r305823) K> +++ head/sys/contrib/ipfilter/netinet/fil.c Thu Sep 15 07:41:48 2016 (r305824) K> @@ -3226,7 +3226,7 @@ filterdone: K> fdp = fin->fin_dif; K> if ((fdp != NULL) && (fdp->fd_ptr != NULL) && K> (fdp->fd_ptr != (void *)-1)) { K> - mc = M_COPY(fin->fin_m); K> + mc = M_COPYM(fin->fin_m); K> if (mc != NULL) K> ipf_fastroute(mc, &mc, fin, fdp); K> } K> K> Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h K> ============================================================================== K> --- head/sys/contrib/ipfilter/netinet/ip_compat.h Thu Sep 15 02:48:56 2016 (r305823) K> +++ head/sys/contrib/ipfilter/netinet/ip_compat.h Thu Sep 15 07:41:48 2016 (r305824) K> @@ -211,7 +211,7 @@ struct ether_addr { K> # define MSGDSIZE(m) mbufchainlen(m) K> # define M_LEN(m) (m)->m_len K> # define M_ADJ(m,x) m_adj(m, x) K> -# define M_COPY(x) m_copy((x), 0, M_COPYALL) K> +# define M_COPYM(x) m_copym((x), 0, M_COPYALL, M_NOWAIT) K> # define M_DUP(m) m_dup(m, M_NOWAIT) K> # define IPF_PANIC(x,y) if (x) { printf y; panic("ipf_panic"); } K> typedef struct mbuf mb_t; K> @@ -366,7 +366,7 @@ typedef struct mb_s { K> # define MSGDSIZE(m) msgdsize(m) K> # define M_LEN(m) (m)->mb_len K> # define M_ADJ(m,x) (m)->mb_len += x K> -# define M_COPY(m) dupmbt(m) K> +# define M_COPYM(m) dupmbt(m) K> # define M_DUP(m) dupmbt(m) K> # define GETKTIME(x) gettimeofday((struct timeval *)(x), NULL) K> # define MTOD(m, t) ((t)(m)->mb_data) IMHO, for contributed ipfilter we should only modify ip_compat.h and ip_fil_freebsd.c. In case of removal of m_copy() the macro should remain named M_COPY(), but it should be defined to call to function of m_copym(). So fil.c can be left unmodified, and ip_compat.h will have only 1 line change. The userland part of ip_compat.h which defines M_COPY() to dupmbt() doesn't need to be renamed as well. -- Totus tuus, Glebius. From owner-svn-src-all@freebsd.org Tue Oct 4 19:35:16 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D59ACAF5BC4; Tue, 4 Oct 2016 19:35:16 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 566718F6; Tue, 4 Oct 2016 19:35:16 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u94JZFX4020636; Tue, 4 Oct 2016 19:35:15 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u94JZEdP020631; Tue, 4 Oct 2016 19:35:14 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201610041935.u94JZEdP020631@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Tue, 4 Oct 2016 19:35:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306684 - in head: sbin/pfctl share/man/man5 sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 19:35:17 -0000 Author: kp Date: Tue Oct 4 19:35:14 2016 New Revision: 306684 URL: https://svnweb.freebsd.org/changeset/base/306684 Log: pf: remove fastroute tag The tag fastroute came from ipf and was removed in OpenBSD in 2011. The code allows to skip the in pfil hooks and completely removes the out pfil invoke, albeit looking up a route that the IP stack will likely find on its own. The code between IPv4 and IPv6 is also inconsistent and marked as "XXX" for years. Submitted by: Franco Fichtner Differential Revision: https://reviews.freebsd.org/D8058 Modified: head/sbin/pfctl/parse.y head/sbin/pfctl/pfctl_parser.c head/share/man/man5/pf.conf.5 head/sys/netpfil/pf/pf.c head/sys/netpfil/pf/pf_ioctl.c Modified: head/sbin/pfctl/parse.y ============================================================================== --- head/sbin/pfctl/parse.y Tue Oct 4 18:07:33 2016 (r306683) +++ head/sbin/pfctl/parse.y Tue Oct 4 19:35:14 2016 (r306684) @@ -2330,7 +2330,7 @@ pfrule : action dir logquick interface memcpy(&r.rpool.key, $5.key, sizeof(struct pf_poolhashkey)); } - if (r.rt && r.rt != PF_FASTROUTE) { + if (r.rt) { decide_address_family($5.host, &r.af); remove_invalid_hosts(&$5.host, &r.af); if ($5.host == NULL) { @@ -4416,8 +4416,9 @@ route : /* empty */ { $$.pool_opts = 0; } | FASTROUTE { + /* backwards-compat */ $$.host = NULL; - $$.rt = PF_FASTROUTE; + $$.rt = 0; $$.pool_opts = 0; } | ROUTETO routespec pool_opts { Modified: head/sbin/pfctl/pfctl_parser.c ============================================================================== --- head/sbin/pfctl/pfctl_parser.c Tue Oct 4 18:07:33 2016 (r306683) +++ head/sbin/pfctl/pfctl_parser.c Tue Oct 4 19:35:14 2016 (r306684) @@ -778,12 +778,8 @@ print_rule(struct pf_rule *r, const char printf(" reply-to"); else if (r->rt == PF_DUPTO) printf(" dup-to"); - else if (r->rt == PF_FASTROUTE) - printf(" fastroute"); - if (r->rt != PF_FASTROUTE) { - printf(" "); - print_pool(&r->rpool, 0, 0, r->af, PF_PASS); - } + printf(" "); + print_pool(&r->rpool, 0, 0, r->af, PF_PASS); } if (r->af) { if (r->af == AF_INET) Modified: head/share/man/man5/pf.conf.5 ============================================================================== --- head/share/man/man5/pf.conf.5 Tue Oct 4 18:07:33 2016 (r306683) +++ head/share/man/man5/pf.conf.5 Tue Oct 4 19:35:14 2016 (r306684) @@ -28,7 +28,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd June 9, 2016 +.Dd September 28, 2016 .Dt PF.CONF 5 .Os .Sh NAME @@ -1874,10 +1874,6 @@ route the packet according to the type o When such a rule creates state, the route option is also applied to all packets matching the same connection. .Bl -tag -width xxxx -.It Ar fastroute -The -.Ar fastroute -option does a normal route lookup to find the next hop for the packet. .It Ar route-to The .Ar route-to @@ -2839,7 +2835,7 @@ option = "set" ( [ "timeout" ( t pf-rule = action [ ( "in" | "out" ) ] [ "log" [ "(" logopts ")"] ] [ "quick" ] - [ "on" ifspec ] [ "fastroute" | route ] [ af ] [ protospec ] + [ "on" ifspec ] [ route ] [ af ] [ protospec ] hosts [ filteropt-list ] logopts = logopt [ "," logopts ] Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Tue Oct 4 18:07:33 2016 (r306683) +++ head/sys/netpfil/pf/pf.c Tue Oct 4 19:35:14 2016 (r306684) @@ -3632,7 +3632,7 @@ pf_create_state(struct pf_rule *r, struc s->timeout = PFTM_OTHER_FIRST_PACKET; } - if (r->rt && r->rt != PF_FASTROUTE) { + if (r->rt) { if (pf_map_addr(pd->af, r, pd->src, &s->rt_addr, NULL, &sn)) { REASON_SET(&reason, PFRES_MAPFAILED); pf_src_tree_remove_state(s); @@ -5439,41 +5439,24 @@ pf_route(struct mbuf **m, struct pf_rule dst.sin_len = sizeof(dst); dst.sin_addr = ip->ip_dst; - if (r->rt == PF_FASTROUTE) { - struct nhop4_basic nh4; - - if (s) - PF_STATE_UNLOCK(s); - - if (fib4_lookup_nh_basic(M_GETFIB(m0), ip->ip_dst, 0, - m0->m_pkthdr.flowid, &nh4) != 0) { - KMOD_IPSTAT_INC(ips_noroute); - error = EHOSTUNREACH; - goto bad; - } - - ifp = nh4.nh_ifp; - dst.sin_addr = nh4.nh_addr; + if (TAILQ_EMPTY(&r->rpool.list)) { + DPFPRINTF(PF_DEBUG_URGENT, + ("%s: TAILQ_EMPTY(&r->rpool.list)\n", __func__)); + goto bad_locked; + } + if (s == NULL) { + pf_map_addr(AF_INET, r, (struct pf_addr *)&ip->ip_src, + &naddr, NULL, &sn); + if (!PF_AZERO(&naddr, AF_INET)) + dst.sin_addr.s_addr = naddr.v4.s_addr; + ifp = r->rpool.cur->kif ? + r->rpool.cur->kif->pfik_ifp : NULL; } else { - if (TAILQ_EMPTY(&r->rpool.list)) { - DPFPRINTF(PF_DEBUG_URGENT, - ("%s: TAILQ_EMPTY(&r->rpool.list)\n", __func__)); - goto bad_locked; - } - if (s == NULL) { - pf_map_addr(AF_INET, r, (struct pf_addr *)&ip->ip_src, - &naddr, NULL, &sn); - if (!PF_AZERO(&naddr, AF_INET)) - dst.sin_addr.s_addr = naddr.v4.s_addr; - ifp = r->rpool.cur->kif ? - r->rpool.cur->kif->pfik_ifp : NULL; - } else { - if (!PF_AZERO(&s->rt_addr, AF_INET)) - dst.sin_addr.s_addr = - s->rt_addr.v4.s_addr; - ifp = s->rt_kif ? s->rt_kif->pfik_ifp : NULL; - PF_STATE_UNLOCK(s); - } + if (!PF_AZERO(&s->rt_addr, AF_INET)) + dst.sin_addr.s_addr = + s->rt_addr.v4.s_addr; + ifp = s->rt_kif ? s->rt_kif->pfik_ifp : NULL; + PF_STATE_UNLOCK(s); } if (ifp == NULL) goto bad; @@ -5615,16 +5598,6 @@ pf_route6(struct mbuf **m, struct pf_rul dst.sin6_len = sizeof(dst); dst.sin6_addr = ip6->ip6_dst; - /* Cheat. XXX why only in the v6 case??? */ - if (r->rt == PF_FASTROUTE) { - if (s) - PF_STATE_UNLOCK(s); - m0->m_flags |= M_SKIP_FIREWALL; - ip6_output(m0, NULL, NULL, 0, NULL, NULL, NULL); - *m = NULL; - return; - } - if (TAILQ_EMPTY(&r->rpool.list)) { DPFPRINTF(PF_DEBUG_URGENT, ("%s: TAILQ_EMPTY(&r->rpool.list)\n", __func__)); Modified: head/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- head/sys/netpfil/pf/pf_ioctl.c Tue Oct 4 18:07:33 2016 (r306683) +++ head/sys/netpfil/pf/pf_ioctl.c Tue Oct 4 19:35:14 2016 (r306684) @@ -1267,7 +1267,7 @@ pfioctl(struct cdev *dev, u_long cmd, ca pf_mv_pool(&V_pf_pabuf, &rule->rpool.list); if (((((rule->action == PF_NAT) || (rule->action == PF_RDR) || (rule->action == PF_BINAT)) && rule->anchor == NULL) || - (rule->rt > PF_FASTROUTE)) && + (rule->rt > PF_NOPFROUTE)) && (TAILQ_FIRST(&rule->rpool.list) == NULL)) error = EINVAL; @@ -1527,7 +1527,7 @@ DIOCADDRULE_error: if (((((newrule->action == PF_NAT) || (newrule->action == PF_RDR) || (newrule->action == PF_BINAT) || - (newrule->rt > PF_FASTROUTE)) && + (newrule->rt > PF_NOPFROUTE)) && !newrule->anchor)) && (TAILQ_FIRST(&newrule->rpool.list) == NULL)) error = EINVAL; From owner-svn-src-all@freebsd.org Tue Oct 4 20:26:19 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D8F3AF5B42; Tue, 4 Oct 2016 20:26:19 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E19ABAD; Tue, 4 Oct 2016 20:26:19 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u94KQImb040728; Tue, 4 Oct 2016 20:26:18 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u94KQIpw040727; Tue, 4 Oct 2016 20:26:18 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201610042026.u94KQIpw040727@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 4 Oct 2016 20:26:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306685 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 20:26:19 -0000 Author: glebius Date: Tue Oct 4 20:26:18 2016 New Revision: 306685 URL: https://svnweb.freebsd.org/changeset/base/306685 Log: Merge r306212: Fix regression from r297400, which truncates headers in case of low socket buffer and put a small optimization for low socket buffer case: - Do not hack uio_resid, and let m_uiotombuf() properly take care of it. This fixes truncation of headers at low buffer. - If headers ate all the space, jump right to the end of the cycle, to avoid doing single page I/O and allocating zero length mbuf. - Clear hdr_uio only if space is positive, which indicates that all uio was copied in. Modified: stable/11/sys/kern/kern_sendfile.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_sendfile.c ============================================================================== --- stable/11/sys/kern/kern_sendfile.c Tue Oct 4 19:35:14 2016 (r306684) +++ stable/11/sys/kern/kern_sendfile.c Tue Oct 4 20:26:18 2016 (r306685) @@ -656,10 +656,18 @@ retry_space: if (hdr_uio != NULL && hdr_uio->uio_resid > 0) { hdr_uio->uio_td = td; hdr_uio->uio_rw = UIO_WRITE; - hdr_uio->uio_resid = min(hdr_uio->uio_resid, space); - mh = m_uiotombuf(hdr_uio, M_WAITOK, 0, 0, 0); + mh = m_uiotombuf(hdr_uio, M_WAITOK, space, 0, 0); hdrlen = m_length(mh, &mhtail); space -= hdrlen; + /* + * If header consumed all the socket buffer space, + * don't waste CPU cycles and jump to the end. + */ + if (space == 0) { + sfio = NULL; + nios = 0; + goto prepend_header; + } hdr_uio = NULL; } @@ -806,6 +814,7 @@ retry_space: /* Prepend header, if any. */ if (hdrlen) { +prepend_header: mhtail->m_next = m; m = mh; mh = NULL; From owner-svn-src-all@freebsd.org Tue Oct 4 20:27:18 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 699F1AF5C03; Tue, 4 Oct 2016 20:27:18 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3330FD62; Tue, 4 Oct 2016 20:27:18 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u94KRHs0040823; Tue, 4 Oct 2016 20:27:17 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u94KRFxi040804; Tue, 4 Oct 2016 20:27:15 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201610042027.u94KRFxi040804@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Tue, 4 Oct 2016 20:27:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306686 - in head: sys/arm64/acpica sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 20:27:18 -0000 Author: jkim Date: Tue Oct 4 20:27:15 2016 New Revision: 306686 URL: https://svnweb.freebsd.org/changeset/base/306686 Log: Merge ACPICA 20160930. Added: head/sys/contrib/dev/acpica/compiler/aslhelp.c - copied, changed from r305162, vendor-sys/acpica/dist/source/compiler/aslhelp.c head/sys/contrib/dev/acpica/compiler/aslhelpers.y - copied unchanged from r303639, vendor-sys/acpica/dist/source/compiler/aslhelpers.y head/sys/contrib/dev/acpica/compiler/aslkeywords.y - copied unchanged from r303639, vendor-sys/acpica/dist/source/compiler/aslkeywords.y head/sys/contrib/dev/acpica/compiler/aslprimaries.y - copied unchanged from r303639, vendor-sys/acpica/dist/source/compiler/aslprimaries.y head/sys/contrib/dev/acpica/components/utilities/utstrtoul64.c - copied, changed from r305162, vendor-sys/acpica/dist/source/components/utilities/utstrtoul64.c head/sys/contrib/dev/acpica/include/platform/acgccex.h - copied unchanged from r303639, vendor-sys/acpica/dist/source/include/platform/acgccex.h Deleted: head/sys/contrib/dev/acpica/components/utilities/utprint.c head/sys/contrib/dev/acpica/os_specific/service_layers/oslibcfs.c Modified: head/sys/arm64/acpica/OsdEnvironment.c head/sys/conf/files head/sys/contrib/dev/acpica/acpica_prep.sh head/sys/contrib/dev/acpica/changes.txt head/sys/contrib/dev/acpica/common/acfileio.c head/sys/contrib/dev/acpica/common/acgetline.c head/sys/contrib/dev/acpica/common/adisasm.c head/sys/contrib/dev/acpica/common/ahtable.c head/sys/contrib/dev/acpica/common/cmfsize.c head/sys/contrib/dev/acpica/common/dmtable.c head/sys/contrib/dev/acpica/common/dmtables.c head/sys/contrib/dev/acpica/common/dmtbdump.c head/sys/contrib/dev/acpica/common/dmtbinfo.c head/sys/contrib/dev/acpica/common/getopt.c head/sys/contrib/dev/acpica/compiler/aslcompiler.h head/sys/contrib/dev/acpica/compiler/aslcstyle.y head/sys/contrib/dev/acpica/compiler/aslmain.c head/sys/contrib/dev/acpica/compiler/aslmaputils.c head/sys/contrib/dev/acpica/compiler/asloperands.c head/sys/contrib/dev/acpica/compiler/aslopt.c head/sys/contrib/dev/acpica/compiler/asloptions.c head/sys/contrib/dev/acpica/compiler/aslparser.y head/sys/contrib/dev/acpica/compiler/aslresources.y head/sys/contrib/dev/acpica/compiler/aslrules.y head/sys/contrib/dev/acpica/compiler/aslstubs.c head/sys/contrib/dev/acpica/compiler/asltokens.y head/sys/contrib/dev/acpica/compiler/asltypes.y head/sys/contrib/dev/acpica/compiler/aslutils.c head/sys/contrib/dev/acpica/compiler/aslxref.c head/sys/contrib/dev/acpica/compiler/dtcompiler.h head/sys/contrib/dev/acpica/compiler/dtfield.c head/sys/contrib/dev/acpica/compiler/dtparser.y head/sys/contrib/dev/acpica/compiler/dttable.c head/sys/contrib/dev/acpica/compiler/dttemplate.h head/sys/contrib/dev/acpica/compiler/dtutils.c head/sys/contrib/dev/acpica/compiler/prparser.y head/sys/contrib/dev/acpica/components/debugger/dbconvert.c head/sys/contrib/dev/acpica/components/debugger/dbexec.c head/sys/contrib/dev/acpica/components/debugger/dbfileio.c head/sys/contrib/dev/acpica/components/debugger/dbinput.c head/sys/contrib/dev/acpica/components/debugger/dbmethod.c head/sys/contrib/dev/acpica/components/disassembler/dmbuffer.c head/sys/contrib/dev/acpica/components/disassembler/dmcstyle.c head/sys/contrib/dev/acpica/components/disassembler/dmopcode.c head/sys/contrib/dev/acpica/components/disassembler/dmresrcl.c head/sys/contrib/dev/acpica/components/disassembler/dmresrcl2.c head/sys/contrib/dev/acpica/components/dispatcher/dsmethod.c head/sys/contrib/dev/acpica/components/dispatcher/dswexec.c head/sys/contrib/dev/acpica/components/dispatcher/dswload2.c head/sys/contrib/dev/acpica/components/events/evgpe.c head/sys/contrib/dev/acpica/components/events/evgpeinit.c head/sys/contrib/dev/acpica/components/events/evrgnini.c head/sys/contrib/dev/acpica/components/events/evxfgpe.c head/sys/contrib/dev/acpica/components/executer/exconcat.c head/sys/contrib/dev/acpica/components/executer/exconfig.c head/sys/contrib/dev/acpica/components/executer/exconvrt.c head/sys/contrib/dev/acpica/components/executer/exmisc.c head/sys/contrib/dev/acpica/components/executer/exoparg1.c head/sys/contrib/dev/acpica/components/executer/exresop.c head/sys/contrib/dev/acpica/components/executer/extrace.c head/sys/contrib/dev/acpica/components/executer/exutils.c head/sys/contrib/dev/acpica/components/hardware/hwgpe.c head/sys/contrib/dev/acpica/components/namespace/nsconvert.c head/sys/contrib/dev/acpica/components/namespace/nsload.c head/sys/contrib/dev/acpica/components/namespace/nsparse.c head/sys/contrib/dev/acpica/components/namespace/nsutils.c head/sys/contrib/dev/acpica/components/parser/psparse.c head/sys/contrib/dev/acpica/components/parser/psxface.c head/sys/contrib/dev/acpica/components/tables/tbdata.c head/sys/contrib/dev/acpica/components/tables/tbfadt.c head/sys/contrib/dev/acpica/components/tables/tbfind.c head/sys/contrib/dev/acpica/components/tables/tbinstal.c head/sys/contrib/dev/acpica/components/tables/tbutils.c head/sys/contrib/dev/acpica/components/tables/tbxface.c head/sys/contrib/dev/acpica/components/tables/tbxfload.c head/sys/contrib/dev/acpica/components/tables/tbxfroot.c head/sys/contrib/dev/acpica/components/utilities/utaddress.c head/sys/contrib/dev/acpica/components/utilities/utbuffer.c head/sys/contrib/dev/acpica/components/utilities/utdebug.c head/sys/contrib/dev/acpica/components/utilities/uthex.c head/sys/contrib/dev/acpica/components/utilities/utinit.c head/sys/contrib/dev/acpica/components/utilities/utnonansi.c head/sys/contrib/dev/acpica/components/utilities/utosi.c head/sys/contrib/dev/acpica/components/utilities/utpredef.c head/sys/contrib/dev/acpica/components/utilities/uttrack.c head/sys/contrib/dev/acpica/components/utilities/utxface.c head/sys/contrib/dev/acpica/components/utilities/utxfinit.c head/sys/contrib/dev/acpica/include/acapps.h head/sys/contrib/dev/acpica/include/acclib.h head/sys/contrib/dev/acpica/include/acconfig.h head/sys/contrib/dev/acpica/include/acdebug.h head/sys/contrib/dev/acpica/include/acdisasm.h head/sys/contrib/dev/acpica/include/acevents.h head/sys/contrib/dev/acpica/include/acglobal.h head/sys/contrib/dev/acpica/include/aclocal.h head/sys/contrib/dev/acpica/include/acnamesp.h head/sys/contrib/dev/acpica/include/acparser.h head/sys/contrib/dev/acpica/include/acpiosxf.h head/sys/contrib/dev/acpica/include/acpixf.h head/sys/contrib/dev/acpica/include/actables.h head/sys/contrib/dev/acpica/include/actbl.h head/sys/contrib/dev/acpica/include/actypes.h head/sys/contrib/dev/acpica/include/acutils.h head/sys/contrib/dev/acpica/include/platform/acenv.h head/sys/contrib/dev/acpica/include/platform/acenvex.h head/sys/contrib/dev/acpica/include/platform/acfreebsd.h head/sys/contrib/dev/acpica/include/platform/acgcc.h head/sys/contrib/dev/acpica/os_specific/service_layers/osunixxf.c head/sys/dev/acpica/Osd/OsdTable.c head/sys/x86/acpica/OsdEnvironment.c head/sys/x86/acpica/madt.c head/sys/x86/acpica/srat.c head/sys/x86/xen/pvcpu_enum.c head/usr.sbin/acpi/acpidb/Makefile head/usr.sbin/acpi/iasl/Makefile Directory Properties: head/sys/contrib/dev/acpica/ (props changed) Modified: head/sys/arm64/acpica/OsdEnvironment.c ============================================================================== --- head/sys/arm64/acpica/OsdEnvironment.c Tue Oct 4 20:26:18 2016 (r306685) +++ head/sys/arm64/acpica/OsdEnvironment.c Tue Oct 4 20:27:15 2016 (r306686) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include static u_long acpi_root_phys; Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Oct 4 20:26:18 2016 (r306685) +++ head/sys/conf/files Tue Oct 4 20:27:15 2016 (r306686) @@ -480,6 +480,7 @@ contrib/dev/acpica/components/utilities/ contrib/dev/acpica/components/utilities/utresrc.c optional acpi contrib/dev/acpica/components/utilities/utstate.c optional acpi contrib/dev/acpica/components/utilities/utstring.c optional acpi +contrib/dev/acpica/components/utilities/utstrtoul64.c optional acpi contrib/dev/acpica/components/utilities/utuuid.c optional acpi acpi_debug contrib/dev/acpica/components/utilities/utxface.c optional acpi contrib/dev/acpica/components/utilities/utxferror.c optional acpi Modified: head/sys/contrib/dev/acpica/acpica_prep.sh ============================================================================== --- head/sys/contrib/dev/acpica/acpica_prep.sh Tue Oct 4 20:26:18 2016 (r306685) +++ head/sys/contrib/dev/acpica/acpica_prep.sh Tue Oct 4 20:27:15 2016 (r306686) @@ -23,7 +23,7 @@ stripfiles="Makefile README accygwin.h a acmacosx.h acmsvc.h acmsvcex.h acnetbsd.h acos2.h acqnx.h \ acwin.h acwin64.h acwinex.h new_table.txt osbsdtbl.c osefitbl.c \ osefixf.c osfreebsdtbl.c oslinuxtbl.c osunixdir.c osunixmap.c \ - oswindir.c oswintbl.c oswinxf.c readme.txt utclib.c" + oswindir.c oswintbl.c oswinxf.c readme.txt utclib.c utprint.c" # include files to canonify src_headers="acapps.h acbuffer.h acclib.h accommon.h acconfig.h \ @@ -87,6 +87,6 @@ rm -rf ${wrk} # assist the developer in generating a diff echo "Directories you may want to 'svn diff':" echo " sys/contrib/dev/acpica sys/dev/acpica \\" -echo " sys/amd64/acpica sys/i386/acpica sys/x86/acpica \\" -echo " sys/amd64/include sys/i386/include include \\" +echo " sys/amd64/acpica sys/arm64/acpica sys/i386/acpica sys/x86/acpica \\" +echo " sys/amd64/include sys/arm64/include sys/i386/include include \\" echo " sys/boot sys/conf sys/modules/acpi usr.sbin/acpi" Modified: head/sys/contrib/dev/acpica/changes.txt ============================================================================== --- head/sys/contrib/dev/acpica/changes.txt Tue Oct 4 20:26:18 2016 (r306685) +++ head/sys/contrib/dev/acpica/changes.txt Tue Oct 4 20:27:15 2016 (r306686) @@ -1,7 +1,249 @@ ---------------------------------------- -27 May 2016. Summary of changes for version 20160527: +30 September 2016. Summary of changes for version 20160930: -This release is available at https://acpica.org/downloads + +1) ACPICA kernel-resident subsystem: + +Fixed a regression in the internal AcpiTbFindTable function where a non +AE_OK exception could inadvertently be returned even if the function did +not fail. This problem affects the following operators: + DataTableRegion + LoadTable + +Fixed a regression in the LoadTable operator where a load to any +namespace location other than the root no longer worked properly. + +Increased the maximum loop count value that will result in the +AE_AML_INFINITE_LOOP exception. This is a mechanism that is intended to +prevent infinite loops within the AML interpreter and thus the host OS +kernel. The value is increased from 0xFFFF to 0xFFFFF loops (65,535 to +1,048,575). + +Moved the AcpiGbl_MaxLoopIterations configuration variable to the public +acpixf.h file. This allows hosts to easily configure the maximum loop +count at runtime. + +Removed an illegal character in the strtoul64.c file. This character +caused errors with some C compilers. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 140.4K Code, 58.1K Data, 198.5K Total + Debug Version: 200.7K Code, 82.1K Data, 282.8K Total + Previous Release: + Non-Debug Version: 140.0K Code, 58.1K Data, 198.1K Total + Debug Version: 200.3K Code, 82.1K Data, 282.4K Total + + +2) iASL Compiler/Disassembler and Tools: + +Disassembler: Fixed a problem with the conversion of Else{If{ blocks into +the simpler ASL ElseIf keyword. During the conversion, a trailing If +block could be lost and missing from the disassembled output. + +iASL: Fixed a missing parser rule for the ObjectType operator. For ASL+, +the missing rule caused a parse error when using the Index operator as an +operand to ObjectType. This construct now compiles properly. Example: + ObjectType(PKG1[4]). + +iASL: Correctly handle unresolved symbols in the hardware map file (-lm +option). Previously, unresolved symbols could cause a protection fault. +Such symbols are now marked as unresolved in the map file. + +iASL: Implemented support to allow control method invocations as an +operand to the ASL DeRefOf operator. Example: + DeRefOf(MTH1(Local0)) + +Disassembler: Improved support for the ToPLD ASL macro. Detection of a +possible _PLD buffer now includes examination of both the normal buffer +length (16 or 20) as well as the surrounding AML package length. + +Disassembler: Fixed a problem with the decoding of complex expressions +within the Divide operator for ASL+. For the case where both the quotient +and remainder targets are specified, the entire statement cannot be +disassembled. Previously, the output incorrectly contained a mix of ASL- +and ASL+ operators. This mixed statement causes a syntax error when +compiled. Example: + Divide (Add (INT1, 6), 128, RSLT, QUOT) // was incorrectly +disassembled to: + Divide (INT1 + 6, 128, RSLT, QUOT) + +iASL/Tools: Added support to process AML and non-AML ACPI tables +consistently. For the disassembler and AcpiExec, allow all types of ACPI +tables (AML and data tables). For the iASL -e option, allow only AML +tables (DSDT/SSDT). + +---------------------------------------- +31 August 2016. Summary of changes for version 20160831: + + +1) ACPICA kernel-resident subsystem: + +Improve support for the so-called "module-level code", which is defined +to be math, logical and control AML opcodes that appear outside of any +control method. This change improves the support by adding more opcodes +that can be executed in the manner. Some other issues have been solved, +and the ASL grammar changes to support such code under all scope +operators (Device, etc.) are complete. Lv Zheng. + +UEFI support: these OSL functions have been implemented. This is an +additional step toward supporting the AcpiExec utility natively (with +full hardware access) under UEFI. Marcelo Ferreira. + AcpiOsReadPciConfiguration + AcpiOsWritePciConfiguration + +Fixed a possible mutex error during control method auto-serialization. Lv +Zheng. + +Updated support for the Generic Address Structure by fully implementing +all GAS fields when a 32-bit address is expanded to a 64-bit GAS. Lv +Zheng. + +Updated the return value for the internal _OSI method. Instead of +0xFFFFFFFF, the "Ones" value is now returned, which is 0xFFFFFFFFFFFFFFFF +for 64-bit ACPI tables. This fixes an incompatibility with other ACPI +implementations, and will be reflected and clarified in the next version +of the ACPI specification. + +Implemented two new table events that can be passed to an ACPICA table +handler. These events are used to indicate a table installation or +uninstallation. These events are used in addition to existed table load +and unload events. Lv Zheng. + +Implemented a cleanup for all internal string-to-integer conversions. +Consolidate multiple versions of this functionality and limit possible +bases to either 10 or 16 to simplify the code. Adds a new file, +utstrtoul64. + +Cleanup the inclusion order of the various compiler-specific headers. +This simplifies build configuration management. The compiler-specific +headers are now split out from the host-specific headers. Lv Zheng. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 140.1K Code, 58.1K Data, 198.1K Total + Debug Version: 200.3K Code, 82.1K Data, 282.4K Total + + +2) iASL Compiler/Disassembler and Tools: + +iASL/AcpiExec: Added a command line option to display the build date/time +of the tool (-vd). This can be useful to verify that the correct version +of the tools are being used. + +AML Debugger: Implemented a new subcommand ("execute predef") to execute +all predefined control methods and names within the current namespace. +This can be useful for debugging problems with ACPI tables and the ACPI +namespace. + +---------------------------------------- +29 July 2016. Summary of changes for version 20160729: + + +1) ACPICA kernel-resident subsystem: + +Implemented basic UEFI support for the various ACPICA tools. This +includes: +1) An OSL to implement the various AcpiOs* interfaces on UEFI. +2) Support to obtain the ACPI tables on UEFI. +3) Local implementation of required C library functions not available on +UEFI. +4) A front-end (main) function for the tools for UEFI-related +initialization. + +The initial deployment of this support is the AcpiDump utility executing +as an UEFI application via EDK2 (EDKII, "UEFI Firmware Development Kit"). +Current environments supported are Linux/Unix. MSVC generation is not +supported at this time. See the generate/efi/README file for build +instructions. Lv Zheng. + +Future plans include porting the AcpiExec utility to execute natively on +the platform with I/O and memory access. This will allow viewing/dump of +the platform namespace and native execution of ACPI control methods that +access the actual hardware. To fully implement this support, the OSL +functions below must be implemented with UEFI interfaces. Any community +help in the implementation of these functions would be appreciated: + AcpiOsReadPort + AcpiOsWritePort + AcpiOsReadMemory + AcpiOsWriteMemory + AcpiOsReadPciConfiguration + AcpiOsWritePciConfiguration + +Restructured and standardized the C library configuration for ACPICA, +resulting in the various configuration options below. This includes a +global restructuring of the compiler-dependent and platform-dependent +include files. These changes may affect the existing platform-dependent +configuration files on some hosts. Lv Zheng. + +The current C library configuration options appear below. For any issues, +it may be helpful to examine the existing compiler-dependent and +platform-dependent files as examples. Lv Zheng. + +1) Linux kernel: + ACPI_USE_STANDARD_HEADERS=n in order not to use system-provided C +library. + ACPI_USE_SYSTEM_CLIBRARY=y in order not to use ACPICA mini C library. +2) Unix/Windows/BSD applications: + ACPI_USE_STANDARD_HEADERS=y in order to use system-provided C +library. + ACPI_USE_SYSTEM_CLIBRARY=y in order not to use ACPICA mini C library. +3) UEFI applications: + ACPI_USE_STANDARD_HEADERS=n in order not to use system-provided C +library. + ACPI_USE_SYSTEM_CLIBRARY=n in order to use ACPICA mini C library. +4) UEFI applications (EDK2/StdLib): + ACPI_USE_STANDARD_HEADERS=y in order to use EDK2 StdLib C library. + ACPI_USE_SYSTEM_CLIBRARY=y in order to use EDK2 StdLib C library. + + +AML interpreter: "module-level code" support. Allows for execution of so- +called "executable" AML code (math/logical operations, etc.) outside of +control methods not just at the module level (top level) but also within +any scope declared outside of a control method - Scope{}, Device{}, +Processor{}, PowerResource{}, and ThermalZone{}. Lv Zheng. + +Simplified the configuration of the "maximum AML loops" global option by +adding a global public variable, "AcpiGbl_MaxLoopIterations" which can be +modified at runtime. + + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 139.1K Code, 22.9K Data, 162.0K Total + Debug Version: 199.0K Code, 81.8K Data, 280.8K Total + + +2) iASL Compiler/Disassembler and Tools: + +iASL: Add full support for the RASF ACPI table (RAS Features Table). +Includes disassembler, data table compiler, and header support. + +iASL Expand "module-level code" support. Allows for +compilation/disassembly of so-called "executable" AML code (math/logical +operations, etc.) outside of control methods not just at the module level +(top level) but also within any scope declared outside of a control +method - Scope{}, Device{}, Processor{}, PowerResource{}, and +ThermalZone{}. + +AcpiDump: Added support for dumping all SSDTs on newer versions of +Windows. These tables are now easily available -- SSDTs are not available +through the registry on older versions. + +---------------------------------------- +27 May 2016. Summary of changes for version 20160527: 1) ACPICA kernel-resident subsystem: Modified: head/sys/contrib/dev/acpica/common/acfileio.c ============================================================================== --- head/sys/contrib/dev/acpica/common/acfileio.c Tue Oct 4 20:26:18 2016 (r306685) +++ head/sys/contrib/dev/acpica/common/acfileio.c Tue Oct 4 20:27:15 2016 (r306686) @@ -43,10 +43,9 @@ #include #include -#include #include #include -#include +#include #define _COMPONENT ACPI_UTILITIES ACPI_MODULE_NAME ("acfileio") @@ -98,7 +97,7 @@ AcGetAllTablesFromFile ( File = fopen (Filename, "rb"); if (!File) { - perror ("Could not open input file"); + fprintf (stderr, "Could not open input file: %s\n", Filename); if (errno == ENOENT) { return (AE_NOT_EXIST); @@ -263,12 +262,14 @@ AcGetOneTableFromFile ( return (Status); } + if (GetOnlyAmlTables) { - /* Table must be an AML table (DSDT/SSDT) or FADT */ - - if (!ACPI_COMPARE_NAME (TableHeader.Signature, ACPI_SIG_FADT) && - !AcpiUtIsAmlTable (&TableHeader)) + /* + * Table must be an AML table (DSDT/SSDT). + * Used for iASL -e option only. + */ + if (!AcpiUtIsAmlTable (&TableHeader)) { fprintf (stderr, " %s: Table [%4.4s] is not an AML table - ignoring\n", @@ -280,7 +281,7 @@ AcGetOneTableFromFile ( /* Allocate a buffer for the entire table */ - Table = AcpiOsAllocate ((size_t) TableHeader.Length); + Table = AcpiOsAllocate ((ACPI_SIZE) TableHeader.Length); if (!Table) { return (AE_NO_MEMORY); @@ -388,7 +389,7 @@ AcValidateTableHeader ( long TableOffset) { ACPI_TABLE_HEADER TableHeader; - size_t Actual; + ACPI_SIZE Actual; long OriginalOffset; UINT32 FileSize; UINT32 i; Modified: head/sys/contrib/dev/acpica/common/acgetline.c ============================================================================== --- head/sys/contrib/dev/acpica/common/acgetline.c Tue Oct 4 20:26:18 2016 (r306685) +++ head/sys/contrib/dev/acpica/common/acgetline.c Tue Oct 4 20:27:15 2016 (r306686) @@ -47,8 +47,6 @@ #include #include -#include - /* * This is an os-independent implementation of line-editing services needed * by the AcpiExec utility. It uses getchar() and putchar() and the existing Modified: head/sys/contrib/dev/acpica/common/adisasm.c ============================================================================== --- head/sys/contrib/dev/acpica/common/adisasm.c Tue Oct 4 20:26:18 2016 (r306685) +++ head/sys/contrib/dev/acpica/common/adisasm.c Tue Oct 4 20:27:15 2016 (r306686) @@ -49,8 +49,6 @@ #include #include -#include - #define _COMPONENT ACPI_TOOLS ACPI_MODULE_NAME ("adisasm") Modified: head/sys/contrib/dev/acpica/common/ahtable.c ============================================================================== --- head/sys/contrib/dev/acpica/common/ahtable.c Tue Oct 4 20:26:18 2016 (r306685) +++ head/sys/contrib/dev/acpica/common/ahtable.c Tue Oct 4 20:27:15 2016 (r306686) @@ -124,6 +124,7 @@ const AH_TABLE AcpiSupportedTables[ {ACPI_SIG_NFIT, "NVDIMM Firmware Interface Table"}, {ACPI_SIG_PCCT, "Platform Communications Channel Table"}, {ACPI_SIG_PMTT, "Platform Memory Topology Table"}, + {ACPI_SIG_RASF, "RAS Features Table"}, {ACPI_RSDP_NAME,"Root System Description Pointer"}, {ACPI_SIG_RSDT, "Root System Description Table"}, {ACPI_SIG_S3PT, "S3 Performance Table"}, Modified: head/sys/contrib/dev/acpica/common/cmfsize.c ============================================================================== --- head/sys/contrib/dev/acpica/common/cmfsize.c Tue Oct 4 20:26:18 2016 (r306685) +++ head/sys/contrib/dev/acpica/common/cmfsize.c Tue Oct 4 20:27:15 2016 (r306686) @@ -44,7 +44,6 @@ #include #include #include -#include #define _COMPONENT ACPI_TOOLS ACPI_MODULE_NAME ("cmfsize") @@ -74,19 +73,19 @@ CmGetFileSize ( /* Save the current file pointer, seek to EOF to obtain file size */ - CurrentOffset = AcpiOsGetFileOffset (File); + CurrentOffset = ftell (File); if (CurrentOffset < 0) { goto OffsetError; } - Status = AcpiOsSetFileOffset (File, 0, ACPI_FILE_END); + Status = fseek (File, 0, SEEK_END); if (ACPI_FAILURE (Status)) { goto SeekError; } - FileSize = AcpiOsGetFileOffset (File); + FileSize = ftell (File); if (FileSize < 0) { goto OffsetError; @@ -94,7 +93,7 @@ CmGetFileSize ( /* Restore original file pointer */ - Status = AcpiOsSetFileOffset (File, CurrentOffset, ACPI_FILE_BEGIN); + Status = fseek (File, CurrentOffset, SEEK_SET); if (ACPI_FAILURE (Status)) { goto SeekError; @@ -104,10 +103,10 @@ CmGetFileSize ( OffsetError: - AcpiLogError ("Could not get file offset"); + fprintf (stderr, "Could not get file offset\n"); return (ACPI_UINT32_MAX); SeekError: - AcpiLogError ("Could not set file offset"); + fprintf (stderr, "Could not set file offset\n"); return (ACPI_UINT32_MAX); } Modified: head/sys/contrib/dev/acpica/common/dmtable.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtable.c Tue Oct 4 20:26:18 2016 (r306685) +++ head/sys/contrib/dev/acpica/common/dmtable.c Tue Oct 4 20:27:15 2016 (r306686) @@ -358,6 +358,7 @@ const ACPI_DMTABLE_DATA AcpiDmTableD {ACPI_SIG_NFIT, AcpiDmTableInfoNfit, AcpiDmDumpNfit, DtCompileNfit, TemplateNfit}, {ACPI_SIG_PCCT, AcpiDmTableInfoPcct, AcpiDmDumpPcct, DtCompilePcct, TemplatePcct}, {ACPI_SIG_PMTT, NULL, AcpiDmDumpPmtt, DtCompilePmtt, TemplatePmtt}, + {ACPI_SIG_RASF, AcpiDmTableInfoRasf, NULL, NULL, TemplateRasf}, {ACPI_SIG_RSDT, NULL, AcpiDmDumpRsdt, DtCompileRsdt, TemplateRsdt}, {ACPI_SIG_S3PT, NULL, NULL, NULL, TemplateS3pt}, {ACPI_SIG_SBST, AcpiDmTableInfoSbst, NULL, NULL, TemplateSbst}, @@ -844,6 +845,11 @@ AcpiDmDumpTable ( ByteLength = 10; break; + case ACPI_DMT_BUF12: + + ByteLength = 12; + break; + case ACPI_DMT_BUF16: case ACPI_DMT_UUID: @@ -1006,6 +1012,7 @@ AcpiDmDumpTable ( case ACPI_DMT_BUF7: case ACPI_DMT_BUF10: + case ACPI_DMT_BUF12: case ACPI_DMT_BUF16: case ACPI_DMT_BUF128: /* Modified: head/sys/contrib/dev/acpica/common/dmtables.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtables.c Tue Oct 4 20:26:18 2016 (r306685) +++ head/sys/contrib/dev/acpica/common/dmtables.c Tue Oct 4 20:27:15 2016 (r306686) @@ -42,14 +42,12 @@ */ #include -#include #include #include #include #include +#include -#include -#include #define _COMPONENT ACPI_TOOLS ACPI_MODULE_NAME ("dmtables") Modified: head/sys/contrib/dev/acpica/common/dmtbdump.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtbdump.c Tue Oct 4 20:26:18 2016 (r306685) +++ head/sys/contrib/dev/acpica/common/dmtbdump.c Tue Oct 4 20:27:15 2016 (r306686) @@ -52,12 +52,31 @@ ACPI_MODULE_NAME ("dmtbdump") -/* Local prototypes */ +/* Table of revision-dependent FADT sizes */ -static void -AcpiDmValidateFadtLength ( - UINT32 Revision, - UINT32 Length); +static const UINT32 FadtRevisionLength [ACPI_FADT_MAX_VERSION + 1] = +{ + 0, /* 0 - illegal */ + ACPI_FADT_V1_SIZE, /* 1 - ACPI 1.0 */ + 0, /* 2 - illegal */ + ACPI_FADT_V3_SIZE, /* 3 - ACPI 2.0 */ + ACPI_FADT_V4_SIZE, /* 4 - ACPI 3.0 and ACPI 4.0 */ + ACPI_FADT_V5_SIZE, /* 5 - ACPI 5.0 */ + ACPI_FADT_V6_SIZE /* 6 - ACPI 6.0 */ +}; + +/* Table of revision-dependent FADT info tables */ + +ACPI_DMTABLE_INFO *FadtRevisionInfo [ACPI_FADT_MAX_VERSION + 1] = +{ + NULL, /* 0 - illegal */ + AcpiDmTableInfoFadt1, /* 1 - ACPI 1.0 */ + NULL, /* 2 - illegal */ + AcpiDmTableInfoFadt3, /* 3 - ACPI 2.0 */ + AcpiDmTableInfoFadt4, /* 4 - ACPI 3.0 and ACPI 4.0 */ + AcpiDmTableInfoFadt5, /* 5 - ACPI 5.0 */ + AcpiDmTableInfoFadt6 /* 6 - ACPI 6.0 */ +}; /******************************************************************************* @@ -347,6 +366,11 @@ AcpiDmDumpXsdt ( * * DESCRIPTION: Format the contents of a FADT * + * Check the FADT revision against the expected table length for + * that revision. Issue a warning if the length is not what was + * expected. This seems to be such a common BIOS bug that the + * FADT revision has been rendered virtually meaningless. + * * NOTE: We cannot depend on the FADT version to indicate the actual * contents of the FADT because of BIOS bugs. The table length * is the only reliable indicator. @@ -358,142 +382,72 @@ AcpiDmDumpFadt ( ACPI_TABLE_HEADER *Table) { ACPI_STATUS Status; + UINT8 FadtRevision; + UINT32 ExpectedLength; + UINT32 i; - /* Always dump the minimum FADT revision 1 fields (ACPI 1.0) */ + FadtRevision = Table->Revision; - Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, - AcpiDmTableInfoFadt1); - if (ACPI_FAILURE (Status)) + /* FADT revision/length validation */ + + if ((FadtRevision == 0) || + (FadtRevision == 2)) { + AcpiOsPrintf ( + "// ACPI Warning: Invalid or unsupported FADT revision: %u\n", + FadtRevision); return; } - /* Check for FADT revision 2 fields (ACPI 1.0B MS extensions) */ - - if ((Table->Length > ACPI_FADT_V1_SIZE) && - (Table->Length <= ACPI_FADT_V2_SIZE)) + if (FadtRevision > ACPI_FADT_MAX_VERSION) { - Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, - AcpiDmTableInfoFadt2); - if (ACPI_FAILURE (Status)) + AcpiOsPrintf ("// ACPI Warning: Revision %u is not fully supported, " + "disassembling known fields (up to revision %u)\n\n", + FadtRevision, ACPI_FADT_MAX_VERSION); + } + else + { + ExpectedLength = FadtRevisionLength[FadtRevision]; + if (Table->Length != ExpectedLength) { - return; + AcpiOsPrintf ( + "// ACPI Warning: Input FADT revision %X does not match " + "expected length: found 0x%X expected 0x%X\n", + FadtRevision, Table->Length, ExpectedLength); } } - /* Check for FADT revision 3/4 fields and up (ACPI 2.0+ extended data) */ - - else if (Table->Length > ACPI_FADT_V2_SIZE) + /* + * Dump the input table on a per-version basis, but is actually + * based upon the length of the table. Table length must + * be larger than the required length of the previous version. + */ + for (i = 1; i <= ACPI_FADT_MAX_VERSION; i++) { - Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, - AcpiDmTableInfoFadt3); - if (ACPI_FAILURE (Status)) + if (!FadtRevisionLength[i]) /* Skip any empty slots */ { - return; + continue; } - /* Check for FADT revision 5 fields and up (ACPI 5.0+) */ + /* Dump the fields specific to FADT revision[i] */ - if (Table->Length > ACPI_FADT_V3_SIZE) + Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, + FadtRevisionInfo[i]); + if (ACPI_FAILURE (Status)) { - Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, - AcpiDmTableInfoFadt5); - if (ACPI_FAILURE (Status)) - { - return; - } + return; } - /* Check for FADT revision 6 fields and up (ACPI 6.0+) */ - - if (Table->Length > ACPI_FADT_V3_SIZE) + if (Table->Length <= FadtRevisionLength[i]) { - Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, - AcpiDmTableInfoFadt6); - if (ACPI_FAILURE (Status)) - { - return; - } + break; /* End of table */ } } - /* Validate various fields in the FADT, including length */ + /* Build a local FADT to test some FADT values */ AcpiTbCreateLocalFadt (Table, Table->Length); - - /* Validate FADT length against the revision */ - - AcpiDmValidateFadtLength (Table->Revision, Table->Length); -} - - -/******************************************************************************* - * - * FUNCTION: AcpiDmValidateFadtLength - * - * PARAMETERS: Revision - FADT revision (Header->Revision) - * Length - FADT length (Header->Length - * - * RETURN: None - * - * DESCRIPTION: Check the FADT revision against the expected table length for - * that revision. Issue a warning if the length is not what was - * expected. This seems to be such a common BIOS bug that the - * FADT revision has been rendered virtually meaningless. - * - ******************************************************************************/ - -static void -AcpiDmValidateFadtLength ( - UINT32 Revision, - UINT32 Length) -{ - UINT32 ExpectedLength; - - - switch (Revision) - { - case 0: - - AcpiOsPrintf ("// ACPI Warning: Invalid FADT revision: 0\n"); - return; - - case 1: - - ExpectedLength = ACPI_FADT_V1_SIZE; - break; - - case 2: - - ExpectedLength = ACPI_FADT_V2_SIZE; - break; - - case 3: - case 4: - - ExpectedLength = ACPI_FADT_V3_SIZE; - break; - - case 5: - - ExpectedLength = ACPI_FADT_V5_SIZE; - break; - - default: - - return; - } - - if (Length == ExpectedLength) - { - return; - } - - AcpiOsPrintf ( - "\n// ACPI Warning: FADT revision %X does not match length: " - "found %X expected %X\n", - Revision, Length, ExpectedLength); } Modified: head/sys/contrib/dev/acpica/common/dmtbinfo.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtbinfo.c Tue Oct 4 20:26:18 2016 (r306685) +++ head/sys/contrib/dev/acpica/common/dmtbinfo.c Tue Oct 4 20:27:15 2016 (r306686) @@ -106,6 +106,7 @@ #define ACPI_NFIT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_NFIT,f) #define ACPI_PCCT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_PCCT,f) #define ACPI_PMTT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_PMTT,f) +#define ACPI_RASF_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_RASF,f) #define ACPI_S3PT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_S3PT,f) #define ACPI_SBST_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SBST,f) #define ACPI_SLIT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SLIT,f) @@ -399,7 +400,7 @@ ACPI_DMTABLE_INFO AcpiDmTableI * ******************************************************************************/ -/* ACPI 1.0 FADT (Version 1) */ +/* FADT version 1 (ACPI 1.0) */ ACPI_DMTABLE_INFO AcpiDmTableInfoFadt1[] = { @@ -485,18 +486,7 @@ ACPI_DMTABLE_INFO AcpiDmTableI ACPI_DMT_TERMINATOR }; -/* ACPI 1.0 MS Extensions (FADT version 2) */ - -ACPI_DMTABLE_INFO AcpiDmTableInfoFadt2[] = -{ - {ACPI_DMT_GAS, ACPI_FADT_OFFSET (ResetRegister), "Reset Register", 0}, - {ACPI_DMT_UINT8, ACPI_FADT_OFFSET (ResetValue), "Value to cause reset", 0}, - {ACPI_DMT_UINT16, ACPI_FADT_OFFSET (ArmBootFlags), "Reserved", 0}, - {ACPI_DMT_UINT8, ACPI_FADT_OFFSET (MinorRevision), "Reserved", 0}, - ACPI_DMT_TERMINATOR -}; - -/* ACPI 2.0+ Extensions (FADT version 3, 4, and 5) */ +/* FADT version 3 (ACPI 2.0) */ ACPI_DMTABLE_INFO AcpiDmTableInfoFadt3[] = { @@ -520,16 +510,23 @@ ACPI_DMTABLE_INFO AcpiDmTableI ACPI_DMT_TERMINATOR }; -/* ACPI 5.0 Extensions (FADT version 5) */ +/* FADT version 4 (ACPI 3.0 and ACPI 4.0) */ -ACPI_DMTABLE_INFO AcpiDmTableInfoFadt5[] = +ACPI_DMTABLE_INFO AcpiDmTableInfoFadt4[] = { {ACPI_DMT_GAS, ACPI_FADT_OFFSET (SleepControl), "Sleep Control Register", 0}, + ACPI_DMT_TERMINATOR +}; + +/* FADT version 5 (ACPI 5.0) */ + +ACPI_DMTABLE_INFO AcpiDmTableInfoFadt5[] = +{ {ACPI_DMT_GAS, ACPI_FADT_OFFSET (SleepStatus), "Sleep Status Register", 0}, ACPI_DMT_TERMINATOR }; -/* ACPI 6.0 Extensions (FADT version 6) */ +/* FADT version 6 (ACPI 6.0) */ ACPI_DMTABLE_INFO AcpiDmTableInfoFadt6[] = { @@ -2440,6 +2437,18 @@ ACPI_DMTABLE_INFO AcpiDmTableI /******************************************************************************* * + * RASF - RAS Feature table + * + ******************************************************************************/ + +ACPI_DMTABLE_INFO AcpiDmTableInfoRasf[] = +{ + {ACPI_DMT_BUF12, ACPI_RASF_OFFSET (ChannelId[0]), "Channel ID", 0}, + ACPI_DMT_TERMINATOR +}; + +/******************************************************************************* + * * S3PT - S3 Performance Table * ******************************************************************************/ Modified: head/sys/contrib/dev/acpica/common/getopt.c ============================================================================== --- head/sys/contrib/dev/acpica/common/getopt.c Tue Oct 4 20:26:18 2016 (r306685) +++ head/sys/contrib/dev/acpica/common/getopt.c Tue Oct 4 20:27:15 2016 (r306686) @@ -57,7 +57,7 @@ #include #define ACPI_OPTION_ERROR(msg, badchar) \ - if (AcpiGbl_Opterr) {AcpiLogError ("%s%c\n", msg, badchar);} + if (AcpiGbl_Opterr) {fprintf (stderr, "%s%c\n", msg, badchar);} int AcpiGbl_Opterr = 1; @@ -101,7 +101,7 @@ AcpiGetoptArgument ( } else if (++AcpiGbl_Optind >= argc) { - ACPI_OPTION_ERROR ("Option requires an argument: -", 'v'); + ACPI_OPTION_ERROR ("\nOption requires an argument", 0); CurrentCharPtr = 1; return (-1); Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompiler.h Tue Oct 4 20:26:18 2016 (r306685) +++ head/sys/contrib/dev/acpica/compiler/aslcompiler.h Tue Oct 4 20:27:15 2016 (r306686) @@ -62,7 +62,6 @@ #include #include -#include #include #include #include @@ -912,7 +911,7 @@ LkFindUnreferencedObjects ( void); /* - * aslmain - startup + * aslhelp - help screens */ void Usage ( @@ -922,6 +921,10 @@ void AslFilenameHelp ( void); +void +AslDisassemblyHelp ( + void); + /* * aslnamesp - namespace output file generation Modified: head/sys/contrib/dev/acpica/compiler/aslcstyle.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcstyle.y Tue Oct 4 20:26:18 2016 (r306685) +++ head/sys/contrib/dev/acpica/compiler/aslcstyle.y Tue Oct 4 20:27:15 2016 (r306686) @@ -82,6 +82,13 @@ NoEcho(' * 13) = += -= *= /= %= <<= >>= &= ^= |= */ + +/******************************************************************************* + * + * Basic operations for math and logical expressions. + * + ******************************************************************************/ + Expression /* Unary operators */ @@ -140,33 +147,43 @@ Expression | TermArg PARSEOP_EXP_LOGICAL_OR {$$ = TrCreateLeafNode (PARSEOP_LOR);} TermArg {$$ = TrLinkChildren ($3,2,$1,$4);} - /* Parentheses */ + /* Parentheses */ | '(' TermArg ')' { $$ = $2;} - /* Index term -- "= BUF1[5]" on right-hand side of an equals (source) */ + /* Index term -- "= BUF1[5]" on right-hand side of an equals (source) */ - | SuperName PARSEOP_EXP_INDEX_LEFT TermArg PARSEOP_EXP_INDEX_RIGHT - {$$ = TrCreateLeafNode (PARSEOP_INDEX); + | SuperName PARSEOP_EXP_INDEX_LEFT + TermArg PARSEOP_EXP_INDEX_RIGHT {$$ = TrCreateLeafNode (PARSEOP_INDEX); TrLinkChildren ($$,3,$1,$3,TrCreateNullTarget ());} ; - /* Index term -- "BUF1[5] = " on left-hand side of an equals (target) */ + /* Index term -- "BUF1[5] = " on left-hand side of an equals (target) */ IndexExpTerm - : SuperName PARSEOP_EXP_INDEX_LEFT TermArg PARSEOP_EXP_INDEX_RIGHT - {$$ = TrCreateLeafNode (PARSEOP_INDEX); + : SuperName PARSEOP_EXP_INDEX_LEFT + TermArg PARSEOP_EXP_INDEX_RIGHT {$$ = TrCreateLeafNode (PARSEOP_INDEX); TrLinkChildren ($$,3,$1,$3,TrCreateNullTarget ());} ; + +/******************************************************************************* + * + * All assignment-type operations -- math and logical. Includes simple + * assignment and compound assignments. + * + ******************************************************************************/ + EqualsTerm - /* All assignment-type operations */ + /* Simple Store() operation */ : SuperName PARSEOP_EXP_EQUALS TermArg {$$ = TrCreateAssignmentNode ($1, $3);} + /* Compound assignments -- Add (operand, operand, target) */ + | TermArg PARSEOP_EXP_ADD_EQ {$$ = TrCreateLeafNode (PARSEOP_ADD);} TermArg {$$ = TrLinkChildren ($3,3,$1,$4, TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));} Copied and modified: head/sys/contrib/dev/acpica/compiler/aslhelp.c (from r305162, vendor-sys/acpica/dist/source/compiler/aslhelp.c) ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslhelp.c Wed Aug 31 21:40:51 2016 (r305162, copy source) +++ head/sys/contrib/dev/acpica/compiler/aslhelp.c Tue Oct 4 20:27:15 2016 (r306686) @@ -41,8 +41,8 @@ * POSSIBILITY OF SUCH DAMAGES. */ -#include "aslcompiler.h" -#include "acapps.h" +#include +#include #define _COMPONENT ACPI_COMPILER ACPI_MODULE_NAME ("aslhelp") Copied: head/sys/contrib/dev/acpica/compiler/aslhelpers.y (from r303639, vendor-sys/acpica/dist/source/compiler/aslhelpers.y) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/dev/acpica/compiler/aslhelpers.y Tue Oct 4 20:27:15 2016 (r306686, copy of r303639, vendor-sys/acpica/dist/source/compiler/aslhelpers.y) @@ -0,0 +1,286 @@ +NoEcho(' +/****************************************************************************** + * + * Module Name: aslhelpers.y - helper and option terms + * + *****************************************************************************/ + +/* + * Copyright (C) 2000 - 2016, Intel Corp. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * 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 MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES. + */ + +') + + +/******************************************************************************* + * + * ASL Helper Terms + * + ******************************************************************************/ + +OptionalBusMasterKeyword + : ',' {$$ = TrCreateLeafNode ( + PARSEOP_BUSMASTERTYPE_MASTER);} + | ',' PARSEOP_BUSMASTERTYPE_MASTER {$$ = TrCreateLeafNode ( + PARSEOP_BUSMASTERTYPE_MASTER);} *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Oct 4 20:53:54 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79006AF5384; Tue, 4 Oct 2016 20:53:54 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 6242EC89; Tue, 4 Oct 2016 20:53:53 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id u94KrqsU015669 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 4 Oct 2016 13:53:52 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id u94Krqio015668; Tue, 4 Oct 2016 13:53:52 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 4 Oct 2016 13:53:52 -0700 From: Gleb Smirnoff To: Hiren Panchasara Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306337 - head/sys/kern Message-ID: <20161004205352.GM23123@FreeBSD.org> References: <201609261013.u8QADwrV002892@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201609261013.u8QADwrV002892@repo.freebsd.org> User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 20:53:54 -0000 Hiren, On Mon, Sep 26, 2016 at 10:13:58AM +0000, Hiren Panchasara wrote: H> Author: hiren H> Date: Mon Sep 26 10:13:58 2016 H> New Revision: 306337 H> URL: https://svnweb.freebsd.org/changeset/base/306337 H> H> Log: H> In sendit(), if mp->msg_control is present, then in sockargs() we are allocating H> mbuf to store mp->msg_control. Later in kern_sendit(), call to getsock_cap(), H> will check validity of file pointer passed, if this fails EBADF is returned but H> mbuf allocated in sockargs() is not freed. Fix this possible leak. H> H> Submitted by: Lohith Bellad H> Reviewed by: adrian H> MFC after: 3 weeks H> Differential Revision: https://reviews.freebsd.org/D7910 The commit appeared to be incorrect, but a problem exists. I'd like to look at it. Is there any reproduce recipe for the leak or bug filed? -- Totus tuus, Glebius. From owner-svn-src-all@freebsd.org Tue Oct 4 20:54:51 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D0C47AF53FE; Tue, 4 Oct 2016 20:54:51 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9B8AFE43; Tue, 4 Oct 2016 20:54:51 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u94Kso0I051861; Tue, 4 Oct 2016 20:54:50 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u94KsoG1051852; Tue, 4 Oct 2016 20:54:50 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201610042054.u94KsoG1051852@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Tue, 4 Oct 2016 20:54:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r306687 - in vendor/byacc/dist: . package package/debian package/pkgsrc test test/btyacc test/yacc X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 20:54:51 -0000 Author: jkim Date: Tue Oct 4 20:54:49 2016 New Revision: 306687 URL: https://svnweb.freebsd.org/changeset/base/306687 Log: Import byacc 20160606. Modified: vendor/byacc/dist/CHANGES vendor/byacc/dist/MANIFEST vendor/byacc/dist/VERSION vendor/byacc/dist/aclocal.m4 vendor/byacc/dist/btyaccpar.c vendor/byacc/dist/btyaccpar.skel vendor/byacc/dist/configure vendor/byacc/dist/defs.h vendor/byacc/dist/error.c vendor/byacc/dist/lalr.c vendor/byacc/dist/lr0.c vendor/byacc/dist/mkpar.c vendor/byacc/dist/output.c vendor/byacc/dist/package/byacc.spec vendor/byacc/dist/package/debian/changelog vendor/byacc/dist/package/mingw-byacc.spec vendor/byacc/dist/package/pkgsrc/Makefile vendor/byacc/dist/reader.c vendor/byacc/dist/skel2c vendor/byacc/dist/test/btyacc/btyacc_calc1.tab.c vendor/byacc/dist/test/btyacc/btyacc_demo.error vendor/byacc/dist/test/btyacc/btyacc_demo.output vendor/byacc/dist/test/btyacc/btyacc_demo.tab.c vendor/byacc/dist/test/btyacc/btyacc_destroy1.tab.c vendor/byacc/dist/test/btyacc/btyacc_destroy2.tab.c vendor/byacc/dist/test/btyacc/btyacc_destroy3.tab.c vendor/byacc/dist/test/btyacc/calc.tab.c vendor/byacc/dist/test/btyacc/calc1.tab.c vendor/byacc/dist/test/btyacc/calc2.tab.c vendor/byacc/dist/test/btyacc/calc3.tab.c vendor/byacc/dist/test/btyacc/code_calc.code.c vendor/byacc/dist/test/btyacc/code_calc.tab.c vendor/byacc/dist/test/btyacc/code_calc.tab.h vendor/byacc/dist/test/btyacc/code_error.code.c vendor/byacc/dist/test/btyacc/empty.tab.c vendor/byacc/dist/test/btyacc/err_inherit1.tab.c vendor/byacc/dist/test/btyacc/err_inherit2.tab.c vendor/byacc/dist/test/btyacc/err_inherit3.output vendor/byacc/dist/test/btyacc/err_inherit3.tab.c vendor/byacc/dist/test/btyacc/err_inherit4.output vendor/byacc/dist/test/btyacc/err_inherit4.tab.c vendor/byacc/dist/test/btyacc/err_inherit5.tab.c vendor/byacc/dist/test/btyacc/err_syntax1.tab.c vendor/byacc/dist/test/btyacc/err_syntax10.tab.c vendor/byacc/dist/test/btyacc/err_syntax11.tab.c vendor/byacc/dist/test/btyacc/err_syntax12.tab.c vendor/byacc/dist/test/btyacc/err_syntax13.tab.c vendor/byacc/dist/test/btyacc/err_syntax14.tab.c vendor/byacc/dist/test/btyacc/err_syntax15.tab.c vendor/byacc/dist/test/btyacc/err_syntax16.tab.c vendor/byacc/dist/test/btyacc/err_syntax17.tab.c vendor/byacc/dist/test/btyacc/err_syntax18.tab.c vendor/byacc/dist/test/btyacc/err_syntax19.tab.c vendor/byacc/dist/test/btyacc/err_syntax2.tab.c vendor/byacc/dist/test/btyacc/err_syntax20.tab.c vendor/byacc/dist/test/btyacc/err_syntax21.tab.c vendor/byacc/dist/test/btyacc/err_syntax22.tab.c vendor/byacc/dist/test/btyacc/err_syntax23.tab.c vendor/byacc/dist/test/btyacc/err_syntax24.error vendor/byacc/dist/test/btyacc/err_syntax24.tab.c vendor/byacc/dist/test/btyacc/err_syntax25.tab.c vendor/byacc/dist/test/btyacc/err_syntax26.tab.c vendor/byacc/dist/test/btyacc/err_syntax27.tab.c vendor/byacc/dist/test/btyacc/err_syntax3.tab.c vendor/byacc/dist/test/btyacc/err_syntax4.tab.c vendor/byacc/dist/test/btyacc/err_syntax5.tab.c vendor/byacc/dist/test/btyacc/err_syntax6.tab.c vendor/byacc/dist/test/btyacc/err_syntax7.tab.c vendor/byacc/dist/test/btyacc/err_syntax7a.tab.c vendor/byacc/dist/test/btyacc/err_syntax7b.tab.c vendor/byacc/dist/test/btyacc/err_syntax8.tab.c vendor/byacc/dist/test/btyacc/err_syntax8a.tab.c vendor/byacc/dist/test/btyacc/err_syntax9.tab.c vendor/byacc/dist/test/btyacc/error.tab.c vendor/byacc/dist/test/btyacc/grammar.tab.c vendor/byacc/dist/test/btyacc/inherit0.tab.c vendor/byacc/dist/test/btyacc/inherit1.tab.c vendor/byacc/dist/test/btyacc/inherit2.output vendor/byacc/dist/test/btyacc/inherit2.tab.c vendor/byacc/dist/test/btyacc/ok_syntax1.tab.c vendor/byacc/dist/test/btyacc/pure_calc.tab.c vendor/byacc/dist/test/btyacc/pure_error.tab.c vendor/byacc/dist/test/btyacc/quote_calc-s.tab.c vendor/byacc/dist/test/btyacc/quote_calc.tab.c vendor/byacc/dist/test/btyacc/quote_calc2-s.tab.c vendor/byacc/dist/test/btyacc/quote_calc2.tab.c vendor/byacc/dist/test/btyacc/quote_calc3-s.tab.c vendor/byacc/dist/test/btyacc/quote_calc3.tab.c vendor/byacc/dist/test/btyacc/quote_calc4-s.tab.c vendor/byacc/dist/test/btyacc/quote_calc4.tab.c vendor/byacc/dist/test/btyacc/rename_debug.c vendor/byacc/dist/test/btyacc/varsyntax_calc1.tab.c vendor/byacc/dist/test/code_calc.y vendor/byacc/dist/test/err_inherit4.y vendor/byacc/dist/test/run_make.sh vendor/byacc/dist/test/yacc/calc.tab.c vendor/byacc/dist/test/yacc/calc1.tab.c vendor/byacc/dist/test/yacc/calc2.tab.c vendor/byacc/dist/test/yacc/calc3.tab.c vendor/byacc/dist/test/yacc/code_calc.code.c vendor/byacc/dist/test/yacc/code_calc.tab.c vendor/byacc/dist/test/yacc/code_calc.tab.h vendor/byacc/dist/test/yacc/code_error.code.c vendor/byacc/dist/test/yacc/empty.tab.c vendor/byacc/dist/test/yacc/err_syntax10.tab.c vendor/byacc/dist/test/yacc/err_syntax11.tab.c vendor/byacc/dist/test/yacc/err_syntax12.tab.c vendor/byacc/dist/test/yacc/err_syntax18.tab.c vendor/byacc/dist/test/yacc/err_syntax20.tab.c vendor/byacc/dist/test/yacc/err_syntax24.error vendor/byacc/dist/test/yacc/error.tab.c vendor/byacc/dist/test/yacc/grammar.tab.c vendor/byacc/dist/test/yacc/ok_syntax1.tab.c vendor/byacc/dist/test/yacc/pure_calc.tab.c vendor/byacc/dist/test/yacc/pure_error.tab.c vendor/byacc/dist/test/yacc/quote_calc-s.tab.c vendor/byacc/dist/test/yacc/quote_calc.tab.c vendor/byacc/dist/test/yacc/quote_calc2-s.tab.c vendor/byacc/dist/test/yacc/quote_calc2.tab.c vendor/byacc/dist/test/yacc/quote_calc3-s.tab.c vendor/byacc/dist/test/yacc/quote_calc3.tab.c vendor/byacc/dist/test/yacc/quote_calc4-s.tab.c vendor/byacc/dist/test/yacc/quote_calc4.tab.c vendor/byacc/dist/test/yacc/rename_debug.c vendor/byacc/dist/test/yacc/varsyntax_calc1.tab.c vendor/byacc/dist/verbose.c vendor/byacc/dist/yaccpar.c vendor/byacc/dist/yaccpar.skel Modified: vendor/byacc/dist/CHANGES ============================================================================== --- vendor/byacc/dist/CHANGES Tue Oct 4 20:27:15 2016 (r306686) +++ vendor/byacc/dist/CHANGES Tue Oct 4 20:54:49 2016 (r306687) @@ -1,3 +1,82 @@ +2016-06-06 Thomas E. Dickey + + * configure: regen + + * aclocal.m4: improved autoconf macros: + CF_CC_ENV_FLAGS - don't limit the check to -I, -U and -D options, since the + added options can include various compiler options before and after + preprocessor options. + CF_PROG_LINT - add cpplint to programs to use; drop ad hoc tdlint and alint. + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + + * lalr.c: indented + + * btyaccpar.c: regen + + * skel2c: + adjust whitespace so that generated skeleton will follow the same format + as other code + + * mkpar.c, verbose.c, lr0.c, reader.c, error.c, output.c: indented + + * reader.c: fix two compiler warnings + + * test/btyacc/inherit2.tab.c, test/btyacc/ok_syntax1.tab.c, test/btyacc/pure_calc.tab.c, test/btyacc/pure_error.tab.c, test/btyacc/quote_calc-s.tab.c, test/btyacc/quote_calc.tab.c, test/btyacc/quote_calc2-s.tab.c, test/btyacc/quote_calc2.tab.c, test/btyacc/quote_calc3-s.tab.c, test/btyacc/quote_calc3.tab.c, test/btyacc/quote_calc4-s.tab.c, test/btyacc/quote_calc4.tab.c, test/btyacc/varsyntax_calc1.tab.c, test/btyacc/err_syntax12.tab.c, test/btyacc/err_syntax18.tab.c, test/btyacc/err_syntax20.tab.c, test/btyacc/error.tab.c, test/btyacc/grammar.tab.c, test/btyacc/inherit0.tab.c, test/btyacc/inherit1.tab.c, test/btyacc/btyacc_calc1.tab.c, test/btyacc/btyacc_demo.tab.c, test/btyacc/btyacc_destroy1.tab.c, test/btyacc/btyacc_destroy2.tab.c, test/btyacc/btyacc_destroy3.tab.c, test/btyacc/calc.tab.c, test/btyacc/calc1.tab.c, test/btyacc/calc2.tab.c, test/btyacc/calc3.tab.c, test/btyacc/code_calc.code.c, test/btyacc/code_error.code.c, test/btyacc/empty.tab.c, test/btyacc/err_inherit3.tab.c, test/btyacc/err_inherit4.tab.c, test/btyacc/err_syntax10.tab.c, test/btyacc/err_syntax11.tab.c, test/btyacc/rename_debug.c, btyaccpar.c, test/yacc/quote_calc2-s.tab.c, test/yacc/quote_calc2.tab.c, test/yacc/quote_calc3-s.tab.c, test/yacc/quote_calc3.tab.c, test/yacc/quote_calc4-s.tab.c, test/yacc/quote_calc4.tab.c, test/yacc/varsyntax_calc1.tab.c, test/yacc/err_syntax20.tab.c, test/yacc/error.tab.c, test/yacc/grammar.tab.c, test/yacc/ok_syntax1.tab.c, test/yacc/pure_calc.tab.c, test/yacc/pure_error.tab.c, test/yacc/quote_calc-s.tab.c, test/yacc/quote_calc.tab.c, test/yacc/calc.tab.c, test/yacc/calc1.tab.c, test/yacc/calc2.tab.c, test/yacc/calc3.tab.c, test/yacc/code_calc.code.c, test/yacc/code_error.code.c, test/yacc/empty.tab.c, test/yacc/err_syntax10.tab.c, test/yacc/err_syntax11.tab.c, test/yacc/err_syntax12.tab.c, test/yacc/err_syntax18.tab.c, test/yacc/rename_debug.c, yaccpar.c: + regen + +2016-06-06 Tom.Shields + + * btyaccpar.skel, yaccpar.skel: + small fix for an edge case of initialized data in Chris Dodd's btyacc changes: + "Avoid crash when input pops up an Action error at the first token" + +2016-06-01 Thomas E. Dickey + + * test/yacc/quote_calc2-s.tab.c, test/yacc/quote_calc3-s.tab.c, test/yacc/quote_calc3.tab.c, test/yacc/quote_calc4-s.tab.c, test/yacc/quote_calc4.tab.c, test/yacc/varsyntax_calc1.tab.c, test/yacc/err_syntax18.tab.c, test/yacc/err_syntax20.tab.c, test/yacc/err_syntax24.error, test/yacc/error.tab.c, test/yacc/grammar.tab.c, test/yacc/ok_syntax1.tab.c, test/yacc/pure_calc.tab.c, test/yacc/pure_error.tab.c, test/yacc/quote_calc-s.tab.c, test/yacc/quote_calc.tab.c, test/yacc/quote_calc2.tab.c, test/yacc/calc.tab.c, test/yacc/calc1.tab.c, test/yacc/calc2.tab.c, test/yacc/calc3.tab.c, test/yacc/code_calc.code.c, test/yacc/code_calc.tab.c, test/yacc/code_calc.tab.h, test/yacc/code_error.code.c, test/yacc/empty.tab.c, test/yacc/err_syntax10.tab.c, test/yacc/err_syntax11.tab.c, test/yacc/err_syntax12.tab.c, test/yacc/rename_debug.c, yaccpar.c, test/btyacc/quote_calc-s.tab.c, test/btyacc/quote_calc.tab.c, test/btyacc/quote_calc2-s.tab.c, test/btyacc/quote_calc2.tab.c, test/btyacc/quote_calc3- s.tab.c, test/btyacc/quote_calc3.tab.c, test/btyacc/quote_calc4-s.tab.c, test/btyacc/quote_calc4.tab.c, test/btyacc/varsyntax_calc1.tab.c, test/btyacc/err_syntax13.tab.c, test/btyacc/err_syntax14.tab.c, test/btyacc/err_syntax15.tab.c, test/btyacc/err_syntax16.tab.c, test/btyacc/err_syntax17.tab.c, test/btyacc/err_syntax18.tab.c, test/btyacc/err_syntax19.tab.c, test/btyacc/err_syntax2.tab.c, test/btyacc/err_syntax20.tab.c, test/btyacc/err_syntax21.tab.c, test/btyacc/err_syntax22.tab.c, test/btyacc/err_syntax23.tab.c, test/btyacc/err_syntax24.error, test/btyacc/err_syntax24.tab.c, test/btyacc/err_syntax25.tab.c, test/btyacc/err_syntax26.tab.c, test/btyacc/err_syntax27.tab.c, test/btyacc/err_syntax3.tab.c, test/btyacc/err_syntax4.tab.c, test/btyacc/err_syntax5.tab.c, test/btyacc/err_syntax6.tab.c, test/btyacc/err_syntax7.tab.c, test/btyacc/err_syntax7a.tab.c, test/btyacc/err_syntax7b.tab.c, test/btyacc/err_syntax8.tab.c, test/btyacc/err_syntax8a.tab.c, test/btyacc/err_syntax9.tab.c, te st/btyacc/error.tab.c, test/btyacc/grammar.t! ab.c, test/btyacc/inherit0.tab.c, test/btyacc/inherit1.tab.c, test/btyacc/inherit2.output, test/btyacc/inherit2.tab.c, test/btyacc/ok_syntax1.tab.c, test/btyacc/pure_calc.tab.c, test/btyacc/pure_error.tab.c, test/btyacc/btyacc_calc1.tab.c, test/btyacc/btyacc_demo.error, test/btyacc/btyacc_demo.output, test/btyacc/btyacc_demo.tab.c, test/btyacc/btyacc_destroy1.tab.c, test/btyacc/btyacc_destroy2.tab.c, test/btyacc/btyacc_destroy3.tab.c, test/btyacc/calc.tab.c, test/btyacc/calc1.tab.c, test/btyacc/calc2.tab.c, test/btyacc/calc3.tab.c, test/btyacc/code_calc.code.c, test/btyacc/code_calc.tab.c, test/btyacc/code_calc.tab.h, test/btyacc/code_error.code.c, test/btyacc/empty.tab.c, test/btyacc/err_inherit1.tab.c, test/btyacc/err_inherit2.tab.c, test/btyacc/err_inherit3.output, test/btyacc/err_inherit3.tab.c, test/btyacc/err_inherit4.output, test/btyacc/err_inherit4.tab.c, test/btyacc/err_inherit5.tab.c, test/btyacc/err_syntax1.tab.c, test/btyacc/err_syntax10.tab.c, test/btyacc/err_syntax11.t ab.c, test/btyacc/err_syntax12.tab.c, test/btyacc/rename_debug.c, btyaccpar.c: + regen + +2016-06-01 Tom.Shields + + * btyaccpar.skel, defs.h, error.c, output.c, reader.c, test/code_calc.y, test/err_inherit4.y, test/run_make.sh, yaccpar.skel: + fixes for issues in btyacc (report by Francis Andre): + + + correction to the placement of the #line directive for a %union specification + + + recovery of a set of casts originally added into btyaccpar.c rather than into + btyaccpar.skel, and so are lost whenever building from scratch + + + Chris Dodd's btyacc improved handling of inherited attributes to eliminate + implicit empty copy rules that are not necessary, and thereby avoiding the + introduction of extra parsing ambiguity + + + Chris Dodd's added support for @-N syntax to reference inherited position + information + + + correction to bad interaction between %token-table and YYDEBUG, where YYDEBUG + was required to be defined in order to compile the generated code + + + correction to yyname[] access in code included with YYDEBUG defined for + single character symbols not recognized (e.g., input containing '&' character + where grammar doesn't define that as a symbol) - map to existing + "illegal-symbol" entry in byname[] + + + fixes to test/run_make.sh: skip test-err_* files; in the bison test phase + skip additional files that contain features not supported by bison and + inhibit new bison warning messages + + + minor changes to btyaccpar.skel & yaccpar.skel so they are more similar in + their commonality; makes it easier to maintain the pair of files using + vimdiff + + + changes to a couple of test cases for coverage of #3, #4 and #5 above + +2016-06-01 Thomas E. Dickey + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + 2016-03-24 Thomas E. Dickey * reader.c: unused variable Modified: vendor/byacc/dist/MANIFEST ============================================================================== --- vendor/byacc/dist/MANIFEST Tue Oct 4 20:27:15 2016 (r306686) +++ vendor/byacc/dist/MANIFEST Tue Oct 4 20:54:49 2016 (r306687) @@ -1,4 +1,4 @@ -MANIFEST for byacc-20160324, version t20160324 +MANIFEST for byacc-20160606, version t20160606 -------------------------------------------------------------------------------- MANIFEST this file ACKNOWLEDGEMENTS original version of byacc - 1993 Modified: vendor/byacc/dist/VERSION ============================================================================== --- vendor/byacc/dist/VERSION Tue Oct 4 20:27:15 2016 (r306686) +++ vendor/byacc/dist/VERSION Tue Oct 4 20:54:49 2016 (r306687) @@ -1 +1 @@ -20160324 +20160606 Modified: vendor/byacc/dist/aclocal.m4 ============================================================================== --- vendor/byacc/dist/aclocal.m4 Tue Oct 4 20:27:15 2016 (r306686) +++ vendor/byacc/dist/aclocal.m4 Tue Oct 4 20:54:49 2016 (r306687) @@ -1,4 +1,4 @@ -dnl $Id: aclocal.m4,v 1.39 2016/03/25 00:06:44 tom Exp $ +dnl $Id: aclocal.m4,v 1.40 2016/06/07 00:48:07 tom Exp $ dnl Macros for byacc configure script (Thomas E. Dickey) dnl --------------------------------------------------------------------------- dnl Copyright 2004-2015,2016 Thomas E. Dickey @@ -171,11 +171,15 @@ ifelse([$3],,[ :]dnl ])dnl ])])dnl dnl --------------------------------------------------------------------------- -dnl CF_CC_ENV_FLAGS version: 2 updated: 2015/04/12 15:39:00 +dnl CF_CC_ENV_FLAGS version: 3 updated: 2016/05/21 18:10:17 dnl --------------- dnl Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content dnl into CC. This will not help with broken scripts that wrap the compiler with dnl options, but eliminates a more common category of user confusion. +dnl +dnl Caveat: this also disallows blanks in the pathname for the compiler, but +dnl the nuisance of having inconsistent settings for compiler and preprocessor +dnl outweighs that limitation. AC_DEFUN([CF_CC_ENV_FLAGS], [ # This should have been defined by AC_PROG_CC @@ -183,13 +187,16 @@ AC_DEFUN([CF_CC_ENV_FLAGS], AC_MSG_CHECKING(\$CC variable) case "$CC" in -(*[[\ \ ]]-[[IUD]]*) +(*[[\ \ ]]-*) AC_MSG_RESULT(broken) AC_MSG_WARN(your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options) # humor him... - cf_flags=`echo "$CC" | sed -e 's/^[[^ ]]*[[ ]]//'` + cf_flags=`echo "$CC" | sed -e 's/^[[^ ]]*[[ ]][[ ]]*//'` CC=`echo "$CC" | sed -e 's/[[ ]].*//'` CF_ADD_CFLAGS($cf_flags) + CF_VERBOSE(resulting CC: '$CC') + CF_VERBOSE(resulting CFLAGS: '$CFLAGS') + CF_VERBOSE(resulting CPPFLAGS: '$CPPFLAGS') ;; (*) AC_MSG_RESULT(ok) @@ -1010,11 +1017,11 @@ AC_SUBST(GROFF_NOTE) AC_SUBST(NROFF_NOTE) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_PROG_LINT version: 2 updated: 2009/08/12 04:43:14 +dnl CF_PROG_LINT version: 3 updated: 2016/05/22 15:25:54 dnl ------------ AC_DEFUN([CF_PROG_LINT], [ -AC_CHECK_PROGS(LINT, tdlint lint alint splint lclint) +AC_CHECK_PROGS(LINT, lint cppcheck splint) AC_SUBST(LINT_OPTS) ])dnl dnl --------------------------------------------------------------------------- Modified: vendor/byacc/dist/btyaccpar.c ============================================================================== --- vendor/byacc/dist/btyaccpar.c Tue Oct 4 20:27:15 2016 (r306686) +++ vendor/byacc/dist/btyaccpar.c Tue Oct 4 20:54:49 2016 (r306687) @@ -2,7 +2,7 @@ * @Id: skel2c,v 1.3 2014/04/06 19:48:04 tom Exp @ */ -/* @Id: btyaccpar.skel,v 1.1 2014/04/02 22:44:41 tom Exp @ */ +/* @Id: btyaccpar.skel,v 1.3 2016/06/06 23:35:55 Tom.Shields Exp @ */ #include "defs.h" @@ -18,7 +18,7 @@ const char *const banner[] = { "/* original parser id follows */", "/* yysccsid[] = \"@(#)yaccpar 1.9 (Berkeley) 02/21/93\" */", - "/* (use YYMAJOR/YYMINOR for ifdefs dependent of parser version) */", + "/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */", "", "#define YYBYACC 1", CONCAT1("#define YYMAJOR ", YYMAJOR), @@ -66,8 +66,10 @@ const char *const tables[] = "#endif /* YYBTYACC */", #endif /* defined(YYBTYACC) */ "", - "#if YYDEBUG", + "#if YYDEBUG || defined(yytname)", "extern const char *const yyname[];", + "#endif", + "#if YYDEBUG", "extern const char *const yyrule[];", "#endif", 0 @@ -148,9 +150,9 @@ const char *const hdr_defs[] = "", "typedef struct {", " unsigned stacksize;", - " short *s_base;", - " short *s_mark;", - " short *s_last;", + " YYINT *s_base;", + " YYINT *s_mark;", + " YYINT *s_last;", " YYSTYPE *l_base;", " YYSTYPE *l_mark;", "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", @@ -293,18 +295,18 @@ const char *const body_1[] = #endif /* defined(YYBTYACC) */ "", "#if YYDEBUG", - "#include /* needed for printf */", + "#include /* needed for printf */", "#endif", "", - "#include /* needed for malloc, etc */", - "#include /* needed for memset */", + "#include /* needed for malloc, etc */", + "#include /* needed for memset */", "", "/* allocate initial stack or double stack size, up to YYMAXDEPTH */", "static int yygrowstack(YYSTACKDATA *data)", "{", " int i;", " unsigned newsize;", - " short *newss;", + " YYINT *newss;", " YYSTYPE *newvs;", "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", " YYLTYPE *newps;", @@ -318,7 +320,7 @@ const char *const body_1[] = " newsize = YYMAXDEPTH;", "", " i = (int) (data->s_mark - data->s_base);", - " newss = (short *)realloc(data->s_base, newsize * sizeof(*newss));", + " newss = (YYINT *)realloc(data->s_base, newsize * sizeof(*newss));", " if (newss == 0)", " return YYENOMEM;", "", @@ -383,7 +385,7 @@ const char *const body_1[] = "#endif", " return p;", " }", - " p->yystack.s_base = (short *) malloc(size * sizeof(short));", + " p->yystack.s_base = (YYINT *) malloc(size * sizeof(YYINT));", " if (p->yystack.s_base == NULL) return NULL;", " p->yystack.l_base = (YYSTYPE *) malloc(size * sizeof(YYSTYPE));", " if (p->yystack.l_base == NULL) return NULL;", @@ -455,6 +457,8 @@ const char *const body_2[] = " yyps->save = 0;", "#endif /* YYBTYACC */", #endif /* defined(YYBTYACC) */ + " yym = 0;", + " yyn = 0;", " yynerrs = 0;", " yyerrflag = 0;", " yychar = YYEMPTY;", @@ -532,11 +536,10 @@ const char *const body_2[] = "#endif /* YYBTYACC */", #endif /* defined(YYBTYACC) */ " if (yychar < 0) yychar = YYEOF;", - " /* if ((yychar = YYLEX) < 0) yychar = YYEOF; */", "#if YYDEBUG", " if (yydebug)", " {", - " yys = yyname[YYTRANSLATE(yychar)];", + " if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN];", " fprintf(stderr, \"%s[%d]: state %d, reading token %d (%s)\",", " YYDEBUGSTR, yydepth, yystate, yychar, yys);", "#ifdef YYSTYPE_TOSTRING", @@ -598,7 +601,7 @@ const char *const body_2[] = " save->state = yystate;", " save->errflag = yyerrflag;", " save->yystack.s_mark = save->yystack.s_base + (yystack.s_mark - yystack.s_base);", - " memcpy (save->yystack.s_base, yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(short));", + " memcpy (save->yystack.s_base, yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(YYINT));", " save->yystack.l_mark = save->yystack.l_base + (yystack.l_mark - yystack.l_base);", " memcpy (save->yystack.l_base, yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));", "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", @@ -679,7 +682,7 @@ const char *const body_2[] = " if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM)", " goto yyoverflow;", " yystate = yyctable[ctry];", - " *++yystack.s_mark = (short) yystate;", + " *++yystack.s_mark = (YYINT) yystate;", " *++yystack.l_mark = yylval;", "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", " *++yystack.p_mark = yylloc;", @@ -727,9 +730,18 @@ const char *const body_2[] = "", " yynewerrflag = 1;", " goto yyerrhandler;", - " goto yyerrlab;", + " goto yyerrlab; /* redundant goto avoids 'unused label' warning */", "", "yyerrlab:", + " /* explicit YYERROR from an action -- pop the rhs of the rule reduced", + " * before looking for error recovery */", + " yystack.s_mark -= yym;", + " yystate = *yystack.s_mark;", + " yystack.l_mark -= yym;", + "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", + " yystack.p_mark -= yym;", + "#endif", + "", " yynewerrflag = 0;", "yyerrhandler:", " while (yyps->save)", @@ -754,7 +766,7 @@ const char *const body_2[] = " yyerrctx->state = yystate;", " yyerrctx->errflag = yyerrflag;", " yyerrctx->yystack.s_mark = yyerrctx->yystack.s_base + (yystack.s_mark - yystack.s_base);", - " memcpy (yyerrctx->yystack.s_base, yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(short));", + " memcpy (yyerrctx->yystack.s_base, yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(YYINT));", " yyerrctx->yystack.l_mark = yyerrctx->yystack.l_base + (yystack.l_mark - yystack.l_base);", " memcpy (yyerrctx->yystack.l_base, yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));", "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", @@ -770,7 +782,7 @@ const char *const body_2[] = " yylexp = yylexemes + save->lexeme;", " yychar = YYEMPTY;", " yystack.s_mark = yystack.s_base + (save->yystack.s_mark - save->yystack.s_base);", - " memcpy (yystack.s_base, save->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(short));", + " memcpy (yystack.s_base, save->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(YYINT));", " yystack.l_mark = yystack.l_base + (save->yystack.l_mark - save->yystack.l_base);", " memcpy (yystack.l_base, save->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));", "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", @@ -805,7 +817,7 @@ const char *const body_2[] = " yylloc = yylpp[-1];", "#endif", " yystack.s_mark = yystack.s_base + (yyerrctx->yystack.s_mark - yyerrctx->yystack.s_base);", - " memcpy (yystack.s_base, yyerrctx->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(short));", + " memcpy (yystack.s_base, yyerrctx->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(YYINT));", " yystack.l_mark = yystack.l_base + (yyerrctx->yystack.l_mark - yyerrctx->yystack.l_base);", " memcpy (yystack.l_base, yyerrctx->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));", "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", @@ -828,7 +840,7 @@ const char *const body_2[] = "#endif", "", "#if !YYBTYACC", - " goto yyerrlab;", + " goto yyerrlab; /* redundant goto avoids 'unused label' warning */", "yyerrlab:", "#endif", " ++yynerrs;", @@ -899,7 +911,7 @@ const char *const body_2[] = "#if YYDEBUG", " if (yydebug)", " {", - " yys = yyname[YYTRANSLATE(yychar)];", + " if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN];", " fprintf(stderr, \"%s[%d]: state %d, error recovery discarding token %d (%s)\\n\",", " YYDEBUGSTR, yydepth, yystate, yychar, yys);", " }", @@ -1070,12 +1082,11 @@ const char *const trailer[] = "#endif /* YYBTYACC */", #endif /* defined(YYBTYACC) */ " if (yychar < 0) yychar = YYEOF;", - " /* if ((yychar = YYLEX) < 0) yychar = YYEOF; */", "#if YYDEBUG", " if (yydebug)", " {", - " yys = yyname[YYTRANSLATE(yychar)];", - " fprintf(stderr, \"%s[%d]: state %d, reading %d (%s)\\n\",", + " if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN];", + " fprintf(stderr, \"%s[%d]: state %d, reading token %d (%s)\\n\",", " YYDEBUGSTR, yydepth, YYFINAL, yychar, yys);", " }", "#endif", @@ -1104,7 +1115,7 @@ const char *const trailer[] = " }", "#endif", " if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;", - " *++yystack.s_mark = (short) yystate;", + " *++yystack.s_mark = (YYINT) yystate;", " *++yystack.l_mark = yyval;", "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", " *++yystack.p_mark = yyloc;", @@ -1140,7 +1151,7 @@ const char *const trailer[] = " yylexp = yylexemes + yypath->lexeme;", " yychar = YYEMPTY;", " yystack.s_mark = yystack.s_base + (yypath->yystack.s_mark - yypath->yystack.s_base);", - " memcpy (yystack.s_base, yypath->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(short));", + " memcpy (yystack.s_base, yypath->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(YYINT));", " yystack.l_mark = yystack.l_base + (yypath->yystack.l_mark - yypath->yystack.l_base);", " memcpy (yystack.l_base, yypath->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));", "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", Modified: vendor/byacc/dist/btyaccpar.skel ============================================================================== --- vendor/byacc/dist/btyaccpar.skel Tue Oct 4 20:27:15 2016 (r306686) +++ vendor/byacc/dist/btyaccpar.skel Tue Oct 4 20:54:49 2016 (r306687) @@ -1,4 +1,4 @@ -/* $Id: btyaccpar.skel,v 1.1 2014/04/02 22:44:41 tom Exp $ */ +/* $Id: btyaccpar.skel,v 1.3 2016/06/06 23:35:55 Tom.Shields Exp $ */ #include "defs.h" @@ -45,8 +45,10 @@ extern const YYINT yycheck[]; extern const YYINT yyctable[]; %%endif -#if YYDEBUG +#if YYDEBUG || defined(yytname) extern const char *const yyname[]; +#endif +#if YYDEBUG extern const char *const yyrule[]; #endif %% global_vars @@ -113,9 +115,9 @@ do \ typedef struct { unsigned stacksize; - short *s_base; - short *s_mark; - short *s_last; + YYINT *s_base; + YYINT *s_mark; + YYINT *s_last; YYSTYPE *l_base; YYSTYPE *l_mark; #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) @@ -238,7 +240,7 @@ static short *yylexemes = 0; %%endif #if YYDEBUG -#include /* needed for printf */ +#include /* needed for printf */ #endif #include /* needed for malloc, etc */ @@ -249,7 +251,7 @@ static int yygrowstack(YYSTACKDATA *data { int i; unsigned newsize; - short *newss; + YYINT *newss; YYSTYPE *newvs; #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) YYLTYPE *newps; @@ -263,7 +265,7 @@ static int yygrowstack(YYSTACKDATA *data newsize = YYMAXDEPTH; i = (int) (data->s_mark - data->s_base); - newss = (short *)realloc(data->s_base, newsize * sizeof(*newss)); + newss = (YYINT *)realloc(data->s_base, newsize * sizeof(*newss)); if (newss == 0) return YYENOMEM; @@ -327,7 +329,7 @@ yyNewState(unsigned size) #endif return p; } - p->yystack.s_base = (short *) malloc(size * sizeof(short)); + p->yystack.s_base = (YYINT *) malloc(size * sizeof(YYINT)); if (p->yystack.s_base == NULL) return NULL; p->yystack.l_base = (YYSTYPE *) malloc(size * sizeof(YYSTYPE)); if (p->yystack.l_base == NULL) return NULL; @@ -388,6 +390,8 @@ YYPARSE_DECL() yyps = yyNewState(0); if (yyps == 0) goto yyenomem; yyps->save = 0; %%endif + yym = 0; + yyn = 0; yynerrs = 0; yyerrflag = 0; yychar = YYEMPTY; @@ -427,8 +431,8 @@ yyloop: /* in trial mode; save scanner results for future parse attempts */ if (yylvp == yylvlim) { /* Enlarge lexical value queue */ - int p = yylvp - yylvals; - int s = yylvlim - yylvals; + size_t p = (size_t) (yylvp - yylvals); + size_t s = (size_t) (yylvlim - yylvals); s += YYLVQUEUEGROWTH; if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem; @@ -461,11 +465,10 @@ yyloop: } while (0); %%endif if (yychar < 0) yychar = YYEOF; - /* if ((yychar = YYLEX) < 0) yychar = YYEOF; */ #if YYDEBUG if (yydebug) { - yys = yyname[YYTRANSLATE(yychar)]; + if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN]; fprintf(stderr, "%s[%d]: state %d, reading token %d (%s)", YYDEBUGSTR, yydepth, yystate, yychar, yys); #ifdef YYSTYPE_TOSTRING @@ -524,12 +527,12 @@ yyloop: save->state = yystate; save->errflag = yyerrflag; save->yystack.s_mark = save->yystack.s_base + (yystack.s_mark - yystack.s_base); - memcpy (save->yystack.s_base, yystack.s_base, (yystack.s_mark - yystack.s_base + 1) * sizeof(short)); + memcpy (save->yystack.s_base, yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(YYINT)); save->yystack.l_mark = save->yystack.l_base + (yystack.l_mark - yystack.l_base); - memcpy (save->yystack.l_base, yystack.l_base, (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE)); + memcpy (save->yystack.l_base, yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE)); #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) save->yystack.p_mark = save->yystack.p_base + (yystack.p_mark - yystack.p_base); - memcpy (save->yystack.p_base, yystack.p_base, (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE)); + memcpy (save->yystack.p_base, yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE)); #endif ctry = yytable[yyn]; if (yyctable[ctry] == -1) @@ -584,7 +587,7 @@ yyloop: yylexp--; yychar = YYEMPTY; } - save->lexeme = yylvp - yylvals; + save->lexeme = (int) (yylvp - yylvals); yyps->save = save; } if (yytable[yyn] == ctry) @@ -605,7 +608,7 @@ yyloop: if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow; yystate = yyctable[ctry]; - *++yystack.s_mark = (short) yystate; + *++yystack.s_mark = (YYINT) yystate; *++yystack.l_mark = yylval; #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) *++yystack.p_mark = yylloc; @@ -651,9 +654,18 @@ yyloop: yynewerrflag = 1; goto yyerrhandler; - goto yyerrlab; + goto yyerrlab; /* redundant goto avoids 'unused label' warning */ yyerrlab: + /* explicit YYERROR from an action -- pop the rhs of the rule reduced + * before looking for error recovery */ + yystack.s_mark -= yym; + yystate = *yystack.s_mark; + yystack.l_mark -= yym; +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + yystack.p_mark -= yym; +#endif + yynewerrflag = 0; yyerrhandler: while (yyps->save) @@ -678,14 +690,14 @@ yyerrhandler: yyerrctx->state = yystate; yyerrctx->errflag = yyerrflag; yyerrctx->yystack.s_mark = yyerrctx->yystack.s_base + (yystack.s_mark - yystack.s_base); - memcpy (yyerrctx->yystack.s_base, yystack.s_base, (yystack.s_mark - yystack.s_base + 1) * sizeof(short)); + memcpy (yyerrctx->yystack.s_base, yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(YYINT)); yyerrctx->yystack.l_mark = yyerrctx->yystack.l_base + (yystack.l_mark - yystack.l_base); - memcpy (yyerrctx->yystack.l_base, yystack.l_base, (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE)); + memcpy (yyerrctx->yystack.l_base, yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE)); #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) yyerrctx->yystack.p_mark = yyerrctx->yystack.p_base + (yystack.p_mark - yystack.p_base); - memcpy (yyerrctx->yystack.p_base, yystack.p_base, (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE)); + memcpy (yyerrctx->yystack.p_base, yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE)); #endif - yyerrctx->lexeme = yylvp - yylvals; + yyerrctx->lexeme = (int) (yylvp - yylvals); } yylvp = yylvals + save->lexeme; #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) @@ -694,12 +706,12 @@ yyerrhandler: yylexp = yylexemes + save->lexeme; yychar = YYEMPTY; yystack.s_mark = yystack.s_base + (save->yystack.s_mark - save->yystack.s_base); - memcpy (yystack.s_base, save->yystack.s_base, (yystack.s_mark - yystack.s_base + 1) * sizeof(short)); + memcpy (yystack.s_base, save->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(YYINT)); yystack.l_mark = yystack.l_base + (save->yystack.l_mark - save->yystack.l_base); - memcpy (yystack.l_base, save->yystack.l_base, (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE)); + memcpy (yystack.l_base, save->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE)); #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) yystack.p_mark = yystack.p_base + (save->yystack.p_mark - save->yystack.p_base); - memcpy (yystack.p_base, save->yystack.p_base, (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE)); + memcpy (yystack.p_base, save->yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE)); #endif ctry = ++save->ctry; yystate = save->state; @@ -729,12 +741,12 @@ yyerrhandler: yylloc = yylpp[-1]; #endif yystack.s_mark = yystack.s_base + (yyerrctx->yystack.s_mark - yyerrctx->yystack.s_base); - memcpy (yystack.s_base, yyerrctx->yystack.s_base, (yystack.s_mark - yystack.s_base + 1) * sizeof(short)); + memcpy (yystack.s_base, yyerrctx->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(YYINT)); yystack.l_mark = yystack.l_base + (yyerrctx->yystack.l_mark - yyerrctx->yystack.l_base); - memcpy (yystack.l_base, yyerrctx->yystack.l_base, (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE)); + memcpy (yystack.l_base, yyerrctx->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE)); #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) yystack.p_mark = yystack.p_base + (yyerrctx->yystack.p_mark - yyerrctx->yystack.p_base); - memcpy (yystack.p_base, yyerrctx->yystack.p_base, (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE)); + memcpy (yystack.p_base, yyerrctx->yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE)); #endif yystate = yyerrctx->state; yyFreeState(yyerrctx); @@ -751,7 +763,7 @@ yyerrhandler: #endif #if !YYBTYACC - goto yyerrlab; + goto yyerrlab; /* redundant goto avoids 'unused label' warning */ yyerrlab: #endif ++yynerrs; @@ -820,7 +832,7 @@ yyinrecovery: #if YYDEBUG if (yydebug) { - yys = yyname[YYTRANSLATE(yychar)]; + if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN]; fprintf(stderr, "%s[%d]: state %d, error recovery discarding token %d (%s)\n", YYDEBUGSTR, yydepth, yystate, yychar, yys); } @@ -938,8 +950,8 @@ yyreduce: /* in trial mode; save scanner results for future parse attempts */ if (yylvp == yylvlim) { /* Enlarge lexical value queue */ - int p = yylvp - yylvals; - int s = yylvlim - yylvals; + size_t p = (size_t) (yylvp - yylvals); + size_t s = (size_t) (yylvlim - yylvals); s += YYLVQUEUEGROWTH; if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) @@ -975,12 +987,11 @@ yyreduce: } while (0); %%endif if (yychar < 0) yychar = YYEOF; - /* if ((yychar = YYLEX) < 0) yychar = YYEOF; */ #if YYDEBUG if (yydebug) { - yys = yyname[YYTRANSLATE(yychar)]; - fprintf(stderr, "%s[%d]: state %d, reading %d (%s)\n", + if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN]; + fprintf(stderr, "%s[%d]: state %d, reading token %d (%s)\n", YYDEBUGSTR, yydepth, YYFINAL, yychar, yys); } #endif @@ -1007,7 +1018,7 @@ yyreduce: } #endif if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow; - *++yystack.s_mark = (short) yystate; + *++yystack.s_mark = (YYINT) yystate; *++yystack.l_mark = yyval; #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) *++yystack.p_mark = yyloc; @@ -1042,12 +1053,12 @@ yyvalid: yylexp = yylexemes + yypath->lexeme; yychar = YYEMPTY; yystack.s_mark = yystack.s_base + (yypath->yystack.s_mark - yypath->yystack.s_base); - memcpy (yystack.s_base, yypath->yystack.s_base, (yystack.s_mark - yystack.s_base + 1) * sizeof(short)); + memcpy (yystack.s_base, yypath->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(YYINT)); yystack.l_mark = yystack.l_base + (yypath->yystack.l_mark - yypath->yystack.l_base); - memcpy (yystack.l_base, yypath->yystack.l_base, (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE)); + memcpy (yystack.l_base, yypath->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE)); #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) yystack.p_mark = yystack.p_base + (yypath->yystack.p_mark - yypath->yystack.p_base); - memcpy (yystack.p_base, yypath->yystack.p_base, (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE)); + memcpy (yystack.p_base, yypath->yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE)); #endif yystate = yypath->state; goto yyloop; Modified: vendor/byacc/dist/configure ============================================================================== --- vendor/byacc/dist/configure Tue Oct 4 20:27:15 2016 (r306686) +++ vendor/byacc/dist/configure Tue Oct 4 20:54:49 2016 (r306687) @@ -1,7 +1,7 @@ #! /bin/sh # From configure.in Revision: 1.21 . # Guess values for system-dependent variables and create Makefiles. -# Generated by Autoconf 2.52.20141204. +# Generated by Autoconf 2.52.20150926. # # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. @@ -767,7 +767,7 @@ This file contains any messages produced running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.52.20141204. Invocation command line was +generated by GNU Autoconf 2.52.20150926. Invocation command line was $ $0 $@ @@ -1949,13 +1949,13 @@ esac echo "$as_me:1949: checking \$CC variable" >&5 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6 case "$CC" in -(*[\ \ ]-[IUD]*) +(*[\ \ ]-*) echo "$as_me:1953: result: broken" >&5 echo "${ECHO_T}broken" >&6 { echo "$as_me:1955: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;} # humor him... - cf_flags=`echo "$CC" | sed -e 's/^[^ ]*[ ]//'` + cf_flags=`echo "$CC" | sed -e 's/^[^ ]*[ ][ ]*//'` CC=`echo "$CC" | sed -e 's/[ ].*//'` cf_fix_cppflags=no @@ -2036,14 +2036,26 @@ if test -n "$cf_new_extra_cppflags" ; th EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS" fi + test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6 + +echo "${as_me:-configure}:2041: testing resulting CC: '$CC' ..." 1>&5 + + test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6 + +echo "${as_me:-configure}:2045: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5 + + test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6 + +echo "${as_me:-configure}:2049: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5 + ;; (*) - echo "$as_me:2041: result: ok" >&5 + echo "$as_me:2053: result: ok" >&5 echo "${ECHO_T}ok" >&6 ;; esac -echo "$as_me:2046: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "$as_me:2058: checking whether ${MAKE-make} sets \${MAKE}" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then @@ -2063,11 +2075,11 @@ fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$as_me:2066: result: yes" >&5 + echo "$as_me:2078: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else - echo "$as_me:2070: result: no" >&5 + echo "$as_me:2082: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi @@ -2084,7 +2096,7 @@ fi # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:2087: checking for a BSD compatible install" >&5 +echo "$as_me:2099: checking for a BSD compatible install" >&5 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then @@ -2133,7 +2145,7 @@ fi INSTALL=$ac_install_sh fi fi -echo "$as_me:2136: result: $INSTALL" >&5 +echo "$as_me:2148: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. @@ -2144,7 +2156,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCR test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -echo "$as_me:2147: checking if filesystem supports mixed-case filenames" >&5 +echo "$as_me:2159: checking if filesystem supports mixed-case filenames" >&5 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6 if test "${cf_cv_mixedcase+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2171,7 +2183,7 @@ else fi fi -echo "$as_me:2174: result: $cf_cv_mixedcase" >&5 +echo "$as_me:2186: result: $cf_cv_mixedcase" >&5 echo "${ECHO_T}$cf_cv_mixedcase" >&6 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF @@ -2182,7 +2194,7 @@ for ac_prog in exctags ctags do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:2185: checking for $ac_word" >&5 +echo "$as_me:2197: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CTAGS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2197,7 +2209,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_CTAGS="$ac_prog" -echo "$as_me:2200: found $ac_dir/$ac_word" >&5 +echo "$as_me:2212: found $ac_dir/$ac_word" >&5 break done @@ -2205,10 +2217,10 @@ fi fi CTAGS=$ac_cv_prog_CTAGS if test -n "$CTAGS"; then - echo "$as_me:2208: result: $CTAGS" >&5 + echo "$as_me:2220: result: $CTAGS" >&5 echo "${ECHO_T}$CTAGS" >&6 else - echo "$as_me:2211: result: no" >&5 + echo "$as_me:2223: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2219,7 +2231,7 @@ for ac_prog in exetags etags do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:2222: checking for $ac_word" >&5 +echo "$as_me:2234: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ETAGS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2234,7 +2246,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ETAGS="$ac_prog" -echo "$as_me:2237: found $ac_dir/$ac_word" >&5 +echo "$as_me:2249: found $ac_dir/$ac_word" >&5 break done @@ -2242,10 +2254,10 @@ fi fi ETAGS=$ac_cv_prog_ETAGS if test -n "$ETAGS"; then - echo "$as_me:2245: result: $ETAGS" >&5 + echo "$as_me:2257: result: $ETAGS" >&5 echo "${ECHO_T}$ETAGS" >&6 else - echo "$as_me:2248: result: no" >&5 + echo "$as_me:2260: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2254,7 +2266,7 @@ done # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args. set dummy ${CTAGS:-ctags}; ac_word=$2 -echo "$as_me:2257: checking for $ac_word" >&5 +echo "$as_me:2269: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2269,7 +2281,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_MAKE_LOWER_TAGS="yes" -echo "$as_me:2272: found $ac_dir/$ac_word" >&5 +echo "$as_me:2284: found $ac_dir/$ac_word" >&5 break done @@ -2278,17 +2290,17 @@ fi fi MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS if test -n "$MAKE_LOWER_TAGS"; then - echo "$as_me:2281: result: $MAKE_LOWER_TAGS" >&5 + echo "$as_me:2293: result: $MAKE_LOWER_TAGS" >&5 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6 else - echo "$as_me:2284: result: no" >&5 + echo "$as_me:2296: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test "$cf_cv_mixedcase" = yes ; then # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args. set dummy ${ETAGS:-etags}; ac_word=$2 -echo "$as_me:2291: checking for $ac_word" >&5 +echo "$as_me:2303: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2303,7 +2315,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_MAKE_UPPER_TAGS="yes" -echo "$as_me:2306: found $ac_dir/$ac_word" >&5 +echo "$as_me:2318: found $ac_dir/$ac_word" >&5 break done @@ -2312,10 +2324,10 @@ fi fi MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS if test -n "$MAKE_UPPER_TAGS"; then - echo "$as_me:2315: result: $MAKE_UPPER_TAGS" >&5 + echo "$as_me:2327: result: $MAKE_UPPER_TAGS" >&5 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6 else - echo "$as_me:2318: result: no" >&5 + echo "$as_me:2330: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2339,7 +2351,7 @@ for ac_prog in mawk gawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:2342: checking for $ac_word" >&5 +echo "$as_me:2354: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2354,7 +2366,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_AWK="$ac_prog" -echo "$as_me:2357: found $ac_dir/$ac_word" >&5 +echo "$as_me:2369: found $ac_dir/$ac_word" >&5 break done @@ -2362,25 +2374,25 @@ fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - echo "$as_me:2365: result: $AWK" >&5 + echo "$as_me:2377: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else - echo "$as_me:2368: result: no" >&5 + echo "$as_me:2380: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done -test -z "$AWK" && { { echo "$as_me:2375: error: No awk program found" >&5 +test -z "$AWK" && { { echo "$as_me:2387: error: No awk program found" >&5 echo "$as_me: error: No awk program found" >&2;} { (exit 1); exit 1; }; } -for ac_prog in tdlint lint alint splint lclint +for ac_prog in lint cppcheck splint do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:2383: checking for $ac_word" >&5 +echo "$as_me:2395: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_LINT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2395,7 +2407,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_LINT="$ac_prog" -echo "$as_me:2398: found $ac_dir/$ac_word" >&5 +echo "$as_me:2410: found $ac_dir/$ac_word" >&5 break done @@ -2403,10 +2415,10 @@ fi fi LINT=$ac_cv_prog_LINT if test -n "$LINT"; then - echo "$as_me:2406: result: $LINT" >&5 + echo "$as_me:2418: result: $LINT" >&5 echo "${ECHO_T}$LINT" >&6 else - echo "$as_me:2409: result: no" >&5 + echo "$as_me:2421: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2451,14 +2463,14 @@ case $host_os in ;; (linux*|gnu*|mint*|k*bsd*-gnu) -echo "$as_me:2454: checking if we must define _GNU_SOURCE" >&5 +echo "$as_me:2466: checking if we must define _GNU_SOURCE" >&5 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6 if test "${cf_cv_gnu_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 2461 "configure" +#line 2473 "configure" #include "confdefs.h" #include int @@ -2473,16 +2485,16 @@ make an error } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2476: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2488: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2479: \$? = $ac_status" >&5 + echo "$as_me:2491: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2482: \"$ac_try\"") >&5 + { (eval echo "$as_me:2494: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2485: \$? = $ac_status" >&5 + echo "$as_me:2497: \$? = $ac_status" >&5 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Oct 4 20:55:49 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F33D1AF546E; Tue, 4 Oct 2016 20:55:49 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA14DF9C; Tue, 4 Oct 2016 20:55:49 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u94KtmBH051958; Tue, 4 Oct 2016 20:55:48 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u94KtmpD051957; Tue, 4 Oct 2016 20:55:48 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201610042055.u94KtmpD051957@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Tue, 4 Oct 2016 20:55:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r306688 - vendor/byacc/20160606 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 20:55:50 -0000 Author: jkim Date: Tue Oct 4 20:55:48 2016 New Revision: 306688 URL: https://svnweb.freebsd.org/changeset/base/306688 Log: Tag byacc 20160606. Added: vendor/byacc/20160606/ - copied from r306687, vendor/byacc/dist/ From owner-svn-src-all@freebsd.org Tue Oct 4 20:56:01 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BBBCBAF54AE; Tue, 4 Oct 2016 20:56:01 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A35CC140; Tue, 4 Oct 2016 20:56:01 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id u94Ku0Qg015720 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 4 Oct 2016 13:56:00 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id u94Ku0LH015719; Tue, 4 Oct 2016 13:56:00 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 4 Oct 2016 13:56:00 -0700 From: Gleb Smirnoff To: Eric van Gyzen Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306346 - head/sys/kern Message-ID: <20161004205600.GN23123@FreeBSD.org> References: <201609261530.u8QFUUZd020174@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201609261530.u8QFUUZd020174@repo.freebsd.org> User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 20:56:01 -0000 Eric, On Mon, Sep 26, 2016 at 03:30:30PM +0000, Eric van Gyzen wrote: E> Author: vangyzen E> Date: Mon Sep 26 15:30:30 2016 E> New Revision: 306346 E> URL: https://svnweb.freebsd.org/changeset/base/306346 E> E> Log: E> Make no assertions about mutex state when the scheduler is stopped. E> E> This changes the assert path to match the lock and unlock paths. E> E> MFC after: 1 week E> Sponsored by: Dell EMC E> E> Modified: E> head/sys/kern/kern_mutex.c E> E> Modified: head/sys/kern/kern_mutex.c E> ============================================================================== E> --- head/sys/kern/kern_mutex.c Mon Sep 26 15:03:31 2016 (r306345) E> +++ head/sys/kern/kern_mutex.c Mon Sep 26 15:30:30 2016 (r306346) E> @@ -924,7 +924,7 @@ __mtx_assert(const volatile uintptr_t *c E> { E> const struct mtx *m; E> E> - if (panicstr != NULL || dumping) E> + if (panicstr != NULL || dumping || SCHEDULER_STOPPED()) E> return; I wonder if all this disjunct can be reduced just to SCHEDULER_STOPPED()? Positive panicstr and dumping imply scheduler stopped. -- Totus tuus, Glebius. From owner-svn-src-all@freebsd.org Tue Oct 4 21:44:21 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D935DAF51BA; Tue, 4 Oct 2016 21:44:21 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ABF61C7D; Tue, 4 Oct 2016 21:44:21 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u94LiKRh071535; Tue, 4 Oct 2016 21:44:20 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u94LiK2o071534; Tue, 4 Oct 2016 21:44:20 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201610042144.u94LiK2o071534@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 4 Oct 2016 21:44:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306689 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 21:44:21 -0000 Author: bdrewery Date: Tue Oct 4 21:44:20 2016 New Revision: 306689 URL: https://svnweb.freebsd.org/changeset/base/306689 Log: Correct some comments after r294299. Sponsored by: Dell EMC Isilon Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Tue Oct 4 20:55:48 2016 (r306688) +++ head/sys/kern/vfs_subr.c Tue Oct 4 21:44:20 2016 (r306689) @@ -2503,9 +2503,8 @@ v_incr_usecount_locked(struct vnode *vp) } /* - * Increment the use and hold counts on the vnode, taking care to reference - * the driver's usecount if this is a chardev. The _vhold() will remove - * the vnode from the free list if it is presently free. + * Increment the use count on the vnode, taking care to reference + * the driver's usecount if this is a chardev. */ static void v_incr_usecount(struct vnode *vp) @@ -2626,7 +2625,8 @@ vget(struct vnode *vp, int flags, struct } /* - * Increase the reference count of a vnode. + * Increase the reference (use) and hold count of a vnode. + * This will also remove the vnode from the free list if it is presently free. */ void vref(struct vnode *vp) From owner-svn-src-all@freebsd.org Tue Oct 4 22:15:43 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28630AF58F9; Tue, 4 Oct 2016 22:15:43 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EED12C3D; Tue, 4 Oct 2016 22:15:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u94MFgYi083676; Tue, 4 Oct 2016 22:15:42 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u94MFgeR083675; Tue, 4 Oct 2016 22:15:42 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201610042215.u94MFgeR083675@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 4 Oct 2016 22:15:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306690 - stable/11/sys/dev/cxgbe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 22:15:43 -0000 Author: jhb Date: Tue Oct 4 22:15:42 2016 New Revision: 306690 URL: https://svnweb.freebsd.org/changeset/base/306690 Log: MFC 305548: Don't break out of the m_advance() loop if len drops to zero. If a packet contains the Ethernet header (14 bytes) in the first mbuf and the payload (IP + UDP + data) in the second mbuf, then the attempt to fetch the l3hdr will return a NULL pointer. The first loop iteration will drop len to zero and exit the loop without setting 'p'. However, the desired data is at the start of the second mbuf, so the correct behavior is to loop around and let the conditional set 'p' to m_data of the next mbuf (and leave offset as 0). Modified: stable/11/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_sge.c Tue Oct 4 21:44:20 2016 (r306689) +++ stable/11/sys/dev/cxgbe/t4_sge.c Tue Oct 4 22:15:42 2016 (r306690) @@ -2081,7 +2081,7 @@ m_advance(struct mbuf **pm, int *poffset MPASS(len > 0); - while (len) { + for (;;) { if (offset + len < m->m_len) { offset += len; p = mtod(m, uintptr_t) + offset; From owner-svn-src-all@freebsd.org Tue Oct 4 22:22:34 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BCA11AF5DCD; Tue, 4 Oct 2016 22:22:34 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84D9C1AA; Tue, 4 Oct 2016 22:22:34 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u94MMXg7087444; Tue, 4 Oct 2016 22:22:33 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u94MMXNe087435; Tue, 4 Oct 2016 22:22:33 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201610042222.u94MMXNe087435@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Tue, 4 Oct 2016 22:22:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306691 - in head/contrib/byacc: . package package/debian package/pkgsrc test test/btyacc test/yacc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 22:22:34 -0000 Author: jkim Date: Tue Oct 4 22:22:32 2016 New Revision: 306691 URL: https://svnweb.freebsd.org/changeset/base/306691 Log: MFV: r306687 Merge byacc 20160606. Modified: head/contrib/byacc/CHANGES head/contrib/byacc/MANIFEST head/contrib/byacc/VERSION head/contrib/byacc/aclocal.m4 head/contrib/byacc/btyaccpar.c head/contrib/byacc/btyaccpar.skel head/contrib/byacc/configure head/contrib/byacc/defs.h head/contrib/byacc/error.c head/contrib/byacc/lalr.c head/contrib/byacc/lr0.c head/contrib/byacc/mkpar.c head/contrib/byacc/output.c head/contrib/byacc/package/byacc.spec head/contrib/byacc/package/debian/changelog head/contrib/byacc/package/mingw-byacc.spec head/contrib/byacc/package/pkgsrc/Makefile head/contrib/byacc/reader.c head/contrib/byacc/skel2c head/contrib/byacc/test/btyacc/btyacc_calc1.tab.c head/contrib/byacc/test/btyacc/btyacc_demo.error head/contrib/byacc/test/btyacc/btyacc_demo.output head/contrib/byacc/test/btyacc/btyacc_demo.tab.c head/contrib/byacc/test/btyacc/btyacc_destroy1.tab.c head/contrib/byacc/test/btyacc/btyacc_destroy2.tab.c head/contrib/byacc/test/btyacc/btyacc_destroy3.tab.c head/contrib/byacc/test/btyacc/calc.tab.c head/contrib/byacc/test/btyacc/calc1.tab.c head/contrib/byacc/test/btyacc/calc2.tab.c head/contrib/byacc/test/btyacc/calc3.tab.c head/contrib/byacc/test/btyacc/code_calc.code.c head/contrib/byacc/test/btyacc/code_calc.tab.c head/contrib/byacc/test/btyacc/code_calc.tab.h head/contrib/byacc/test/btyacc/code_error.code.c head/contrib/byacc/test/btyacc/empty.tab.c head/contrib/byacc/test/btyacc/err_inherit1.tab.c head/contrib/byacc/test/btyacc/err_inherit2.tab.c head/contrib/byacc/test/btyacc/err_inherit3.output head/contrib/byacc/test/btyacc/err_inherit3.tab.c head/contrib/byacc/test/btyacc/err_inherit4.output head/contrib/byacc/test/btyacc/err_inherit4.tab.c head/contrib/byacc/test/btyacc/err_inherit5.tab.c head/contrib/byacc/test/btyacc/err_syntax1.tab.c head/contrib/byacc/test/btyacc/err_syntax10.tab.c head/contrib/byacc/test/btyacc/err_syntax11.tab.c head/contrib/byacc/test/btyacc/err_syntax12.tab.c head/contrib/byacc/test/btyacc/err_syntax13.tab.c head/contrib/byacc/test/btyacc/err_syntax14.tab.c head/contrib/byacc/test/btyacc/err_syntax15.tab.c head/contrib/byacc/test/btyacc/err_syntax16.tab.c head/contrib/byacc/test/btyacc/err_syntax17.tab.c head/contrib/byacc/test/btyacc/err_syntax18.tab.c head/contrib/byacc/test/btyacc/err_syntax19.tab.c head/contrib/byacc/test/btyacc/err_syntax2.tab.c head/contrib/byacc/test/btyacc/err_syntax20.tab.c head/contrib/byacc/test/btyacc/err_syntax21.tab.c head/contrib/byacc/test/btyacc/err_syntax22.tab.c head/contrib/byacc/test/btyacc/err_syntax23.tab.c head/contrib/byacc/test/btyacc/err_syntax24.error head/contrib/byacc/test/btyacc/err_syntax24.tab.c head/contrib/byacc/test/btyacc/err_syntax25.tab.c head/contrib/byacc/test/btyacc/err_syntax26.tab.c head/contrib/byacc/test/btyacc/err_syntax27.tab.c head/contrib/byacc/test/btyacc/err_syntax3.tab.c head/contrib/byacc/test/btyacc/err_syntax4.tab.c head/contrib/byacc/test/btyacc/err_syntax5.tab.c head/contrib/byacc/test/btyacc/err_syntax6.tab.c head/contrib/byacc/test/btyacc/err_syntax7.tab.c head/contrib/byacc/test/btyacc/err_syntax7a.tab.c head/contrib/byacc/test/btyacc/err_syntax7b.tab.c head/contrib/byacc/test/btyacc/err_syntax8.tab.c head/contrib/byacc/test/btyacc/err_syntax8a.tab.c head/contrib/byacc/test/btyacc/err_syntax9.tab.c head/contrib/byacc/test/btyacc/error.tab.c head/contrib/byacc/test/btyacc/grammar.tab.c head/contrib/byacc/test/btyacc/inherit0.tab.c head/contrib/byacc/test/btyacc/inherit1.tab.c head/contrib/byacc/test/btyacc/inherit2.output head/contrib/byacc/test/btyacc/inherit2.tab.c head/contrib/byacc/test/btyacc/ok_syntax1.tab.c head/contrib/byacc/test/btyacc/pure_calc.tab.c head/contrib/byacc/test/btyacc/pure_error.tab.c head/contrib/byacc/test/btyacc/quote_calc-s.tab.c head/contrib/byacc/test/btyacc/quote_calc.tab.c head/contrib/byacc/test/btyacc/quote_calc2-s.tab.c head/contrib/byacc/test/btyacc/quote_calc2.tab.c head/contrib/byacc/test/btyacc/quote_calc3-s.tab.c head/contrib/byacc/test/btyacc/quote_calc3.tab.c head/contrib/byacc/test/btyacc/quote_calc4-s.tab.c head/contrib/byacc/test/btyacc/quote_calc4.tab.c head/contrib/byacc/test/btyacc/rename_debug.c head/contrib/byacc/test/btyacc/varsyntax_calc1.tab.c head/contrib/byacc/test/code_calc.y head/contrib/byacc/test/err_inherit4.y head/contrib/byacc/test/run_make.sh head/contrib/byacc/test/yacc/calc.tab.c head/contrib/byacc/test/yacc/calc1.tab.c head/contrib/byacc/test/yacc/calc2.tab.c head/contrib/byacc/test/yacc/calc3.tab.c head/contrib/byacc/test/yacc/code_calc.code.c head/contrib/byacc/test/yacc/code_calc.tab.c head/contrib/byacc/test/yacc/code_calc.tab.h head/contrib/byacc/test/yacc/code_error.code.c head/contrib/byacc/test/yacc/empty.tab.c head/contrib/byacc/test/yacc/err_syntax10.tab.c head/contrib/byacc/test/yacc/err_syntax11.tab.c head/contrib/byacc/test/yacc/err_syntax12.tab.c head/contrib/byacc/test/yacc/err_syntax18.tab.c head/contrib/byacc/test/yacc/err_syntax20.tab.c head/contrib/byacc/test/yacc/err_syntax24.error head/contrib/byacc/test/yacc/error.tab.c head/contrib/byacc/test/yacc/grammar.tab.c head/contrib/byacc/test/yacc/ok_syntax1.tab.c head/contrib/byacc/test/yacc/pure_calc.tab.c head/contrib/byacc/test/yacc/pure_error.tab.c head/contrib/byacc/test/yacc/quote_calc-s.tab.c head/contrib/byacc/test/yacc/quote_calc.tab.c head/contrib/byacc/test/yacc/quote_calc2-s.tab.c head/contrib/byacc/test/yacc/quote_calc2.tab.c head/contrib/byacc/test/yacc/quote_calc3-s.tab.c head/contrib/byacc/test/yacc/quote_calc3.tab.c head/contrib/byacc/test/yacc/quote_calc4-s.tab.c head/contrib/byacc/test/yacc/quote_calc4.tab.c head/contrib/byacc/test/yacc/rename_debug.c head/contrib/byacc/test/yacc/varsyntax_calc1.tab.c head/contrib/byacc/verbose.c head/contrib/byacc/yaccpar.c head/contrib/byacc/yaccpar.skel Directory Properties: head/contrib/byacc/ (props changed) Modified: head/contrib/byacc/CHANGES ============================================================================== --- head/contrib/byacc/CHANGES Tue Oct 4 22:15:42 2016 (r306690) +++ head/contrib/byacc/CHANGES Tue Oct 4 22:22:32 2016 (r306691) @@ -1,3 +1,82 @@ +2016-06-06 Thomas E. Dickey + + * configure: regen + + * aclocal.m4: improved autoconf macros: + CF_CC_ENV_FLAGS - don't limit the check to -I, -U and -D options, since the + added options can include various compiler options before and after + preprocessor options. + CF_PROG_LINT - add cpplint to programs to use; drop ad hoc tdlint and alint. + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + + * lalr.c: indented + + * btyaccpar.c: regen + + * skel2c: + adjust whitespace so that generated skeleton will follow the same format + as other code + + * mkpar.c, verbose.c, lr0.c, reader.c, error.c, output.c: indented + + * reader.c: fix two compiler warnings + + * test/btyacc/inherit2.tab.c, test/btyacc/ok_syntax1.tab.c, test/btyacc/pure_calc.tab.c, test/btyacc/pure_error.tab.c, test/btyacc/quote_calc-s.tab.c, test/btyacc/quote_calc.tab.c, test/btyacc/quote_calc2-s.tab.c, test/btyacc/quote_calc2.tab.c, test/btyacc/quote_calc3-s.tab.c, test/btyacc/quote_calc3.tab.c, test/btyacc/quote_calc4-s.tab.c, test/btyacc/quote_calc4.tab.c, test/btyacc/varsyntax_calc1.tab.c, test/btyacc/err_syntax12.tab.c, test/btyacc/err_syntax18.tab.c, test/btyacc/err_syntax20.tab.c, test/btyacc/error.tab.c, test/btyacc/grammar.tab.c, test/btyacc/inherit0.tab.c, test/btyacc/inherit1.tab.c, test/btyacc/btyacc_calc1.tab.c, test/btyacc/btyacc_demo.tab.c, test/btyacc/btyacc_destroy1.tab.c, test/btyacc/btyacc_destroy2.tab.c, test/btyacc/btyacc_destroy3.tab.c, test/btyacc/calc.tab.c, test/btyacc/calc1.tab.c, test/btyacc/calc2.tab.c, test/btyacc/calc3.tab.c, test/btyacc/code_calc.code.c, test/btyacc/code_error.code.c, test/btyacc/empty.tab.c, test/btyacc/err_inherit3.tab.c, test/btyacc/err_inherit4.tab.c, test/btyacc/err_syntax10.tab.c, test/btyacc/err_syntax11.tab.c, test/btyacc/rename_debug.c, btyaccpar.c, test/yacc/quote_calc2-s.tab.c, test/yacc/quote_calc2.tab.c, test/yacc/quote_calc3-s.tab.c, test/yacc/quote_calc3.tab.c, test/yacc/quote_calc4-s.tab.c, test/yacc/quote_calc4.tab.c, test/yacc/varsyntax_calc1.tab.c, test/yacc/err_syntax20.tab.c, test/yacc/error.tab.c, test/yacc/grammar.tab.c, test/yacc/ok_syntax1.tab.c, test/yacc/pure_calc.tab.c, test/yacc/pure_error.tab.c, test/yacc/quote_calc-s.tab.c, test/yacc/quote_calc.tab.c, test/yacc/calc.tab.c, test/yacc/calc1.tab.c, test/yacc/calc2.tab.c, test/yacc/calc3.tab.c, test/yacc/code_calc.code.c, test/yacc/code_error.code.c, test/yacc/empty.tab.c, test/yacc/err_syntax10.tab.c, test/yacc/err_syntax11.tab.c, test/yacc/err_syntax12.tab.c, test/yacc/err_syntax18.tab.c, test/yacc/rename_debug.c, yaccpar.c: + regen + +2016-06-06 Tom.Shields + + * btyaccpar.skel, yaccpar.skel: + small fix for an edge case of initialized data in Chris Dodd's btyacc changes: + "Avoid crash when input pops up an Action error at the first token" + +2016-06-01 Thomas E. Dickey + + * test/yacc/quote_calc2-s.tab.c, test/yacc/quote_calc3-s.tab.c, test/yacc/quote_calc3.tab.c, test/yacc/quote_calc4-s.tab.c, test/yacc/quote_calc4.tab.c, test/yacc/varsyntax_calc1.tab.c, test/yacc/err_syntax18.tab.c, test/yacc/err_syntax20.tab.c, test/yacc/err_syntax24.error, test/yacc/error.tab.c, test/yacc/grammar.tab.c, test/yacc/ok_syntax1.tab.c, test/yacc/pure_calc.tab.c, test/yacc/pure_error.tab.c, test/yacc/quote_calc-s.tab.c, test/yacc/quote_calc.tab.c, test/yacc/quote_calc2.tab.c, test/yacc/calc.tab.c, test/yacc/calc1.tab.c, test/yacc/calc2.tab.c, test/yacc/calc3.tab.c, test/yacc/code_calc.code.c, test/yacc/code_calc.tab.c, test/yacc/code_calc.tab.h, test/yacc/code_error.code.c, test/yacc/empty.tab.c, test/yacc/err_syntax10.tab.c, test/yacc/err_syntax11.tab.c, test/yacc/err_syntax12.tab.c, test/yacc/rename_debug.c, yaccpar.c, test/btyacc/quote_calc-s.tab.c, test/btyacc/quote_calc.tab.c, test/btyacc/quote_calc2-s.tab.c, test/btyacc/quote_calc2.tab.c, test/btyacc/quote_calc3- s.tab.c, test/btyacc/quote_calc3.tab.c, test/btyacc/quote_calc4-s.tab.c, test/btyacc/quote_calc4.tab.c, test/btyacc/varsyntax_calc1.tab.c, test/btyacc/err_syntax13.tab.c, test/btyacc/err_syntax14.tab.c, test/btyacc/err_syntax15.tab.c, test/btyacc/err_syntax16.tab.c, test/btyacc/err_syntax17.tab.c, test/btyacc/err_syntax18.tab.c, test/btyacc/err_syntax19.tab.c, test/btyacc/err_syntax2.tab.c, test/btyacc/err_syntax20.tab.c, test/btyacc/err_syntax21.tab.c, test/btyacc/err_syntax22.tab.c, test/btyacc/err_syntax23.tab.c, test/btyacc/err_syntax24.error, test/btyacc/err_syntax24.tab.c, test/btyacc/err_syntax25.tab.c, test/btyacc/err_syntax26.tab.c, test/btyacc/err_syntax27.tab.c, test/btyacc/err_syntax3.tab.c, test/btyacc/err_syntax4.tab.c, test/btyacc/err_syntax5.tab.c, test/btyacc/err_syntax6.tab.c, test/btyacc/err_syntax7.tab.c, test/btyacc/err_syntax7a.tab.c, test/btyacc/err_syntax7b.tab.c, test/btyacc/err_syntax8.tab.c, test/btyacc/err_syntax8a.tab.c, test/btyacc/err_syntax9.tab.c, te st/btyacc/error.tab.c, test/btyacc/grammar.t! ab.c, test/btyacc/inherit0.tab.c, test/btyacc/inherit1.tab.c, test/btyacc/inherit2.output, test/btyacc/inherit2.tab.c, test/btyacc/ok_syntax1.tab.c, test/btyacc/pure_calc.tab.c, test/btyacc/pure_error.tab.c, test/btyacc/btyacc_calc1.tab.c, test/btyacc/btyacc_demo.error, test/btyacc/btyacc_demo.output, test/btyacc/btyacc_demo.tab.c, test/btyacc/btyacc_destroy1.tab.c, test/btyacc/btyacc_destroy2.tab.c, test/btyacc/btyacc_destroy3.tab.c, test/btyacc/calc.tab.c, test/btyacc/calc1.tab.c, test/btyacc/calc2.tab.c, test/btyacc/calc3.tab.c, test/btyacc/code_calc.code.c, test/btyacc/code_calc.tab.c, test/btyacc/code_calc.tab.h, test/btyacc/code_error.code.c, test/btyacc/empty.tab.c, test/btyacc/err_inherit1.tab.c, test/btyacc/err_inherit2.tab.c, test/btyacc/err_inherit3.output, test/btyacc/err_inherit3.tab.c, test/btyacc/err_inherit4.output, test/btyacc/err_inherit4.tab.c, test/btyacc/err_inherit5.tab.c, test/btyacc/err_syntax1.tab.c, test/btyacc/err_syntax10.tab.c, test/btyacc/err_syntax11.t ab.c, test/btyacc/err_syntax12.tab.c, test/btyacc/rename_debug.c, btyaccpar.c: + regen + +2016-06-01 Tom.Shields + + * btyaccpar.skel, defs.h, error.c, output.c, reader.c, test/code_calc.y, test/err_inherit4.y, test/run_make.sh, yaccpar.skel: + fixes for issues in btyacc (report by Francis Andre): + + + correction to the placement of the #line directive for a %union specification + + + recovery of a set of casts originally added into btyaccpar.c rather than into + btyaccpar.skel, and so are lost whenever building from scratch + + + Chris Dodd's btyacc improved handling of inherited attributes to eliminate + implicit empty copy rules that are not necessary, and thereby avoiding the + introduction of extra parsing ambiguity + + + Chris Dodd's added support for @-N syntax to reference inherited position + information + + + correction to bad interaction between %token-table and YYDEBUG, where YYDEBUG + was required to be defined in order to compile the generated code + + + correction to yyname[] access in code included with YYDEBUG defined for + single character symbols not recognized (e.g., input containing '&' character + where grammar doesn't define that as a symbol) - map to existing + "illegal-symbol" entry in byname[] + + + fixes to test/run_make.sh: skip test-err_* files; in the bison test phase + skip additional files that contain features not supported by bison and + inhibit new bison warning messages + + + minor changes to btyaccpar.skel & yaccpar.skel so they are more similar in + their commonality; makes it easier to maintain the pair of files using + vimdiff + + + changes to a couple of test cases for coverage of #3, #4 and #5 above + +2016-06-01 Thomas E. Dickey + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + 2016-03-24 Thomas E. Dickey * reader.c: unused variable Modified: head/contrib/byacc/MANIFEST ============================================================================== --- head/contrib/byacc/MANIFEST Tue Oct 4 22:15:42 2016 (r306690) +++ head/contrib/byacc/MANIFEST Tue Oct 4 22:22:32 2016 (r306691) @@ -1,4 +1,4 @@ -MANIFEST for byacc-20160324, version t20160324 +MANIFEST for byacc-20160606, version t20160606 -------------------------------------------------------------------------------- MANIFEST this file ACKNOWLEDGEMENTS original version of byacc - 1993 Modified: head/contrib/byacc/VERSION ============================================================================== --- head/contrib/byacc/VERSION Tue Oct 4 22:15:42 2016 (r306690) +++ head/contrib/byacc/VERSION Tue Oct 4 22:22:32 2016 (r306691) @@ -1 +1 @@ -20160324 +20160606 Modified: head/contrib/byacc/aclocal.m4 ============================================================================== --- head/contrib/byacc/aclocal.m4 Tue Oct 4 22:15:42 2016 (r306690) +++ head/contrib/byacc/aclocal.m4 Tue Oct 4 22:22:32 2016 (r306691) @@ -1,4 +1,4 @@ -dnl $Id: aclocal.m4,v 1.39 2016/03/25 00:06:44 tom Exp $ +dnl $Id: aclocal.m4,v 1.40 2016/06/07 00:48:07 tom Exp $ dnl Macros for byacc configure script (Thomas E. Dickey) dnl --------------------------------------------------------------------------- dnl Copyright 2004-2015,2016 Thomas E. Dickey @@ -171,11 +171,15 @@ ifelse([$3],,[ :]dnl ])dnl ])])dnl dnl --------------------------------------------------------------------------- -dnl CF_CC_ENV_FLAGS version: 2 updated: 2015/04/12 15:39:00 +dnl CF_CC_ENV_FLAGS version: 3 updated: 2016/05/21 18:10:17 dnl --------------- dnl Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content dnl into CC. This will not help with broken scripts that wrap the compiler with dnl options, but eliminates a more common category of user confusion. +dnl +dnl Caveat: this also disallows blanks in the pathname for the compiler, but +dnl the nuisance of having inconsistent settings for compiler and preprocessor +dnl outweighs that limitation. AC_DEFUN([CF_CC_ENV_FLAGS], [ # This should have been defined by AC_PROG_CC @@ -183,13 +187,16 @@ AC_DEFUN([CF_CC_ENV_FLAGS], AC_MSG_CHECKING(\$CC variable) case "$CC" in -(*[[\ \ ]]-[[IUD]]*) +(*[[\ \ ]]-*) AC_MSG_RESULT(broken) AC_MSG_WARN(your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options) # humor him... - cf_flags=`echo "$CC" | sed -e 's/^[[^ ]]*[[ ]]//'` + cf_flags=`echo "$CC" | sed -e 's/^[[^ ]]*[[ ]][[ ]]*//'` CC=`echo "$CC" | sed -e 's/[[ ]].*//'` CF_ADD_CFLAGS($cf_flags) + CF_VERBOSE(resulting CC: '$CC') + CF_VERBOSE(resulting CFLAGS: '$CFLAGS') + CF_VERBOSE(resulting CPPFLAGS: '$CPPFLAGS') ;; (*) AC_MSG_RESULT(ok) @@ -1010,11 +1017,11 @@ AC_SUBST(GROFF_NOTE) AC_SUBST(NROFF_NOTE) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_PROG_LINT version: 2 updated: 2009/08/12 04:43:14 +dnl CF_PROG_LINT version: 3 updated: 2016/05/22 15:25:54 dnl ------------ AC_DEFUN([CF_PROG_LINT], [ -AC_CHECK_PROGS(LINT, tdlint lint alint splint lclint) +AC_CHECK_PROGS(LINT, lint cppcheck splint) AC_SUBST(LINT_OPTS) ])dnl dnl --------------------------------------------------------------------------- Modified: head/contrib/byacc/btyaccpar.c ============================================================================== --- head/contrib/byacc/btyaccpar.c Tue Oct 4 22:15:42 2016 (r306690) +++ head/contrib/byacc/btyaccpar.c Tue Oct 4 22:22:32 2016 (r306691) @@ -2,7 +2,7 @@ * @Id: skel2c,v 1.3 2014/04/06 19:48:04 tom Exp @ */ -/* @Id: btyaccpar.skel,v 1.1 2014/04/02 22:44:41 tom Exp @ */ +/* @Id: btyaccpar.skel,v 1.3 2016/06/06 23:35:55 Tom.Shields Exp @ */ #include "defs.h" @@ -18,7 +18,7 @@ const char *const banner[] = { "/* original parser id follows */", "/* yysccsid[] = \"@(#)yaccpar 1.9 (Berkeley) 02/21/93\" */", - "/* (use YYMAJOR/YYMINOR for ifdefs dependent of parser version) */", + "/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */", "", "#define YYBYACC 1", CONCAT1("#define YYMAJOR ", YYMAJOR), @@ -66,8 +66,10 @@ const char *const tables[] = "#endif /* YYBTYACC */", #endif /* defined(YYBTYACC) */ "", - "#if YYDEBUG", + "#if YYDEBUG || defined(yytname)", "extern const char *const yyname[];", + "#endif", + "#if YYDEBUG", "extern const char *const yyrule[];", "#endif", 0 @@ -148,9 +150,9 @@ const char *const hdr_defs[] = "", "typedef struct {", " unsigned stacksize;", - " short *s_base;", - " short *s_mark;", - " short *s_last;", + " YYINT *s_base;", + " YYINT *s_mark;", + " YYINT *s_last;", " YYSTYPE *l_base;", " YYSTYPE *l_mark;", "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", @@ -293,18 +295,18 @@ const char *const body_1[] = #endif /* defined(YYBTYACC) */ "", "#if YYDEBUG", - "#include /* needed for printf */", + "#include /* needed for printf */", "#endif", "", - "#include /* needed for malloc, etc */", - "#include /* needed for memset */", + "#include /* needed for malloc, etc */", + "#include /* needed for memset */", "", "/* allocate initial stack or double stack size, up to YYMAXDEPTH */", "static int yygrowstack(YYSTACKDATA *data)", "{", " int i;", " unsigned newsize;", - " short *newss;", + " YYINT *newss;", " YYSTYPE *newvs;", "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", " YYLTYPE *newps;", @@ -318,7 +320,7 @@ const char *const body_1[] = " newsize = YYMAXDEPTH;", "", " i = (int) (data->s_mark - data->s_base);", - " newss = (short *)realloc(data->s_base, newsize * sizeof(*newss));", + " newss = (YYINT *)realloc(data->s_base, newsize * sizeof(*newss));", " if (newss == 0)", " return YYENOMEM;", "", @@ -383,7 +385,7 @@ const char *const body_1[] = "#endif", " return p;", " }", - " p->yystack.s_base = (short *) malloc(size * sizeof(short));", + " p->yystack.s_base = (YYINT *) malloc(size * sizeof(YYINT));", " if (p->yystack.s_base == NULL) return NULL;", " p->yystack.l_base = (YYSTYPE *) malloc(size * sizeof(YYSTYPE));", " if (p->yystack.l_base == NULL) return NULL;", @@ -455,6 +457,8 @@ const char *const body_2[] = " yyps->save = 0;", "#endif /* YYBTYACC */", #endif /* defined(YYBTYACC) */ + " yym = 0;", + " yyn = 0;", " yynerrs = 0;", " yyerrflag = 0;", " yychar = YYEMPTY;", @@ -532,11 +536,10 @@ const char *const body_2[] = "#endif /* YYBTYACC */", #endif /* defined(YYBTYACC) */ " if (yychar < 0) yychar = YYEOF;", - " /* if ((yychar = YYLEX) < 0) yychar = YYEOF; */", "#if YYDEBUG", " if (yydebug)", " {", - " yys = yyname[YYTRANSLATE(yychar)];", + " if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN];", " fprintf(stderr, \"%s[%d]: state %d, reading token %d (%s)\",", " YYDEBUGSTR, yydepth, yystate, yychar, yys);", "#ifdef YYSTYPE_TOSTRING", @@ -598,7 +601,7 @@ const char *const body_2[] = " save->state = yystate;", " save->errflag = yyerrflag;", " save->yystack.s_mark = save->yystack.s_base + (yystack.s_mark - yystack.s_base);", - " memcpy (save->yystack.s_base, yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(short));", + " memcpy (save->yystack.s_base, yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(YYINT));", " save->yystack.l_mark = save->yystack.l_base + (yystack.l_mark - yystack.l_base);", " memcpy (save->yystack.l_base, yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));", "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", @@ -679,7 +682,7 @@ const char *const body_2[] = " if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM)", " goto yyoverflow;", " yystate = yyctable[ctry];", - " *++yystack.s_mark = (short) yystate;", + " *++yystack.s_mark = (YYINT) yystate;", " *++yystack.l_mark = yylval;", "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", " *++yystack.p_mark = yylloc;", @@ -727,9 +730,18 @@ const char *const body_2[] = "", " yynewerrflag = 1;", " goto yyerrhandler;", - " goto yyerrlab;", + " goto yyerrlab; /* redundant goto avoids 'unused label' warning */", "", "yyerrlab:", + " /* explicit YYERROR from an action -- pop the rhs of the rule reduced", + " * before looking for error recovery */", + " yystack.s_mark -= yym;", + " yystate = *yystack.s_mark;", + " yystack.l_mark -= yym;", + "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", + " yystack.p_mark -= yym;", + "#endif", + "", " yynewerrflag = 0;", "yyerrhandler:", " while (yyps->save)", @@ -754,7 +766,7 @@ const char *const body_2[] = " yyerrctx->state = yystate;", " yyerrctx->errflag = yyerrflag;", " yyerrctx->yystack.s_mark = yyerrctx->yystack.s_base + (yystack.s_mark - yystack.s_base);", - " memcpy (yyerrctx->yystack.s_base, yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(short));", + " memcpy (yyerrctx->yystack.s_base, yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(YYINT));", " yyerrctx->yystack.l_mark = yyerrctx->yystack.l_base + (yystack.l_mark - yystack.l_base);", " memcpy (yyerrctx->yystack.l_base, yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));", "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", @@ -770,7 +782,7 @@ const char *const body_2[] = " yylexp = yylexemes + save->lexeme;", " yychar = YYEMPTY;", " yystack.s_mark = yystack.s_base + (save->yystack.s_mark - save->yystack.s_base);", - " memcpy (yystack.s_base, save->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(short));", + " memcpy (yystack.s_base, save->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(YYINT));", " yystack.l_mark = yystack.l_base + (save->yystack.l_mark - save->yystack.l_base);", " memcpy (yystack.l_base, save->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));", "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", @@ -805,7 +817,7 @@ const char *const body_2[] = " yylloc = yylpp[-1];", "#endif", " yystack.s_mark = yystack.s_base + (yyerrctx->yystack.s_mark - yyerrctx->yystack.s_base);", - " memcpy (yystack.s_base, yyerrctx->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(short));", + " memcpy (yystack.s_base, yyerrctx->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(YYINT));", " yystack.l_mark = yystack.l_base + (yyerrctx->yystack.l_mark - yyerrctx->yystack.l_base);", " memcpy (yystack.l_base, yyerrctx->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));", "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", @@ -828,7 +840,7 @@ const char *const body_2[] = "#endif", "", "#if !YYBTYACC", - " goto yyerrlab;", + " goto yyerrlab; /* redundant goto avoids 'unused label' warning */", "yyerrlab:", "#endif", " ++yynerrs;", @@ -899,7 +911,7 @@ const char *const body_2[] = "#if YYDEBUG", " if (yydebug)", " {", - " yys = yyname[YYTRANSLATE(yychar)];", + " if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN];", " fprintf(stderr, \"%s[%d]: state %d, error recovery discarding token %d (%s)\\n\",", " YYDEBUGSTR, yydepth, yystate, yychar, yys);", " }", @@ -1070,12 +1082,11 @@ const char *const trailer[] = "#endif /* YYBTYACC */", #endif /* defined(YYBTYACC) */ " if (yychar < 0) yychar = YYEOF;", - " /* if ((yychar = YYLEX) < 0) yychar = YYEOF; */", "#if YYDEBUG", " if (yydebug)", " {", - " yys = yyname[YYTRANSLATE(yychar)];", - " fprintf(stderr, \"%s[%d]: state %d, reading %d (%s)\\n\",", + " if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN];", + " fprintf(stderr, \"%s[%d]: state %d, reading token %d (%s)\\n\",", " YYDEBUGSTR, yydepth, YYFINAL, yychar, yys);", " }", "#endif", @@ -1104,7 +1115,7 @@ const char *const trailer[] = " }", "#endif", " if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;", - " *++yystack.s_mark = (short) yystate;", + " *++yystack.s_mark = (YYINT) yystate;", " *++yystack.l_mark = yyval;", "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", " *++yystack.p_mark = yyloc;", @@ -1140,7 +1151,7 @@ const char *const trailer[] = " yylexp = yylexemes + yypath->lexeme;", " yychar = YYEMPTY;", " yystack.s_mark = yystack.s_base + (yypath->yystack.s_mark - yypath->yystack.s_base);", - " memcpy (yystack.s_base, yypath->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(short));", + " memcpy (yystack.s_base, yypath->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(YYINT));", " yystack.l_mark = yystack.l_base + (yypath->yystack.l_mark - yypath->yystack.l_base);", " memcpy (yystack.l_base, yypath->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));", "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", Modified: head/contrib/byacc/btyaccpar.skel ============================================================================== --- head/contrib/byacc/btyaccpar.skel Tue Oct 4 22:15:42 2016 (r306690) +++ head/contrib/byacc/btyaccpar.skel Tue Oct 4 22:22:32 2016 (r306691) @@ -1,4 +1,4 @@ -/* $Id: btyaccpar.skel,v 1.1 2014/04/02 22:44:41 tom Exp $ */ +/* $Id: btyaccpar.skel,v 1.3 2016/06/06 23:35:55 Tom.Shields Exp $ */ #include "defs.h" @@ -45,8 +45,10 @@ extern const YYINT yycheck[]; extern const YYINT yyctable[]; %%endif -#if YYDEBUG +#if YYDEBUG || defined(yytname) extern const char *const yyname[]; +#endif +#if YYDEBUG extern const char *const yyrule[]; #endif %% global_vars @@ -113,9 +115,9 @@ do \ typedef struct { unsigned stacksize; - short *s_base; - short *s_mark; - short *s_last; + YYINT *s_base; + YYINT *s_mark; + YYINT *s_last; YYSTYPE *l_base; YYSTYPE *l_mark; #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) @@ -238,7 +240,7 @@ static short *yylexemes = 0; %%endif #if YYDEBUG -#include /* needed for printf */ +#include /* needed for printf */ #endif #include /* needed for malloc, etc */ @@ -249,7 +251,7 @@ static int yygrowstack(YYSTACKDATA *data { int i; unsigned newsize; - short *newss; + YYINT *newss; YYSTYPE *newvs; #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) YYLTYPE *newps; @@ -263,7 +265,7 @@ static int yygrowstack(YYSTACKDATA *data newsize = YYMAXDEPTH; i = (int) (data->s_mark - data->s_base); - newss = (short *)realloc(data->s_base, newsize * sizeof(*newss)); + newss = (YYINT *)realloc(data->s_base, newsize * sizeof(*newss)); if (newss == 0) return YYENOMEM; @@ -327,7 +329,7 @@ yyNewState(unsigned size) #endif return p; } - p->yystack.s_base = (short *) malloc(size * sizeof(short)); + p->yystack.s_base = (YYINT *) malloc(size * sizeof(YYINT)); if (p->yystack.s_base == NULL) return NULL; p->yystack.l_base = (YYSTYPE *) malloc(size * sizeof(YYSTYPE)); if (p->yystack.l_base == NULL) return NULL; @@ -388,6 +390,8 @@ YYPARSE_DECL() yyps = yyNewState(0); if (yyps == 0) goto yyenomem; yyps->save = 0; %%endif + yym = 0; + yyn = 0; yynerrs = 0; yyerrflag = 0; yychar = YYEMPTY; @@ -427,8 +431,8 @@ yyloop: /* in trial mode; save scanner results for future parse attempts */ if (yylvp == yylvlim) { /* Enlarge lexical value queue */ - int p = yylvp - yylvals; - int s = yylvlim - yylvals; + size_t p = (size_t) (yylvp - yylvals); + size_t s = (size_t) (yylvlim - yylvals); s += YYLVQUEUEGROWTH; if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem; @@ -461,11 +465,10 @@ yyloop: } while (0); %%endif if (yychar < 0) yychar = YYEOF; - /* if ((yychar = YYLEX) < 0) yychar = YYEOF; */ #if YYDEBUG if (yydebug) { - yys = yyname[YYTRANSLATE(yychar)]; + if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN]; fprintf(stderr, "%s[%d]: state %d, reading token %d (%s)", YYDEBUGSTR, yydepth, yystate, yychar, yys); #ifdef YYSTYPE_TOSTRING @@ -524,12 +527,12 @@ yyloop: save->state = yystate; save->errflag = yyerrflag; save->yystack.s_mark = save->yystack.s_base + (yystack.s_mark - yystack.s_base); - memcpy (save->yystack.s_base, yystack.s_base, (yystack.s_mark - yystack.s_base + 1) * sizeof(short)); + memcpy (save->yystack.s_base, yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(YYINT)); save->yystack.l_mark = save->yystack.l_base + (yystack.l_mark - yystack.l_base); - memcpy (save->yystack.l_base, yystack.l_base, (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE)); + memcpy (save->yystack.l_base, yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE)); #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) save->yystack.p_mark = save->yystack.p_base + (yystack.p_mark - yystack.p_base); - memcpy (save->yystack.p_base, yystack.p_base, (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE)); + memcpy (save->yystack.p_base, yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE)); #endif ctry = yytable[yyn]; if (yyctable[ctry] == -1) @@ -584,7 +587,7 @@ yyloop: yylexp--; yychar = YYEMPTY; } - save->lexeme = yylvp - yylvals; + save->lexeme = (int) (yylvp - yylvals); yyps->save = save; } if (yytable[yyn] == ctry) @@ -605,7 +608,7 @@ yyloop: if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow; yystate = yyctable[ctry]; - *++yystack.s_mark = (short) yystate; + *++yystack.s_mark = (YYINT) yystate; *++yystack.l_mark = yylval; #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) *++yystack.p_mark = yylloc; @@ -651,9 +654,18 @@ yyloop: yynewerrflag = 1; goto yyerrhandler; - goto yyerrlab; + goto yyerrlab; /* redundant goto avoids 'unused label' warning */ yyerrlab: + /* explicit YYERROR from an action -- pop the rhs of the rule reduced + * before looking for error recovery */ + yystack.s_mark -= yym; + yystate = *yystack.s_mark; + yystack.l_mark -= yym; +#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) + yystack.p_mark -= yym; +#endif + yynewerrflag = 0; yyerrhandler: while (yyps->save) @@ -678,14 +690,14 @@ yyerrhandler: yyerrctx->state = yystate; yyerrctx->errflag = yyerrflag; yyerrctx->yystack.s_mark = yyerrctx->yystack.s_base + (yystack.s_mark - yystack.s_base); - memcpy (yyerrctx->yystack.s_base, yystack.s_base, (yystack.s_mark - yystack.s_base + 1) * sizeof(short)); + memcpy (yyerrctx->yystack.s_base, yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(YYINT)); yyerrctx->yystack.l_mark = yyerrctx->yystack.l_base + (yystack.l_mark - yystack.l_base); - memcpy (yyerrctx->yystack.l_base, yystack.l_base, (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE)); + memcpy (yyerrctx->yystack.l_base, yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE)); #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) yyerrctx->yystack.p_mark = yyerrctx->yystack.p_base + (yystack.p_mark - yystack.p_base); - memcpy (yyerrctx->yystack.p_base, yystack.p_base, (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE)); + memcpy (yyerrctx->yystack.p_base, yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE)); #endif - yyerrctx->lexeme = yylvp - yylvals; + yyerrctx->lexeme = (int) (yylvp - yylvals); } yylvp = yylvals + save->lexeme; #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) @@ -694,12 +706,12 @@ yyerrhandler: yylexp = yylexemes + save->lexeme; yychar = YYEMPTY; yystack.s_mark = yystack.s_base + (save->yystack.s_mark - save->yystack.s_base); - memcpy (yystack.s_base, save->yystack.s_base, (yystack.s_mark - yystack.s_base + 1) * sizeof(short)); + memcpy (yystack.s_base, save->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(YYINT)); yystack.l_mark = yystack.l_base + (save->yystack.l_mark - save->yystack.l_base); - memcpy (yystack.l_base, save->yystack.l_base, (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE)); + memcpy (yystack.l_base, save->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE)); #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) yystack.p_mark = yystack.p_base + (save->yystack.p_mark - save->yystack.p_base); - memcpy (yystack.p_base, save->yystack.p_base, (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE)); + memcpy (yystack.p_base, save->yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE)); #endif ctry = ++save->ctry; yystate = save->state; @@ -729,12 +741,12 @@ yyerrhandler: yylloc = yylpp[-1]; #endif yystack.s_mark = yystack.s_base + (yyerrctx->yystack.s_mark - yyerrctx->yystack.s_base); - memcpy (yystack.s_base, yyerrctx->yystack.s_base, (yystack.s_mark - yystack.s_base + 1) * sizeof(short)); + memcpy (yystack.s_base, yyerrctx->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(YYINT)); yystack.l_mark = yystack.l_base + (yyerrctx->yystack.l_mark - yyerrctx->yystack.l_base); - memcpy (yystack.l_base, yyerrctx->yystack.l_base, (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE)); + memcpy (yystack.l_base, yyerrctx->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE)); #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) yystack.p_mark = yystack.p_base + (yyerrctx->yystack.p_mark - yyerrctx->yystack.p_base); - memcpy (yystack.p_base, yyerrctx->yystack.p_base, (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE)); + memcpy (yystack.p_base, yyerrctx->yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE)); #endif yystate = yyerrctx->state; yyFreeState(yyerrctx); @@ -751,7 +763,7 @@ yyerrhandler: #endif #if !YYBTYACC - goto yyerrlab; + goto yyerrlab; /* redundant goto avoids 'unused label' warning */ yyerrlab: #endif ++yynerrs; @@ -820,7 +832,7 @@ yyinrecovery: #if YYDEBUG if (yydebug) { - yys = yyname[YYTRANSLATE(yychar)]; + if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN]; fprintf(stderr, "%s[%d]: state %d, error recovery discarding token %d (%s)\n", YYDEBUGSTR, yydepth, yystate, yychar, yys); } @@ -938,8 +950,8 @@ yyreduce: /* in trial mode; save scanner results for future parse attempts */ if (yylvp == yylvlim) { /* Enlarge lexical value queue */ - int p = yylvp - yylvals; - int s = yylvlim - yylvals; + size_t p = (size_t) (yylvp - yylvals); + size_t s = (size_t) (yylvlim - yylvals); s += YYLVQUEUEGROWTH; if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) @@ -975,12 +987,11 @@ yyreduce: } while (0); %%endif if (yychar < 0) yychar = YYEOF; - /* if ((yychar = YYLEX) < 0) yychar = YYEOF; */ #if YYDEBUG if (yydebug) { - yys = yyname[YYTRANSLATE(yychar)]; - fprintf(stderr, "%s[%d]: state %d, reading %d (%s)\n", + if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN]; + fprintf(stderr, "%s[%d]: state %d, reading token %d (%s)\n", YYDEBUGSTR, yydepth, YYFINAL, yychar, yys); } #endif @@ -1007,7 +1018,7 @@ yyreduce: } #endif if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow; - *++yystack.s_mark = (short) yystate; + *++yystack.s_mark = (YYINT) yystate; *++yystack.l_mark = yyval; #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) *++yystack.p_mark = yyloc; @@ -1042,12 +1053,12 @@ yyvalid: yylexp = yylexemes + yypath->lexeme; yychar = YYEMPTY; yystack.s_mark = yystack.s_base + (yypath->yystack.s_mark - yypath->yystack.s_base); - memcpy (yystack.s_base, yypath->yystack.s_base, (yystack.s_mark - yystack.s_base + 1) * sizeof(short)); + memcpy (yystack.s_base, yypath->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(YYINT)); yystack.l_mark = yystack.l_base + (yypath->yystack.l_mark - yypath->yystack.l_base); - memcpy (yystack.l_base, yypath->yystack.l_base, (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE)); + memcpy (yystack.l_base, yypath->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE)); #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) yystack.p_mark = yystack.p_base + (yypath->yystack.p_mark - yypath->yystack.p_base); - memcpy (yystack.p_base, yypath->yystack.p_base, (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE)); + memcpy (yystack.p_base, yypath->yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE)); #endif yystate = yypath->state; goto yyloop; Modified: head/contrib/byacc/configure ============================================================================== --- head/contrib/byacc/configure Tue Oct 4 22:15:42 2016 (r306690) +++ head/contrib/byacc/configure Tue Oct 4 22:22:32 2016 (r306691) @@ -1,7 +1,7 @@ #! /bin/sh # From configure.in Revision: 1.21 . # Guess values for system-dependent variables and create Makefiles. -# Generated by Autoconf 2.52.20141204. +# Generated by Autoconf 2.52.20150926. # # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. @@ -767,7 +767,7 @@ This file contains any messages produced running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.52.20141204. Invocation command line was +generated by GNU Autoconf 2.52.20150926. Invocation command line was $ $0 $@ @@ -1949,13 +1949,13 @@ esac echo "$as_me:1949: checking \$CC variable" >&5 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6 case "$CC" in -(*[\ \ ]-[IUD]*) +(*[\ \ ]-*) echo "$as_me:1953: result: broken" >&5 echo "${ECHO_T}broken" >&6 { echo "$as_me:1955: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;} # humor him... - cf_flags=`echo "$CC" | sed -e 's/^[^ ]*[ ]//'` + cf_flags=`echo "$CC" | sed -e 's/^[^ ]*[ ][ ]*//'` CC=`echo "$CC" | sed -e 's/[ ].*//'` cf_fix_cppflags=no @@ -2036,14 +2036,26 @@ if test -n "$cf_new_extra_cppflags" ; th EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS" fi + test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6 + +echo "${as_me:-configure}:2041: testing resulting CC: '$CC' ..." 1>&5 + + test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6 + +echo "${as_me:-configure}:2045: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5 + + test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6 + +echo "${as_me:-configure}:2049: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5 + ;; (*) - echo "$as_me:2041: result: ok" >&5 + echo "$as_me:2053: result: ok" >&5 echo "${ECHO_T}ok" >&6 ;; esac -echo "$as_me:2046: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "$as_me:2058: checking whether ${MAKE-make} sets \${MAKE}" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then @@ -2063,11 +2075,11 @@ fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$as_me:2066: result: yes" >&5 + echo "$as_me:2078: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else - echo "$as_me:2070: result: no" >&5 + echo "$as_me:2082: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi @@ -2084,7 +2096,7 @@ fi # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:2087: checking for a BSD compatible install" >&5 +echo "$as_me:2099: checking for a BSD compatible install" >&5 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then @@ -2133,7 +2145,7 @@ fi INSTALL=$ac_install_sh fi fi -echo "$as_me:2136: result: $INSTALL" >&5 +echo "$as_me:2148: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. @@ -2144,7 +2156,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCR test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -echo "$as_me:2147: checking if filesystem supports mixed-case filenames" >&5 +echo "$as_me:2159: checking if filesystem supports mixed-case filenames" >&5 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6 if test "${cf_cv_mixedcase+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2171,7 +2183,7 @@ else fi fi -echo "$as_me:2174: result: $cf_cv_mixedcase" >&5 +echo "$as_me:2186: result: $cf_cv_mixedcase" >&5 echo "${ECHO_T}$cf_cv_mixedcase" >&6 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF @@ -2182,7 +2194,7 @@ for ac_prog in exctags ctags do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:2185: checking for $ac_word" >&5 +echo "$as_me:2197: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CTAGS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2197,7 +2209,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_CTAGS="$ac_prog" -echo "$as_me:2200: found $ac_dir/$ac_word" >&5 +echo "$as_me:2212: found $ac_dir/$ac_word" >&5 break done @@ -2205,10 +2217,10 @@ fi fi CTAGS=$ac_cv_prog_CTAGS if test -n "$CTAGS"; then - echo "$as_me:2208: result: $CTAGS" >&5 + echo "$as_me:2220: result: $CTAGS" >&5 echo "${ECHO_T}$CTAGS" >&6 else - echo "$as_me:2211: result: no" >&5 + echo "$as_me:2223: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2219,7 +2231,7 @@ for ac_prog in exetags etags do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:2222: checking for $ac_word" >&5 +echo "$as_me:2234: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ETAGS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2234,7 +2246,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ETAGS="$ac_prog" -echo "$as_me:2237: found $ac_dir/$ac_word" >&5 +echo "$as_me:2249: found $ac_dir/$ac_word" >&5 break done @@ -2242,10 +2254,10 @@ fi fi ETAGS=$ac_cv_prog_ETAGS if test -n "$ETAGS"; then - echo "$as_me:2245: result: $ETAGS" >&5 + echo "$as_me:2257: result: $ETAGS" >&5 echo "${ECHO_T}$ETAGS" >&6 else - echo "$as_me:2248: result: no" >&5 + echo "$as_me:2260: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2254,7 +2266,7 @@ done # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args. set dummy ${CTAGS:-ctags}; ac_word=$2 -echo "$as_me:2257: checking for $ac_word" >&5 +echo "$as_me:2269: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2269,7 +2281,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_MAKE_LOWER_TAGS="yes" -echo "$as_me:2272: found $ac_dir/$ac_word" >&5 +echo "$as_me:2284: found $ac_dir/$ac_word" >&5 break done @@ -2278,17 +2290,17 @@ fi fi MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS if test -n "$MAKE_LOWER_TAGS"; then - echo "$as_me:2281: result: $MAKE_LOWER_TAGS" >&5 + echo "$as_me:2293: result: $MAKE_LOWER_TAGS" >&5 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6 else - echo "$as_me:2284: result: no" >&5 + echo "$as_me:2296: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test "$cf_cv_mixedcase" = yes ; then # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args. set dummy ${ETAGS:-etags}; ac_word=$2 -echo "$as_me:2291: checking for $ac_word" >&5 +echo "$as_me:2303: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2303,7 +2315,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_MAKE_UPPER_TAGS="yes" -echo "$as_me:2306: found $ac_dir/$ac_word" >&5 +echo "$as_me:2318: found $ac_dir/$ac_word" >&5 break done @@ -2312,10 +2324,10 @@ fi fi MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS if test -n "$MAKE_UPPER_TAGS"; then - echo "$as_me:2315: result: $MAKE_UPPER_TAGS" >&5 + echo "$as_me:2327: result: $MAKE_UPPER_TAGS" >&5 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6 else - echo "$as_me:2318: result: no" >&5 + echo "$as_me:2330: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2339,7 +2351,7 @@ for ac_prog in mawk gawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:2342: checking for $ac_word" >&5 +echo "$as_me:2354: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2354,7 +2366,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_AWK="$ac_prog" -echo "$as_me:2357: found $ac_dir/$ac_word" >&5 +echo "$as_me:2369: found $ac_dir/$ac_word" >&5 break done @@ -2362,25 +2374,25 @@ fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - echo "$as_me:2365: result: $AWK" >&5 + echo "$as_me:2377: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else - echo "$as_me:2368: result: no" >&5 + echo "$as_me:2380: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done -test -z "$AWK" && { { echo "$as_me:2375: error: No awk program found" >&5 +test -z "$AWK" && { { echo "$as_me:2387: error: No awk program found" >&5 echo "$as_me: error: No awk program found" >&2;} { (exit 1); exit 1; }; } -for ac_prog in tdlint lint alint splint lclint +for ac_prog in lint cppcheck splint do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:2383: checking for $ac_word" >&5 +echo "$as_me:2395: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_LINT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2395,7 +2407,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_LINT="$ac_prog" -echo "$as_me:2398: found $ac_dir/$ac_word" >&5 +echo "$as_me:2410: found $ac_dir/$ac_word" >&5 break done @@ -2403,10 +2415,10 @@ fi fi LINT=$ac_cv_prog_LINT if test -n "$LINT"; then - echo "$as_me:2406: result: $LINT" >&5 + echo "$as_me:2418: result: $LINT" >&5 echo "${ECHO_T}$LINT" >&6 else - echo "$as_me:2409: result: no" >&5 + echo "$as_me:2421: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2451,14 +2463,14 @@ case $host_os in ;; (linux*|gnu*|mint*|k*bsd*-gnu) -echo "$as_me:2454: checking if we must define _GNU_SOURCE" >&5 +echo "$as_me:2466: checking if we must define _GNU_SOURCE" >&5 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6 if test "${cf_cv_gnu_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 2461 "configure" +#line 2473 "configure" #include "confdefs.h" #include int @@ -2473,16 +2485,16 @@ make an error } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2476: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2488: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2479: \$? = $ac_status" >&5 + echo "$as_me:2491: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2482: \"$ac_try\"") >&5 + { (eval echo "$as_me:2494: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2485: \$? = $ac_status" >&5 + echo "$as_me:2497: \$? = $ac_status" >&5 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Oct 4 22:26:46 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC3CFAF4064; Tue, 4 Oct 2016 22:26:46 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x22b.google.com (mail-pa0-x22b.google.com [IPv6:2607:f8b0:400e:c03::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9D5983B7; Tue, 4 Oct 2016 22:26:46 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pa0-x22b.google.com with SMTP id ik13so24013399pac.2; Tue, 04 Oct 2016 15:26:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=FHR6njrgQ0+BUKVDAdeR6jBlqqXNrmw1inY96OdTKhY=; b=ZMQUiF4lk4lJvESCodg3SkzzZH5ufMCqa8deqvFaXxrbcyc/Dwm9HiIsNifmJhOCv9 LoY7vLmSPhihgGFPOfk3NixFs8f6LGZbNdfYwMoTqhKzN108Y4/AoQGpZBCODD2tZ8QH OvslbuxYM7v/yMJYFNOy4M7NczhoMilI94iOdJS6E1OVAFM1xWYty4ciH6CiMVmxG2JB pm4IBw5szPBChRXLRrY4MK4G2bkoFI30fuGKPJqrUooto2OHhQbhzWd1QK2Bf3XVa93q yilJSuwqIiSsH6QsdTzNARh45Q3f/4ZFwjk5ug1F631MrtHZUkDFM8992JQ0UxnXoRiG Cnhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=FHR6njrgQ0+BUKVDAdeR6jBlqqXNrmw1inY96OdTKhY=; b=SlMqLyYCZvSqSKNm0CavherRZ5clGobeMRvbvvmbnS5LV9eecOxSxEnMNoPWtMdaSp v6l19CEqwX6UiKS9RO6Q3JfXgdnjDOJNQRk6mYGSisiZ+cqHWhTYMYYpqy4Xbo2XvlOT hLQDYWWWgYwZ0NeM5pjGd/mmsFMTllo1jVHFNlNPq0a64LBIfk116dolF6+CHl9iTzUU p+eP0DjLYZsAJLcr4jPKBMHHUwXCMs4eKxRiaWznC1HbNvpIvv0Rj79r70WDwUiYXa+E JkuhUsnnYtVHm8EwH6NpJHS3v89dR+rdBTkRHBTgaitroYDHqpiolTcxwVE4IDyZy9zU SzeQ== X-Gm-Message-State: AA6/9RmmYS8WEPg0C391Jb/3yMKQ5DnELTJk3Utwm8iXvMnmfUMuZmXRvmO4RAU2YG/jxQ== X-Received: by 10.66.26.49 with SMTP id i17mr8431150pag.145.1475620006118; Tue, 04 Oct 2016 15:26:46 -0700 (PDT) Received: from [192.168.100.50] (fp276ebe43.tkyc502.ap.nuro.jp. [39.110.190.67]) by smtp.gmail.com with ESMTPSA id p77sm20822740pfi.27.2016.10.04.15.26.45 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 04 Oct 2016 15:26:45 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r306678 - head/sys/geom From: Ngie Cooper X-Mailer: iPhone Mail (13G36) In-Reply-To: <201610041635.u94GZceA051745@repo.freebsd.org> Date: Wed, 5 Oct 2016 07:26:44 +0900 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: <9A2589D1-B685-448D-B597-790BB0A4FA4D@gmail.com> References: <201610041635.u94GZceA051745@repo.freebsd.org> To: Adrian Chadd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 22:26:46 -0000 > On Oct 5, 2016, at 01:35, Adrian Chadd wrote: > > Author: adrian > Date: Tue Oct 4 16:35:38 2016 > New Revision: 306678 > URL: https://svnweb.freebsd.org/changeset/base/306678 ... > g_trace(G_T_TOPOLOGY, "redboot_taste(%s,%s)", mp->name, pp->name); > g_topology_assert(); > @@ -278,7 +289,8 @@ g_redboot_taste(struct g_class *mp, stru > return (NULL); > g_topology_unlock(); > head = NULL; > - offset = cp->provider->mediasize - blksize; > + if(offset == 0) White space is goofed up here.. > + offset = cp->provider->mediasize - blksize; > again: > buf = g_read_data(cp, offset, blksize, NULL); > if (buf != NULL) From owner-svn-src-all@freebsd.org Tue Oct 4 22:32:44 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8966EAF43AD; Tue, 4 Oct 2016 22:32:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 401D3B0A; Tue, 4 Oct 2016 22:32:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u94MWhoP091629; Tue, 4 Oct 2016 22:32:43 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u94MWhlt091628; Tue, 4 Oct 2016 22:32:43 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201610042232.u94MWhlt091628@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 4 Oct 2016 22:32:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306692 - stable/11/sys/dev/cxgbe/common X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 22:32:44 -0000 Author: jhb Date: Tue Oct 4 22:32:43 2016 New Revision: 306692 URL: https://svnweb.freebsd.org/changeset/base/306692 Log: MFC 304482: Adjust t4_port_init() to work with VF devices. Specifically, the FW_PORT_CMD may or may not work for a VF (the PF driver can choose whether or not to permit access to this command), so don't attempt to fetch port information on a VF if permission is denied by the PF. Modified: stable/11/sys/dev/cxgbe/common/t4_hw.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/11/sys/dev/cxgbe/common/t4_hw.c Tue Oct 4 22:22:32 2016 (r306691) +++ stable/11/sys/dev/cxgbe/common/t4_hw.c Tue Oct 4 22:32:43 2016 (r306692) @@ -7938,15 +7938,26 @@ int t4_port_init(struct adapter *adap, i } while ((adap->params.portvec & (1 << j)) == 0); } - c.op_to_portid = htonl(V_FW_CMD_OP(FW_PORT_CMD) | - F_FW_CMD_REQUEST | F_FW_CMD_READ | - V_FW_PORT_CMD_PORTID(j)); - c.action_to_len16 = htonl( - V_FW_PORT_CMD_ACTION(FW_PORT_ACTION_GET_PORT_INFO) | - FW_LEN16(c)); - ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c); - if (ret) - return ret; + if (!(adap->flags & IS_VF) || + adap->params.vfres.r_caps & FW_CMD_CAP_PORT) { + c.op_to_portid = htonl(V_FW_CMD_OP(FW_PORT_CMD) | + F_FW_CMD_REQUEST | F_FW_CMD_READ | + V_FW_PORT_CMD_PORTID(j)); + c.action_to_len16 = htonl( + V_FW_PORT_CMD_ACTION(FW_PORT_ACTION_GET_PORT_INFO) | + FW_LEN16(c)); + ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c); + if (ret) + return ret; + + ret = be32_to_cpu(c.u.info.lstatus_to_modtype); + p->mdio_addr = (ret & F_FW_PORT_CMD_MDIOCAP) ? + G_FW_PORT_CMD_MDIOADDR(ret) : -1; + p->port_type = G_FW_PORT_CMD_PTYPE(ret); + p->mod_type = G_FW_PORT_CMD_MODTYPE(ret); + + init_link_config(&p->link_cfg, be16_to_cpu(c.u.info.pcap)); + } ret = t4_alloc_vi(adap, mbox, j, pf, vf, 1, addr, &rss_size); if (ret < 0) @@ -7959,14 +7970,6 @@ int t4_port_init(struct adapter *adap, i p->vi[0].rss_size = rss_size; t4_os_set_hw_addr(adap, p->port_id, addr); - ret = be32_to_cpu(c.u.info.lstatus_to_modtype); - p->mdio_addr = (ret & F_FW_PORT_CMD_MDIOCAP) ? - G_FW_PORT_CMD_MDIOADDR(ret) : -1; - p->port_type = G_FW_PORT_CMD_PTYPE(ret); - p->mod_type = G_FW_PORT_CMD_MODTYPE(ret); - - init_link_config(&p->link_cfg, be16_to_cpu(c.u.info.pcap)); - param = V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DEV) | V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DEV_RSSINFO) | V_FW_PARAMS_PARAM_YZ(p->vi[0].viid); From owner-svn-src-all@freebsd.org Tue Oct 4 22:34:13 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E48CAF442F; Tue, 4 Oct 2016 22:34:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6ED6CC87; Tue, 4 Oct 2016 22:34:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u94MYCSV091824; Tue, 4 Oct 2016 22:34:12 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u94MYCkb091823; Tue, 4 Oct 2016 22:34:12 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201610042234.u94MYCkb091823@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 4 Oct 2016 22:34:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306693 - stable/11/sys/dev/cxgbe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 22:34:13 -0000 Author: jhb Date: Tue Oct 4 22:34:12 2016 New Revision: 306693 URL: https://svnweb.freebsd.org/changeset/base/306693 Log: MFC 303454: Mark spg_len and fl_pktshift static. These variables are no longer exported to t4_netmap.c after r296478. Modified: stable/11/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_sge.c Tue Oct 4 22:32:43 2016 (r306692) +++ stable/11/sys/dev/cxgbe/t4_sge.c Tue Oct 4 22:34:12 2016 (r306693) @@ -82,7 +82,7 @@ __FBSDID("$FreeBSD$"); * Ethernet frames are DMA'd at this byte offset into the freelist buffer. * 0-7 are valid values. */ -int fl_pktshift = 2; +static int fl_pktshift = 2; TUNABLE_INT("hw.cxgbe.fl_pktshift", &fl_pktshift); /* @@ -99,7 +99,7 @@ TUNABLE_INT("hw.cxgbe.fl_pad", &fl_pad); * -1: driver should figure out a good value. * 64 or 128 are the only other valid values. */ -int spg_len = -1; +static int spg_len = -1; TUNABLE_INT("hw.cxgbe.spg_len", &spg_len); /* From owner-svn-src-all@freebsd.org Tue Oct 4 22:36:37 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BFC7FAF45C3; Tue, 4 Oct 2016 22:36:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75FDF10C; Tue, 4 Oct 2016 22:36:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u94Maa23092559; Tue, 4 Oct 2016 22:36:36 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u94Maa7F092555; Tue, 4 Oct 2016 22:36:36 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201610042236.u94Maa7F092555@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 4 Oct 2016 22:36:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306694 - stable/11/sys/dev/cxgbe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 22:36:37 -0000 Author: jhb Date: Tue Oct 4 22:36:36 2016 New Revision: 306694 URL: https://svnweb.freebsd.org/changeset/base/306694 Log: MFC 303859,305851: Fix a typo and some whitespace nits. Modified: stable/11/sys/dev/cxgbe/t4_iov.c stable/11/sys/dev/cxgbe/t4_sge.c stable/11/sys/dev/cxgbe/t4_vf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/t4_iov.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_iov.c Tue Oct 4 22:34:12 2016 (r306693) +++ stable/11/sys/dev/cxgbe/t4_iov.c Tue Oct 4 22:36:36 2016 (r306694) @@ -97,7 +97,7 @@ static int t4iov_attach_child(device_t d static int t4iov_probe(device_t dev) { - uint16_t d; + uint16_t d; size_t i; d = pci_get_device(dev); @@ -114,7 +114,7 @@ t4iov_probe(device_t dev) static int t5iov_probe(device_t dev) { - uint16_t d; + uint16_t d; size_t i; d = pci_get_device(dev); Modified: stable/11/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_sge.c Tue Oct 4 22:34:12 2016 (r306693) +++ stable/11/sys/dev/cxgbe/t4_sge.c Tue Oct 4 22:36:36 2016 (r306694) @@ -594,7 +594,7 @@ t4_tweak_chip_settings(struct adapter *s /* * SGE wants the buffer to be at least 64B and then a multiple of 16. If - * padding is is use the buffer's start and end need to be aligned to the pad + * padding is in use, the buffer's start and end need to be aligned to the pad * boundary as well. We'll just make sure that the size is a multiple of the * boundary here, it is up to the buffer allocation code to make sure the start * of the buffer is aligned as well. Modified: stable/11/sys/dev/cxgbe/t4_vf.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_vf.c Tue Oct 4 22:34:12 2016 (r306693) +++ stable/11/sys/dev/cxgbe/t4_vf.c Tue Oct 4 22:36:36 2016 (r306694) @@ -124,7 +124,7 @@ static struct cdevsw t4vf_cdevsw = { static int t4vf_probe(device_t dev) { - uint16_t d; + uint16_t d; size_t i; d = pci_get_device(dev); @@ -140,7 +140,7 @@ t4vf_probe(device_t dev) static int t5vf_probe(device_t dev) { - uint16_t d; + uint16_t d; size_t i; d = pci_get_device(dev); @@ -653,7 +653,7 @@ t4vf_attach(device_t dev) pi->vi[0].dev = pi->dev; device_set_softc(pi->dev, pi); } - + /* * Interrupt type, # of interrupts, # of rx/tx queues, etc. */ From owner-svn-src-all@freebsd.org Tue Oct 4 23:10:44 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CE30AF4EEE; Tue, 4 Oct 2016 23:10:44 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5836F119; Tue, 4 Oct 2016 23:10:44 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u94NAhjh003775; Tue, 4 Oct 2016 23:10:43 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u94NAhuI003774; Tue, 4 Oct 2016 23:10:43 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201610042310.u94NAhuI003774@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Tue, 4 Oct 2016 23:10:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306695 - head/contrib/blacklist/libexec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 23:10:44 -0000 Author: lidl Date: Tue Oct 4 23:10:43 2016 New Revision: 306695 URL: https://svnweb.freebsd.org/changeset/base/306695 Log: Make blacklist-helper commands emit a message when successful The blacklistd daemon expects to see a message on stdout, instead of just relying on the exit value from any invoked programs. Change the pf filtering to create multiple filters, attached under a the "blacklist/*" anchor point. This prevents the filtering for each port's filtering rule from overwriting the previously installed filtering rule. Check for an existing filtering rule for each port, so the installation of a given filtering rule only happens once. Reinstalling the same rule resets the counters for the pf rule, and we don't want that. Reported by: David Horn (dhorn2000 at gmail.com) Reviewed by: emaste MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8081 Modified: head/contrib/blacklist/libexec/blacklistd-helper Modified: head/contrib/blacklist/libexec/blacklistd-helper ============================================================================== --- head/contrib/blacklist/libexec/blacklistd-helper Tue Oct 4 22:36:36 2016 (r306694) +++ head/contrib/blacklist/libexec/blacklistd-helper Tue Oct 4 23:10:43 2016 (r306695) @@ -19,8 +19,8 @@ fi if [ -z "$pf" ]; then for f in npf pf ipf; do if [ -f "/etc/$f.conf" ]; then - pf="$f" - break + pf="$f" + break fi done fi @@ -54,8 +54,8 @@ add) ipf) /sbin/ipfstat -io | /sbin/ipf -I -f - >/dev/null 2>&1 echo block in quick $proto from $addr/$mask to \ - any port=$6 head port$6 | \ - /sbin/ipf -I -f - -s >/dev/null 2>&1 + any port=$6 head port$6 | \ + /sbin/ipf -I -f - -s >/dev/null 2>&1 && echo OK ;; ipfw) # use $ipfw_offset+$port for rule number @@ -64,17 +64,21 @@ add) /sbin/ipfw table $tname create type addr 2>/dev/null /sbin/ipfw -q table $tname add "$addr/$mask" /sbin/ipfw -q add $rule drop $3 from "table("$tname")" to \ - any dst-port $6 + any dst-port $6 && echo OK ;; npf) /sbin/npfctl rule "$2" add block in final $proto from \ "$addr/$mask" to any $port ;; pf) - # insert $ip/$mask into per-protocol anchored table - /sbin/pfctl -a "$2" -t "port$6" -T add "$addr/$mask" - echo "block in quick $proto from to any $port" | \ - /sbin/pfctl -a "$2" -f - + # if the filtering rule does not exist, create it + /sbin/pfctl -a "$2/$6" -sr 2>/dev/null | \ + grep -q "" || \ + echo "block in quick $proto from to any $port" | \ + /sbin/pfctl -a "$2/$6" -f - + # insert $ip/$mask into per-protocol/port anchored table + /sbin/pfctl -a "$2/$6" -t "port$6" -T add "$addr/$mask" && \ + echo OK ;; esac ;; @@ -83,33 +87,35 @@ rem) ipf) /sbin/ipfstat -io | /sbin/ipf -I -f - >/dev/null 2>&1 echo block in quick $proto from $addr/$mask to \ - any port=$6 head port$6 | \ - /sbin/ipf -I -r -f - -s >/dev/null 2>&1 + any port=$6 head port$6 | \ + /sbin/ipf -I -r -f - -s >/dev/null 2>&1 && echo OK ;; ipfw) - /sbin/ipfw table "port$6" delete "$addr/$mask" 2>/dev/null + /sbin/ipfw table "port$6" delete "$addr/$mask" 2>/dev/null && \ + echo OK ;; npf) /sbin/npfctl rule "$2" rem-id "$7" ;; pf) - /sbin/pfctl -a "$2" -t "port$6" -T delete "$addr/$mask" + /sbin/pfctl -a "$2/$6" -t "port$6" -T delete "$addr/$mask" && \ + echo OK ;; esac ;; flush) case "$pf" in ipf) - /sbin/ipf -Z -I -Fi -s > /dev/null + /sbin/ipf -Z -I -Fi -s > /dev/null && echo OK ;; ipfw) - /sbin/ipfw table "port$6" flush 2>/dev/null + /sbin/ipfw table "port$6" flush 2>/dev/null && echo OK ;; npf) /sbin/npfctl rule "$2" flush ;; pf) - /sbin/pfctl -a "$2" -t "port$6" -T flush + /sbin/pfctl -a "$2/$6" -t "port$6" -T flush && echo OK ;; esac ;; From owner-svn-src-all@freebsd.org Tue Oct 4 23:12:36 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 83D9CAF5084; Tue, 4 Oct 2016 23:12:36 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56EBA783; Tue, 4 Oct 2016 23:12:36 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u94NCZqc007359; Tue, 4 Oct 2016 23:12:35 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u94NCZPv007358; Tue, 4 Oct 2016 23:12:35 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201610042312.u94NCZPv007358@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Tue, 4 Oct 2016 23:12:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306696 - head/etc/periodic/security X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 23:12:36 -0000 Author: lidl Date: Tue Oct 4 23:12:35 2016 New Revision: 306696 URL: https://svnweb.freebsd.org/changeset/base/306696 Log: Make 502.pfdenied find blacklistd/* filter names dynamically This change is needed to make the 520.pfdenied script find the new blacklistd/* anchor points for reporting blocked traffic. Reviewed by: kp MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/etc/periodic/security/520.pfdenied Modified: head/etc/periodic/security/520.pfdenied ============================================================================== --- head/etc/periodic/security/520.pfdenied Tue Oct 4 23:10:43 2016 (r306695) +++ head/etc/periodic/security/520.pfdenied Tue Oct 4 23:12:35 2016 (r306696) @@ -44,8 +44,7 @@ rc=0 if check_yesno_period security_status_pfdenied_enable then TMP=`mktemp -t security` - touch ${TMP} - for _a in "" blacklistd + for _a in "" $(pfctl -a "blacklistd" -sA 2>/dev/null) do pfctl -a ${_a} -sr -v -z 2>/dev/null | \ nawk '{if (/^block/) {buf=$0; getline; gsub(" +"," ",$0); if ($5 > 0) print buf$0;} }' >> ${TMP} From owner-svn-src-all@freebsd.org Wed Oct 5 00:33:08 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29789AF6475; Wed, 5 Oct 2016 00:33:08 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ECB08C25; Wed, 5 Oct 2016 00:33:07 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u950X79o037167; Wed, 5 Oct 2016 00:33:07 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u950X7H7037166; Wed, 5 Oct 2016 00:33:07 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201610050033.u950X7H7037166@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 5 Oct 2016 00:33:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306697 - stable/10/usr.sbin/portsnap/portsnap X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 00:33:08 -0000 Author: emaste Date: Wed Oct 5 00:33:06 2016 New Revision: 306697 URL: https://svnweb.freebsd.org/changeset/base/306697 Log: MFC r306417: portsnap: only move expected snapshot contents from snap/ to files/ Previously it was possible to smuggle in addional files that would be used by later portsnap runs. Now we only move those files expected to be in the snapshot into files/ and require that there are no unexpected files. This was used by portsnap attacks 2, 3, and 4 in the "non-cryptanalytic attacks against FreeBSD update components" anonymous gist. Modified: stable/10/usr.sbin/portsnap/portsnap/portsnap.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/portsnap/portsnap/portsnap.sh ============================================================================== --- stable/10/usr.sbin/portsnap/portsnap/portsnap.sh Tue Oct 4 23:12:35 2016 (r306696) +++ stable/10/usr.sbin/portsnap/portsnap/portsnap.sh Wed Oct 5 00:33:06 2016 (r306697) @@ -686,6 +686,13 @@ fetch_snapshot() { fetch_index_sanity || return 1 # Verify the snapshot contents cut -f 2 -d '|' INDEX.new | fetch_snapshot_verify || return 1 + cut -f 2 -d '|' tINDEX.new INDEX.new | sort -u > files.expected + find snap -mindepth 1 | sed -E 's^snap/(.*)\.gz^\1^' | sort > files.snap + if ! cmp -s files.expected files.snap; then + echo "unexpected files in snapshot." + return 1 + fi + rm files.expected files.snap echo "done." # Move files into their proper locations From owner-svn-src-all@freebsd.org Wed Oct 5 00:33:53 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8223EAF6511; Wed, 5 Oct 2016 00:33:53 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F645DA2; Wed, 5 Oct 2016 00:33:53 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u950XqAo037243; Wed, 5 Oct 2016 00:33:52 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u950Xq98037242; Wed, 5 Oct 2016 00:33:52 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201610050033.u950Xq98037242@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 5 Oct 2016 00:33:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306698 - stable/11/sys/cam X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 00:33:53 -0000 Author: markj Date: Wed Oct 5 00:33:52 2016 New Revision: 306698 URL: https://svnweb.freebsd.org/changeset/base/306698 Log: MFC r306061: Protect ccbq access with devq->send_mtx in the XPT_ABORT handler. Modified: stable/11/sys/cam/cam_xpt.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/cam_xpt.c ============================================================================== --- stable/11/sys/cam/cam_xpt.c Wed Oct 5 00:33:06 2016 (r306697) +++ stable/11/sys/cam/cam_xpt.c Wed Oct 5 00:33:52 2016 (r306698) @@ -2565,21 +2565,25 @@ xpt_action_default(union ccb *start_ccb) abort_ccb = start_ccb->cab.abort_ccb; if (XPT_FC_IS_DEV_QUEUED(abort_ccb)) { + struct cam_ed *device; + struct cam_devq *devq; + + device = abort_ccb->ccb_h.path->device; + devq = device->sim->devq; - if (abort_ccb->ccb_h.pinfo.index >= 0) { - struct cam_ccbq *ccbq; - struct cam_ed *device; - - device = abort_ccb->ccb_h.path->device; - ccbq = &device->ccbq; - cam_ccbq_remove_ccb(ccbq, abort_ccb); + mtx_lock(&devq->send_mtx); + if (abort_ccb->ccb_h.pinfo.index > 0) { + cam_ccbq_remove_ccb(&device->ccbq, abort_ccb); abort_ccb->ccb_h.status = CAM_REQ_ABORTED|CAM_DEV_QFRZN; - xpt_freeze_devq(abort_ccb->ccb_h.path, 1); + xpt_freeze_devq_device(device, 1); + mtx_unlock(&devq->send_mtx); xpt_done(abort_ccb); start_ccb->ccb_h.status = CAM_REQ_CMP; break; } + mtx_unlock(&devq->send_mtx); + if (abort_ccb->ccb_h.pinfo.index == CAM_UNQUEUED_INDEX && (abort_ccb->ccb_h.status & CAM_SIM_QUEUED) == 0) { /* From owner-svn-src-all@freebsd.org Wed Oct 5 00:45:59 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7AADAF6774; Wed, 5 Oct 2016 00:45:59 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88300393; Wed, 5 Oct 2016 00:45:59 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u950jwcq041205; Wed, 5 Oct 2016 00:45:58 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u950jwVp041204; Wed, 5 Oct 2016 00:45:58 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201610050045.u950jwVp041204@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 5 Oct 2016 00:45:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306699 - head/sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 00:45:59 -0000 Author: mav Date: Wed Oct 5 00:45:58 2016 New Revision: 306699 URL: https://svnweb.freebsd.org/changeset/base/306699 Log: Do not retry on some security sense codes. MFC after: 1 week Modified: head/sys/cam/scsi/scsi_all.c Modified: head/sys/cam/scsi/scsi_all.c ============================================================================== --- head/sys/cam/scsi/scsi_all.c Wed Oct 5 00:33:52 2016 (r306698) +++ head/sys/cam/scsi/scsi_all.c Wed Oct 5 00:45:58 2016 (r306699) @@ -3192,10 +3192,10 @@ static struct asc_table_entry asc_table[ { SST(0x74, 0x6F, SS_RDEF, /* XXX TBD */ "External data encryption control error") }, /* DT R M E V */ - { SST(0x74, 0x71, SS_RDEF, /* XXX TBD */ + { SST(0x74, 0x71, SS_FATAL | EACCES, "Logical unit access not authorized") }, /* D */ - { SST(0x74, 0x79, SS_RDEF, /* XXX TBD */ + { SST(0x74, 0x79, SS_FATAL | EACCES, "Security conflict in translated device") } }; From owner-svn-src-all@freebsd.org Wed Oct 5 00:49:40 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FDECAF67F4; Wed, 5 Oct 2016 00:49:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44BC87A4; Wed, 5 Oct 2016 00:49:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u950ndMP041389; Wed, 5 Oct 2016 00:49:39 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u950ndSL041388; Wed, 5 Oct 2016 00:49:39 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201610050049.u950ndSL041388@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 5 Oct 2016 00:49:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306700 - stable/11/sys/conf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 00:49:40 -0000 Author: jhb Date: Wed Oct 5 00:49:39 2016 New Revision: 306700 URL: https://svnweb.freebsd.org/changeset/base/306700 Log: MFC 303226: Fix kernel builds with "device cxgbe". Modified: stable/11/sys/conf/files Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/files ============================================================================== --- stable/11/sys/conf/files Wed Oct 5 00:45:58 2016 (r306699) +++ stable/11/sys/conf/files Wed Oct 5 00:49:39 2016 (r306700) @@ -1244,6 +1244,7 @@ dev/cxgb/sys/uipc_mvec.c optional cxgb p compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/cxgb_t3fw.c optional cxgb cxgb_t3fw \ compile-with "${NORMAL_C} -I$S/dev/cxgb" +dev/cxgbe/t4_if.m optional cxgbe pci dev/cxgbe/t4_iov.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_mp_ring.c optional cxgbe pci \ From owner-svn-src-all@freebsd.org Wed Oct 5 00:49:46 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E3BCAF6828; Wed, 5 Oct 2016 00:49:46 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id CEE0E855; Wed, 5 Oct 2016 00:49:45 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-106-163-102.carlnfd1.nsw.optusnet.com.au (c122-106-163-102.carlnfd1.nsw.optusnet.com.au [122.106.163.102]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 9871F3C254B; Wed, 5 Oct 2016 11:19:17 +1100 (AEDT) Date: Wed, 5 Oct 2016 11:19:10 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Gleb Smirnoff cc: Eric van Gyzen , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306346 - head/sys/kern In-Reply-To: <20161004205600.GN23123@FreeBSD.org> Message-ID: <20161005101932.U984@besplex.bde.org> References: <201609261530.u8QFUUZd020174@repo.freebsd.org> <20161004205600.GN23123@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=CoZCCSMD c=1 sm=1 tr=0 a=IXAyHK3mFcy+1kvmsno0Fw==:117 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=U5UPkUwmBUP_buS78hMA:9 a=CjuIK1q_8ugA:10 a=chvjmp5bT-K0Np4W8Gpx:22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 00:49:46 -0000 On Tue, 4 Oct 2016, Gleb Smirnoff wrote: > On Mon, Sep 26, 2016 at 03:30:30PM +0000, Eric van Gyzen wrote: > E> ... > E> Modified: head/sys/kern/kern_mutex.c > E> ============================================================================== > E> --- head/sys/kern/kern_mutex.c Mon Sep 26 15:03:31 2016 (r306345) > E> +++ head/sys/kern/kern_mutex.c Mon Sep 26 15:30:30 2016 (r306346) > E> @@ -924,7 +924,7 @@ __mtx_assert(const volatile uintptr_t *c > E> { > E> const struct mtx *m; > E> > E> - if (panicstr != NULL || dumping) > E> + if (panicstr != NULL || dumping || SCHEDULER_STOPPED()) > E> return; > > I wonder if all this disjunct can be reduced just to SCHEDULER_STOPPED()? > Positive panicstr and dumping imply scheduler stopped. 'dumping' doesn't imply SCHEDULER_STOPPED(). Checking 'dumping' here seems to be just an old bug. It just breaks __mtx_assert(), while all other mutex operations work normally for dumping without panicing. kern doesn't have this bug anywhere else. It just has style bugs for most references to 'dumping': X kern_mutex.c: * re-enable interrupts while dumping core. This is under another recent fix involving SCHEDULER_STOPPED(). X kern_mutex.c: if (panicstr != NULL || dumping || SCHEDULER_STOPPED()) Broken. X kern_shutdown.c:int dumping; /* system is dumping */ Banal comment. X kern_shutdown.c: if (dumping) X kern_shutdown.c: dumping++; X kern_shutdown.c: dumping--; Obfuscation of a boolean by manually optimizing its setting for PDP-11. X kern_shutdown.c: if ((howto & (RB_HALT|RB_DUMP)) == RB_DUMP && !cold && !dumping) Missing spaced around binary operator. X sched_4bsd.c: if (panicstr != NULL || pri >= cpri || cold /* || dumping */ || Here the bogus test for dumping is commented out. This is in maybe_preempt(). There is a TD_IS_INHIBITED() check. sched_ule.c has similar code without the commented-out 'dumping'. Neither checks SCHEDULER_STOPPED(). It is certainly useless to preempt if SCHEDULER_STOPPED(), but perhaps checking it is unnecessary. I don't like the design or implementation of SCHEDULER_STOPPED(). It is a hack to specially break mutexes while panicing. Panicing stops the scheduler and tries to stop all other CPUs (fixed in my version to either actually stop them all, with special stopping for NMI handlers, or hang waiting) and we set the flag curthread->td_stopsched to indicate that the scheduler is specially stopped for panic. Bugs in the implementation of this include: - 2 bytes are wasted in struct thread to hold the flag. This is a dubious obfuscation of an old version that used a global flag - despite this optimization, all mutex operations should be slowed down by testing this flag - however, the inlined mutex operations don't test this flag. This gives inconsistencies. __mtx_assert() needed the fix in this commit to not detect these inconsistencies Bugs in the design of this include: - SCHEDULER_STOPPED() doesn't really mean that the scheduler has stopped. It means that we are panicing and have (tried to) stop other CPUs and want to forcer all mutex operations to silently succeed without keeping the mutex state consistent. This is fragile. Nothing can depend on mutexes working or mutex assertions finding inconsistencies or on mtx_owned() working, so the SCHEDULER_STOPPED() check must be done in more than central mutex code. It is confusing that this condition doesn't mean that the scheduler is stopped. It means that a certain state in panicing has been reached. Bruce From owner-svn-src-all@freebsd.org Wed Oct 5 01:01:11 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C22ABAF69E9; Wed, 5 Oct 2016 01:01:11 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FB8BE84; Wed, 5 Oct 2016 01:01:11 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9511A4W046608; Wed, 5 Oct 2016 01:01:10 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9511AU5046607; Wed, 5 Oct 2016 01:01:10 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201610050101.u9511AU5046607@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 5 Oct 2016 01:01:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r306701 - stable/9/usr.sbin/portsnap/portsnap X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 01:01:11 -0000 Author: emaste Date: Wed Oct 5 01:01:10 2016 New Revision: 306701 URL: https://svnweb.freebsd.org/changeset/base/306701 Log: MFC r306417: portsnap: only move expected snapshot contents from snap/ to files/ Previously it was possible to smuggle in addional files that would used by later portsnap runs. Now we only move those files expected to be in the snapshot into files/ and require that there are no unexpected files. This was used by portsnap attacks 2, 3, and 4 in the "non-cryptanalytic attacks against FreeBSD update components" anonymous gist. Modified: stable/9/usr.sbin/portsnap/portsnap/portsnap.sh Directory Properties: stable/9/usr.sbin/portsnap/portsnap/ (props changed) Modified: stable/9/usr.sbin/portsnap/portsnap/portsnap.sh ============================================================================== --- stable/9/usr.sbin/portsnap/portsnap/portsnap.sh Wed Oct 5 00:49:39 2016 (r306700) +++ stable/9/usr.sbin/portsnap/portsnap/portsnap.sh Wed Oct 5 01:01:10 2016 (r306701) @@ -649,6 +649,13 @@ fetch_snapshot() { fetch_index_sanity || return 1 # Verify the snapshot contents cut -f 2 -d '|' INDEX.new | fetch_snapshot_verify || return 1 + cut -f 2 -d '|' tINDEX.new INDEX.new | sort -u > files.expected + find snap -mindepth 1 | sed -E 's^snap/(.*)\.gz^\1^' | sort > files.snap + if ! cmp -s files.expected files.snap; then + echo "unexpected files in snapshot." + return 1 + fi + rm files.expected files.snap echo "done." # Move files into their proper locations From owner-svn-src-all@freebsd.org Wed Oct 5 03:21:59 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC67AAF5BE5; Wed, 5 Oct 2016 03:21:59 +0000 (UTC) (envelope-from kevlo@ns.kevlo.org) Received: from ns.kevlo.org (220-135-115-6.HINET-IP.hinet.net [220.135.115.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ns.kevlo.org", Issuer "ns.kevlo.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7DBCB955; Wed, 5 Oct 2016 03:21:58 +0000 (UTC) (envelope-from kevlo@ns.kevlo.org) Received: from ns.kevlo.org (localhost [127.0.0.1]) by ns.kevlo.org (8.15.2/8.15.2) with ESMTPS id u953Kxfx074698 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 5 Oct 2016 11:20:59 +0800 (CST) (envelope-from kevlo@ns.kevlo.org) Received: (from kevlo@localhost) by ns.kevlo.org (8.15.2/8.15.2/Submit) id u953KwxI074697; Wed, 5 Oct 2016 11:20:58 +0800 (CST) (envelope-from kevlo) Date: Wed, 5 Oct 2016 11:20:58 +0800 From: Kevin Lo To: Gleb Smirnoff Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r305824 - in head/sys: contrib/ipfilter/netinet kern net netinet netinet6 netipsec sys Message-ID: <20161005032057.GA74690@ns.kevlo.org> References: <201609150741.u8F7fmcM059138@repo.freebsd.org> <20161004190920.GL23123@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161004190920.GL23123@FreeBSD.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 03:22:00 -0000 On Tue, Oct 04, 2016 at 12:09:20PM -0700, Gleb Smirnoff wrote: > > Kevin, Hi Gleb, > On Thu, Sep 15, 2016 at 07:41:48AM +0000, Kevin Lo wrote: > K> Log: > K> Remove the 4.3BSD compatible macro m_copy(), use m_copym() instead. > ... > K> Modified: head/sys/contrib/ipfilter/netinet/fil.c > K> ============================================================================== > K> --- head/sys/contrib/ipfilter/netinet/fil.c Thu Sep 15 02:48:56 2016 (r305823) > K> +++ head/sys/contrib/ipfilter/netinet/fil.c Thu Sep 15 07:41:48 2016 (r305824) > K> @@ -3226,7 +3226,7 @@ filterdone: > K> fdp = fin->fin_dif; > K> if ((fdp != NULL) && (fdp->fd_ptr != NULL) && > K> (fdp->fd_ptr != (void *)-1)) { > K> - mc = M_COPY(fin->fin_m); > K> + mc = M_COPYM(fin->fin_m); > K> if (mc != NULL) > K> ipf_fastroute(mc, &mc, fin, fdp); > K> } > K> > K> Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h > K> ============================================================================== > K> --- head/sys/contrib/ipfilter/netinet/ip_compat.h Thu Sep 15 02:48:56 2016 (r305823) > K> +++ head/sys/contrib/ipfilter/netinet/ip_compat.h Thu Sep 15 07:41:48 2016 (r305824) > K> @@ -211,7 +211,7 @@ struct ether_addr { > K> # define MSGDSIZE(m) mbufchainlen(m) > K> # define M_LEN(m) (m)->m_len > K> # define M_ADJ(m,x) m_adj(m, x) > K> -# define M_COPY(x) m_copy((x), 0, M_COPYALL) > K> +# define M_COPYM(x) m_copym((x), 0, M_COPYALL, M_NOWAIT) > K> # define M_DUP(m) m_dup(m, M_NOWAIT) > K> # define IPF_PANIC(x,y) if (x) { printf y; panic("ipf_panic"); } > K> typedef struct mbuf mb_t; > K> @@ -366,7 +366,7 @@ typedef struct mb_s { > K> # define MSGDSIZE(m) msgdsize(m) > K> # define M_LEN(m) (m)->mb_len > K> # define M_ADJ(m,x) (m)->mb_len += x > K> -# define M_COPY(m) dupmbt(m) > K> +# define M_COPYM(m) dupmbt(m) > K> # define M_DUP(m) dupmbt(m) > K> # define GETKTIME(x) gettimeofday((struct timeval *)(x), NULL) > K> # define MTOD(m, t) ((t)(m)->mb_data) > > IMHO, for contributed ipfilter we should only modify ip_compat.h and ip_fil_freebsd.c. > In case of removal of m_copy() the macro should remain named M_COPY(), but it should be > defined to call to function of m_copym(). So fil.c can be left unmodified, and ip_compat.h > will have only 1 line change. The userland part of ip_compat.h which defines M_COPY() to > dupmbt() doesn't need to be renamed as well. Actually your comments were addressed in my original patch, but rwatson@ pointed out that switching M_COPY() to M_COPYM() for consistency: https://reviews.freebsd.org/D7878#163304 > -- > Totus tuus, Glebius. Kevin From owner-svn-src-all@freebsd.org Wed Oct 5 03:48:41 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9FC62AF4606; Wed, 5 Oct 2016 03:48:41 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4A6B9929; Wed, 5 Oct 2016 03:48:40 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id rdC3bR4Y4fI0ardC4bqWca; Tue, 04 Oct 2016 21:48:33 -0600 X-Authority-Analysis: v=2.2 cv=JOx5iICb c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=CH0kA5CcgfcA:10 a=SAfkavq5AAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=OHVipD7GlL4V5qlsAQ8A:9 a=CjuIK1q_8ugA:10 a=QZZ0i9YZlR7GoCpEi5UP:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTPS id 0E4A8E7; Tue, 4 Oct 2016 20:48:30 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id u953mErl056310; Tue, 4 Oct 2016 20:48:15 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201610050348.u953mErl056310@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Kevin Lo cc: Gleb Smirnoff , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r305824 - in head/sys: contrib/ipfilter/netinet kern net netinet netinet6 netipsec sys In-Reply-To: Message from Kevin Lo of "Wed, 05 Oct 2016 11:20:58 +0800." <20161005032057.GA74690@ns.kevlo.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 04 Oct 2016 20:48:14 -0700 X-CMAE-Envelope: MS4wfJxJ3iZ/MplaFe+fMC9LLnrotxY707bt0td3Ra8VhVewGK88bbyzJEG4PADlPiLpGw+tXuQRIC02pliddlsV2oYBdhJmZuzBhaJZoY4/ANEAaNCzfMpW flVVSN6uEK8U8J4Ik1Q+MrHEPyKnPbKOf6lw0ljhxNwMZBtxqnkc7dfn1kBcQBx+QrqltD6yjVcqrJP0Slz9VMjDU5gxWJkRBYQ8UXhLBmOs0X4WO7uy64D6 R9ussjT6osjeXCK9ZPIq31A1zlYRy/Wtl32OBuG0CmtACgViSJRW67jTZJWRhg0SIBackAz2NIUu0FfLneEVcQ== X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 03:48:41 -0000 In message <20161005032057.GA74690@ns.kevlo.org>, Kevin Lo writes: > On Tue, Oct 04, 2016 at 12:09:20PM -0700, Gleb Smirnoff wrote: > > > > Kevin, > > Hi Gleb, > > > On Thu, Sep 15, 2016 at 07:41:48AM +0000, Kevin Lo wrote: > > K> Log: > > K> Remove the 4.3BSD compatible macro m_copy(), use m_copym() instead. > > ... > > K> Modified: head/sys/contrib/ipfilter/netinet/fil.c > > K> ======================================================================== > ====== > > K> --- head/sys/contrib/ipfilter/netinet/fil.c Thu Sep 15 02:48:56 201 > 6 (r305823) > > K> +++ head/sys/contrib/ipfilter/netinet/fil.c Thu Sep 15 07:41:48 201 > 6 (r305824) > > K> @@ -3226,7 +3226,7 @@ filterdone: > > K> fdp = fin->fin_dif; > > K> if ((fdp != NULL) && (fdp->fd_ptr != NULL) && > > K> (fdp->fd_ptr != (void *)-1)) { > > K> - mc = M_COPY(fin->fin_m); > > K> + mc = M_COPYM(fin->fin_m); > > K> if (mc != NULL) > > K> ipf_fastroute(mc, &mc, fin, fdp); > > K> } > > K> > > K> Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h > > K> ======================================================================== > ====== > > K> --- head/sys/contrib/ipfilter/netinet/ip_compat.h Thu Sep 15 02:4 > 8:56 2016 (r305823) > > K> +++ head/sys/contrib/ipfilter/netinet/ip_compat.h Thu Sep 15 07:4 > 1:48 2016 (r305824) > > K> @@ -211,7 +211,7 @@ struct ether_addr { > > K> # define MSGDSIZE(m) mbufchainlen(m) > > K> # define M_LEN(m) (m)->m_len > > K> # define M_ADJ(m,x) m_adj(m, x) > > K> -# define M_COPY(x) m_copy((x), 0, M_COPYALL) > > K> +# define M_COPYM(x) m_copym((x), 0, M_COPYALL, M_NOWAIT) > > K> # define M_DUP(m) m_dup(m, M_NOWAIT) > > K> # define IPF_PANIC(x,y) if (x) { printf y; panic("ipf_panic"); > } > > K> typedef struct mbuf mb_t; > > K> @@ -366,7 +366,7 @@ typedef struct mb_s { > > K> # define MSGDSIZE(m) msgdsize(m) > > K> # define M_LEN(m) (m)->mb_len > > K> # define M_ADJ(m,x) (m)->mb_len += x > > K> -# define M_COPY(m) dupmbt(m) > > K> +# define M_COPYM(m) dupmbt(m) > > K> # define M_DUP(m) dupmbt(m) > > K> # define GETKTIME(x) gettimeofday((struct timeval *)(x), NUL > L) > > K> # define MTOD(m, t) ((t)(m)->mb_data) > > > > IMHO, for contributed ipfilter we should only modify ip_compat.h and ip_fil > _freebsd.c. > > In case of removal of m_copy() the macro should remain named M_COPY(), but > it should be > > defined to call to function of m_copym(). So fil.c can be left unmodified, > and ip_compat.h > > will have only 1 line change. The userland part of ip_compat.h which define > s M_COPY() to > > dupmbt() doesn't need to be renamed as well. > > Actually your comments were addressed in my original patch, but rwatson@ > pointed out that switching M_COPY() to M_COPYM() for consistency: > https://reviews.freebsd.org/D7878#163304 There is no really easy answer to this. Yes, it's nice, even important, to have consistency across the entire tree. On the flip side, keeping the number of non-functional changes to contributed software to a minimum aids merge of future releases. There are advantages and disadvantages to each. One could even go so far as to modify contributed software to comply with FreeBSD style(9) standards (extreme example). However, merge of new releases would constitute a POLA violation to future developers merging new releases into the tree. I think leaving as vanilla as possible aids in future maintenance and upgrades. My vote would be that the macro remain named M_COPY(). The downside of this is that someone not well versed with a certain contrib code might be astonished at the use of a different macro. There are pluses and minuses to either approach but I think that the merge argument may be a stronger argument for M_COPY() remaining in contrib code. It's not inconceivable that mis-merges can be and are the cause of some interesting bugs. That's my $0.02. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Wed Oct 5 04:40:50 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0DDB2AF6172; Wed, 5 Oct 2016 04:40:50 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D492BFB7; Wed, 5 Oct 2016 04:40:49 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u954enf9028711; Wed, 5 Oct 2016 04:40:49 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u954enFt028710; Wed, 5 Oct 2016 04:40:49 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201610050440.u954enFt028710@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 5 Oct 2016 04:40:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306702 - head/sys/powerpc/mpc85xx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 04:40:50 -0000 Author: jhibbits Date: Wed Oct 5 04:40:48 2016 New Revision: 306702 URL: https://svnweb.freebsd.org/changeset/base/306702 Log: Fix e500mc/derivatives cpu idle Setting the doze registers wasn't actually working, and was being masked by a bad #ifdef. Since the #ifdef was fixed, now e500mc-based SoCs hang at idle. Fix this by using the intended wait. MFC after: 1 week Modified: head/sys/powerpc/mpc85xx/platform_mpc85xx.c Modified: head/sys/powerpc/mpc85xx/platform_mpc85xx.c ============================================================================== --- head/sys/powerpc/mpc85xx/platform_mpc85xx.c Wed Oct 5 01:01:10 2016 (r306701) +++ head/sys/powerpc/mpc85xx/platform_mpc85xx.c Wed Oct 5 04:40:48 2016 (r306702) @@ -530,9 +530,11 @@ mpc85xx_idle(platform_t plat, int cpu) uint32_t reg; if (mpc85xx_is_qoriq()) { - reg = ccsr_read4(OCP85XX_RCPM_CDOZCR); - ccsr_write4(OCP85XX_RCPM_CDOZCR, reg | (1 << cpu)); - ccsr_read4(OCP85XX_RCPM_CDOZCR); + /* + * Base binutils doesn't know what the 'wait' instruction is, so + * use the opcode encoding here. + */ + __asm __volatile("wrteei 1; .long 0x7c00007c"); } else { reg = mfmsr(); /* Freescale E500 core RM section 6.4.1. */ @@ -544,15 +546,6 @@ mpc85xx_idle(platform_t plat, int cpu) static int mpc85xx_idle_wakeup(platform_t plat, int cpu) { - uint32_t reg; - - if (mpc85xx_is_qoriq()) { - reg = ccsr_read4(OCP85XX_RCPM_CDOZCR); - ccsr_write4(OCP85XX_RCPM_CDOZCR, reg & ~(1 << cpu)); - ccsr_read4(OCP85XX_RCPM_CDOZCR); - - return (1); - } return (0); } From owner-svn-src-all@freebsd.org Wed Oct 5 12:17:44 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5133AF6AE5; Wed, 5 Oct 2016 12:17:44 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3A6382A; Wed, 5 Oct 2016 12:17:44 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95CHh3d003769; Wed, 5 Oct 2016 12:17:43 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95CHhVx003768; Wed, 5 Oct 2016 12:17:43 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201610051217.u95CHhVx003768@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Wed, 5 Oct 2016 12:17:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306703 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 12:17:45 -0000 Author: mmel Date: Wed Oct 5 12:17:43 2016 New Revision: 306703 URL: https://svnweb.freebsd.org/changeset/base/306703 Log: ARM: Disconnect elf_trampoline.c from ARMv6 build. The trampoline code never functioned properly for Cortex CPUs, and its functionality is already provided by ubldr. Modified: head/sys/conf/Makefile.arm Modified: head/sys/conf/Makefile.arm ============================================================================== --- head/sys/conf/Makefile.arm Wed Oct 5 04:40:48 2016 (r306702) +++ head/sys/conf/Makefile.arm Wed Oct 5 12:17:43 2016 (r306703) @@ -74,7 +74,7 @@ FILES_CPU_FUNC = \ $S/$M/$M/cpufunc_asm_pj4b.S $S/$M/$M/cpufunc_asm_armv6.S \ $S/$M/$M/cpufunc_asm_armv7.S -.if defined(KERNPHYSADDR) +.if ${TARGET_ARCH} != "armv6" && defined(KERNPHYSADDR) KERNEL_EXTRA=trampoline KERNEL_EXTRA_INSTALL=kernel.gz.tramp trampoline: ${KERNEL_KO}.tramp From owner-svn-src-all@freebsd.org Wed Oct 5 12:19:10 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE099AF6B67; Wed, 5 Oct 2016 12:19:10 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 959539C9; Wed, 5 Oct 2016 12:19:10 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95CJ9sj003890; Wed, 5 Oct 2016 12:19:09 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95CJ9Ma003887; Wed, 5 Oct 2016 12:19:09 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201610051219.u95CJ9Ma003887@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Wed, 5 Oct 2016 12:19:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306704 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 12:19:10 -0000 Author: mmel Date: Wed Oct 5 12:19:09 2016 New Revision: 306704 URL: https://svnweb.freebsd.org/changeset/base/306704 Log: ARM: Remove next bunch of unused cpu_functions from ARMv6. Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/arm/machdep.c head/sys/arm/include/cpufunc.h Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Wed Oct 5 12:17:43 2016 (r306703) +++ head/sys/arm/arm/cpufunc.c Wed Oct 5 12:19:09 2016 (r306704) @@ -242,9 +242,6 @@ struct cpu_functions sheeva_cpufuncs = { #ifdef CPU_MV_PJ4B struct cpu_functions pj4bv7_cpufuncs = { - /* MMU functions */ - .cf_control = cpufunc_control, - .cf_setttb = armv7_setttb, /* Cache operations */ .cf_l2cache_wbinv_all = (void *)cpufunc_nullop, @@ -254,7 +251,6 @@ struct cpu_functions pj4bv7_cpufuncs = { .cf_l2cache_drain_writebuf = (void *)cpufunc_nullop, /* Other functions */ - .cf_drain_writebuf = armv7_drain_writebuf, .cf_sleep = (void *)cpufunc_nullop, /* Soft functions */ @@ -418,9 +414,6 @@ struct cpu_functions fa526_cpufuncs = { #if defined(CPU_ARM1176) struct cpu_functions arm1176_cpufuncs = { - /* MMU functions */ - .cf_control = cpufunc_control, - .cf_setttb = arm11x6_setttb, /* Cache operations */ .cf_l2cache_wbinv_all = (void *)cpufunc_nullop, @@ -430,7 +423,6 @@ struct cpu_functions arm1176_cpufuncs = .cf_l2cache_drain_writebuf = (void *)cpufunc_nullop, /* Other functions */ - .cf_drain_writebuf = arm11_drain_writebuf, .cf_sleep = arm11x6_sleep, /* Soft functions */ @@ -440,9 +432,6 @@ struct cpu_functions arm1176_cpufuncs = #if defined(CPU_CORTEXA8) || defined(CPU_CORTEXA_MP) || defined(CPU_KRAIT) struct cpu_functions cortexa_cpufuncs = { - /* MMU functions */ - .cf_control = cpufunc_control, - .cf_setttb = armv7_setttb, /* Cache operations */ @@ -457,7 +446,6 @@ struct cpu_functions cortexa_cpufuncs = .cf_l2cache_drain_writebuf = (void *)cpufunc_nullop, /* Other functions */ - .cf_drain_writebuf = armv7_drain_writebuf, .cf_sleep = armv7_cpu_sleep, /* Soft functions */ Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Wed Oct 5 12:17:43 2016 (r306703) +++ head/sys/arm/arm/machdep.c Wed Oct 5 12:19:09 2016 (r306704) @@ -412,7 +412,7 @@ arm_vector_init(vm_offset_t va, int whic icache_sync(va, (ARM_NVEC * 2) * sizeof(u_int)); vector_page = va; - +#if __ARM_ARCH < 6 if (va == ARM_VECTORS_HIGH) { /* * Enable high vectors in the system control reg (SCTLR). @@ -427,6 +427,7 @@ arm_vector_init(vm_offset_t va, int whic */ cpu_control(CPU_CONTROL_VECRELOC, CPU_CONTROL_VECRELOC); } +#endif } static void Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Wed Oct 5 12:17:43 2016 (r306703) +++ head/sys/arm/include/cpufunc.h Wed Oct 5 12:19:09 2016 (r306704) @@ -61,14 +61,12 @@ struct cpu_functions { /* CPU functions */ #if __ARM_ARCH < 6 void (*cf_cpwait) (void); -#endif /* MMU functions */ u_int (*cf_control) (u_int bic, u_int eor); void (*cf_setttb) (u_int ttb); -#if __ARM_ARCH < 6 /* TLB functions */ void (*cf_tlb_flushID) (void); @@ -150,7 +148,9 @@ struct cpu_functions { /* Other functions */ +#if __ARM_ARCH < 6 void (*cf_drain_writebuf) (void); +#endif void (*cf_sleep) (int mode); From owner-svn-src-all@freebsd.org Wed Oct 5 14:00:07 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 294E3AF5F49; Wed, 5 Oct 2016 14:00:07 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ECA31E1E; Wed, 5 Oct 2016 14:00:06 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95E06ac043311; Wed, 5 Oct 2016 14:00:06 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95E06Lf043310; Wed, 5 Oct 2016 14:00:06 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201610051400.u95E06Lf043310@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 5 Oct 2016 14:00:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306705 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 14:00:07 -0000 Author: andrew Date: Wed Oct 5 14:00:05 2016 New Revision: 306705 URL: https://svnweb.freebsd.org/changeset/base/306705 Log: We don't use cpu_control on armv6, remove the macro there. Modified: head/sys/arm/include/cpufunc.h Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Wed Oct 5 12:19:09 2016 (r306704) +++ head/sys/arm/include/cpufunc.h Wed Oct 5 14:00:05 2016 (r306705) @@ -168,10 +168,8 @@ extern u_int cputype; #if __ARM_ARCH < 6 #define cpu_cpwait() cpufuncs.cf_cpwait() -#endif #define cpu_control(c, e) cpufuncs.cf_control(c, e) -#if __ARM_ARCH < 6 #define cpu_setttb(t) cpufuncs.cf_setttb(t) #define cpu_tlb_flushID() cpufuncs.cf_tlb_flushID() @@ -190,6 +188,7 @@ extern u_int cputype; #define cpu_idcache_wbinv_all() cpufuncs.cf_idcache_wbinv_all() #define cpu_idcache_wbinv_range(a, s) cpufuncs.cf_idcache_wbinv_range((a), (s)) #endif + #define cpu_l2cache_wbinv_all() cpufuncs.cf_l2cache_wbinv_all() #define cpu_l2cache_wb_range(a, s) cpufuncs.cf_l2cache_wb_range((a), (s)) #define cpu_l2cache_inv_range(a, s) cpufuncs.cf_l2cache_inv_range((a), (s)) From owner-svn-src-all@freebsd.org Wed Oct 5 16:15:27 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E087EAF5803; Wed, 5 Oct 2016 16:15:27 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B01861339; Wed, 5 Oct 2016 16:15:27 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95GFQxt097264; Wed, 5 Oct 2016 16:15:26 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95GFQk8097263; Wed, 5 Oct 2016 16:15:26 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201610051615.u95GFQk8097263@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Wed, 5 Oct 2016 16:15:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306706 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 16:15:28 -0000 Author: alc Date: Wed Oct 5 16:15:26 2016 New Revision: 306706 URL: https://svnweb.freebsd.org/changeset/base/306706 Log: Change vm_pageout_scan() to return a value indicating whether the free page target was met. Previously, vm_pageout_worker() itself checked the length of the free page queues to determine whether vm_pageout_scan(pass >= 1)'s inactive queue scan freed enough pages to meet the free page target. Specifically, vm_pageout_worker() used vm_paging_needed(). The trouble with vm_paging_needed() is that it compares the length of the free page queues to the wakeup threshold for the page daemon, which is much lower than the free page target. Consequently, vm_pageout_worker() could conclude that the inactive queue scan succeeded in meeting its free page target when in fact it did not; and rather than immediately triggering an all-out laundering pass over the inactive queue, vm_pageout_worker() would go back to sleep waiting for the free page count to fall below the page daemon wakeup threshold again, at which point it will perform another limited (pass == 1) scan over the inactive queue. Changing vm_pageout_worker() to use vm_page_count_target() instead of vm_paging_needed() won't work because any page allocations that happen concurrently with the inactive queue scan will result in the free page count being below the target at the end of a successful scan. Instead, having vm_pageout_scan() return a value indicating success or failure is the most straightforward fix. Reviewed by: kib, markj MFC after: 3 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D8111 Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Wed Oct 5 14:00:05 2016 (r306705) +++ head/sys/vm/vm_pageout.c Wed Oct 5 16:15:26 2016 (r306706) @@ -121,7 +121,7 @@ static void vm_pageout(void); static void vm_pageout_init(void); static int vm_pageout_clean(vm_page_t m); static int vm_pageout_cluster(vm_page_t m); -static void vm_pageout_scan(struct vm_domain *vmd, int pass); +static bool vm_pageout_scan(struct vm_domain *vmd, int pass); static void vm_pageout_mightbe_oom(struct vm_domain *vmd, int page_shortage, int starting_page_shortage); @@ -845,17 +845,20 @@ unlock_mp: * pass 0 - Update active LRU/deactivate pages * pass 1 - Free inactive pages * pass 2 - Launder dirty pages + * + * Returns true if pass was zero or enough pages were freed by the inactive + * queue scan to meet the target. */ -static void +static bool vm_pageout_scan(struct vm_domain *vmd, int pass) { vm_page_t m, next; struct vm_pagequeue *pq; vm_object_t object; long min_scan; - int act_delta, addl_page_shortage, deficit, error, maxlaunder, maxscan; - int page_shortage, scan_tick, scanned, starting_page_shortage; - int vnodes_skipped; + int act_delta, addl_page_shortage, deficit, error, inactq_shortage; + int maxlaunder, maxscan, page_shortage, scan_tick, scanned; + int starting_page_shortage, vnodes_skipped; boolean_t pageout_ok, queue_locked; /* @@ -886,7 +889,9 @@ vm_pageout_scan(struct vm_domain *vmd, i addl_page_shortage = 0; /* - * Calculate the number of pages that we want to free. + * Calculate the number of pages that we want to free. This number + * can be negative if many pages are freed between the wakeup call to + * the page daemon and this calculation. */ if (pass > 0) { deficit = atomic_readandclear_int(&vm_pageout_deficit); @@ -956,7 +961,7 @@ vm_pageout_scan(struct vm_domain *vmd, i * Held pages are essentially stuck in the * queue. So, they ought to be discounted * from the inactive count. See the - * calculation of the page_shortage for the + * calculation of inactq_shortage before the * loop over the active queue below. */ addl_page_shortage++; @@ -1164,7 +1169,7 @@ relock_queue: * Compute the number of pages we want to try to move from the * active queue to the inactive queue. */ - page_shortage = vm_cnt.v_inactive_target - vm_cnt.v_inactive_count + + inactq_shortage = vm_cnt.v_inactive_target - vm_cnt.v_inactive_count + vm_paging_target() + deficit + addl_page_shortage; pq = &vmd->vmd_pagequeues[PQ_ACTIVE]; @@ -1182,7 +1187,7 @@ relock_queue: min_scan /= hz * vm_pageout_update_period; } else min_scan = 0; - if (min_scan > 0 || (page_shortage > 0 && maxscan > 0)) + if (min_scan > 0 || (inactq_shortage > 0 && maxscan > 0)) vmd->vmd_last_active_scan = scan_tick; /* @@ -1191,7 +1196,7 @@ relock_queue: * candidates. Held pages may be deactivated. */ for (m = TAILQ_FIRST(&pq->pq_pl), scanned = 0; m != NULL && (scanned < - min_scan || (page_shortage > 0 && scanned < maxscan)); m = next, + min_scan || (inactq_shortage > 0 && scanned < maxscan)); m = next, scanned++) { KASSERT(m->queue == PQ_ACTIVE, ("vm_pageout_scan: page %p isn't active", m)); @@ -1256,7 +1261,7 @@ relock_queue: /* Dequeue to avoid later lock recursion. */ vm_page_dequeue_locked(m); vm_page_deactivate(m); - page_shortage--; + inactq_shortage--; } else vm_page_requeue_locked(m); vm_page_unlock(m); @@ -1275,6 +1280,7 @@ relock_queue: } } #endif + return (page_shortage <= 0); } static int vm_pageout_oom_vote; @@ -1504,9 +1510,11 @@ vm_pageout_worker(void *arg) { struct vm_domain *domain; int domidx; + bool target_met; domidx = (uintptr_t)arg; domain = &vm_dom[domidx]; + target_met = true; /* * XXXKIB It could be useful to bind pageout daemon threads to @@ -1545,11 +1553,11 @@ vm_pageout_worker(void *arg) } /* - * Do not clear vm_pageout_wanted until we reach our target. - * Otherwise, we may be awakened over and over again, wasting - * CPU time. + * Do not clear vm_pageout_wanted until we reach our free page + * target. Otherwise, we may be awakened over and over again, + * wasting CPU time. */ - if (vm_pageout_wanted && !vm_paging_needed()) + if (vm_pageout_wanted && target_met) vm_pageout_wanted = false; /* @@ -1584,7 +1592,7 @@ vm_pageout_worker(void *arg) domain->vmd_pass = 0; } - vm_pageout_scan(domain, domain->vmd_pass); + target_met = vm_pageout_scan(domain, domain->vmd_pass); } } From owner-svn-src-all@freebsd.org Wed Oct 5 16:23:03 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB901AF5AB4; Wed, 5 Oct 2016 16:23:03 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A9C7C183C; Wed, 5 Oct 2016 16:23:03 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95GN2Bn000976; Wed, 5 Oct 2016 16:23:02 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95GN2G2000975; Wed, 5 Oct 2016 16:23:02 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201610051623.u95GN2G2000975@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Wed, 5 Oct 2016 16:23:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306707 - head/lib/libcasper/libcasper X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 16:23:04 -0000 Author: oshogbo Date: Wed Oct 5 16:23:02 2016 New Revision: 306707 URL: https://svnweb.freebsd.org/changeset/base/306707 Log: Fix naming in Casper man page. Modified: head/lib/libcasper/libcasper/libcasper.3 Modified: head/lib/libcasper/libcasper/libcasper.3 ============================================================================== --- head/lib/libcasper/libcasper/libcasper.3 Wed Oct 5 16:15:26 2016 (r306706) +++ head/lib/libcasper/libcasper/libcasper.3 Wed Oct 5 16:23:02 2016 (r306707) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 25, 2016 +.Dd October 5, 2016 .Dt LIBCASPER 3 .Os .Sh NAME @@ -75,7 +75,7 @@ .Fn cap_service_open "const cap_channel_t *chan" "const char *name" .Sh DESCRIPTION The -.Nm libcapsicum +.Nm libcasper library allows to manage application capabilities through the casper process. .Pp The application capability (represented by the From owner-svn-src-all@freebsd.org Wed Oct 5 17:03:23 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5413DAF6513; Wed, 5 Oct 2016 17:03:23 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 239B6D54; Wed, 5 Oct 2016 17:03:23 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95H3MRc016638; Wed, 5 Oct 2016 17:03:22 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95H3MRS016637; Wed, 5 Oct 2016 17:03:22 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201610051703.u95H3MRS016637@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 5 Oct 2016 17:03:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306708 - head/lib/libc/stdlib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 17:03:23 -0000 Author: emaste Date: Wed Oct 5 17:03:22 2016 New Revision: 306708 URL: https://svnweb.freebsd.org/changeset/base/306708 Log: abort in srandomdev if kern.arandom sysctl fails The sysctl cannot fail. If it does fail on some FreeBSD derivative or after some future change, just abort() so that the problem will be found and fixed. While abort() is not normally suitable for a library, it makes sense here. This is akin to r306636 for arc4random. Reviewed by: ed MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8077 Modified: head/lib/libc/stdlib/random.c Modified: head/lib/libc/stdlib/random.c ============================================================================== --- head/lib/libc/stdlib/random.c Wed Oct 5 16:23:02 2016 (r306707) +++ head/lib/libc/stdlib/random.c Wed Oct 5 17:03:22 2016 (r306708) @@ -270,16 +270,17 @@ void srandomdev(void) { int mib[2]; - size_t len; + size_t expected, len; if (rand_type == TYPE_0) - len = sizeof(state[0]); + expected = len = sizeof(state[0]); else - len = rand_deg * sizeof(state[0]); + expected = len = rand_deg * sizeof(state[0]); mib[0] = CTL_KERN; mib[1] = KERN_ARND; - sysctl(mib, 2, state, &len, NULL, 0); + if (sysctl(mib, 2, state, &len, NULL, 0) == -1 || len != expected) + abort(); if (rand_type != TYPE_0) { fptr = &state[rand_sep]; From owner-svn-src-all@freebsd.org Wed Oct 5 17:04:59 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F17F5AF65A9; Wed, 5 Oct 2016 17:04:59 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3661EEB; Wed, 5 Oct 2016 17:04:59 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95H4xZK016735; Wed, 5 Oct 2016 17:04:59 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95H4wnG016733; Wed, 5 Oct 2016 17:04:58 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201610051704.u95H4wnG016733@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 5 Oct 2016 17:04:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306709 - in head/lib/msun: ld80 src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 17:05:00 -0000 Author: emaste Date: Wed Oct 5 17:04:58 2016 New Revision: 306709 URL: https://svnweb.freebsd.org/changeset/base/306709 Log: libm: remove unused variables Sponsored by: The FreeBSD Foundation Modified: head/lib/msun/ld80/e_lgammal_r.c head/lib/msun/src/e_lgammaf_r.c Modified: head/lib/msun/ld80/e_lgammal_r.c ============================================================================== --- head/lib/msun/ld80/e_lgammal_r.c Wed Oct 5 17:03:22 2016 (r306708) +++ head/lib/msun/ld80/e_lgammal_r.c Wed Oct 5 17:04:58 2016 (r306709) @@ -249,7 +249,7 @@ sin_pil(long double x) long double lgammal_r(long double x, int *signgamp) { - long double nadj,p,p1,p2,p3,q,r,t,w,y,z; + long double nadj,p,p1,p2,q,r,t,w,y,z; uint64_t lx; int i; uint16_t hx,ix; Modified: head/lib/msun/src/e_lgammaf_r.c ============================================================================== --- head/lib/msun/src/e_lgammaf_r.c Wed Oct 5 17:03:22 2016 (r306708) +++ head/lib/msun/src/e_lgammaf_r.c Wed Oct 5 17:04:58 2016 (r306709) @@ -122,7 +122,7 @@ sin_pif(float x) float __ieee754_lgammaf_r(float x, int *signgamp) { - float nadj,p,p1,p2,p3,q,r,t,w,y,z; + float nadj,p,p1,p2,q,r,t,w,y,z; int32_t hx; int i,ix; From owner-svn-src-all@freebsd.org Wed Oct 5 17:18:25 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A96B0AF6A41; Wed, 5 Oct 2016 17:18:25 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68CF8946; Wed, 5 Oct 2016 17:18:25 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95HIOSg020687; Wed, 5 Oct 2016 17:18:24 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95HIOdk020685; Wed, 5 Oct 2016 17:18:24 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201610051718.u95HIOdk020685@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 5 Oct 2016 17:18:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306710 - head/sys/cam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 17:18:25 -0000 Author: markj Date: Wed Oct 5 17:18:24 2016 New Revision: 306710 URL: https://svnweb.freebsd.org/changeset/base/306710 Log: CAM ccbq sanity: checks on insert and remove KASSERT in cam_ccbq_insert_ccb that only XPT_FC_QUEUED ops are queued, and XPT_FC_USER_CCB ops are not. Otherwise cam_ccbq_ccb_done may be skipped. Bounds check the index used for camq_remove in order to panic instead of scribble on removal of an out-of-bounds index (e.g. consider the effect of camq_remove of CAM_UNQUEUED_INDEX). KASSERT in cam_ccbq_remove_ccb that the ccb removed by index was the one sought. Submitted by: Ryan Libby Reviewed by: imp, mav MFC after: 2 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D8151 Modified: head/sys/cam/cam_queue.c head/sys/cam/cam_queue.h Modified: head/sys/cam/cam_queue.c ============================================================================== --- head/sys/cam/cam_queue.c Wed Oct 5 17:04:58 2016 (r306709) +++ head/sys/cam/cam_queue.c Wed Oct 5 17:18:24 2016 (r306710) @@ -176,8 +176,11 @@ camq_remove(struct camq *queue, int inde { cam_pinfo *removed_entry; - if (index == 0 || index > queue->entries) - return (NULL); + if (index <= 0 || index > queue->entries) + panic("%s: Attempt to remove out-of-bounds index %d " + "from queue %p of size %d", __func__, index, queue, + queue->entries); + removed_entry = queue->queue_array[index]; if (queue->entries != index) { queue->queue_array[index] = queue->queue_array[queue->entries]; Modified: head/sys/cam/cam_queue.h ============================================================================== --- head/sys/cam/cam_queue.h Wed Oct 5 17:04:58 2016 (r306709) +++ head/sys/cam/cam_queue.h Wed Oct 5 17:18:24 2016 (r306710) @@ -197,6 +197,11 @@ cam_ccbq_insert_ccb(struct cam_ccbq *ccb struct ccb_hdr *old_ccb; struct camq *queue = &ccbq->queue; + KASSERT((new_ccb->ccb_h.func_code & XPT_FC_QUEUED) != 0 && + (new_ccb->ccb_h.func_code & XPT_FC_USER_CCB) == 0, + ("%s: Cannot queue ccb %p func_code %#x", __func__, new_ccb, + new_ccb->ccb_h.func_code)); + /* * If queue is already full, try to resize. * If resize fail, push CCB with lowest priority out to the TAILQ. @@ -218,6 +223,7 @@ cam_ccbq_remove_ccb(struct cam_ccbq *ccb { struct ccb_hdr *cccb, *bccb; struct camq *queue = &ccbq->queue; + cam_pinfo *removed_entry __unused; /* If the CCB is on the TAILQ, remove it from there. */ if (ccb->ccb_h.pinfo.index == CAM_EXTRAQ_INDEX) { @@ -228,7 +234,10 @@ cam_ccbq_remove_ccb(struct cam_ccbq *ccb return; } - camq_remove(queue, ccb->ccb_h.pinfo.index); + removed_entry = camq_remove(queue, ccb->ccb_h.pinfo.index); + KASSERT(removed_entry == &ccb->ccb_h.pinfo, + ("%s: Removed wrong entry from queue (%p != %p)", __func__, + removed_entry, &ccb->ccb_h.pinfo)); /* * If there are some CCBs on TAILQ, find the best one and move it From owner-svn-src-all@freebsd.org Wed Oct 5 17:32:08 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D033AF6D7B; Wed, 5 Oct 2016 17:32:08 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB731238; Wed, 5 Oct 2016 17:32:07 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95HW7EZ028299; Wed, 5 Oct 2016 17:32:07 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95HW6k9028296; Wed, 5 Oct 2016 17:32:06 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201610051732.u95HW6k9028296@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Wed, 5 Oct 2016 17:32:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306712 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 17:32:08 -0000 Author: alc Date: Wed Oct 5 17:32:06 2016 New Revision: 306712 URL: https://svnweb.freebsd.org/changeset/base/306712 Log: Make the page daemon's notion of what kind of pass is being performed by vm_pageout_scan() local to vm_pageout_worker(). There is no reason to store the pass in the NUMA domain structure. Reviewed by: kib MFC after: 3 weeks Modified: head/sys/vm/vm_page.c head/sys/vm/vm_page.h head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Wed Oct 5 17:26:32 2016 (r306711) +++ head/sys/vm/vm_page.c Wed Oct 5 17:32:06 2016 (r306712) @@ -394,7 +394,6 @@ vm_page_domain_init(struct vm_domain *vm vmd->vmd_free_count = 0; vmd->vmd_segs = 0; vmd->vmd_oom = FALSE; - vmd->vmd_pass = 0; for (i = 0; i < PQ_COUNT; i++) { pq = &vmd->vmd_pagequeues[i]; TAILQ_INIT(&pq->pq_pl); @@ -3928,14 +3927,12 @@ DB_SHOW_COMMAND(pageq, vm_page_print_pag db_printf("pq_free %d pq_cache %d\n", vm_cnt.v_free_count, vm_cnt.v_cache_count); for (dom = 0; dom < vm_ndomains; dom++) { - db_printf( - "dom %d page_cnt %d free %d pq_act %d pq_inact %d pass %d\n", + db_printf("dom %d page_cnt %d free %d pq_act %d pq_inact %d\n", dom, vm_dom[dom].vmd_page_count, vm_dom[dom].vmd_free_count, vm_dom[dom].vmd_pagequeues[PQ_ACTIVE].pq_cnt, - vm_dom[dom].vmd_pagequeues[PQ_INACTIVE].pq_cnt, - vm_dom[dom].vmd_pass); + vm_dom[dom].vmd_pagequeues[PQ_INACTIVE].pq_cnt); } } Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Wed Oct 5 17:26:32 2016 (r306711) +++ head/sys/vm/vm_page.h Wed Oct 5 17:32:06 2016 (r306712) @@ -226,7 +226,6 @@ struct vm_domain { u_int vmd_free_count; long vmd_segs; /* bitmask of the segments */ boolean_t vmd_oom; - int vmd_pass; /* local pagedaemon pass */ int vmd_oom_seq; int vmd_last_active_scan; struct vm_page vmd_marker; /* marker for pagedaemon private use */ Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Wed Oct 5 17:26:32 2016 (r306711) +++ head/sys/vm/vm_pageout.c Wed Oct 5 17:32:06 2016 (r306712) @@ -1509,11 +1509,12 @@ static void vm_pageout_worker(void *arg) { struct vm_domain *domain; - int domidx; + int domidx, pass; bool target_met; domidx = (uintptr_t)arg; domain = &vm_dom[domidx]; + pass = 0; target_met = true; /* @@ -1575,9 +1576,9 @@ vm_pageout_worker(void *arg) * and try again later. */ mtx_unlock(&vm_page_queue_free_mtx); - if (domain->vmd_pass > 1) + if (pass > 1) pause("psleep", hz / 2); - domain->vmd_pass++; + pass++; } else { /* * Yes. Sleep until pages need to be reclaimed or @@ -1587,12 +1588,12 @@ vm_pageout_worker(void *arg) &vm_page_queue_free_mtx, PDROP | PVM, "psleep", hz) == 0) { PCPU_INC(cnt.v_pdwakeups); - domain->vmd_pass = 1; + pass = 1; } else - domain->vmd_pass = 0; + pass = 0; } - target_met = vm_pageout_scan(domain, domain->vmd_pass); + target_met = vm_pageout_scan(domain, pass); } } From owner-svn-src-all@freebsd.org Wed Oct 5 18:26:40 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3906AF6F51; Wed, 5 Oct 2016 18:26:40 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 950ABD18; Wed, 5 Oct 2016 18:26:40 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95IQdQX048418; Wed, 5 Oct 2016 18:26:39 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95IQdQ8048417; Wed, 5 Oct 2016 18:26:39 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610051826.u95IQdQ8048417@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Wed, 5 Oct 2016 18:26:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306714 - head/bin/chio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 18:26:40 -0000 Author: sevan (doc committer) Date: Wed Oct 5 18:26:39 2016 New Revision: 306714 URL: https://svnweb.freebsd.org/changeset/base/306714 Log: Document where chio(1) originated from & which version of FreeBSD first included it. PR: 211776 Approved by: bcr (mentor) MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D8104 Modified: head/bin/chio/chio.1 Modified: head/bin/chio/chio.1 ============================================================================== --- head/bin/chio/chio.1 Wed Oct 5 18:03:17 2016 (r306713) +++ head/bin/chio/chio.1 Wed Oct 5 18:26:39 2016 (r306714) @@ -32,7 +32,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 2, 2016 +.Dd October 5, 2016 .Dt CHIO 1 .Os .Sh NAME @@ -287,6 +287,14 @@ Configure the changer to use picker 2 (t .Sh SEE ALSO .Xr mt 1 , .Xr mount 8 +.Sh HISTORY +A +.Nm +utility appeared in +.Nx 1.3 . +.Nm +first appeared in +.Fx 2.2 . .Sh AUTHORS .An -nosplit The From owner-svn-src-all@freebsd.org Wed Oct 5 18:38:40 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00864AF62AA; Wed, 5 Oct 2016 18:38:39 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B70CA5F4; Wed, 5 Oct 2016 18:38:39 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95IccUN052597; Wed, 5 Oct 2016 18:38:38 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95IccwD052596; Wed, 5 Oct 2016 18:38:38 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610051838.u95IccwD052596@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Wed, 5 Oct 2016 18:38:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306715 - head/bin/dd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 18:38:40 -0000 Author: sevan (doc committer) Date: Wed Oct 5 18:38:38 2016 New Revision: 306715 URL: https://svnweb.freebsd.org/changeset/base/306715 Log: Add history section for dd(1) First version of UNIX to include dd found using TUHS http://minnie.tuhs.org/cgi-bin/utree.pl?file=V5/usr/source/s1/dd.c PR: 211777 Approved by: bcr (mentor) MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D8104 Modified: head/bin/dd/dd.1 Modified: head/bin/dd/dd.1 ============================================================================== --- head/bin/dd/dd.1 Wed Oct 5 18:26:39 2016 (r306714) +++ head/bin/dd/dd.1 Wed Oct 5 18:38:38 2016 (r306715) @@ -32,7 +32,7 @@ .\" @(#)dd.1 8.2 (Berkeley) 1/13/94 .\" $FreeBSD$ .\" -.Dd August 25, 2016 +.Dd October 5, 2016 .Dt DD 1 .Os .Sh NAME @@ -447,6 +447,11 @@ and values are extensions to the .Tn POSIX standard. +.Sh HISTORY +A +.Nm +command appeared in +.At v5 . .Sh BUGS Protection mechanisms in the .Xr geom 4 From owner-svn-src-all@freebsd.org Wed Oct 5 19:01:02 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4480DAF6BC5; Wed, 5 Oct 2016 19:01:02 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07FD69AD; Wed, 5 Oct 2016 19:01:01 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95J1162061126; Wed, 5 Oct 2016 19:01:01 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95J11tF061125; Wed, 5 Oct 2016 19:01:01 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201610051901.u95J11tF061125@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Wed, 5 Oct 2016 19:01:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306716 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 19:01:02 -0000 Author: oshogbo Date: Wed Oct 5 19:01:00 2016 New Revision: 306716 URL: https://svnweb.freebsd.org/changeset/base/306716 Log: Add man page for dnvlist. Submitted by: Adam Starak Reviewed by: cem, wblock Added: head/share/man/man9/dnv.9 (contents, props changed) Modified: head/share/man/man9/Makefile Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Wed Oct 5 18:38:38 2016 (r306715) +++ head/share/man/man9/Makefile Wed Oct 5 19:01:00 2016 (r306716) @@ -114,6 +114,7 @@ MAN= accept_filter.9 \ devstat.9 \ devtoname.9 \ disk.9 \ + dnv.9 \ domain.9 \ drbr.9 \ driver.9 \ @@ -761,6 +762,19 @@ MLINKS+=disk.9 disk_alloc.9 \ disk.9 disk_destroy.9 \ disk.9 disk_gone.9 \ disk.9 disk_resize.9 +MLINKS+=dnv.9 dnvlist.9 \ + dnv.9 dnvlist_get_binary.9 \ + dnv.9 dnvlist_get_bool.9 \ + dnv.9 dnvlist_get_descriptor.9 \ + dnv.9 dnvlist_get_number.9 \ + dnv.9 dnvlist_get_nvlist.9 \ + dnv.9 dnvlist_get_string.9 \ + dnv.9 dnvlist_take_binary.9 \ + dnv.9 dnvlist_take_bool.9 \ + dnv.9 dnvlist_take_descriptor.9 \ + dnv.9 dnvlist_take_number.9 \ + dnv.9 dnvlist_take_nvlist.9 \ + dnv.9 dnvlist_take_string.9 MLINKS+=domain.9 DOMAIN_SET.9 \ domain.9 domain_add.9 \ domain.9 pfctlinput.9 \ Added: head/share/man/man9/dnv.9 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man9/dnv.9 Wed Oct 5 19:01:00 2016 (r306716) @@ -0,0 +1,116 @@ +.\" +.\" Copyright (c) 2016 Adam Starak +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd July 26, 2016 +.Dt DNV 9 +.Os +.Sh NAME +.Nm dnvlist_get, +.Nm dnvlist_take, +.Nd "API for getting name/value pairs. Nonexistent pairs do not raise an error." +.Sh LIBRARY +.Lb libnv +.Sh SYNOPSIS +.In sys/dnv.h +.Ft bool +.Fn dnvlist_get_bool "const nvlist_t *nvl" "const char *name" "bool defval" +.Ft uint64_t +.Fn dnvlist_get_number "const nvlist_t *nvl" "const char *name" "uint64_t defval" +.Ft char * +.Fn dnvlist_get_string "const nvlist_t *nvl" "const char *name" "const char *defval" +.Ft nvlist_t * +.Fn dnvlist_get_nvlist "const nvlist_t *nvl" "const char *name" "nvlist_t *defval" +.Ft int +.Fn dnvlist_get_descriptor "const nvlist_t *nvl" "const char *name" "int defval" +.Ft void * +.Fn dnvlist_get_binary "const nvlist_t *nvl" "const char *name" "size_t *sizep" "void *defval" "size_t defsize" +.Ft bool +.Fn dnvlist_take_bool "const nvlist_t *nvl" "const char *name" "bool defval" +.Ft uint64_t +.Fn dnvlist_take_number "const nvlist_t *nvl" "const char *name" "uint64_t defval" +.Ft char * +.Fn dnvlist_take_string "const nvlist_t *nvl" "const char *name" "const char *defval" +.Ft nvlist_t * +.Fn dnvlist_take_nvlist "const nvlist_t *nvl" "const char *name" "nvlist_t *defval" +.Ft int +.Fn dnvlist_take_descriptor "const nvlist_t *nvl" "const char *name" "int defval" +.Ft void * +.Fn dnvlist_take_binary "const nvlist_t *nvl" "const char *name" "size_t *sizep" "void *defval" "size_t defsize" +.Sh DESCRIPTION +The +.Nm libnv +library permits easy management of name/value pairs and can send and receive +them over sockets. +For more information, also see +.Xr nv 9 . +.Pp +The +.Nm dnvlist_get +family of functions returns the value associated with the specified name. +If an element of the specified name does not exist, the function returns the +value provided in +.Fa defval . +Returned strings, nvlists, descriptors, binaries, or arrays must not be modified +by the user. +They still belong to the nvlist. +If the nvlist is in an error state, attempts to use any of these functions will +cause the program to abort. +.Pp +The +.Nm dnvlist_take +family of functions returns the value associated with the specified name and +removes the element from the nvlist. +If an element of the supplied name does not exist, the value provided in +.Nm defval +is returned. +When the value is a string, binary, or array value, the caller is +responsible for freeing returned memory with +.Fn free 3 . +When the value is an nvlist, the caller is responsible for destroying the +returned nvlist with +.Fn nvlist_destroy . +When the value is a descriptor, the caller is responsible for closing the +returned descriptor with +.Fn close 2 . +.Sh SEE ALSO +.Xr close 2 , +.Xr free 3 , +.Xr nv 9 +.Sh HISTORY +The +.Nm dnv +API appeared in +.Fx 11.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm dnv +API was implemented by +.An Pawel Jakub Dawidek Aq Mt pawel@dawidek.net +under sponsorship from the FreeBSD Foundation. +This manual page was written by +.An Adam Starak Aq Mt starak.adam@gmail.com From owner-svn-src-all@freebsd.org Wed Oct 5 19:09:29 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 435DEAF6D4F; Wed, 5 Oct 2016 19:09:29 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12382F85; Wed, 5 Oct 2016 19:09:29 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95J9SrW065099; Wed, 5 Oct 2016 19:09:28 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95J9SJ3065096; Wed, 5 Oct 2016 19:09:28 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201610051909.u95J9SJ3065096@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Wed, 5 Oct 2016 19:09:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306717 - head/sys/arm/ti/cpsw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 19:09:29 -0000 Author: loos Date: Wed Oct 5 19:09:27 2016 New Revision: 306717 URL: https://svnweb.freebsd.org/changeset/base/306717 Log: if_cpsw overhaul: - Fix RX and TX teardown: . TX teardown would not reclaim the abandoned descriptors; . Interrupt storms in RX teardown; . Fixed the acknowledge of the teardown completion interrupt. - Remove temporary lists for the descriptors; - Simplified the descriptor handling (less writes and reads from descriptors where possible); - Better debug; - Add support for the RX threshold interrupts: With interrupt moderation only, an RX overrun is likely to happen. The RX threshold is set to trigger a non paced interrupt everytime your RX free buffers are under the minimum threshold, helping to prevent the rx overrun. The NIC now survive when pushed over its limits (where previously it would lock up in a few seconds). uFW (600MHz SoC) can now forward up to 560Mb/s of UDP traffic (netmap pkt-gen as source and sink). TCP forwarding rate is over 350Mb/s. No difference (other than CPU use) was seen on Beaglebone black (1GHz SoC) for his fast ethernet. Tested on: uFW, BBB Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/arm/ti/cpsw/if_cpsw.c head/sys/arm/ti/cpsw/if_cpswreg.h head/sys/arm/ti/cpsw/if_cpswvar.h Modified: head/sys/arm/ti/cpsw/if_cpsw.c ============================================================================== --- head/sys/arm/ti/cpsw/if_cpsw.c Wed Oct 5 19:01:00 2016 (r306716) +++ head/sys/arm/ti/cpsw/if_cpsw.c Wed Oct 5 19:09:27 2016 (r306717) @@ -336,6 +336,8 @@ cpsw_debugf(const char *fmt, ...) bus_write_region_4(sc->mem_res, slot->bd_offset, (uint32_t *) val, 4) #define cpsw_cpdma_write_bd_next(sc, slot, next_slot) \ cpsw_write_4(sc, slot->bd_offset, cpsw_cpdma_bd_paddr(sc, next_slot)) +#define cpsw_cpdma_write_bd_flags(sc, slot, val) \ + bus_write_2(sc->mem_res, slot->bd_offset + 14, val) #define cpsw_cpdma_read_bd_flags(sc, slot) \ bus_read_2(sc->mem_res, slot->bd_offset + 14) #define cpsw_write_hdp_slot(sc, queue, slot) \ @@ -383,7 +385,8 @@ cpsw_dump_slot(struct cpsw_softc *sc, st int i; cpsw_cpdma_read_bd(sc, slot, &bd); - printf("BD Addr: 0x%08x Next: 0x%08x\n", cpsw_cpdma_bd_paddr(sc, slot), bd.next); + printf("BD Addr : 0x%08x Next : 0x%08x\n", + cpsw_cpdma_bd_paddr(sc, slot), bd.next); printf(" BufPtr: 0x%08x BufLen: 0x%08x\n", bd.bufptr, bd.buflen); printf(" BufOff: 0x%08x PktLen: 0x%08x\n", bd.bufoff, bd.pktlen); printf(" Flags: "); @@ -417,7 +420,7 @@ cpsw_dump_queue(struct cpsw_softc *sc, s int others = 0; STAILQ_FOREACH(slot, q, next) { - if (i > 4) + if (i > CPSW_TXFRAGS) ++others; else cpsw_dump_slot(sc, slot); @@ -581,16 +584,14 @@ cpsw_init(struct cpsw_softc *sc) /* Enable statistics for ports 0, 1 and 2 */ cpsw_write_4(sc, CPSW_SS_STAT_PORT_EN, 7); - /* Experiment: Turn off flow control */ - /* This seems to fix the watchdog resets that have plagued - earlier versions of this driver; I'm not yet sure if there - are negative effects yet. */ + /* Turn off flow control. */ cpsw_write_4(sc, CPSW_SS_FLOW_CONTROL, 0); /* Make IP hdr aligned with 4 */ cpsw_write_4(sc, CPSW_CPDMA_RX_BUFFER_OFFSET, 2); /* Initialize RX Buffer Descriptors */ + cpsw_write_4(sc, CPSW_CPDMA_RX_PENDTHRESH(0), 0); cpsw_write_4(sc, CPSW_CPDMA_RX_FREEBUFFER(0), 0); /* Enable TX & RX DMA */ @@ -607,7 +608,8 @@ cpsw_init(struct cpsw_softc *sc) cpsw_write_4(sc, CPSW_CPDMA_DMA_INTMASK_SET, 3); /* Enable interrupts for RX and TX on Channel 0 */ - cpsw_write_4(sc, CPSW_CPDMA_RX_INTMASK_SET, 1); + cpsw_write_4(sc, CPSW_CPDMA_RX_INTMASK_SET, + CPSW_CPDMA_RX_INT(0) | CPSW_CPDMA_RX_INT_THRESH(0)); cpsw_write_4(sc, CPSW_CPDMA_TX_INTMASK_SET, 1); /* Initialze MDIO - ENABLE, PREAMBLE=0, FAULTENB, CLKDIV=0xFF */ @@ -625,6 +627,8 @@ cpsw_init(struct cpsw_softc *sc) if (slot != NULL) cpsw_write_hdp_slot(sc, &sc->rx, slot); cpsw_rx_enqueue(sc); + cpsw_write_4(sc, CPSW_CPDMA_RX_FREEBUFFER(0), sc->rx.active_queue_len); + cpsw_write_4(sc, CPSW_CPDMA_RX_PENDTHRESH(0), CPSW_TXFRAGS); /* Activate network interface. */ sc->rx.running = 1; @@ -1154,58 +1158,52 @@ cpsw_shutdown(device_t dev) } static void -cpsw_rx_teardown_locked(struct cpsw_softc *sc) +cpsw_rx_teardown(struct cpsw_softc *sc) { - struct ifnet *ifp; - struct mbuf *received, *next; int i = 0; + CPSW_RX_LOCK(sc); CPSW_DEBUGF(sc, ("starting RX teardown")); + sc->rx.teardown = 1; cpsw_write_4(sc, CPSW_CPDMA_RX_TEARDOWN, 0); - for (;;) { - received = cpsw_rx_dequeue(sc); - CPSW_RX_UNLOCK(sc); - while (received != NULL) { - next = received->m_nextpkt; - received->m_nextpkt = NULL; - ifp = received->m_pkthdr.rcvif; - (*ifp->if_input)(ifp, received); - if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); - received = next; - } - CPSW_RX_LOCK(sc); - if (!sc->rx.running) { - CPSW_DEBUGF(sc, - ("finished RX teardown (%d retries)", i)); - return; - } + CPSW_RX_UNLOCK(sc); + while (sc->rx.running) { if (++i > 10) { device_printf(sc->dev, "Unable to cleanly shutdown receiver\n"); return; } - DELAY(10); + DELAY(200); } + if (!sc->rx.running) + CPSW_DEBUGF(sc, ("finished RX teardown (%d retries)", i)); } static void -cpsw_tx_teardown_locked(struct cpsw_softc *sc) +cpsw_tx_teardown(struct cpsw_softc *sc) { int i = 0; + CPSW_TX_LOCK(sc); CPSW_DEBUGF(sc, ("starting TX teardown")); - cpsw_write_4(sc, CPSW_CPDMA_TX_TEARDOWN, 0); + /* Start the TX queue teardown if queue is not empty. */ + if (STAILQ_FIRST(&sc->tx.active) != NULL) + cpsw_write_4(sc, CPSW_CPDMA_TX_TEARDOWN, 0); + else + sc->tx.teardown = 1; cpsw_tx_dequeue(sc); while (sc->tx.running && ++i < 10) { - DELAY(10); + DELAY(200); cpsw_tx_dequeue(sc); } if (sc->tx.running) { device_printf(sc->dev, "Unable to cleanly shutdown transmitter\n"); } - CPSW_DEBUGF(sc, ("finished TX teardown (%d retries, %d idle buffers)", - i, sc->tx.active_queue_len)); + CPSW_DEBUGF(sc, + ("finished TX teardown (%d retries, %d idle buffers)", i, + sc->tx.active_queue_len)); + CPSW_TX_UNLOCK(sc); } static void @@ -1230,12 +1228,8 @@ cpswp_stop_locked(struct cpswp_softc *sc /* Tear down the RX/TX queues. */ if (cpsw_ports_down(sc->swsc)) { - CPSW_RX_LOCK(sc->swsc); - cpsw_rx_teardown_locked(sc->swsc); - CPSW_RX_UNLOCK(sc->swsc); - CPSW_TX_LOCK(sc->swsc); - cpsw_tx_teardown_locked(sc->swsc); - CPSW_TX_UNLOCK(sc->swsc); + cpsw_rx_teardown(sc->swsc); + cpsw_tx_teardown(sc->swsc); } /* Stop MAC RX/TX modules. */ @@ -1350,12 +1344,11 @@ cpswp_ioctl(struct ifnet *ifp, u_long co ifp->if_flags & IFF_ALLMULTI); } else { CPSW_DEBUGF(sc->swsc, - ("SIOCSIFFLAGS: UP but not RUNNING; starting up")); + ("SIOCSIFFLAGS: starting up")); cpswp_init_locked(sc); } } else if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - CPSW_DEBUGF(sc->swsc, - ("SIOCSIFFLAGS: not UP but RUNNING; shutting down")); + CPSW_DEBUGF(sc->swsc, ("SIOCSIFFLAGS: shutting down")); cpswp_stop_locked(sc); } @@ -1498,16 +1491,22 @@ cpswp_miibus_statchg(device_t dev) static void cpsw_intr_rx(void *arg) { - struct cpsw_softc *sc = arg; + struct cpsw_softc *sc; struct ifnet *ifp; struct mbuf *received, *next; + sc = (struct cpsw_softc *)arg; CPSW_RX_LOCK(sc); + if (sc->rx.teardown) { + sc->rx.running = 0; + sc->rx.teardown = 0; + cpsw_write_cp(sc, &sc->rx, 0xfffffffc); + } received = cpsw_rx_dequeue(sc); cpsw_rx_enqueue(sc); cpsw_write_4(sc, CPSW_CPDMA_CPDMA_EOI_VECTOR, 1); CPSW_RX_UNLOCK(sc); - + while (received != NULL) { next = received->m_nextpkt; received->m_nextpkt = NULL; @@ -1522,20 +1521,28 @@ static struct mbuf * cpsw_rx_dequeue(struct cpsw_softc *sc) { struct cpsw_cpdma_bd bd; - struct cpsw_slot *slot; + struct cpsw_slot *last, *slot; struct cpswp_softc *psc; struct mbuf *mb_head, *mb_tail; int port, removed = 0; + last = NULL; mb_head = mb_tail = NULL; /* Pull completed packets off hardware RX queue. */ while ((slot = STAILQ_FIRST(&sc->rx.active)) != NULL) { cpsw_cpdma_read_bd(sc, slot, &bd); - if (bd.flags & CPDMA_BD_OWNER) - break; /* Still in use by hardware */ - CPSW_DEBUGF(sc, ("Removing received packet from RX queue")); + /* + * Stop on packets still in use by hardware, but do not stop + * on packets with the teardown complete flag, they will be + * discarded later. + */ + if ((bd.flags & (CPDMA_BD_OWNER | CPDMA_BD_TDOWNCMPLT)) == + CPDMA_BD_OWNER) + break; + + last = slot; ++removed; STAILQ_REMOVE_HEAD(&sc->rx.active, next); STAILQ_INSERT_TAIL(&sc->rx.avail, slot, next); @@ -1544,16 +1551,14 @@ cpsw_rx_dequeue(struct cpsw_softc *sc) bus_dmamap_unload(sc->mbuf_dtag, slot->dmamap); if (bd.flags & CPDMA_BD_TDOWNCMPLT) { - CPSW_DEBUGF(sc, ("RX teardown in progress")); + CPSW_DEBUGF(sc, ("RX teardown is complete")); m_freem(slot->mbuf); slot->mbuf = NULL; - cpsw_write_cp(sc, &sc->rx, 0xfffffffc); sc->rx.running = 0; + sc->rx.teardown = 0; break; } - cpsw_write_cp_slot(sc, &sc->rx, slot); - port = (bd.flags & CPDMA_BD_PORT_MASK) - 1; KASSERT(port >= 0 && port <= 1, ("patcket received with invalid port: %d", port)); @@ -1586,15 +1591,20 @@ cpsw_rx_dequeue(struct cpsw_softc *sc) } mb_tail = slot->mbuf; slot->mbuf = NULL; + if (sc->rx_batch > 0 && sc->rx_batch == removed) + break; } if (removed != 0) { + cpsw_write_cp_slot(sc, &sc->rx, last); sc->rx.queue_removes += removed; - sc->rx.active_queue_len -= removed; sc->rx.avail_queue_len += removed; + sc->rx.active_queue_len -= removed; if (sc->rx.avail_queue_len > sc->rx.max_avail_queue_len) sc->rx.max_avail_queue_len = sc->rx.avail_queue_len; + CPSW_DEBUGF(sc, ("Removed %d received packet(s) from RX queue", removed)); } + return (mb_head); } @@ -1603,13 +1613,16 @@ cpsw_rx_enqueue(struct cpsw_softc *sc) { bus_dma_segment_t seg[1]; struct cpsw_cpdma_bd bd; - struct cpsw_slots tmpqueue = STAILQ_HEAD_INITIALIZER(tmpqueue); - struct cpsw_slot *slot, *prev_slot = NULL; - struct cpsw_slot *last_old_slot, *first_new_slot; + struct cpsw_slot *first_new_slot, *last_old_slot, *next, *slot; int error, nsegs, added = 0; + uint32_t flags; /* Register new mbufs with hardware. */ + first_new_slot = NULL; + last_old_slot = STAILQ_LAST(&sc->rx.active, cpsw_slot, next); while ((slot = STAILQ_FIRST(&sc->rx.avail)) != NULL) { + if (first_new_slot == NULL) + first_new_slot = slot; if (slot->mbuf == NULL) { slot->mbuf = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (slot->mbuf == NULL) { @@ -1639,8 +1652,11 @@ cpsw_rx_enqueue(struct cpsw_softc *sc) bus_dmamap_sync(sc->mbuf_dtag, slot->dmamap, BUS_DMASYNC_PREREAD); - /* Create and submit new rx descriptor*/ - bd.next = 0; + /* Create and submit new rx descriptor. */ + if ((next = STAILQ_NEXT(slot, next)) != NULL) + bd.next = cpsw_cpdma_bd_paddr(sc, next); + else + bd.next = 0; bd.bufptr = seg->ds_addr; bd.bufoff = 0; bd.buflen = MCLBYTES - 1; @@ -1649,38 +1665,35 @@ cpsw_rx_enqueue(struct cpsw_softc *sc) cpsw_cpdma_write_bd(sc, slot, &bd); ++added; - if (prev_slot != NULL) - cpsw_cpdma_write_bd_next(sc, prev_slot, slot); - prev_slot = slot; STAILQ_REMOVE_HEAD(&sc->rx.avail, next); - sc->rx.avail_queue_len--; - STAILQ_INSERT_TAIL(&tmpqueue, slot, next); + STAILQ_INSERT_TAIL(&sc->rx.active, slot, next); } - if (added == 0) + if (added == 0 || first_new_slot == NULL) return; CPSW_DEBUGF(sc, ("Adding %d buffers to RX queue", added)); /* Link new entries to hardware RX queue. */ - last_old_slot = STAILQ_LAST(&sc->rx.active, cpsw_slot, next); - first_new_slot = STAILQ_FIRST(&tmpqueue); - STAILQ_CONCAT(&sc->rx.active, &tmpqueue); - if (first_new_slot == NULL) { - return; - } else if (last_old_slot == NULL) { + if (last_old_slot == NULL) { /* Start a fresh queue. */ cpsw_write_hdp_slot(sc, &sc->rx, first_new_slot); } else { /* Add buffers to end of current queue. */ cpsw_cpdma_write_bd_next(sc, last_old_slot, first_new_slot); /* If underrun, restart queue. */ - if (cpsw_cpdma_read_bd_flags(sc, last_old_slot) & CPDMA_BD_EOQ) { + if ((flags = cpsw_cpdma_read_bd_flags(sc, last_old_slot)) & + CPDMA_BD_EOQ) { + flags &= ~CPDMA_BD_EOQ; + cpsw_cpdma_write_bd_flags(sc, last_old_slot, flags); cpsw_write_hdp_slot(sc, &sc->rx, first_new_slot); + sc->rx.queue_restart++; } } sc->rx.queue_adds += added; + sc->rx.avail_queue_len -= added; sc->rx.active_queue_len += added; + cpsw_write_4(sc, CPSW_CPDMA_RX_FREEBUFFER(0), sc->rx.active_queue_len); if (sc->rx.active_queue_len > sc->rx.max_active_queue_len) { sc->rx.max_active_queue_len = sc->rx.active_queue_len; } @@ -1689,13 +1702,16 @@ cpsw_rx_enqueue(struct cpsw_softc *sc) static void cpswp_start(struct ifnet *ifp) { - struct cpswp_softc *sc = ifp->if_softc; + struct cpswp_softc *sc; - CPSW_TX_LOCK(sc->swsc); - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) && sc->swsc->tx.running) { - cpswp_tx_enqueue(sc); - cpsw_tx_dequeue(sc->swsc); + sc = ifp->if_softc; + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || + sc->swsc->tx.running == 0) { + return; } + CPSW_TX_LOCK(sc->swsc); + cpswp_tx_enqueue(sc); + cpsw_tx_dequeue(sc->swsc); CPSW_TX_UNLOCK(sc->swsc); } @@ -1706,6 +1722,8 @@ cpsw_intr_tx(void *arg) sc = (struct cpsw_softc *)arg; CPSW_TX_LOCK(sc); + if (cpsw_read_4(sc, CPSW_CPDMA_TX_CP(0)) == 0xfffffffc) + cpsw_write_cp(sc, &sc->tx, 0xfffffffc); cpsw_tx_dequeue(sc); cpsw_write_4(sc, CPSW_CPDMA_CPDMA_EOI_VECTOR, 2); CPSW_TX_UNLOCK(sc); @@ -1716,9 +1734,7 @@ cpswp_tx_enqueue(struct cpswp_softc *sc) { bus_dma_segment_t segs[CPSW_TXFRAGS]; struct cpsw_cpdma_bd bd; - struct cpsw_slots tmpqueue = STAILQ_HEAD_INITIALIZER(tmpqueue); - struct cpsw_slot *slot, *prev_slot = NULL; - struct cpsw_slot *last_old_slot, *first_new_slot; + struct cpsw_slot *first_new_slot, *last, *last_old_slot, *next, *slot; struct mbuf *m0; int error, flags, nsegs, seg, added = 0, padlen; @@ -1728,6 +1744,9 @@ cpswp_tx_enqueue(struct cpswp_softc *sc) ((sc->unit + 1) & CPDMA_BD_PORT_MASK); } /* Pull pending packets from IF queue and prep them for DMA. */ + last = NULL; + first_new_slot = NULL; + last_old_slot = STAILQ_LAST(&sc->swsc->tx.active, cpsw_slot, next); while ((slot = STAILQ_FIRST(&sc->swsc->tx.avail)) != NULL) { IF_DEQUEUE(&sc->ifp->if_snd, m0); if (m0 == NULL) @@ -1779,12 +1798,24 @@ cpswp_tx_enqueue(struct cpswp_softc *sc) ("Queueing TX packet: %d segments + %d pad bytes", nsegs, padlen)); + if (first_new_slot == NULL) + first_new_slot = slot; + + /* Link from the previous descriptor. */ + if (last != NULL) + cpsw_cpdma_write_bd_next(sc->swsc, last, slot); + slot->ifp = sc->ifp; + /* If there is only one segment, the for() loop * gets skipped and the single buffer gets set up * as both SOP and EOP. */ - /* Start by setting up the first buffer */ - bd.next = 0; + if (nsegs > 1) { + next = STAILQ_NEXT(slot, next); + bd.next = cpsw_cpdma_bd_paddr(sc->swsc, next); + } else + bd.next = 0; + /* Start by setting up the first buffer. */ bd.bufptr = segs[0].ds_addr; bd.bufoff = 0; bd.buflen = segs[0].ds_len; @@ -1793,19 +1824,16 @@ cpswp_tx_enqueue(struct cpswp_softc *sc) for (seg = 1; seg < nsegs; ++seg) { /* Save the previous buffer (which isn't EOP) */ cpsw_cpdma_write_bd(sc->swsc, slot, &bd); - if (prev_slot != NULL) { - cpsw_cpdma_write_bd_next(sc->swsc, prev_slot, - slot); - } - prev_slot = slot; STAILQ_REMOVE_HEAD(&sc->swsc->tx.avail, next); - sc->swsc->tx.avail_queue_len--; - STAILQ_INSERT_TAIL(&tmpqueue, slot, next); - ++added; + STAILQ_INSERT_TAIL(&sc->swsc->tx.active, slot, next); slot = STAILQ_FIRST(&sc->swsc->tx.avail); /* Setup next buffer (which isn't SOP) */ - bd.next = 0; + if (nsegs > seg + 1) { + next = STAILQ_NEXT(slot, next); + bd.next = cpsw_cpdma_bd_paddr(sc->swsc, next); + } else + bd.next = 0; bd.bufptr = segs[seg].ds_addr; bd.bufoff = 0; bd.buflen = segs[seg].ds_len; @@ -1815,25 +1843,18 @@ cpswp_tx_enqueue(struct cpswp_softc *sc) /* Save the final buffer. */ if (padlen <= 0) bd.flags |= CPDMA_BD_EOP; + else { + next = STAILQ_NEXT(slot, next); + bd.next = cpsw_cpdma_bd_paddr(sc->swsc, next); + } cpsw_cpdma_write_bd(sc->swsc, slot, &bd); - if (prev_slot != NULL) - cpsw_cpdma_write_bd_next(sc->swsc, prev_slot, slot); - prev_slot = slot; STAILQ_REMOVE_HEAD(&sc->swsc->tx.avail, next); - sc->swsc->tx.avail_queue_len--; - STAILQ_INSERT_TAIL(&tmpqueue, slot, next); - ++added; + STAILQ_INSERT_TAIL(&sc->swsc->tx.active, slot, next); if (padlen > 0) { slot = STAILQ_FIRST(&sc->swsc->tx.avail); - STAILQ_REMOVE_HEAD(&sc->swsc->tx.avail, next); - sc->swsc->tx.avail_queue_len--; - STAILQ_INSERT_TAIL(&tmpqueue, slot, next); - ++added; - - /* Setup buffer of null pad bytes (definitely EOP) */ - cpsw_cpdma_write_bd_next(sc->swsc, prev_slot, slot); - prev_slot = slot; + + /* Setup buffer of null pad bytes (definitely EOP). */ bd.next = 0; bd.bufptr = sc->swsc->null_mbuf_paddr; bd.bufoff = 0; @@ -1842,8 +1863,14 @@ cpswp_tx_enqueue(struct cpswp_softc *sc) bd.flags = CPDMA_BD_EOP | CPDMA_BD_OWNER | flags; cpsw_cpdma_write_bd(sc->swsc, slot, &bd); ++nsegs; + + STAILQ_REMOVE_HEAD(&sc->swsc->tx.avail, next); + STAILQ_INSERT_TAIL(&sc->swsc->tx.active, slot, next); } + last = slot; + + added += nsegs; if (nsegs > sc->swsc->tx.longest_chain) sc->swsc->tx.longest_chain = nsegs; @@ -1852,33 +1879,27 @@ cpswp_tx_enqueue(struct cpswp_softc *sc) BPF_MTAP(sc->ifp, m0); } - /* Attach the list of new buffers to the hardware TX queue. */ - last_old_slot = STAILQ_LAST(&sc->swsc->tx.active, cpsw_slot, next); - first_new_slot = STAILQ_FIRST(&tmpqueue); - STAILQ_CONCAT(&sc->swsc->tx.active, &tmpqueue); - if (first_new_slot == NULL) { + if (first_new_slot == NULL) return; - } else if (last_old_slot == NULL) { - /* Start a fresh queue. */ - sc->swsc->last_hdp = cpsw_cpdma_bd_paddr(sc->swsc, first_new_slot); - cpsw_write_hdp_slot(sc->swsc, &sc->swsc->tx, first_new_slot); - } else { + + /* Attach the list of new buffers to the hardware TX queue. */ + if (last_old_slot != NULL && + (cpsw_cpdma_read_bd_flags(sc->swsc, last_old_slot) & + CPDMA_BD_EOQ) == 0) { /* Add buffers to end of current queue. */ cpsw_cpdma_write_bd_next(sc->swsc, last_old_slot, first_new_slot); - /* If underrun, restart queue. */ - if (cpsw_cpdma_read_bd_flags(sc->swsc, last_old_slot) & - CPDMA_BD_EOQ) { - sc->swsc->last_hdp = cpsw_cpdma_bd_paddr(sc->swsc, first_new_slot); - cpsw_write_hdp_slot(sc->swsc, &sc->swsc->tx, - first_new_slot); - } + } else { + /* Start a fresh queue. */ + cpsw_write_hdp_slot(sc->swsc, &sc->swsc->tx, first_new_slot); } sc->swsc->tx.queue_adds += added; + sc->swsc->tx.avail_queue_len -= added; sc->swsc->tx.active_queue_len += added; if (sc->swsc->tx.active_queue_len > sc->swsc->tx.max_active_queue_len) { sc->swsc->tx.max_active_queue_len = sc->swsc->tx.active_queue_len; } + CPSW_DEBUGF(sc->swsc, ("Queued %d TX packet(s)", added)); } static int @@ -1888,27 +1909,31 @@ cpsw_tx_dequeue(struct cpsw_softc *sc) struct cpsw_cpdma_bd bd; uint32_t flags, removed = 0; - slot = STAILQ_FIRST(&sc->tx.active); - if (slot == NULL && cpsw_read_cp(sc, &sc->tx) == 0xfffffffc) { - CPSW_DEBUGF(sc, ("TX teardown of an empty queue")); - cpsw_write_cp(sc, &sc->tx, 0xfffffffc); - sc->tx.running = 0; - return (0); - } - /* Pull completed buffers off the hardware TX queue. */ + slot = STAILQ_FIRST(&sc->tx.active); while (slot != NULL) { flags = cpsw_cpdma_read_bd_flags(sc, slot); - if (flags & CPDMA_BD_OWNER) + + /* TearDown complete is only marked on the SOP for the packet. */ + if ((flags & (CPDMA_BD_SOP | CPDMA_BD_TDOWNCMPLT)) == + (CPDMA_BD_SOP | CPDMA_BD_TDOWNCMPLT)) { + sc->tx.teardown = 1; + } + + if ((flags & CPDMA_BD_OWNER) != 0 && sc->tx.teardown == 0) break; /* Hardware is still using this packet. */ - CPSW_DEBUGF(sc, ("TX removing completed packet")); bus_dmamap_sync(sc->mbuf_dtag, slot->dmamap, BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->mbuf_dtag, slot->dmamap); m_freem(slot->mbuf); slot->mbuf = NULL; - if (slot->ifp) - if_inc_counter(slot->ifp, IFCOUNTER_OPACKETS, 1); + + if (slot->ifp) { + if (sc->tx.teardown == 0) + if_inc_counter(slot->ifp, IFCOUNTER_OPACKETS, 1); + else + if_inc_counter(slot->ifp, IFCOUNTER_OQDROPS, 1); + } /* Dequeue any additional buffers used by this packet. */ while (slot != NULL && slot->mbuf == NULL) { @@ -1919,37 +1944,34 @@ cpsw_tx_dequeue(struct cpsw_softc *sc) slot = STAILQ_FIRST(&sc->tx.active); } - /* TearDown complete is only marked on the SOP for the packet. */ - if ((flags & (CPDMA_BD_SOP | CPDMA_BD_TDOWNCMPLT)) == - (CPDMA_BD_SOP | CPDMA_BD_TDOWNCMPLT)) { - CPSW_DEBUGF(sc, ("TX teardown in progress")); - cpsw_write_cp(sc, &sc->tx, 0xfffffffc); - // TODO: Increment a count of dropped TX packets - sc->tx.running = 0; - break; - } + cpsw_write_cp_slot(sc, &sc->tx, last_removed_slot); - if ((flags & CPDMA_BD_EOP) == 0) - flags = cpsw_cpdma_read_bd_flags(sc, last_removed_slot); - if ((flags & (CPDMA_BD_EOP | CPDMA_BD_EOQ)) == + /* Restart the TX queue if necessary. */ + cpsw_cpdma_read_bd(sc, last_removed_slot, &bd); + if (slot != NULL && bd.next != 0 && (bd.flags & + (CPDMA_BD_EOP | CPDMA_BD_OWNER | CPDMA_BD_EOQ)) == (CPDMA_BD_EOP | CPDMA_BD_EOQ)) { - cpsw_cpdma_read_bd(sc, last_removed_slot, &bd); - if (bd.next != 0 && bd.next != sc->last_hdp) { - /* Restart the queue. */ - sc->last_hdp = bd.next; - cpsw_write_4(sc, sc->tx.hdp_offset, bd.next); - } + cpsw_write_hdp_slot(sc, &sc->tx, slot); + sc->tx.queue_restart++; + break; } } if (removed != 0) { - cpsw_write_cp_slot(sc, &sc->tx, last_removed_slot); sc->tx.queue_removes += removed; sc->tx.active_queue_len -= removed; sc->tx.avail_queue_len += removed; if (sc->tx.avail_queue_len > sc->tx.max_avail_queue_len) sc->tx.max_avail_queue_len = sc->tx.avail_queue_len; + CPSW_DEBUGF(sc, ("TX removed %d completed packet(s)", removed)); + } + + if (sc->tx.teardown && STAILQ_EMPTY(&sc->tx.active)) { + CPSW_DEBUGF(sc, ("TX teardown is complete")); + sc->tx.teardown = 0; + sc->tx.running = 0; } + return (removed); } @@ -1962,11 +1984,25 @@ cpsw_tx_dequeue(struct cpsw_softc *sc) static void cpsw_intr_rx_thresh(void *arg) { - struct cpsw_softc *sc = arg; - uint32_t stat = cpsw_read_4(sc, CPSW_WR_C_RX_THRESH_STAT(0)); + struct cpsw_softc *sc; + struct ifnet *ifp; + struct mbuf *received, *next; - CPSW_DEBUGF(sc, ("stat=%x", stat)); + sc = (struct cpsw_softc *)arg; + CPSW_RX_LOCK(sc); + received = cpsw_rx_dequeue(sc); + cpsw_rx_enqueue(sc); cpsw_write_4(sc, CPSW_CPDMA_CPDMA_EOI_VECTOR, 0); + CPSW_RX_UNLOCK(sc); + + while (received != NULL) { + next = received->m_nextpkt; + received->m_nextpkt = NULL; + ifp = received->m_pkthdr.rcvif; + (*ifp->if_input)(ifp, received); + if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); + received = next; + } } static void @@ -2138,6 +2174,11 @@ cpsw_tx_watchdog_full_reset(struct cpsw_ cpsw_debugf_head("CPSW watchdog"); device_printf(sc->dev, "watchdog timeout\n"); + printf("CPSW_CPDMA_TX%d_HDP=0x%x\n", 0, + cpsw_read_4(sc, CPSW_CPDMA_TX_HDP(0))); + printf("CPSW_CPDMA_TX%d_CP=0x%x\n", 0, + cpsw_read_4(sc, CPSW_CPDMA_TX_CP(0))); + cpsw_dump_queue(sc, &sc->tx.active); for (i = 0; i < CPSW_PORTS; i++) { if (!sc->dualemac && i != sc->active_slave) continue; @@ -2569,6 +2610,9 @@ cpsw_add_queue_sysctls(struct sysctl_ctx SYSCTL_ADD_UINT(ctx, parent, OID_AUTO, "totalDequeued", CTLFLAG_RD, &queue->queue_removes, 0, "Total buffers removed from queue"); + SYSCTL_ADD_UINT(ctx, parent, OID_AUTO, "queueRestart", + CTLFLAG_RD, &queue->queue_restart, 0, + "Total times the queue has been restarted"); SYSCTL_ADD_UINT(ctx, parent, OID_AUTO, "longestChain", CTLFLAG_RD, &queue->longest_chain, 0, "Max buffers used for a single packet"); @@ -2602,6 +2646,9 @@ cpsw_add_sysctls(struct cpsw_softc *sc) SYSCTL_ADD_INT(ctx, parent, OID_AUTO, "debug", CTLFLAG_RW, &sc->debug, 0, "Enable switch debug messages"); + SYSCTL_ADD_INT(ctx, parent, OID_AUTO, "rx_batch", + CTLFLAG_RW, &sc->rx_batch, 0, "Set the rx batch size"); + SYSCTL_ADD_PROC(ctx, parent, OID_AUTO, "attachedSecs", CTLTYPE_UINT | CTLFLAG_RD, sc, 0, cpsw_stat_attached, "IU", "Time since driver attach"); Modified: head/sys/arm/ti/cpsw/if_cpswreg.h ============================================================================== --- head/sys/arm/ti/cpsw/if_cpswreg.h Wed Oct 5 19:01:00 2016 (r306716) +++ head/sys/arm/ti/cpsw/if_cpswreg.h Wed Oct 5 19:09:27 2016 (r306717) @@ -64,10 +64,13 @@ #define CPSW_CPDMA_RX_INTSTAT_MASKED (CPSW_CPDMA_OFFSET + 0xA4) #define CPSW_CPDMA_RX_INTMASK_SET (CPSW_CPDMA_OFFSET + 0xA8) #define CPSW_CPDMA_RX_INTMASK_CLEAR (CPSW_CPDMA_OFFSET + 0xAc) +#define CPSW_CPDMA_RX_INT_THRESH(_ch) (1 << (8 + ((_ch) & 7))) +#define CPSW_CPDMA_RX_INT(_ch) (1 << (0 + ((_ch) & 7))) #define CPSW_CPDMA_DMA_INTSTAT_RAW (CPSW_CPDMA_OFFSET + 0xB0) #define CPSW_CPDMA_DMA_INTSTAT_MASKED (CPSW_CPDMA_OFFSET + 0xB4) #define CPSW_CPDMA_DMA_INTMASK_SET (CPSW_CPDMA_OFFSET + 0xB8) #define CPSW_CPDMA_DMA_INTMASK_CLEAR (CPSW_CPDMA_OFFSET + 0xBC) +#define CPSW_CPDMA_RX_PENDTHRESH(p) (CPSW_CPDMA_OFFSET + 0x0c0 + ((p) * 0x04)) #define CPSW_CPDMA_RX_FREEBUFFER(p) (CPSW_CPDMA_OFFSET + 0x0e0 + ((p) * 0x04)) #define CPSW_STATS_OFFSET 0x0900 Modified: head/sys/arm/ti/cpsw/if_cpswvar.h ============================================================================== --- head/sys/arm/ti/cpsw/if_cpswvar.h Wed Oct 5 19:01:00 2016 (r306716) +++ head/sys/arm/ti/cpsw/if_cpswvar.h Wed Oct 5 19:09:27 2016 (r306717) @@ -52,11 +52,13 @@ STAILQ_HEAD(cpsw_slots, cpsw_slot); struct cpsw_queue { struct mtx lock; int running; + int teardown; struct cpsw_slots active; struct cpsw_slots avail; uint32_t queue_adds; /* total bufs added */ uint32_t queue_removes; /* total bufs removed */ uint32_t queue_removes_at_last_tick; /* Used by watchdog */ + uint32_t queue_restart; int queue_slots; int active_queue_len; int max_active_queue_len; @@ -77,6 +79,7 @@ struct cpsw_softc { int active_slave; int debug; int dualemac; + int rx_batch; phandle_t node; struct bintime attach_uptime; /* system uptime when attach happened. */ struct cpsw_port port[2]; @@ -84,7 +87,6 @@ struct cpsw_softc { /* RX and TX buffer tracking */ struct cpsw_queue rx, tx; - uint32_t last_hdp; /* We expect 1 memory resource and 4 interrupts from the device tree. */ int mem_rid; From owner-svn-src-all@freebsd.org Wed Oct 5 19:16:56 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DCB46AF6211; Wed, 5 Oct 2016 19:16:56 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE8BFA6F; Wed, 5 Oct 2016 19:16:56 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95JGt9H068979; Wed, 5 Oct 2016 19:16:55 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95JGtaM068978; Wed, 5 Oct 2016 19:16:55 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610051916.u95JGtaM068978@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Wed, 5 Oct 2016 19:16:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306718 - head/bin/echo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 19:16:57 -0000 Author: sevan (doc committer) Date: Wed Oct 5 19:16:55 2016 New Revision: 306718 URL: https://svnweb.freebsd.org/changeset/base/306718 Log: Add history section for echo(1) Sourced using the draft copy of the second edition manual http://www.tuhs.org/Archive/PDP-11/Distributions/research/1972_stuff/unix_2nd_edition_manual.pdf PR: 211785 Approved by: bcr (mentor) MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D8104 Modified: head/bin/echo/echo.1 Modified: head/bin/echo/echo.1 ============================================================================== --- head/bin/echo/echo.1 Wed Oct 5 19:09:27 2016 (r306717) +++ head/bin/echo/echo.1 Wed Oct 5 19:16:55 2016 (r306718) @@ -32,7 +32,7 @@ .\" @(#)echo.1 8.1 (Berkeley) 7/22/93 .\" $FreeBSD$ .\" -.Dd November 12, 2010 +.Dd October 5, 2016 .Dt ECHO 1 .Os .Sh NAME @@ -103,3 +103,8 @@ The utility conforms to .St -p1003.1-2001 as amended by Cor.\& 1-2002. +.Sh HISTORY +The +.Nm +command appeared in +.At v2 . From owner-svn-src-all@freebsd.org Wed Oct 5 19:26:36 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BEA12AF6545; Wed, 5 Oct 2016 19:26:36 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B501FCF; Wed, 5 Oct 2016 19:26:36 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95JQZUd073032; Wed, 5 Oct 2016 19:26:35 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95JQZ8M073031; Wed, 5 Oct 2016 19:26:35 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610051926.u95JQZ8M073031@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Wed, 5 Oct 2016 19:26:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306719 - head/bin/expr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 19:26:36 -0000 Author: sevan (doc committer) Date: Wed Oct 5 19:26:35 2016 New Revision: 306719 URL: https://svnweb.freebsd.org/changeset/base/306719 Log: Document origins of expr & authors http://minnie.tuhs.org/cgi-bin/utree.pl?file=PWB1/usr/man/man1/expr.1 PR: 173979 Approved by: bcr (mentor) MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D8104 Modified: head/bin/expr/expr.1 Modified: head/bin/expr/expr.1 ============================================================================== --- head/bin/expr/expr.1 Wed Oct 5 19:16:55 2016 (r306718) +++ head/bin/expr/expr.1 Wed Oct 5 19:26:35 2016 (r306719) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 25, 2012 +.Dd October 5, 2016 .Dt EXPR 1 .Os .Sh NAME @@ -309,3 +309,19 @@ these arguments are treated just as thei The .Fl e flag is an extension. +.Sh HISTORY +An +.Nm +utility first appeared in the Programmer's Workbench (PWB/UNIX). +A public domain version of +.Nm +written by +.An Pace Willisson Aq Mt pace@blitz.com +appeared in +.Bx 386 0.1 . +.Sh AUTHORS +Initial implementation by +.An Pace Willisson Aq Mt pace@blitz.com +was largely rewritten by +.An -nosplit +.An J.T. Conklin Aq Mt jtc@FreeBSD.org . From owner-svn-src-all@freebsd.org Wed Oct 5 19:31:30 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4506EAF6A4E; Wed, 5 Oct 2016 19:31:30 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10D40681; Wed, 5 Oct 2016 19:31:29 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95JVTks074581; Wed, 5 Oct 2016 19:31:29 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95JVTeM074580; Wed, 5 Oct 2016 19:31:29 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610051931.u95JVTeM074580@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Wed, 5 Oct 2016 19:31:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306720 - head/bin/pwd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 19:31:30 -0000 Author: sevan (doc committer) Date: Wed Oct 5 19:31:29 2016 New Revision: 306720 URL: https://svnweb.freebsd.org/changeset/base/306720 Log: Add history section of pwd(1) http://minnie.tuhs.org/cgi-bin/utree.pl?file=V5/usr/source/s2/pwd.c PR: 211787 Approved by: bcr (mentor) MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D8104 Modified: head/bin/pwd/pwd.1 Modified: head/bin/pwd/pwd.1 ============================================================================== --- head/bin/pwd/pwd.1 Wed Oct 5 19:26:35 2016 (r306719) +++ head/bin/pwd/pwd.1 Wed Oct 5 19:31:29 2016 (r306720) @@ -32,7 +32,7 @@ .\" @(#)pwd.1 8.2 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd April 12, 2003 +.Dd October 5, 2016 .Dt PWD 1 .Os .Sh NAME @@ -85,6 +85,11 @@ The .Nm utility conforms to .St -p1003.1-2001 . +.Sh HISTORY +The +.Nm +command appeared in +.At v5 . .Sh BUGS In .Xr csh 1 From owner-svn-src-all@freebsd.org Wed Oct 5 19:37:47 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80E48AF6CAC; Wed, 5 Oct 2016 19:37:47 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DC4DCF4; Wed, 5 Oct 2016 19:37:47 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95JbkV5077067; Wed, 5 Oct 2016 19:37:46 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95JbkcN077066; Wed, 5 Oct 2016 19:37:46 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610051937.u95JbkcN077066@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Wed, 5 Oct 2016 19:37:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306721 - head/bin/stty X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 19:37:47 -0000 Author: sevan (doc committer) Date: Wed Oct 5 19:37:46 2016 New Revision: 306721 URL: https://svnweb.freebsd.org/changeset/base/306721 Log: Add history section for stty(1) http://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man1/stty.1 PR: 211788 Approved by: bcr (mentor) MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D8104 Modified: head/bin/stty/stty.1 Modified: head/bin/stty/stty.1 ============================================================================== --- head/bin/stty/stty.1 Wed Oct 5 19:31:29 2016 (r306720) +++ head/bin/stty/stty.1 Wed Oct 5 19:37:46 2016 (r306721) @@ -32,7 +32,7 @@ .\" @(#)stty.1 8.4 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd August 23, 2008 +.Dd October 5, 2016 .Dt STTY 1 .Os .Sh NAME @@ -601,3 +601,8 @@ and .Fl f are extensions to the standard. +.Sh HISTORY +A +.Nm +command appeared in +.At v2 . From owner-svn-src-all@freebsd.org Wed Oct 5 19:47:04 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 275ADAF6F81; Wed, 5 Oct 2016 19:47:04 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EAF9D662; Wed, 5 Oct 2016 19:47:03 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95Jl3R8081217; Wed, 5 Oct 2016 19:47:03 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95Jl3RE081216; Wed, 5 Oct 2016 19:47:03 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610051947.u95Jl3RE081216@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Wed, 5 Oct 2016 19:47:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306722 - head/bin/test X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 19:47:04 -0000 Author: sevan (doc committer) Date: Wed Oct 5 19:47:02 2016 New Revision: 306722 URL: https://svnweb.freebsd.org/changeset/base/306722 Log: Add history section for test(1) http://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/cmd/test.c PR: 211789 Approved by: bcr (mentor) MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D8104 Modified: head/bin/test/test.1 Modified: head/bin/test/test.1 ============================================================================== --- head/bin/test/test.1 Wed Oct 5 19:37:46 2016 (r306721) +++ head/bin/test/test.1 Wed Oct 5 19:47:02 2016 (r306722) @@ -32,7 +32,7 @@ .\" @(#)test.1 8.1 (Berkeley) 5/31/93 .\" $FreeBSD$ .\" -.Dd June 1, 2013 +.Dd October 5, 2016 .Dt TEST 1 .Os .Sh NAME @@ -376,6 +376,11 @@ The primaries and .Fl O are extensions. +.Sh HISTORY +A +.Nm +utility appeared in +.At v7 . .Sh BUGS Both sides are always evaluated in .Fl a From owner-svn-src-all@freebsd.org Wed Oct 5 19:49:49 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7D3FAF7010; Wed, 5 Oct 2016 19:49:49 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 764A789D; Wed, 5 Oct 2016 19:49:49 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95JnmdM081360; Wed, 5 Oct 2016 19:49:48 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95JnmWG081359; Wed, 5 Oct 2016 19:49:48 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610051949.u95JnmWG081359@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Wed, 5 Oct 2016 19:49:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306723 - head/sbin/atm/atmconfig X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 19:49:49 -0000 Author: sevan (doc committer) Date: Wed Oct 5 19:49:48 2016 New Revision: 306723 URL: https://svnweb.freebsd.org/changeset/base/306723 Log: Add history section for atmconfig(8) PR: 212415 Approved by: bcr (mentor) MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D8104 Modified: head/sbin/atm/atmconfig/atmconfig.8 Modified: head/sbin/atm/atmconfig/atmconfig.8 ============================================================================== --- head/sbin/atm/atmconfig/atmconfig.8 Wed Oct 5 19:47:02 2016 (r306722) +++ head/sbin/atm/atmconfig/atmconfig.8 Wed Oct 5 19:49:48 2016 (r306723) @@ -1,7 +1,7 @@ .\" .\" Copyright (c) 2001-2003 .\" Fraunhofer Institute for Open Communication Systems (FhG Fokus). -.\" All rights reserved. +.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 11, 2003 +.Dd October 5, 2016 .Dt ATMCONFIG 8 .Os .Sh NAME @@ -314,5 +314,10 @@ List all NATM routes. .Sh SEE ALSO .Xr natm 4 , .Xr natmip 4 +.Sh HISTORY +An +.Nm +command appeared in +.Fx 3.0 . .Sh AUTHORS .An Hartmut Brandt Aq Mt harti@FreeBSD.org From owner-svn-src-all@freebsd.org Wed Oct 5 19:56:11 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98BFDAF7244; Wed, 5 Oct 2016 19:56:11 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68EE4DA9; Wed, 5 Oct 2016 19:56:11 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95JuAG5085222; Wed, 5 Oct 2016 19:56:10 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95JuAs1085221; Wed, 5 Oct 2016 19:56:10 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610051956.u95JuAs1085221@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Wed, 5 Oct 2016 19:56:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306724 - head/sbin/bsdlabel X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 19:56:11 -0000 Author: sevan (doc committer) Date: Wed Oct 5 19:56:10 2016 New Revision: 306724 URL: https://svnweb.freebsd.org/changeset/base/306724 Log: Add history section for bsdlabel(8) http://minnie.tuhs.org/cgi-bin/utree.pl?file=4.3BSD-Tahoe/usr/man/cat8/disklabel.0 Remove tab after space, highlighted by igor PR: 212436 Approved by: bcr (mentor) MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D8104 Modified: head/sbin/bsdlabel/bsdlabel.8 Modified: head/sbin/bsdlabel/bsdlabel.8 ============================================================================== --- head/sbin/bsdlabel/bsdlabel.8 Wed Oct 5 19:49:48 2016 (r306723) +++ head/sbin/bsdlabel/bsdlabel.8 Wed Oct 5 19:56:10 2016 (r306724) @@ -31,7 +31,7 @@ .\" @(#)disklabel.8 8.2 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd October 1, 2013 +.Dd October 5, 2016 .Dt BSDLABEL 8 .Os .Sh NAME @@ -466,7 +466,7 @@ which could be used as a source file for 8 partitions: # size offset fstype [fsize bsize bps/cpg] - a: 400M 16 4.2BSD 4096 16384 75 # (Cyl. 0 - 812*) + a: 400M 16 4.2BSD 4096 16384 75 # (Cyl. 0 - 812*) b: 1G * swap c: * * unused e: 204800 * 4.2BSD @@ -500,3 +500,8 @@ are not generally compatible. .Xr boot0cfg 8 , .Xr gpart 8 , .Xr newfs 8 +.Sh HISTORY +The +.Nm disklabel +utility appeared in +.Bx 4.3 Tahoe . From owner-svn-src-all@freebsd.org Wed Oct 5 20:01:10 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8930AAF7429; Wed, 5 Oct 2016 20:01:10 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55EE92B6; Wed, 5 Oct 2016 20:01:10 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95K190N087114; Wed, 5 Oct 2016 20:01:09 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95K19Ub087113; Wed, 5 Oct 2016 20:01:09 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610052001.u95K19Ub087113@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Wed, 5 Oct 2016 20:01:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306725 - head/sbin/clri X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 20:01:10 -0000 Author: sevan (doc committer) Date: Wed Oct 5 20:01:09 2016 New Revision: 306725 URL: https://svnweb.freebsd.org/changeset/base/306725 Log: Add history section for clri(8) http://minnie.tuhs.org/cgi-bin/utree.pl?file=V6/usr/man/man8/clri.8 PR: 212438 Approved by: bcr (mentor) MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D8104 Modified: head/sbin/clri/clri.8 Modified: head/sbin/clri/clri.8 ============================================================================== --- head/sbin/clri/clri.8 Wed Oct 5 19:56:10 2016 (r306724) +++ head/sbin/clri/clri.8 Wed Oct 5 20:01:09 2016 (r306725) @@ -28,7 +28,7 @@ .\" @(#)clri.8 8.2 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd April 19, 1994 +.Dd October 5, 2016 .Dt CLRI 8 .Os .Sh NAME @@ -70,6 +70,11 @@ will be able to clean up the resulting m .Sh SEE ALSO .Xr fsck 8 , .Xr fsdb 8 +.Sh HISTORY +The +.Nm +utility first appeared in +.At v6 . .Sh BUGS If the file is open, the work of .Nm From owner-svn-src-all@freebsd.org Wed Oct 5 20:02:35 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C696FAF74BF; Wed, 5 Oct 2016 20:02:35 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 842348A0; Wed, 5 Oct 2016 20:02:35 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95K2YtW089232; Wed, 5 Oct 2016 20:02:34 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95K2Y23089231; Wed, 5 Oct 2016 20:02:34 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201610052002.u95K2Y23089231@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Wed, 5 Oct 2016 20:02:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306726 - head/lib/libcapsicum X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 20:02:35 -0000 Author: oshogbo Date: Wed Oct 5 20:02:34 2016 New Revision: 306726 URL: https://svnweb.freebsd.org/changeset/base/306726 Log: Add man pages for Capsicum helpers. Reviewed by: cem Differential Revision: https://reviews.freebsd.org/D8154 Added: head/lib/libcapsicum/capsicum_helpers.3 (contents, props changed) Modified: head/lib/libcapsicum/Makefile Modified: head/lib/libcapsicum/Makefile ============================================================================== --- head/lib/libcapsicum/Makefile Wed Oct 5 20:01:09 2016 (r306725) +++ head/lib/libcapsicum/Makefile Wed Oct 5 20:02:34 2016 (r306726) @@ -4,4 +4,14 @@ PACKAGE=lib${LIB} INCS= capsicum_helpers.h +MAN+= capsicum_helpers.3 + +MLINKS+=capsicum_helpers.3 caph_limit_stream.3 +MLINKS+=capsicum_helpers.3 caph_limit_stdin.3 +MLINKS+=capsicum_helpers.3 caph_limit_stderr.3 +MLINKS+=capsicum_helpers.3 caph_limit_stdout.3 +MLINKS+=capsicum_helpers.3 caph_limit_stdio.3 +MLINKS+=capsicum_helpers.3 caph_cache_tzdata.3 +MLINKS+=capsicum_helpers.3 caph_cache_catpages.3 + .include Added: head/lib/libcapsicum/capsicum_helpers.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcapsicum/capsicum_helpers.3 Wed Oct 5 20:02:34 2016 (r306726) @@ -0,0 +1,110 @@ +.\" Copyright (c) 2016 Mariusz Zaborski +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd October 5, 2016 +.Dt CAPSICUM_HELPERS 3 +.Os +.Sh NAME +.Nm caph_limit_stream , +.Nm caph_limit_stdin , +.Nm caph_limit_stderr , +.Nm caph_limit_stdout , +.Nm caph_limit_stdio , +.Nm caph_cache_tzdata , +.Nm caph_cache_catpages +.Nd "set of the functions , part of the libcapsicum" +.Sh LIBRARY +.Lb libcapsicum +.Sh SYNOPSIS +.In capsicum_helpers.h +.Ft int +.Fn caph_limit_stream "int fd, int flags" +.Ft int +.Fn caph_limit_stdin "void" +.Ft int +.Fn caph_limit_stderr "void" +.Ft int +.Fn caph_limit_stdout "void" +.Ft int +.Fn caph_limit_stdio "void" +.Ft void +.Fn caph_cache_tzdata "void" +.Ft void +.Fn caph_cache_catpages "void" +.Sh DESCRIPTION +The +.Nm capsicum helpers +are a set of a inline functions which simplify Capsicumizing programs. +The goal is to reduce duplicated code patterns. +The +.Nm capsicum helpers +are part of +.Nm libcapsicum +but there is no need to link to the library. +.Pp +.Fn caph_limit_stream +restricts capabilities on +.Fa fd +to only those needed by POSIX stream objects (that is, FILEs). +.Pp +The following flags can be provided: +.Pp +.Bl -tag -width "CAPH_IGNORE_EBADF" -compact -offset indent +.It Dv CAPH_IGNORE_EBADF +Do not return an error if file descriptor is invalid. +.It Dv CAPH_READ +Set CAP_READ on limited descriptor. +.It Dv CAPH_WRITE +Set CAP_WRITE on limited descriptor. +.El +.Pp +.Fn caph_limit_stdin , +.Fn caph_limit_stderr +and +.Fn caph_limit_stdout +limit standard descriptors using the +.Nm caph_limit_stream +function. +.Pp +.Fn caph_limit_stdio +limits stdin, stderr and stdout. +.Pp +.Fn caph_cache_tzdata +precaches all timezone data needed to use +.Li libc +local time functions. +.Pp +.Fn caph_cache_catpages +caches Native Language Support (NLS) data. +NLS data is used for localized error printing by +.Xr strerror 3 +and +.Xr err 3 , +among others. +.Ed +.Sh SEE ALSO +.Xr cap_enter 2 , +.Xr rights 4 From owner-svn-src-all@freebsd.org Wed Oct 5 20:04:37 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2116AF7556; Wed, 5 Oct 2016 20:04:37 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6EFC5A93; Wed, 5 Oct 2016 20:04:37 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95K4aZr089344; Wed, 5 Oct 2016 20:04:36 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95K4adX089343; Wed, 5 Oct 2016 20:04:36 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610052004.u95K4adX089343@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Wed, 5 Oct 2016 20:04:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306727 - head/sbin/devd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 20:04:37 -0000 Author: sevan (doc committer) Date: Wed Oct 5 20:04:36 2016 New Revision: 306727 URL: https://svnweb.freebsd.org/changeset/base/306727 Log: Add history section for devd(8) Move sentence to a new line as advised by igor PR: 212439 Approved by: bcr (mentor) MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D8104 Modified: head/sbin/devd/devd.8 Modified: head/sbin/devd/devd.8 ============================================================================== --- head/sbin/devd/devd.8 Wed Oct 5 20:02:34 2016 (r306726) +++ head/sbin/devd/devd.8 Wed Oct 5 20:04:36 2016 (r306727) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 14, 2014 +.Dd October 5, 2016 .Dt DEVD 8 .Os .Sh NAME @@ -62,7 +62,8 @@ The default connection limit is 10. Do not process all pending events before becoming a daemon. Instead, call daemon right away. .It Fl q -Quiet mode. Only log messages at priority LOG_WARNING or above. +Quiet mode. +Only log messages at priority LOG_WARNING or above. .El .Sh IMPLEMENTATION NOTES The @@ -153,5 +154,10 @@ A deprecated socket retained for use wit .Sh SEE ALSO .Xr devctl 4 , .Xr devd.conf 5 +.Sh HISTORY +The +.Nm +utility first appeared in +.Fx 5.0 . .Sh AUTHORS .An M. Warner Losh From owner-svn-src-all@freebsd.org Wed Oct 5 20:08:08 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C546DAF7693; Wed, 5 Oct 2016 20:08:08 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 94CFDDAF; Wed, 5 Oct 2016 20:08:08 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95K87Jx089544; Wed, 5 Oct 2016 20:08:07 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95K87VK089543; Wed, 5 Oct 2016 20:08:07 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610052008.u95K87VK089543@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Wed, 5 Oct 2016 20:08:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306728 - head/sbin/devfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 20:08:08 -0000 Author: sevan (doc committer) Date: Wed Oct 5 20:08:07 2016 New Revision: 306728 URL: https://svnweb.freebsd.org/changeset/base/306728 Log: Add history section for devfs(8) Move sentence to a new line as advised by igor. PR: 212441 Approved by: bcr (mentor) MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D8104 Modified: head/sbin/devfs/devfs.8 Modified: head/sbin/devfs/devfs.8 ============================================================================== --- head/sbin/devfs/devfs.8 Wed Oct 5 20:04:36 2016 (r306727) +++ head/sbin/devfs/devfs.8 Wed Oct 5 20:08:07 2016 (r306728) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 12, 2013 +.Dd October 5, 2016 .Dt DEVFS 8 .Os .Sh NAME @@ -249,7 +249,8 @@ configuration file. .It Pa /etc/devfs.rules Local .Nm -configuration file. Rulesets in here override those in +configuration file. +Rulesets in here override those in .Pa /etc/defaults/devfs.rules with the same ruleset number, otherwise the two files are effectively merged. .It Pa /etc/devfs.conf @@ -374,5 +375,10 @@ this feature can be used to copy ruleset .Xr chown 8 , .Xr jail 8 , .Xr mknod 8 +.Sh HISTORY +The +.Nm +utility first appeared in +.Fx 5.0 . .Sh AUTHORS .An Dima Dorfman From owner-svn-src-all@freebsd.org Wed Oct 5 20:12:02 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09EE9AF786A; Wed, 5 Oct 2016 20:12:02 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC78A224; Wed, 5 Oct 2016 20:12:01 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95KC1n5093046; Wed, 5 Oct 2016 20:12:01 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95KC1mg093045; Wed, 5 Oct 2016 20:12:01 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201610052012.u95KC1mg093045@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 5 Oct 2016 20:12:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306729 - head/tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 20:12:02 -0000 Author: emaste Date: Wed Oct 5 20:12:00 2016 New Revision: 306729 URL: https://svnweb.freebsd.org/changeset/base/306729 Log: makeman: avoid bogus output with duplicated options On some targets 'make showconfig' currently reports both 'no' and 'yes' for some options. For example: % make TARGET=mips showconfig | grep SSP MK_SSP = no MK_SSP = yes Emit a warning on encountering a duplicated variable, and skip the second entry. Sponsored by: The FreeBSD Foundation Modified: head/tools/build/options/makeman Modified: head/tools/build/options/makeman ============================================================================== --- head/tools/build/options/makeman Wed Oct 5 20:08:07 2016 (r306728) +++ head/tools/build/options/makeman Wed Oct 5 20:12:00 2016 (r306729) @@ -33,12 +33,18 @@ show_options() ALL_TARGETS=$(echo $(${make} targets | tail -n +2)) rm -f $t/settings for target in ${ALL_TARGETS} ; do + prev_opt= env -i ${make} showconfig \ SRC_ENV_CONF=/dev/null SRCCONF=/dev/null \ __MAKE_CONF=/dev/null \ TARGET_ARCH=${target#*/} TARGET=${target%/*} | while read var _ val ; do opt=${var#MK_} + if [ $opt = "$prev_opt" ]; then + echo "$target: ignoring duplicate option $opt" >&2 + continue + fi + prev_opt=$opt case ${val} in yes) echo ${opt} ${target} From owner-svn-src-all@freebsd.org Wed Oct 5 20:18:19 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39FC2AF7A35; Wed, 5 Oct 2016 20:18:19 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7884BBB; Wed, 5 Oct 2016 20:18:18 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95KIIRG094293; Wed, 5 Oct 2016 20:18:18 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95KII9b094292; Wed, 5 Oct 2016 20:18:18 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201610052018.u95KII9b094292@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 5 Oct 2016 20:18:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306730 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 20:18:19 -0000 Author: emaste Date: Wed Oct 5 20:18:17 2016 New Revision: 306730 URL: https://svnweb.freebsd.org/changeset/base/306730 Log: Regen src.conf.5 after r306649 Sponsored by: The FreeBSD Foundation Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Wed Oct 5 20:12:00 2016 (r306729) +++ head/share/man/man5/src.conf.5 Wed Oct 5 20:18:17 2016 (r306730) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. -.\" from FreeBSD: head/tools/build/options/makeman 292283 2015-12-15 18:42:30Z bdrewery +.\" from FreeBSD: head/tools/build/options/makeman 306729 2016-10-05 20:12:00Z emaste .\" $FreeBSD$ -.Dd September 21, 2016 +.Dd October 5, 2016 .Dt SRC.CONF 5 .Os .Sh NAME @@ -493,6 +493,15 @@ When set, it also enforces the following .\" from FreeBSD: head/tools/build/options/WITHOUT_DEBUG_FILES 290059 2015-10-27 20:49:56Z emaste Set to avoid building or installing standalone debug files for each executable binary and shared library. +.It Va WITHOUT_DIALOG +.\" from FreeBSD: head/tools/build/options/WITHOUT_DIALOG 306375 2016-09-27 18:08:38Z emaste +Set to not build dialog(1), dialog(1,3), and dpv(1,3). +When set, it also enforces the following options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_BSDINSTALL +.El .It Va WITHOUT_DICT .\" from FreeBSD: head/tools/build/options/WITHOUT_DICT 156932 2006-03-21 07:50:50Z ru Set to not build the Webster dictionary files. @@ -617,12 +626,6 @@ and related programs. .It Va WITH_EISA .\" from FreeBSD: head/tools/build/options/WITH_EISA 264654 2014-04-18 16:53:06Z imp Set to build EISA kernel modules. -.It Va WITHOUT_ELFCOPY_AS_OBJCOPY -.\" from FreeBSD: head/tools/build/options/WITHOUT_ELFCOPY_AS_OBJCOPY 296193 2016-02-29 16:39:38Z emaste -Set to build and install -.Xr objcopy 1 -from GNU Binutils, instead of the one from ELF Tool Chain. -This option is provided as a transition aid and will be removed in due time. .It Va WITHOUT_ELFTOOLCHAIN_BOOTSTRAP .\" from FreeBSD: head/tools/build/options/WITHOUT_ELFTOOLCHAIN_BOOTSTRAP 295491 2016-02-11 00:14:00Z emaste Set to not build ELF Tool Chain tools @@ -1376,6 +1379,9 @@ Set to not build kernel modules that inc .It Va WITHOUT_SSP .\" from FreeBSD: head/tools/build/options/WITHOUT_SSP 180012 2008-06-25 21:33:28Z ru Set to not build world with propolice stack smashing protection. +.Pp +It is a default setting on +mips/mipsel, mips/mips, mips/mips64el, mips/mips64 and mips/mipsn32. .It Va WITH_STAGING .\" from FreeBSD: head/tools/build/options/WITH_STAGING 290816 2015-11-14 03:24:48Z sjg Enable staging of files to a stage tree. From owner-svn-src-all@freebsd.org Wed Oct 5 20:21:07 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A277AF7AB4; Wed, 5 Oct 2016 20:21:07 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F1F5E98; Wed, 5 Oct 2016 20:21:07 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95KL6MW096455; Wed, 5 Oct 2016 20:21:06 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95KL6X5096454; Wed, 5 Oct 2016 20:21:06 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610052021.u95KL6X5096454@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Wed, 5 Oct 2016 20:21:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306731 - head/sbin/fdisk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 20:21:07 -0000 Author: sevan (doc committer) Date: Wed Oct 5 20:21:06 2016 New Revision: 306731 URL: https://svnweb.freebsd.org/changeset/base/306731 Log: Document the history of fdisk based on the original post to comp.unix.bsd by Julian Elischer [1] and the Mach 2.5 Installation notes [2]. I was unable to pin point the exact version of Mach the fdisk utility appeared as I could not find documentation older than version 2.5 & no source code or repo history. fdisk utility appears as a separate utility[3] in v2.5. Due to this, I have avoided stating the exact version fdisk first appeared in Mach. Add authors section. Make correction pointed by igor [1] https://groups.google.com/d/topic/comp.unix.bsd/Hhi45vAHxDg/discussion [2] ftp://ftp.mcs.vuw.ac.nz/doc/misc/mach-i386-doc/i386_install.ps [3] ftp://ftp.mcs.vuw.ac.nz/doc/misc/mach-i386-doc/i386_manpages.ps PR: 212469 Approved by: bcr (mentor) MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D8104 Modified: head/sbin/fdisk/fdisk.8 Modified: head/sbin/fdisk/fdisk.8 ============================================================================== --- head/sbin/fdisk/fdisk.8 Wed Oct 5 20:18:17 2016 (r306730) +++ head/sbin/fdisk/fdisk.8 Wed Oct 5 20:21:06 2016 (r306731) @@ -1,6 +1,6 @@ .\" $FreeBSD$ .\" -.Dd October 1, 2013 +.Dd October 5, 2016 .Dt FDISK 8 .Os .Sh NAME @@ -177,19 +177,19 @@ An example follows: Information from DOS bootblock is: The data for partition 1 is: sysid 165,(FreeBSD/NetBSD/386BSD) - start 495, size 380160 (185 Meg), flag 0 + start 495, size 380160 (185 Meg), flag 0 beg: cyl 1/ sector 1/ head 0; end: cyl 768/ sector 33/ head 14 The data for partition 2 is: sysid 164,(unknown) - start 378180, size 2475 (1 Meg), flag 0 + start 378180, size 2475 (1 Meg), flag 0 beg: cyl 764/ sector 1/ head 0; end: cyl 768/ sector 33/ head 14 The data for partition 3 is: The data for partition 4 is: sysid 99,(ISC UNIX, other System V/386, GNU HURD or Mach) - start 380656, size 224234 (109 Meg), flag 80 + start 380656, size 224234 (109 Meg), flag 80 beg: cyl 769/ sector 2/ head 0; end: cyl 197/ sector 33/ head 14 .Ed @@ -485,6 +485,21 @@ The default boot code. .Xr bsdlabel 8 , .Xr gpart 8 , .Xr newfs 8 +.Sh HISTORY +A version of +.Nm +first appeared in the Mach Operating System. +It was subsequently ported to +.Bx 386 . +.Sh AUTHORS +.An -nosplit +.Nm +for Mach Operating System was written by +.An Robert Baron Aq Mt rvb@cs.cmu.edu . +It was ported to +.Bx 386 +by +.An Julian Elischer Aq Mt julian@tfs.com . .Sh BUGS The default boot code will not necessarily handle all slice types correctly, in particular those introduced since From owner-svn-src-all@freebsd.org Wed Oct 5 20:28:06 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20560AF7C3B; Wed, 5 Oct 2016 20:28:06 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E62C8227; Wed, 5 Oct 2016 20:28:05 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95KS5pg098553; Wed, 5 Oct 2016 20:28:05 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95KS5Ln098552; Wed, 5 Oct 2016 20:28:05 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610052028.u95KS5Ln098552@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Wed, 5 Oct 2016 20:28:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306732 - head/sbin/fdisk_pc98 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 20:28:06 -0000 Author: sevan (doc committer) Date: Wed Oct 5 20:28:04 2016 New Revision: 306732 URL: https://svnweb.freebsd.org/changeset/base/306732 Log: Document the history of fdisk based on the original post to comp.unix.bsd by Julian Elischer [1] and the Mach 2.5 Installation notes [2]. I was unable to pin point the exact version of Mach the fdisk utility appeared as I could not find documentation older than version 2.5 & no source code or repo history. fdisk utility appears as a separate utility[3] in v2.5. Due to this, I have avoided stating the exact version fdisk first appeared in Mach. Add authors section. [1] https://groups.google.com/d/topic/comp.unix.bsd/Hhi45vAHxDg/discussion [2] ftp://ftp.mcs.vuw.ac.nz/doc/misc/mach-i386-doc/i386_install.ps [3] ftp://ftp.mcs.vuw.ac.nz/doc/misc/mach-i386-doc/i386_manpages.ps PR: 212470 Approved by: bcr (mentor) MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D8104 Modified: head/sbin/fdisk_pc98/fdisk.8 Modified: head/sbin/fdisk_pc98/fdisk.8 ============================================================================== --- head/sbin/fdisk_pc98/fdisk.8 Wed Oct 5 20:21:06 2016 (r306731) +++ head/sbin/fdisk_pc98/fdisk.8 Wed Oct 5 20:28:04 2016 (r306732) @@ -1,6 +1,6 @@ .\" $FreeBSD$ .\" -.Dd April 30, 2007 +.Dd October 5, 2016 .Dt FDISK 8 .Os .Sh NAME @@ -448,6 +448,21 @@ Example: to make slice 1 the active slic .Xr bsdlabel 8 , .Xr gpart 8 , .Xr newfs 8 +.Sh HISTORY +A version of +.Nm +first appeared in the Mach Operating System. +It was subsequently ported to +.Bx 386 . +.Sh AUTHORS +.An -nosplit +.Nm +for Mach Operating System was written by +.An Robert Baron Aq Mt rvb@cs.cmu.edu . +It was ported to +.Bx 386 +by +.An Julian Elischer Aq Mt julian@tfs.com . .Sh BUGS The default boot code will not necessarily handle all slice types correctly, in particular those introduced since From owner-svn-src-all@freebsd.org Wed Oct 5 20:29:19 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56510AF7CBC; Wed, 5 Oct 2016 20:29:19 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 38D683ED; Wed, 5 Oct 2016 20:29:19 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 27AB919D0; Wed, 5 Oct 2016 20:29:19 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 649BC1D969; Wed, 5 Oct 2016 20:29:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id wiZlwJ6c4H-B; Wed, 5 Oct 2016 20:27:49 +0000 (UTC) Subject: Re: svn commit: r306729 - head/tools/build/options DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 7D83F1D95C To: Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201610052012.u95KC1mg093045@repo.freebsd.org> From: Bryan Drewery Organization: FreeBSD Message-ID: <430cab29-2676-8aa0-68d2-f370725c137c@FreeBSD.org> Date: Wed, 5 Oct 2016 13:27:44 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <201610052012.u95KC1mg093045@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="TbGocT5DfDodu36kGwPF1LD5gf1pKCgx0" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 20:29:19 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --TbGocT5DfDodu36kGwPF1LD5gf1pKCgx0 Content-Type: multipart/mixed; boundary="rbxcggNGk9dQFtODCVJuKrB2GVEJj7CXo"; protected-headers="v1" From: Bryan Drewery To: Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <430cab29-2676-8aa0-68d2-f370725c137c@FreeBSD.org> Subject: Re: svn commit: r306729 - head/tools/build/options References: <201610052012.u95KC1mg093045@repo.freebsd.org> In-Reply-To: <201610052012.u95KC1mg093045@repo.freebsd.org> --rbxcggNGk9dQFtODCVJuKrB2GVEJj7CXo Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/5/16 1:12 PM, Ed Maste wrote: > Author: emaste > Date: Wed Oct 5 20:12:00 2016 > New Revision: 306729 > URL: https://svnweb.freebsd.org/changeset/base/306729 >=20 > Log: > makeman: avoid bogus output with duplicated options > =20 > On some targets 'make showconfig' currently reports both 'no' and 'ye= s' > for some options. For example: > =20 > % make TARGET=3Dmips showconfig | grep SSP > MK_SSP =3D no > MK_SSP =3D yes > =20 This problem in this case is because kern.opts.mk is returning MK_SSP=3Dyes due to bsd.opts.mk defaulting SSP to on, and src.opts.mk is returning MK_SSP=3Dno for TARGET_ARCH=3Dmips. This will fix it: https://people.freebsd.org/~bdrewery/patches/bsd.opts.mk.broken-options.p= atch I think it would be more proper to move any BROKEN_OPTIONS owned by bsd.opts.mk to there rather than in src.opts.mk. Since in this case SSP is broken on MIPS and yet will continue to be used for out-of-tree builds even though it is broken... > Emit a warning on encountering a duplicated variable, and skip the > second entry. > =20 > Sponsored by: The FreeBSD Foundation >=20 > Modified: > head/tools/build/options/makeman >=20 > Modified: head/tools/build/options/makeman > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/tools/build/options/makeman Wed Oct 5 20:08:07 2016 (r306728)= > +++ head/tools/build/options/makeman Wed Oct 5 20:12:00 2016 (r306729)= > @@ -33,12 +33,18 @@ show_options() > ALL_TARGETS=3D$(echo $(${make} targets | tail -n +2)) > rm -f $t/settings > for target in ${ALL_TARGETS} ; do > + prev_opt=3D > env -i ${make} showconfig \ > SRC_ENV_CONF=3D/dev/null SRCCONF=3D/dev/null \ > __MAKE_CONF=3D/dev/null \ > TARGET_ARCH=3D${target#*/} TARGET=3D${target%/*} | > while read var _ val ; do > opt=3D${var#MK_} > + if [ $opt =3D "$prev_opt" ]; then > + echo "$target: ignoring duplicate option $opt" >&2 > + continue > + fi > + prev_opt=3D$opt > case ${val} in > yes) > echo ${opt} ${target} >=20 --=20 Regards, Bryan Drewery --rbxcggNGk9dQFtODCVJuKrB2GVEJj7CXo-- --TbGocT5DfDodu36kGwPF1LD5gf1pKCgx0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJX9WJBAAoJEDXXcbtuRpfPF1MIAJL87lFZed205JreC8oAIAp/ l+PYprm1s2A7xthEoyxa6xlgrGzSyGDQgB1Ldfkn/Bkuq9tnSX/GWGjULHmicahT FAev4i2hu1oiAZf6TgrXjXiulQFGDOz6+TLtVkRLi0AsfIfvnVRxealUH6FZyjU8 pwOeeDocq2CrUKzdoblcO3d3/PhFHYhcdP4CkAgX1g2fId8WaHjDIKnbZ6DuTlMN N3pffnPR2ho/r+bD+IJdTAN7kgxpzevHDrmBWZPADQADVp2IUNp3fvi3ceEzlGVG HC82EhvirzWkahWlioKTK4SMaouFHL57Y1o3YIp6wicMB2K6/KLnaTgOzxLhiWQ= =zPiq -----END PGP SIGNATURE----- --TbGocT5DfDodu36kGwPF1LD5gf1pKCgx0-- From owner-svn-src-all@freebsd.org Wed Oct 5 20:31:45 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46413AF7E61; Wed, 5 Oct 2016 20:31:45 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15ACF9AA; Wed, 5 Oct 2016 20:31:45 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95KViS9002211; Wed, 5 Oct 2016 20:31:44 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95KVi9L002210; Wed, 5 Oct 2016 20:31:44 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610052031.u95KVi9L002210@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Wed, 5 Oct 2016 20:31:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306733 - head/sbin/fsck X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 20:31:45 -0000 Author: sevan (doc committer) Date: Wed Oct 5 20:31:44 2016 New Revision: 306733 URL: https://svnweb.freebsd.org/changeset/base/306733 Log: Add history section to fsck(8) PR: 212472 Approved by: bcr (mentor) MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D8104 Modified: head/sbin/fsck/fsck.8 Modified: head/sbin/fsck/fsck.8 ============================================================================== --- head/sbin/fsck/fsck.8 Wed Oct 5 20:28:04 2016 (r306732) +++ head/sbin/fsck/fsck.8 Wed Oct 5 20:31:44 2016 (r306733) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 23, 2014 +.Dd October 5, 2016 .Dt FSCK 8 .Os .Sh NAME @@ -229,3 +229,15 @@ file system table .Xr fsck_ffs 8 , .Xr fsck_msdosfs 8 , .Xr mount 8 +.Sh HISTORY +A +.Nm +utility appeared in +.Bx 4.0 . +It was reimplemented as a filesystem independent wrapper in +.Nx 1.3 +and first appeared in +.Fx 5.0 . +The original filesystem specific utility became +.Xr fsck_ffs 8 +at this point. From owner-svn-src-all@freebsd.org Wed Oct 5 20:38:50 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 684EEAF7F89; Wed, 5 Oct 2016 20:38:50 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 37D1FEAC; Wed, 5 Oct 2016 20:38:50 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95KcnH7004250; Wed, 5 Oct 2016 20:38:49 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95KcnIh004249; Wed, 5 Oct 2016 20:38:49 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610052038.u95KcnIh004249@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Wed, 5 Oct 2016 20:38:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306734 - head/sbin/fsck_ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 20:38:50 -0000 Author: sevan (doc committer) Date: Wed Oct 5 20:38:49 2016 New Revision: 306734 URL: https://svnweb.freebsd.org/changeset/base/306734 Log: Add history section to fsck_ffs(8) Move sentence to a new line as advised by igor. PR: 212474 Approved by: bcr (mentor) MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D8104 Modified: head/sbin/fsck_ffs/fsck_ffs.8 Modified: head/sbin/fsck_ffs/fsck_ffs.8 ============================================================================== --- head/sbin/fsck_ffs/fsck_ffs.8 Wed Oct 5 20:31:44 2016 (r306733) +++ head/sbin/fsck_ffs/fsck_ffs.8 Wed Oct 5 20:38:49 2016 (r306734) @@ -29,7 +29,7 @@ .\" @(#)fsck.8 8.4 (Berkeley) 5/9/95 .\" $FreeBSD$ .\" -.Dd July 30, 2013 +.Dd October 5, 2016 .Dt FSCK_FFS 8 .Os .Sh NAME @@ -268,9 +268,9 @@ do not open the file system for writing. Preen file systems (see above). .It Fl R Instruct fsck_ffs to restart itself if it encounters certain errors that -warrant another run. It will limit itself to a maximum of 10 restarts -in a given run in order to avoid an endless loop with extremely corrupted -filesystems. +warrant another run. +It will limit itself to a maximum of 10 restarts in a given run in order +to avoid an endless loop with extremely corrupted filesystems. .It Fl r Free up excess unused inodes. Decreasing the number of preallocated inodes reduces the @@ -393,3 +393,14 @@ are fully enumerated and explained in Ap .Xr fsdb 8 , .Xr newfs 8 , .Xr reboot 8 +.Sh HISTORY +A +.Nm fsck +utility appeared in +.Bx 4.0 . +It became +.Nm +in +.Fx 5.0 +with the introduction of the filesystem independent wrapper as +.Nm fsck . From owner-svn-src-all@freebsd.org Wed Oct 5 20:42:36 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1F34AF63DF; Wed, 5 Oct 2016 20:42:36 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 741F474E; Wed, 5 Oct 2016 20:42:36 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95KgZBm008058; Wed, 5 Oct 2016 20:42:35 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95KgZG3008057; Wed, 5 Oct 2016 20:42:35 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610052042.u95KgZG3008057@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Wed, 5 Oct 2016 20:42:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306735 - head/sbin/natd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 20:42:36 -0000 Author: sevan (doc committer) Date: Wed Oct 5 20:42:35 2016 New Revision: 306735 URL: https://svnweb.freebsd.org/changeset/base/306735 Log: Add history section to natd(8) Fix back sentence raised by igor. PR: 212544 Approved by: bcr (mentor) MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D8104 Modified: head/sbin/natd/natd.8 Modified: head/sbin/natd/natd.8 ============================================================================== --- head/sbin/natd/natd.8 Wed Oct 5 20:38:49 2016 (r306734) +++ head/sbin/natd/natd.8 Wed Oct 5 20:42:35 2016 (r306735) @@ -1,5 +1,5 @@ .\" $FreeBSD$ -.Dd June 23, 2008 +.Dd October 5, 2016 .Dt NATD 8 .Os .Sh NAME @@ -426,7 +426,7 @@ Options can be divided to several sectio Each section applies to own .Nm instance. -This ability allows to configure one +This ability allows the configuration of one .Nm process for several NAT instances. The first instance that always exists is a "default" instance. @@ -808,6 +808,11 @@ are forwarded to the appropriate router .Xr init 8 , .Xr ipfw 8 , .Xr ppp 8 +.Sh HISTORY +The +.Nm +utility appeared in +.Fx 3.0 . .Sh AUTHORS This program is the result of the efforts of many people at different times: From owner-svn-src-all@freebsd.org Wed Oct 5 20:45:00 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E89E4AF65DA; Wed, 5 Oct 2016 20:45:00 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it0-x242.google.com (mail-it0-x242.google.com [IPv6:2607:f8b0:4001:c0b::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B2392B94; Wed, 5 Oct 2016 20:45:00 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it0-x242.google.com with SMTP id o21so341673itb.0; Wed, 05 Oct 2016 13:45:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=0VvuwIILkPbMu72g7kLE4RZU4zQr4lL94+rmk5mu+OM=; b=ZzPjXtCDrfLtDGRiSF3gY22X67a3USRrAfwPtDLUaoZpzKqpNmsXayQW/x3lxGHBf9 b2hBx0uLBcMG1aQcIdf8Cqdg7iQFgGfYulLOO7OamIlyPXDL8ttGrFmmIIpo+D5ejWCB DYe29OifmPo/3yN28ZnHw/Ym7vsm3A5eLOz1kabRIOh7xrzuA+r3HDdifntVONXqdJd4 EV4Bhoujj1DW9Dn7adiANLoU98Tlw5ke4Z+tBD7zbzbExW1gpHqaAtLu0QZ6ZTRhULy9 SSsSwb3bAKtxMXO4dGzYq0JAUNEZmPR7HX0/8XXuwe2Jp5/DNddhirWv8Y3+eVHEWsho pgrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=0VvuwIILkPbMu72g7kLE4RZU4zQr4lL94+rmk5mu+OM=; b=BGEsesR5bDlHeTy2DKFhsekEjJay1hSpAugnwX+jdAcWUp/3adq+bV96eFPWTT2QoY cV15dZoYVhhkWqL/HFLXJPlf+VQ5/pWmHKFz9Aps2VVn3BdHvVRqG5oo5rOA22MJzcug uKMOcNbCiU4TG1dyGCB7+HHI96iiDDug3qgOYSQHszg+vPDn8MtkPPBHqhyFv+EU6ORj yXarLJ4cKGxolKTTCt6uxnJnICUSJUM09VA+BD7VdTdHA5U/+9t4Dosf4iITzb+oq70c roYpuhLTud+fvq+Eu1FJD1yNZ30j1mkSAeHlyWi51F1WXoh5zPzgmTQRzPKRwGzc3Tah /emw== X-Gm-Message-State: AA6/9RmWpwpiQnCQO8B/ytHHMvjc7L+1UDCavhlQORHcQEPQ5+Fn8rutrp+NflyKbkEfeHGffR7tk0e8+c5pdw== X-Received: by 10.36.69.232 with SMTP id c101mr8852051itd.14.1475700300038; Wed, 05 Oct 2016 13:45:00 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.180.211 with HTTP; Wed, 5 Oct 2016 13:44:39 -0700 (PDT) In-Reply-To: <201609270944.u8R9iUqi035006@repo.freebsd.org> References: <201609270944.u8R9iUqi035006@repo.freebsd.org> From: Ed Maste Date: Wed, 5 Oct 2016 20:44:39 +0000 X-Google-Sender-Auth: Lkfz4RYcG8iPOwakEHyTpiFCvCQ Message-ID: Subject: Re: svn commit: r306364 - in head: lib/libc/tests share/mk To: Ruslan Bukin Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 20:45:01 -0000 On 27 September 2016 at 09:44, Ruslan Bukin wrote: > Author: br > Date: Tue Sep 27 09:44:30 2016 > New Revision: 306364 > URL: https://svnweb.freebsd.org/changeset/base/306364 > > Log: > Mark SSP broken on MIPS. This needs an adjustment in sys/conf/kern.opts.mk as well it seems; 'make showconfig' (as used by makeman to generate src.conf.5) now reports SSP is both 'no' and 'yes' on mips: % make TARGET=mips TARGET_ARCH=mips showconfig | grep SSP MK_SSP = no MK_SSP = yes From owner-svn-src-all@freebsd.org Wed Oct 5 20:45:23 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27330AF66BC; Wed, 5 Oct 2016 20:45:23 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB6A5D9C; Wed, 5 Oct 2016 20:45:22 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95KjM2K008232; Wed, 5 Oct 2016 20:45:22 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95KjMYk008231; Wed, 5 Oct 2016 20:45:22 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610052045.u95KjMYk008231@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Wed, 5 Oct 2016 20:45:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306736 - head/sbin/nos-tun X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 20:45:23 -0000 Author: sevan (doc committer) Date: Wed Oct 5 20:45:21 2016 New Revision: 306736 URL: https://svnweb.freebsd.org/changeset/base/306736 Log: Add history section to nos-tun(8) PR: 212545 Approved by: bcr (mentor) MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D8104 Modified: head/sbin/nos-tun/nos-tun.8 Modified: head/sbin/nos-tun/nos-tun.8 ============================================================================== --- head/sbin/nos-tun/nos-tun.8 Wed Oct 5 20:42:35 2016 (r306735) +++ head/sbin/nos-tun/nos-tun.8 Wed Oct 5 20:45:21 2016 (r306736) @@ -8,7 +8,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 11, 1998 +.Dd October 5, 2016 .Dt NOS-TUN 8 .Os .Sh NAME @@ -80,6 +80,11 @@ tunnel mode nos tunnel destination 192.168.59.34 tunnel source 192.168.56.45 .Ed +.Sh HISTORY +The +.Nm +utility appeared in +.Fx 3.0 . .Sh AUTHORS .An -nosplit .An Nickolay N. Dudorov Aq Mt nnd@itfs.nsk.su From owner-svn-src-all@freebsd.org Wed Oct 5 20:46:23 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 473B1AF67DF; Wed, 5 Oct 2016 20:46:23 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B6DAF5C; Wed, 5 Oct 2016 20:46:23 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1brt4w-0000KA-2V; Wed, 05 Oct 2016 23:46:14 +0300 Date: Wed, 5 Oct 2016 23:46:14 +0300 From: Slawa Olhovchenkov To: Bruce Evans Cc: Gleb Smirnoff , svn-src-head@freebsd.org, svn-src-all@freebsd.org, Eric van Gyzen , src-committers@freebsd.org Subject: Re: svn commit: r306346 - head/sys/kern Message-ID: <20161005204613.GD6177@zxy.spb.ru> References: <201609261530.u8QFUUZd020174@repo.freebsd.org> <20161004205600.GN23123@FreeBSD.org> <20161005101932.U984@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161005101932.U984@besplex.bde.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 20:46:23 -0000 On Wed, Oct 05, 2016 at 11:19:10AM +1100, Bruce Evans wrote: > On Tue, 4 Oct 2016, Gleb Smirnoff wrote: > > > On Mon, Sep 26, 2016 at 03:30:30PM +0000, Eric van Gyzen wrote: > > E> ... > > E> Modified: head/sys/kern/kern_mutex.c > > E> ============================================================================== > > E> --- head/sys/kern/kern_mutex.c Mon Sep 26 15:03:31 2016 (r306345) > > E> +++ head/sys/kern/kern_mutex.c Mon Sep 26 15:30:30 2016 (r306346) > > E> @@ -924,7 +924,7 @@ __mtx_assert(const volatile uintptr_t *c > > E> { > > E> const struct mtx *m; > > E> > > E> - if (panicstr != NULL || dumping) > > E> + if (panicstr != NULL || dumping || SCHEDULER_STOPPED()) > > E> return; > > > > I wonder if all this disjunct can be reduced just to SCHEDULER_STOPPED()? > > Positive panicstr and dumping imply scheduler stopped. > > 'dumping' doesn't imply SCHEDULER_STOPPED(). > > Checking 'dumping' here seems to be just an old bug. It just breaks > __mtx_assert(), while all other mutex operations work normally for dumping > without panicing. [...] Is this related to halted (not reboted) 11.0 after ~^B and `panic`? What I see on serial console: ===== db> panic panic: from debugger cpuid = 1 KDB: stack backtrace: db_trace_self_wrapper() at 0xffffffff8031fadb = db_trace_self_wrapper+0x2b/frame 0xfffffe1f9e198120 vpanic() at 0xffffffff804a0302 = vpanic+0x182/frame 0xfffffe1f9e1981a0 panic() at 0xffffffff804a0383 = panic+0x43/frame 0xfffffe1f9e198200 db_panic() at 0xffffffff8031d987 = db_panic+0x17/frame 0xfffffe1f9e198210 db_command() at 0xffffffff8031d019 = db_command+0x299/frame 0xfffffe1f9e1982e0 db_command_loop() at 0xffffffff8031cd74 = db_command_loop+0x64/frame 0xfffffe1f9e1982f0 db_trap() at 0xffffffff8031fc1b = db_trap+0xdb/frame 0xfffffe1f9e198380 kdb_trap() at 0xffffffff804dd8c3 = kdb_trap+0x193/frame 0xfffffe1f9e198410 trap() at 0xffffffff806e3065 = trap+0x255/frame 0xfffffe1f9e198620 calltrap() at 0xffffffff806cafd1 = calltrap+0x8/frame 0xfffffe1f9e198620 --- trap 0x3, rip = 0xffffffff804dd11e, rsp = 0xfffffe1f9e1986f0, rbp = 0xfffffe1f9e198710 --- kdb_alt_break_internal() at 0xffffffff804dd11e = kdb_alt_break_internal+0x18e/frame 0xfffffe1f9e198710 kdb_alt_break() at 0xffffffff804dcf8b = kdb_alt_break+0xb/frame 0xfffffe1f9e198720 uart_intr_rxready() at 0xffffffff803e38a8 = uart_intr_rxready+0x98/frame 0xfffffe1f9e198750 uart_intr() at 0xffffffff803e4621 = uart_intr+0x121/frame 0xfffffe1f9e198790 intr_event_handle() at 0xffffffff8046c74b = intr_event_handle+0x9b/frame 0xfffffe1f9e1987e0 intr_execute_handlers() at 0xffffffff8076d2d8 = intr_execute_handlers+0x48/frame 0xfffffe1f9e198810 lapic_handle_intr() at 0xffffffff8077163f = lapic_handle_intr+0x3f/frame 0xfffffe1f9e198830 Xapic_isr1() at 0xffffffff806cb6b7 = Xapic_isr1+0xb7/frame 0xfffffe1f9e198830 --- interrupt, rip = 0xffffffff8032fedf, rsp = 0xfffffe1f9e198900, rbp = 0xfffffe1f9e198940 --- acpi_cpu_idle() at 0xffffffff8032fedf = acpi_cpu_idle+0x2af/frame 0xfffffe1f9e198940 cpu_idle_acpi() at 0xffffffff8076ad1f = cpu_idle_acpi+0x3f/frame 0xfffffe1f9e198960 cpu_idle() at 0xffffffff8076adc5 = cpu_idle+0x95/frame 0xfffffe1f9e198980 sched_idletd() at 0xffffffff804cbbe5 = sched_idletd+0x495/frame 0xfffffe1f9e198a70 fork_exit() at 0xffffffff8046a211 = fork_exit+0x71/frame 0xfffffe1f9e198ab0 fork_trampoline() at 0xffffffff806cb50e = fork_trampoline+0xe/frame 0xfffffe1f9e198ab0 --- trap 0, rip = 0, rsp = 0, rbp = 0 --- Uptime: 1d4h53m19s Dumping 12148 out of 131020 MB:..1%..11%..21%..31%..41%..51%..61%..71%..81%..91% Dump complete mps2: Sending StopUnit: path (xpt0:mps2:0:14:ffffffff): handle 12 mps2: Incrementing SSU count mps2: Sending StopUnit: path (xpt0:mps2:0:18:ffffffff): handle 9 mps2: Incrementing SSU count ===== This is normal reboot (by /sbin/reboot): === Sending StopUnit: path (xpt0:mps2:0:14:ffffffff): handle 13 mps2: Incrementing SSU count mps2: Sending StopUnit: path (xpt0:mps2:0:18:ffffffff): handle 9 mps2: Incrementing SSU count mps2: Decrementing SSU count. mps2: Completing stop unit for (xpt0:mps2:0:18:ffffffff): mps2: Decrementing SSU count. mps2: Completing stop unit for (xpt0:mps2:0:14:ffffffff): === ==== mps2: lagg0: link state changed to DOWN Sending StopUnit: path (xpt0:mps2:0:14:ffffffff): handle 12 mps2: Incrementing SSU count mps2: Sending StopUnit: path (xpt0:mps2:0:18:ffffffff): handle 9 mps2: Incrementing SSU count mps2: Decrementing SSU count. mps2: Completing stop unit for (xpt0:mps2:0:18:ffffffff): mps2: Decrementing SSU count. mps2: Completing stop unit for (xpt0:mps2:0:14:ffffffff): ==== From owner-svn-src-all@freebsd.org Wed Oct 5 22:02:38 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7397DAF7B6B; Wed, 5 Oct 2016 22:02:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B03EE77; Wed, 5 Oct 2016 22:02:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95M2bGe037900; Wed, 5 Oct 2016 22:02:37 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95M2aVL037893; Wed, 5 Oct 2016 22:02:36 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201610052202.u95M2aVL037893@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 5 Oct 2016 22:02:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306737 - in stable/11/sys: amd64/amd64 amd64/conf amd64/include conf modules modules/efirt X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 22:02:38 -0000 Author: kib Date: Wed Oct 5 22:02:36 2016 New Revision: 306737 URL: https://svnweb.freebsd.org/changeset/base/306737 Log: MFC r306097: Add kernel interfaces to call EFI Runtime Services. MFC r306104: Fix build of the module outside the kernel tree. MFC r306209 (by imp): Change the efi_get_table interface to a void **. MFC r306351: Handle TLB shootdown IPI during the EFI runtime calls, on SandyBridges. Added: stable/11/sys/amd64/amd64/efirt.c (contents, props changed) - copied, changed from r306097, head/sys/amd64/amd64/efirt.c stable/11/sys/modules/efirt/ - copied from r306097, head/sys/modules/efirt/ Modified: stable/11/sys/amd64/conf/NOTES stable/11/sys/amd64/include/efi.h stable/11/sys/conf/files.amd64 stable/11/sys/conf/options.amd64 stable/11/sys/modules/Makefile stable/11/sys/modules/efirt/Makefile Directory Properties: stable/11/ (props changed) Copied and modified: stable/11/sys/amd64/amd64/efirt.c (from r306097, head/sys/amd64/amd64/efirt.c) ============================================================================== --- head/sys/amd64/amd64/efirt.c Wed Sep 21 11:31:58 2016 (r306097, copy source) +++ stable/11/sys/amd64/amd64/efirt.c Wed Oct 5 22:02:36 2016 (r306737) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -301,6 +302,17 @@ efi_enter(void) PMAP_UNLOCK(curpmap); return (error); } + + /* + * IPI TLB shootdown handler invltlb_pcid_handler() reloads + * %cr3 from the curpmap->pm_cr3, which would disable runtime + * segments mappings. Block the handler's action by setting + * curpmap to impossible value. See also comment in + * pmap.c:pmap_activate_sw(). + */ + if (pmap_pcid_enabled && !invpcid_works) + PCPU_SET(curpmap, NULL); + load_cr3(VM_PAGE_TO_PHYS(efi_pml4_page) | (pmap_pcid_enabled ? curpmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid : 0)); /* @@ -317,7 +329,9 @@ efi_leave(void) { pmap_t curpmap; - curpmap = PCPU_GET(curpmap); + curpmap = &curproc->p_vmspace->vm_pmap; + if (pmap_pcid_enabled && !invpcid_works) + PCPU_SET(curpmap, curpmap); load_cr3(curpmap->pm_cr3 | (pmap_pcid_enabled ? curpmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid : 0)); if (!pmap_pcid_enabled) @@ -405,7 +419,7 @@ efi_uninit(void) } int -efi_get_table(struct uuid *uuid, void *ptr) +efi_get_table(struct uuid *uuid, void **ptr) { struct efi_cfgtbl *ct; u_long count; @@ -416,7 +430,7 @@ efi_get_table(struct uuid *uuid, void *p ct = efi_cfgtbl; while (count--) { if (!bcmp(&ct->ct_uuid, uuid, sizeof(*uuid))) { - ptr = (void *)PHYS_TO_DMAP(ct->ct_data); + *ptr = (void *)PHYS_TO_DMAP(ct->ct_data); return (0); } ct++; Modified: stable/11/sys/amd64/conf/NOTES ============================================================================== --- stable/11/sys/amd64/conf/NOTES Wed Oct 5 20:45:21 2016 (r306736) +++ stable/11/sys/amd64/conf/NOTES Wed Oct 5 22:02:36 2016 (r306737) @@ -599,6 +599,9 @@ options ENABLE_ALART # Control alarm o # options NKPT=31 +# EFI Runtime Services support (not functional yet). +options EFIRT + ##################################################################### # ABI Emulation Modified: stable/11/sys/amd64/include/efi.h ============================================================================== --- stable/11/sys/amd64/include/efi.h Wed Oct 5 20:45:21 2016 (r306736) +++ stable/11/sys/amd64/include/efi.h Wed Oct 5 22:02:36 2016 (r306737) @@ -39,4 +39,21 @@ */ #define EFIABI_ATTR __attribute__((ms_abi)) +#ifdef _KERNEL +struct uuid; +struct efi_tm; + +int efi_get_table(struct uuid *uuid, void **ptr); +int efi_get_time(struct efi_tm *tm); +int efi_get_time_locked(struct efi_tm *tm); +int efi_reset_system(void); +int efi_set_time(struct efi_tm *tm); +int efi_set_time_locked(struct efi_tm *tm); +int efi_var_get(uint16_t *name, struct uuid *vendor, uint32_t *attrib, + size_t *datasize, void *data); +int efi_var_nextname(size_t *namesize, uint16_t *name, struct uuid *vendor); +int efi_var_set(uint16_t *name, struct uuid *vendor, uint32_t attrib, + size_t datasize, void *data); +#endif + #endif /* __AMD64_INCLUDE_EFI_H_ */ Modified: stable/11/sys/conf/files.amd64 ============================================================================== --- stable/11/sys/conf/files.amd64 Wed Oct 5 20:45:21 2016 (r306736) +++ stable/11/sys/conf/files.amd64 Wed Oct 5 22:02:36 2016 (r306737) @@ -110,6 +110,7 @@ amd64/amd64/cpu_switch.S standard amd64/amd64/db_disasm.c optional ddb amd64/amd64/db_interface.c optional ddb amd64/amd64/db_trace.c optional ddb +amd64/amd64/efirt.c optional efirt amd64/amd64/elf_machdep.c standard amd64/amd64/exception.S standard amd64/amd64/fpu.c standard Modified: stable/11/sys/conf/options.amd64 ============================================================================== --- stable/11/sys/conf/options.amd64 Wed Oct 5 20:45:21 2016 (r306736) +++ stable/11/sys/conf/options.amd64 Wed Oct 5 22:02:36 2016 (r306737) @@ -65,3 +65,6 @@ XENHVM opt_global.h # options for the Intel C600 SAS driver (isci) ISCI_LOGGING opt_isci.h + +# EFI Runtime services support +EFIRT opt_efirt.h Modified: stable/11/sys/modules/Makefile ============================================================================== --- stable/11/sys/modules/Makefile Wed Oct 5 20:45:21 2016 (r306736) +++ stable/11/sys/modules/Makefile Wed Oct 5 22:02:36 2016 (r306737) @@ -102,6 +102,7 @@ SUBDIR= \ ${_drm2} \ dummynet \ ${_ed} \ + ${_efirt} \ ${_elink} \ ${_em} \ en \ @@ -666,6 +667,7 @@ _x86bios= x86bios .endif .if ${MACHINE_CPUARCH} == "amd64" +_efirt= efirt _ioat= ioat _ixl= ixl _ixlv= ixlv Modified: stable/11/sys/modules/efirt/Makefile ============================================================================== --- head/sys/modules/efirt/Makefile Wed Sep 21 11:31:58 2016 (r306097) +++ stable/11/sys/modules/efirt/Makefile Wed Oct 5 22:02:36 2016 (r306737) @@ -4,5 +4,6 @@ KMOD= efirt SRCS= efirt.c +SRCS+= device_if.h bus_if.h .include From owner-svn-src-all@freebsd.org Wed Oct 5 22:04:24 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27408AF7BF7; Wed, 5 Oct 2016 22:04:24 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9AC2FE0; Wed, 5 Oct 2016 22:04:23 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95M4Nji038011; Wed, 5 Oct 2016 22:04:23 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95M4Nvn038008; Wed, 5 Oct 2016 22:04:23 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201610052204.u95M4Nvn038008@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 5 Oct 2016 22:04:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306738 - stable/11/sys/boot/efi/loader/arch/amd64 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 22:04:24 -0000 Author: kib Date: Wed Oct 5 22:04:22 2016 New Revision: 306738 URL: https://svnweb.freebsd.org/changeset/base/306738 Log: MFC r306090: Simple post-mortem reporter for amd64 loader.efi. Added: stable/11/sys/boot/efi/loader/arch/amd64/exc.S - copied unchanged from r306090, head/sys/boot/efi/loader/arch/amd64/exc.S stable/11/sys/boot/efi/loader/arch/amd64/trap.c - copied unchanged from r306090, head/sys/boot/efi/loader/arch/amd64/trap.c Modified: stable/11/sys/boot/efi/loader/arch/amd64/Makefile.inc Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/boot/efi/loader/arch/amd64/Makefile.inc ============================================================================== --- stable/11/sys/boot/efi/loader/arch/amd64/Makefile.inc Wed Oct 5 22:02:36 2016 (r306737) +++ stable/11/sys/boot/efi/loader/arch/amd64/Makefile.inc Wed Oct 5 22:04:22 2016 (r306738) @@ -3,7 +3,9 @@ SRCS+= amd64_tramp.S \ start.S \ framebuffer.c \ - elf64_freebsd.c + elf64_freebsd.c \ + trap.c \ + exc.S .PATH: ${.CURDIR}/../../i386/libi386 SRCS+= nullconsole.c \ Copied: stable/11/sys/boot/efi/loader/arch/amd64/exc.S (from r306090, head/sys/boot/efi/loader/arch/amd64/exc.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/sys/boot/efi/loader/arch/amd64/exc.S Wed Oct 5 22:04:22 2016 (r306738, copy of r306090, head/sys/boot/efi/loader/arch/amd64/exc.S) @@ -0,0 +1,165 @@ +/*- + * Copyright (c) 2016 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Konstantin Belousov under sponsorship + * from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + + .macro EH N, err=1 + .align 8 + .globl EXC\N\()_handler +EXC\N\()_handler: + .if \err != 1 + pushq $0 + .endif + pushq %rax + pushq %rdx + pushq %rcx + movl $\N,%ecx + jmp all_handlers + .endm + + .text + EH 0,0 + EH 1,0 + EH 2,0 + EH 3,0 + EH 4,0 + EH 5,0 + EH 6,0 + EH 7,0 + EH 8 + EH 9,0 + EH 10 + EH 11 + EH 12 + EH 13 + EH 14 + EH 16,0 + EH 17 + EH 18,0 + EH 19,0 + EH 20,0 + + .globl exc_rsp +all_handlers: + cmpq %rsp,exc_rsp(%rip) + je exception + + /* + * Interrupt, not exception. + * First, copy the hardware interrupt frame to the previous stack. + * Our handler always has private IST stack. + */ + movq (6*8)(%rsp),%rax /* saved %rsp value, AKA old stack */ + subq (5*8),%rax + movq (3*8)(%rsp),%rdx /* copy %rip to old stack */ + movq %rdx,(%rax) + movq (4*8)(%rsp),%rdx /* copy %cs */ + movq %rdx,(1*8)(%rax) + movq (5*8)(%rsp),%rdx /* copy %rflags */ + movq %rdx,(2*8)(%rax) + movq (6*8)(%rsp),%rdx /* copy %rsp */ + movq %rdx,(3*8)(%rax) + movq (7*8)(%rsp),%rdx /* copy %ss */ + movq %rdx,(4*8)(%rax) + + /* + * Now simulate invocation of the original interrupt handler + * with retq. We switch stacks and execute retq from the old + * stack since there is no free registers at the last moment. + */ + subq $16,%rax + leaq fw_intr_handlers(%rip),%rdx + movq (%rdx,%rcx,8),%rdx /* push intr handler address on old stack */ + movq %rdx,8(%rax) + movq (2*8)(%rsp),%rcx /* saved %rax is put on top of old stack */ + movq %rcx,(%rax) + movq (%rsp),%rcx + movq 8(%rsp),%rdx + + movq 32(%rsp),%rsp /* switch to old stack */ + popq %rax + retq + +exception: + /* + * Form the struct trapframe on our IST stack. + * Skip three words, which are currently busy with temporal + * saves. + */ + pushq %r15 + pushq %r14 + pushq %r13 + pushq %r12 + pushq %r11 + pushq %r10 + pushq %rbp + pushq %rbx + pushq $0 /* %rax */ + pushq %r9 + pushq %r8 + pushq $0 /* %rcx */ + pushq $0 /* %rdx */ + pushq %rsi + pushq %rdi + + /* + * Move %rax, %rdx, %rcx values into the final location, + * from the three words which were skipped above. + */ + movq 0x88(%rsp),%rax + movq %rax,0x30(%rsp) /* tf_rax */ + movq 0x78(%rsp),%rax + movq %rax,0x18(%rsp) /* tf_rcx */ + movq 0x80(%rsp),%rax + movq %rax,0x10(%rsp) /* tf_rdx */ + + /* + * And fill the three words themself. + */ + movq %cr2,%rax + movq %rax,0x80(%rsp) /* tf_addr */ + movl %ecx,0x78(%rsp) /* tf_trapno */ + movw %ds,0x8e(%rsp) + movw %es,0x8c(%rsp) + movw %fs,0x7c(%rsp) + movw %gs,0x7e(%rsp) + movw $0,0x88(%rsp) /* tf_flags */ + + /* + * Call dump routine. + */ + movq %rsp,%rdi + callq report_exc + + /* + * Hang after reporting. Interrupts are already disabled. + */ +1: + hlt + jmp 1b Copied: stable/11/sys/boot/efi/loader/arch/amd64/trap.c (from r306090, head/sys/boot/efi/loader/arch/amd64/trap.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/sys/boot/efi/loader/arch/amd64/trap.c Wed Oct 5 22:04:22 2016 (r306738, copy of r306090, head/sys/boot/efi/loader/arch/amd64/trap.c) @@ -0,0 +1,398 @@ +/*- + * Copyright (c) 2016 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Konstantin Belousov under sponsorship + * from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "bootstrap.h" +#include "loader_efi.h" + +#define NUM_IST 8 +#define NUM_EXC 32 + +/* + * This code catches exceptions but forwards hardware interrupts to + * handlers installed by firmware. It differentiates exceptions + * vs. interrupts by presence of the error code on the stack, which + * causes different stack pointer value on trap handler entry. + * + * Use kernel layout for the trapframe just to not be original. + * + * Use free IST slot in existing TSS, or create our own TSS if + * firmware did not configured any, to have stack switched to + * IST-specified one, e.g. to handle #SS. If hand-off cannot find + * unused IST slot, or create a new descriptor in GDT, we bail out. + */ + +static struct region_descriptor fw_idt; /* Descriptor for pristine fw IDT */ +static struct region_descriptor loader_idt;/* Descriptor for loader + shadow IDT */ +static EFI_PHYSICAL_ADDRESS lidt_pa; /* Address of loader shadow IDT */ +static EFI_PHYSICAL_ADDRESS tss_pa; /* Address of TSS */ +static EFI_PHYSICAL_ADDRESS exc_stack_pa;/* Address of IST stack for loader */ +EFI_PHYSICAL_ADDRESS exc_rsp; /* %rsp value on our IST stack when + exception happens */ +EFI_PHYSICAL_ADDRESS fw_intr_handlers[NUM_EXC]; /* fw handlers for < 32 IDT + vectors */ +static int intercepted[NUM_EXC]; +static int ist; /* IST for exception handlers */ +static uint32_t tss_fw_seg; /* Fw TSS segment */ +static uint32_t loader_tss; /* Loader TSS segment */ +static struct region_descriptor fw_gdt; /* Descriptor of pristine GDT */ +static EFI_PHYSICAL_ADDRESS loader_gdt_pa; /* Address of loader shadow GDT */ + +void report_exc(struct trapframe *tf); +void +report_exc(struct trapframe *tf) +{ + + /* XXX using printf */ + printf("====================================================" + "============================\n"); + printf("Exception %u\n", tf->tf_trapno); + printf("ss 0x%04hx cs 0x%04hx ds 0x%04hx es 0x%04hx fs 0x%04hx " + "gs 0x%04hx\n", + (uint16_t)tf->tf_ss, (uint16_t)tf->tf_cs, (uint16_t)tf->tf_ds, + (uint16_t)tf->tf_es, (uint16_t)tf->tf_fs, (uint16_t)tf->tf_gs); + printf("err 0x%08x rfl 0x%08x addr 0x%016lx\n" + "rsp 0x%016lx rip 0x%016lx\n", + (uint32_t)tf->tf_err, (uint32_t)tf->tf_rflags, tf->tf_addr, + tf->tf_rsp, tf->tf_rip); + printf( + "rdi 0x%016lx rsi 0x%016lx rdx 0x%016lx\n" + "rcx 0x%016lx r8 0x%016lx r9 0x%016lx\n" + "rax 0x%016lx rbx 0x%016lx rbp 0x%016lx\n" + "r10 0x%016lx r11 0x%016lx r12 0x%016lx\n" + "r13 0x%016lx r14 0x%016lx r15 0x%016lx\n", + tf->tf_rdi, tf->tf_rsi, tf->tf_rdx, tf->tf_rcx, tf->tf_r8, + tf->tf_r9, tf->tf_rax, tf->tf_rbx, tf->tf_rbp, tf->tf_r10, + tf->tf_r11, tf->tf_r12, tf->tf_r13, tf->tf_r14, tf->tf_r15); + printf("Machine stopped.\n"); +} + +static void +prepare_exception(unsigned idx, uint64_t my_handler, + int ist_use_table[static NUM_IST]) +{ + struct gate_descriptor *fw_idt_e, *loader_idt_e; + + fw_idt_e = &((struct gate_descriptor *)fw_idt.rd_base)[idx]; + loader_idt_e = &((struct gate_descriptor *)loader_idt.rd_base)[idx]; + fw_intr_handlers[idx] = fw_idt_e->gd_looffset + + (fw_idt_e->gd_hioffset << 16); + intercepted[idx] = 1; + ist_use_table[fw_idt_e->gd_ist]++; + loader_idt_e->gd_looffset = my_handler; + loader_idt_e->gd_hioffset = my_handler >> 16; + loader_idt_e->gd_selector = fw_idt_e->gd_selector; /* XXX */ + loader_idt_e->gd_ist = 0; + loader_idt_e->gd_type = SDT_SYSIGT; + loader_idt_e->gd_dpl = 0; + loader_idt_e->gd_p = 1; + loader_idt_e->gd_xx = 0; + loader_idt_e->sd_xx1 = 0; +} +#define PREPARE_EXCEPTION(N) \ + extern char EXC##N##_handler[]; \ + prepare_exception(N, (uintptr_t)EXC##N##_handler, ist_use_table); + +static void +free_tables(void) +{ + + if (lidt_pa != 0) { + BS->FreePages(lidt_pa, EFI_SIZE_TO_PAGES(fw_idt.rd_limit)); + lidt_pa = 0; + } + if (exc_stack_pa != 0) { + BS->FreePages(exc_stack_pa, 1); + exc_stack_pa = 0; + } + if (tss_pa != 0 && tss_fw_seg == 0) { + BS->FreePages(tss_pa, EFI_SIZE_TO_PAGES(sizeof(struct + amd64tss))); + tss_pa = 0; + } + if (loader_gdt_pa != 0) { + BS->FreePages(tss_pa, 2); + loader_gdt_pa = 0; + } + ist = 0; + loader_tss = 0; +} + +static int +efi_setup_tss(struct region_descriptor *gdt, uint32_t loader_tss_idx, + struct amd64tss **tss) +{ + EFI_STATUS status; + struct system_segment_descriptor *tss_desc; + + tss_desc = (struct system_segment_descriptor *)(gdt->rd_base + + (loader_tss_idx << 3)); + status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData, + EFI_SIZE_TO_PAGES(sizeof(struct amd64tss)), &tss_pa); + if (EFI_ERROR(status)) { + printf("efi_setup_tss: AllocatePages tss error %lu\n", + EFI_ERROR_CODE(status)); + return (0); + } + *tss = (struct amd64tss *)tss_pa; + bzero(*tss, sizeof(**tss)); + tss_desc->sd_lolimit = sizeof(struct amd64tss); + tss_desc->sd_lobase = tss_pa; + tss_desc->sd_type = SDT_SYSTSS; + tss_desc->sd_dpl = 0; + tss_desc->sd_p = 1; + tss_desc->sd_hilimit = sizeof(struct amd64tss) >> 16; + tss_desc->sd_gran = 0; + tss_desc->sd_hibase = tss_pa >> 24; + tss_desc->sd_xx0 = 0; + tss_desc->sd_xx1 = 0; + tss_desc->sd_mbz = 0; + tss_desc->sd_xx2 = 0; + return (1); +} + +static int +efi_redirect_exceptions(void) +{ + int ist_use_table[NUM_IST]; + struct gate_descriptor *loader_idt_e; + struct system_segment_descriptor *tss_desc, *gdt_desc; + struct amd64tss *tss; + struct region_descriptor *gdt_rd, loader_gdt; + uint32_t i; + EFI_STATUS status; + register_t rfl; + + sidt(&fw_idt); + status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData, + EFI_SIZE_TO_PAGES(fw_idt.rd_limit), &lidt_pa); + if (EFI_ERROR(status)) { + printf("efi_redirect_exceptions: AllocatePages IDT error %lu\n", + EFI_ERROR_CODE(status)); + lidt_pa = 0; + return (0); + } + status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData, 1, + &exc_stack_pa); + if (EFI_ERROR(status)) { + printf("efi_redirect_exceptions: AllocatePages stk error %lu\n", + EFI_ERROR_CODE(status)); + exc_stack_pa = 0; + free_tables(); + return (0); + } + loader_idt.rd_limit = fw_idt.rd_limit; + bcopy((void *)fw_idt.rd_base, (void *)loader_idt.rd_base, + loader_idt.rd_limit); + bzero(ist_use_table, sizeof(ist_use_table)); + bzero(fw_intr_handlers, sizeof(fw_intr_handlers)); + bzero(intercepted, sizeof(intercepted)); + + sgdt(&fw_gdt); + tss_fw_seg = read_tr(); + gdt_rd = NULL; + if (tss_fw_seg == 0) { + for (i = 2; (i << 3) + sizeof(*gdt_desc) <= fw_gdt.rd_limit; + i += 2) { + gdt_desc = (struct system_segment_descriptor *)( + fw_gdt.rd_base + (i << 3)); + if (gdt_desc->sd_type == 0 && gdt_desc->sd_mbz == 0) { + gdt_rd = &fw_gdt; + break; + } + } + if (gdt_rd == NULL) { + if (i >= 8190) { + printf("efi_redirect_exceptions: all slots " + "in gdt are used\n"); + free_tables(); + return (0); + } + loader_gdt.rd_limit = roundup2(fw_gdt.rd_limit + + sizeof(struct system_segment_descriptor), + sizeof(struct system_segment_descriptor)) - 1; + i = (loader_gdt.rd_limit + 1 - + sizeof(struct system_segment_descriptor)) / + sizeof(struct system_segment_descriptor) * 2; + status = BS->AllocatePages(AllocateAnyPages, + EfiLoaderData, + EFI_SIZE_TO_PAGES(loader_gdt.rd_limit), + &loader_gdt_pa); + if (EFI_ERROR(status)) { + printf("efi_setup_tss: AllocatePages gdt error " + "%lu\n", EFI_ERROR_CODE(status)); + loader_gdt_pa = 0; + free_tables(); + return (0); + } + loader_gdt.rd_base = loader_gdt_pa; + bzero((void *)loader_gdt.rd_base, loader_gdt.rd_limit); + bcopy((void *)fw_gdt.rd_base, + (void *)loader_gdt.rd_base, fw_gdt.rd_limit); + gdt_rd = &loader_gdt; + } + loader_tss = i << 3; + if (!efi_setup_tss(gdt_rd, i, &tss)) { + tss_pa = 0; + free_tables(); + return (0); + } + } else { + tss_desc = (struct system_segment_descriptor *)((char *) + fw_gdt.rd_base + tss_fw_seg); + if (tss_desc->sd_type != SDT_SYSTSS && + tss_desc->sd_type != SDT_SYSBSY) { + printf("LTR points to non-TSS descriptor\n"); + free_tables(); + return (0); + } + tss_pa = tss_desc->sd_lobase + (tss_desc->sd_hibase << 16); + tss = (struct amd64tss *)tss_pa; + tss_desc->sd_type = SDT_SYSTSS; /* unbusy */ + } + + PREPARE_EXCEPTION(0); + PREPARE_EXCEPTION(1); + PREPARE_EXCEPTION(2); + PREPARE_EXCEPTION(3); + PREPARE_EXCEPTION(4); + PREPARE_EXCEPTION(5); + PREPARE_EXCEPTION(6); + PREPARE_EXCEPTION(7); + PREPARE_EXCEPTION(8); + PREPARE_EXCEPTION(9); + PREPARE_EXCEPTION(10); + PREPARE_EXCEPTION(11); + PREPARE_EXCEPTION(12); + PREPARE_EXCEPTION(13); + PREPARE_EXCEPTION(14); + PREPARE_EXCEPTION(16); + PREPARE_EXCEPTION(17); + PREPARE_EXCEPTION(18); + PREPARE_EXCEPTION(19); + PREPARE_EXCEPTION(20); + + exc_rsp = exc_stack_pa + PAGE_SIZE - + (6 /* hw exception frame */ + 3 /* scratch regs */) * 8; + + /* Find free IST and use it */ + for (ist = 1; ist < NUM_IST; ist++) { + if (ist_use_table[ist] == 0) + break; + } + if (ist == NUM_IST) { + printf("efi_redirect_exceptions: all ISTs used\n"); + free_tables(); + lidt_pa = 0; + return (0); + } + for (i = 0; i < NUM_EXC; i++) { + loader_idt_e = &((struct gate_descriptor *)loader_idt. + rd_base)[i]; + if (intercepted[i]) + loader_idt_e->gd_ist = ist; + } + (&(tss->tss_ist1))[ist - 1] = exc_stack_pa + PAGE_SIZE; + + /* Switch to new IDT */ + rfl = intr_disable(); + if (loader_gdt_pa != 0) + bare_lgdt(&loader_gdt); + if (loader_tss != 0) + ltr(loader_tss); + lidt(&loader_idt); + intr_restore(rfl); + return (1); +} + +static void +efi_unredirect_exceptions(void) +{ + register_t rfl; + + if (lidt_pa == 0) + return; + + rfl = intr_disable(); + if (ist != 0) + (&(((struct amd64tss *)tss_pa)->tss_ist1))[ist - 1] = 0; + if (loader_gdt_pa != 0) + bare_lgdt(&fw_gdt); + if (loader_tss != 0) + ltr(tss_fw_seg); + lidt(&fw_idt); + intr_restore(rfl); + free_tables(); +} + +static int +command_grab_faults(int argc, char *argv[]) +{ + int res; + + res = efi_redirect_exceptions(); + if (!res) + printf("failed\n"); + return (CMD_OK); +} +COMMAND_SET(grap_faults, "grab_faults", "grab faults", command_grab_faults); + +static int +command_ungrab_faults(int argc, char *argv[]) +{ + + efi_unredirect_exceptions(); + return (CMD_OK); +} +COMMAND_SET(ungrab_faults, "ungrab_faults", "ungrab faults", + command_ungrab_faults); + +static int +command_fault(int argc, char *argv[]) +{ + + __asm("ud2"); + return (CMD_OK); +} +COMMAND_SET(fault, "fault", "generate fault", command_fault); From owner-svn-src-all@freebsd.org Wed Oct 5 22:26:49 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EAA47AF7EAC; Wed, 5 Oct 2016 22:26:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE1E5A8E; Wed, 5 Oct 2016 22:26:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95MQmw3045630; Wed, 5 Oct 2016 22:26:48 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95MQmZl045629; Wed, 5 Oct 2016 22:26:48 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201610052226.u95MQmZl045629@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 5 Oct 2016 22:26:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306739 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 22:26:50 -0000 Author: jhb Date: Wed Oct 5 22:26:48 2016 New Revision: 306739 URL: https://svnweb.freebsd.org/changeset/base/306739 Log: MFC 305922: Fix LINT building. Modified: stable/11/sys/kern/kern_lockf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_lockf.c ============================================================================== --- stable/11/sys/kern/kern_lockf.c Wed Oct 5 22:04:22 2016 (r306738) +++ stable/11/sys/kern/kern_lockf.c Wed Oct 5 22:26:48 2016 (r306739) @@ -83,7 +83,9 @@ __FBSDID("$FreeBSD$"); #ifdef LOCKF_DEBUG #include +#include #include +#include #include static int lockf_debug = 0; /* control debug output */ @@ -2500,7 +2502,7 @@ lf_print(char *tag, struct lockf_entry * if (lock->lf_inode != (struct inode *)0) printf(" in ino %ju on dev <%s>,", (uintmax_t)lock->lf_inode->i_number, - devtoname(lock->lf_inode->i_dev)); + devtoname(ITODEV(lock->lf_inode))); printf(" %s, start %jd, end ", lock->lf_type == F_RDLCK ? "shared" : lock->lf_type == F_WRLCK ? "exclusive" : @@ -2528,7 +2530,7 @@ lf_printlist(char *tag, struct lockf_ent printf("%s: Lock list for ino %ju on dev <%s>:\n", tag, (uintmax_t)lock->lf_inode->i_number, - devtoname(lock->lf_inode->i_dev)); + devtoname(ITODEV(lock->lf_inode))); LIST_FOREACH(lf, &lock->lf_vnode->v_lockf->ls_active, lf_link) { printf("\tlock %p for ",(void *)lf); lf_print_owner(lock->lf_owner); From owner-svn-src-all@freebsd.org Wed Oct 5 23:14:43 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97334B81036; Wed, 5 Oct 2016 23:14:43 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7310E6CF; Wed, 5 Oct 2016 23:14:43 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id u95NEgAX024438 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 5 Oct 2016 16:14:42 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id u95NEgmT024437; Wed, 5 Oct 2016 16:14:42 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 5 Oct 2016 16:14:42 -0700 From: Gleb Smirnoff To: Kevin Lo , rwatson@FreeBSD.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r305824 - in head/sys: contrib/ipfilter/netinet kern net netinet netinet6 netipsec sys Message-ID: <20161005231442.GS23123@FreeBSD.org> References: <201609150741.u8F7fmcM059138@repo.freebsd.org> <20161004190920.GL23123@FreeBSD.org> <20161005032057.GA74690@ns.kevlo.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161005032057.GA74690@ns.kevlo.org> User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 23:14:43 -0000 On Wed, Oct 05, 2016 at 11:20:58AM +0800, Kevin Lo wrote: K> > On Thu, Sep 15, 2016 at 07:41:48AM +0000, Kevin Lo wrote: K> > K> Log: K> > K> Remove the 4.3BSD compatible macro m_copy(), use m_copym() instead. K> > ... K> > K> Modified: head/sys/contrib/ipfilter/netinet/fil.c K> > K> ============================================================================== K> > K> --- head/sys/contrib/ipfilter/netinet/fil.c Thu Sep 15 02:48:56 2016 (r305823) K> > K> +++ head/sys/contrib/ipfilter/netinet/fil.c Thu Sep 15 07:41:48 2016 (r305824) K> > K> @@ -3226,7 +3226,7 @@ filterdone: K> > K> fdp = fin->fin_dif; K> > K> if ((fdp != NULL) && (fdp->fd_ptr != NULL) && K> > K> (fdp->fd_ptr != (void *)-1)) { K> > K> - mc = M_COPY(fin->fin_m); K> > K> + mc = M_COPYM(fin->fin_m); K> > K> if (mc != NULL) K> > K> ipf_fastroute(mc, &mc, fin, fdp); K> > K> } K> > K> K> > K> Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h K> > K> ============================================================================== K> > K> --- head/sys/contrib/ipfilter/netinet/ip_compat.h Thu Sep 15 02:48:56 2016 (r305823) K> > K> +++ head/sys/contrib/ipfilter/netinet/ip_compat.h Thu Sep 15 07:41:48 2016 (r305824) K> > K> @@ -211,7 +211,7 @@ struct ether_addr { K> > K> # define MSGDSIZE(m) mbufchainlen(m) K> > K> # define M_LEN(m) (m)->m_len K> > K> # define M_ADJ(m,x) m_adj(m, x) K> > K> -# define M_COPY(x) m_copy((x), 0, M_COPYALL) K> > K> +# define M_COPYM(x) m_copym((x), 0, M_COPYALL, M_NOWAIT) K> > K> # define M_DUP(m) m_dup(m, M_NOWAIT) K> > K> # define IPF_PANIC(x,y) if (x) { printf y; panic("ipf_panic"); } K> > K> typedef struct mbuf mb_t; K> > K> @@ -366,7 +366,7 @@ typedef struct mb_s { K> > K> # define MSGDSIZE(m) msgdsize(m) K> > K> # define M_LEN(m) (m)->mb_len K> > K> # define M_ADJ(m,x) (m)->mb_len += x K> > K> -# define M_COPY(m) dupmbt(m) K> > K> +# define M_COPYM(m) dupmbt(m) K> > K> # define M_DUP(m) dupmbt(m) K> > K> # define GETKTIME(x) gettimeofday((struct timeval *)(x), NULL) K> > K> # define MTOD(m, t) ((t)(m)->mb_data) K> > K> > IMHO, for contributed ipfilter we should only modify ip_compat.h and ip_fil_freebsd.c. K> > In case of removal of m_copy() the macro should remain named M_COPY(), but it should be K> > defined to call to function of m_copym(). So fil.c can be left unmodified, and ip_compat.h K> > will have only 1 line change. The userland part of ip_compat.h which defines M_COPY() to K> > dupmbt() doesn't need to be renamed as well. K> K> Actually your comments were addressed in my original patch, but rwatson@ K> pointed out that switching M_COPY() to M_COPYM() for consistency: K> https://reviews.freebsd.org/D7878#163304 This looks more like a general comment, not comment to ipfilter part. Robert, can you confirm please? The ipfilter part should have modifications only in ip_compat.h and ip_fil_freebsd.c. -- Totus tuus, Glebius. From owner-svn-src-all@freebsd.org Wed Oct 5 23:25:30 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4925B812E2; Wed, 5 Oct 2016 23:25:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7AC79B77; Wed, 5 Oct 2016 23:25:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95NPTap069232; Wed, 5 Oct 2016 23:25:29 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95NPTaO069230; Wed, 5 Oct 2016 23:25:29 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201610052325.u95NPTaO069230@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 5 Oct 2016 23:25:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306740 - head/gnu/usr.bin/groff X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 23:25:30 -0000 Author: emaste Date: Wed Oct 5 23:25:29 2016 New Revision: 306740 URL: https://svnweb.freebsd.org/changeset/base/306740 Log: groff: use changelog date rather than file modification date in man pages The source checkout date is not particularly relevant, and this makes groff man pages build reproducibly. Reviewed by: bapt MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8158 Added: head/gnu/usr.bin/groff/mdate.sh (contents, props changed) Modified: head/gnu/usr.bin/groff/Makefile.inc Modified: head/gnu/usr.bin/groff/Makefile.inc ============================================================================== --- head/gnu/usr.bin/groff/Makefile.inc Wed Oct 5 22:26:48 2016 (r306739) +++ head/gnu/usr.bin/groff/Makefile.inc Wed Oct 5 23:25:29 2016 (r306740) @@ -119,7 +119,7 @@ revision=`sed -e 's/^0$$//' -e 's/^[1-9] -e "s;@TMAC_MDIR@;$(tmacdir)/mm;g" \ -e "s;@BROKEN_SPOOLER_FLAGS@;$(BROKEN_SPOOLER_FLAGS);g" \ -e "s;@VERSION@;$(version)$(revision);g" \ - -e "s;@MDATE@;`$(SHELL) ${GROFF_DIST}/mdate.sh $<`;g" \ + -e "s;@MDATE@;$(MDATE);g" \ -e "s;@g@;$(g);g" \ -e "s;@G@;`echo $(g) | LC_ALL=C tr a-z A-Z`;g" \ $< >$@ @@ -141,4 +141,5 @@ TOPREL?= .. GROFF_DIST= ${.CURDIR}/${TOPREL}/../../../contrib/groff DIST_SUBDIR?= ${.CURDIR:T} DIST_DIR= ${GROFF_DIST}/${DIST_SUBDIR} +MDATE!= sh ${.CURDIR}/${TOPREL}/mdate.sh ${GROFF_DIST}/ChangeLog .PATH: ${DIST_DIR} Added: head/gnu/usr.bin/groff/mdate.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/gnu/usr.bin/groff/mdate.sh Wed Oct 5 23:25:29 2016 (r306740) @@ -0,0 +1,9 @@ +#!/bin/sh +# $FreeBSD$ + +set -e +test -r "$1" +export LC_ALL=C +changelog_date=$(sed -E -n 's/^([0-9]{4}-[0-9]{2}-[0-9]{2}).*$/\1/p' "$1" |\ + head -n 1) +echo $(date -j -f %Y-%m-%d +"%e %B %Y" $changelog_date) From owner-svn-src-all@freebsd.org Wed Oct 5 23:42:04 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31920B81644; Wed, 5 Oct 2016 23:42:04 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 01DA12B1; Wed, 5 Oct 2016 23:42:03 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95Ng3Yx076051; Wed, 5 Oct 2016 23:42:03 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95Ng3go076030; Wed, 5 Oct 2016 23:42:03 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201610052342.u95Ng3go076030@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Wed, 5 Oct 2016 23:42:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306741 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 23:42:04 -0000 Author: cem Date: Wed Oct 5 23:42:02 2016 New Revision: 306741 URL: https://svnweb.freebsd.org/changeset/base/306741 Log: vfs_bio: Remove a leading space (style) Introduced in r282085. Sponsored by: Dell EMC Isilon Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Wed Oct 5 23:25:29 2016 (r306740) +++ head/sys/kern/vfs_bio.c Wed Oct 5 23:42:02 2016 (r306741) @@ -3113,7 +3113,7 @@ flushbufqueues(struct vnode *lvp, int ta if (bp->b_qindex == QUEUE_SENTINEL || (lvp != NULL && bp->b_vp != lvp)) { mtx_unlock(&bqlocks[queue]); - continue; + continue; } error = BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL); mtx_unlock(&bqlocks[queue]); From owner-svn-src-all@freebsd.org Wed Oct 5 23:55:03 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FEC0B818DA; Wed, 5 Oct 2016 23:55:03 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6F40AA8; Wed, 5 Oct 2016 23:55:02 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u95Nt2GM080440; Wed, 5 Oct 2016 23:55:02 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u95Nt2Fj080439; Wed, 5 Oct 2016 23:55:02 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201610052355.u95Nt2Fj080439@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 5 Oct 2016 23:55:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306742 - head/sys/geom/mirror X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 23:55:03 -0000 Author: markj Date: Wed Oct 5 23:55:01 2016 New Revision: 306742 URL: https://svnweb.freebsd.org/changeset/base/306742 Log: gmirror: Use bool instead of boolean_t. MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/sys/geom/mirror/g_mirror.c Modified: head/sys/geom/mirror/g_mirror.c ============================================================================== --- head/sys/geom/mirror/g_mirror.c Wed Oct 5 23:42:02 2016 (r306741) +++ head/sys/geom/mirror/g_mirror.c Wed Oct 5 23:55:01 2016 (r306742) @@ -100,7 +100,7 @@ struct g_class g_mirror_class = { static void g_mirror_destroy_provider(struct g_mirror_softc *sc); static int g_mirror_update_disk(struct g_mirror_disk *disk, u_int state); -static void g_mirror_update_device(struct g_mirror_softc *sc, boolean_t force); +static void g_mirror_update_device(struct g_mirror_softc *sc, bool force); static void g_mirror_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, struct g_consumer *cp, struct g_provider *pp); static void g_mirror_sync_stop(struct g_mirror_disk *disk, int type); @@ -1837,7 +1837,7 @@ g_mirror_worker(void *arg) "Running event for device %s.", sc->sc_name); ep->e_error = 0; - g_mirror_update_device(sc, 1); + g_mirror_update_device(sc, true); } else { /* Update disk status. */ G_MIRROR_DEBUG(3, "Running event for disk %s.", @@ -1845,7 +1845,7 @@ g_mirror_worker(void *arg) ep->e_error = g_mirror_update_disk(ep->e_disk, ep->e_state); if (ep->e_error == 0) - g_mirror_update_device(sc, 0); + g_mirror_update_device(sc, false); } if ((ep->e_flags & G_MIRROR_EVENT_DONTWAIT) != 0) { KASSERT(ep->e_error == 0, @@ -2243,7 +2243,7 @@ g_mirror_determine_state(struct g_mirror * Update device state. */ static void -g_mirror_update_device(struct g_mirror_softc *sc, boolean_t force) +g_mirror_update_device(struct g_mirror_softc *sc, bool force) { struct g_mirror_disk *disk; u_int state; From owner-svn-src-all@freebsd.org Thu Oct 6 00:05:46 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CEDF5B81EF9; Thu, 6 Oct 2016 00:05:46 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86A601A3; Thu, 6 Oct 2016 00:05:46 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9605jsp084119; Thu, 6 Oct 2016 00:05:45 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9605jRH084118; Thu, 6 Oct 2016 00:05:45 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201610060005.u9605jRH084118@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 6 Oct 2016 00:05:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306743 - head/sys/geom/mirror X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 00:05:46 -0000 Author: markj Date: Thu Oct 6 00:05:45 2016 New Revision: 306743 URL: https://svnweb.freebsd.org/changeset/base/306743 Log: gmirror: Bump the syncid if broken disks are found during startup. Consider a mirror with two components, m1 and m2. Suppose a hardware error results in the removal of m2, with m1's genid bumped. Suppose further that a replacement mirror component m3 is created and synchronized, after which the system is shut down uncleanly. During a subsequent bootup, if gmirror tastes m1 and m2 first, m2 will be removed from the mirror because it is broken, but the mirror will be started without bumping the syncid on m1 because all elements of the mirror are accounted for. Then m3 will be added to the already-running mirror with the same syncid as m1, so the components will not be synchronized despite the unclean shutdown. Handle this scenario by bumping the syncid of healthy components if any broken mirrors are discovered during mirror startup. MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/sys/geom/mirror/g_mirror.c Modified: head/sys/geom/mirror/g_mirror.c ============================================================================== --- head/sys/geom/mirror/g_mirror.c Wed Oct 5 23:55:01 2016 (r306742) +++ head/sys/geom/mirror/g_mirror.c Thu Oct 6 00:05:45 2016 (r306743) @@ -2255,6 +2255,7 @@ g_mirror_update_device(struct g_mirror_s { struct g_mirror_disk *pdisk, *tdisk; u_int dirty, ndisks, genid, syncid; + bool broken; KASSERT(sc->sc_provider == NULL, ("Non-NULL provider in STARTING state (%s).", sc->sc_name)); @@ -2322,12 +2323,18 @@ g_mirror_update_device(struct g_mirror_s /* * Remove all disks without the biggest genid. */ + broken = false; LIST_FOREACH_SAFE(disk, &sc->sc_disks, d_next, tdisk) { if (disk->d_genid < genid) { G_MIRROR_DEBUG(0, "Component %s (device %s) broken, skipping.", g_mirror_get_diskname(disk), sc->sc_name); g_mirror_destroy_disk(disk); + /* + * Bump the syncid in case we discover a healthy + * replacement disk after starting the mirror. + */ + broken = true; } } @@ -2418,7 +2425,7 @@ g_mirror_update_device(struct g_mirror_s /* Reset hint. */ sc->sc_hint = NULL; sc->sc_syncid = syncid; - if (force) { + if (force || broken) { /* Remember to bump syncid on first write. */ sc->sc_bump_id |= G_MIRROR_BUMP_SYNCID; } From owner-svn-src-all@freebsd.org Thu Oct 6 00:13:56 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B81F4AF44B4; Thu, 6 Oct 2016 00:13:56 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8862FAC7; Thu, 6 Oct 2016 00:13:56 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u960Dt0K087721; Thu, 6 Oct 2016 00:13:55 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u960Dtew087720; Thu, 6 Oct 2016 00:13:55 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201610060013.u960Dtew087720@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 6 Oct 2016 00:13:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306744 - head/sys/geom/mirror X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 00:13:56 -0000 Author: markj Date: Thu Oct 6 00:13:55 2016 New Revision: 306744 URL: https://svnweb.freebsd.org/changeset/base/306744 Log: gmirror: Write an updated syncid before queuing writes. When a syncid bump is pending, any write to the mirror results in the updated syncid being written to each component's metadata block. However, the update was only being performed after the writes to the mirror componenents were queued. Instead, synchronously update the metadata block first. MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/sys/geom/mirror/g_mirror.c Modified: head/sys/geom/mirror/g_mirror.c ============================================================================== --- head/sys/geom/mirror/g_mirror.c Thu Oct 6 00:05:45 2016 (r306743) +++ head/sys/geom/mirror/g_mirror.c Thu Oct 6 00:13:55 2016 (r306744) @@ -1676,6 +1676,14 @@ g_mirror_register_request(struct bio *bp sc->sc_last_write = time_uptime; /* + * Bump syncid on first write. + */ + if ((sc->sc_bump_id & G_MIRROR_BUMP_SYNCID) != 0) { + sc->sc_bump_id &= ~G_MIRROR_BUMP_SYNCID; + g_mirror_bump_syncid(sc); + } + + /* * Allocate all bios before sending any request, so we can * return ENOMEM in nice and clean way. */ @@ -1730,13 +1738,6 @@ g_mirror_register_request(struct bio *bp * synchronization requests don't collide with it. */ bioq_insert_tail(&sc->sc_inflight, bp); - /* - * Bump syncid on first write. - */ - if ((sc->sc_bump_id & G_MIRROR_BUMP_SYNCID) != 0) { - sc->sc_bump_id &= ~G_MIRROR_BUMP_SYNCID; - g_mirror_bump_syncid(sc); - } return; } default: From owner-svn-src-all@freebsd.org Thu Oct 6 00:51:29 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20C2EAF4F84; Thu, 6 Oct 2016 00:51:29 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7653DAE; Thu, 6 Oct 2016 00:51:28 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u960pSMC001368; Thu, 6 Oct 2016 00:51:28 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u960pRbV001365; Thu, 6 Oct 2016 00:51:27 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201610060051.u960pRbV001365@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Thu, 6 Oct 2016 00:51:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306745 - in head/sys: net net/altq netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 00:51:29 -0000 Author: kevlo Date: Thu Oct 6 00:51:27 2016 New Revision: 306745 URL: https://svnweb.freebsd.org/changeset/base/306745 Log: Remove an alias if_list, use if_link consistently. Reviewed by: tuexen Differential Revision: https://reviews.freebsd.org/D8075 Modified: head/sys/net/altq/altq_subr.c head/sys/net/if_var.h head/sys/netinet/sctp_bsd_addr.c Modified: head/sys/net/altq/altq_subr.c ============================================================================== --- head/sys/net/altq/altq_subr.c Thu Oct 6 00:13:55 2016 (r306744) +++ head/sys/net/altq/altq_subr.c Thu Oct 6 00:51:27 2016 (r306745) @@ -435,7 +435,7 @@ tbr_timeout(arg) VNET_FOREACH(vnet_iter) { CURVNET_SET(vnet_iter); for (ifp = TAILQ_FIRST(&V_ifnet); ifp; - ifp = TAILQ_NEXT(ifp, if_list)) { + ifp = TAILQ_NEXT(ifp, if_link)) { /* read from if_snd unlocked */ if (!TBR_IS_ENABLED(&ifp->if_snd)) continue; Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Thu Oct 6 00:13:55 2016 (r306744) +++ head/sys/net/if_var.h Thu Oct 6 00:51:27 2016 (r306745) @@ -313,7 +313,6 @@ struct ifnet { }; /* for compatibility with other BSDs */ -#define if_list if_link #define if_name(ifp) ((ifp)->if_xname) /* Modified: head/sys/netinet/sctp_bsd_addr.c ============================================================================== --- head/sys/netinet/sctp_bsd_addr.c Thu Oct 6 00:13:55 2016 (r306744) +++ head/sys/netinet/sctp_bsd_addr.c Thu Oct 6 00:51:27 2016 (r306745) @@ -208,7 +208,7 @@ sctp_init_ifns_for_vrf(int vrfid) #endif IFNET_RLOCK(); - TAILQ_FOREACH(ifn, &MODULE_GLOBAL(ifnet), if_list) { + TAILQ_FOREACH(ifn, &MODULE_GLOBAL(ifnet), if_link) { if (sctp_is_desired_interface_type(ifn) == 0) { /* non desired type */ continue; @@ -361,7 +361,7 @@ void struct ifaddr *ifa; IFNET_RLOCK(); - TAILQ_FOREACH(ifn, &MODULE_GLOBAL(ifnet), if_list) { + TAILQ_FOREACH(ifn, &MODULE_GLOBAL(ifnet), if_link) { if (!(*pred) (ifn)) { continue; } From owner-svn-src-all@freebsd.org Thu Oct 6 01:01:01 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66C33AF60D0; Thu, 6 Oct 2016 01:01:01 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 40F4512A; Thu, 6 Oct 2016 01:01:01 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96110IU004300; Thu, 6 Oct 2016 01:01:00 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96110AJ004299; Thu, 6 Oct 2016 01:01:00 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201610060101.u96110AJ004299@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Thu, 6 Oct 2016 01:01:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306746 - head/sys/dev/atkbdc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 01:01:01 -0000 Author: gonzo Date: Thu Oct 6 01:01:00 2016 New Revision: 306746 URL: https://svnweb.freebsd.org/changeset/base/306746 Log: Fix extended buttons support on synaptic clickpad Fix regression introduced by r306355 on synaptic clickpads with extended buttons (buttons stopped working) PR: 205690 Submitted by: Vladimir Kondratyev Modified: head/sys/dev/atkbdc/psm.c Modified: head/sys/dev/atkbdc/psm.c ============================================================================== --- head/sys/dev/atkbdc/psm.c Thu Oct 6 00:51:27 2016 (r306745) +++ head/sys/dev/atkbdc/psm.c Thu Oct 6 01:01:00 2016 (r306746) @@ -2750,7 +2750,9 @@ proc_synaptics(struct psm_softc *sc, pac static int touchpad_buttons; static int guest_buttons; static finger_t f[PSM_FINGERS]; - int w, id, nfingers, ewcode; + int w, id, nfingers, ewcode, extended_buttons; + + extended_buttons = 0; /* TouchPad PS/2 absolute mode message format with capFourButtons: * @@ -2863,7 +2865,8 @@ proc_synaptics(struct psm_softc *sc, pac if (pb->ipacket[1] & 0x02) guest_buttons |= MOUSE_BUTTON3DOWN; - ms->button = touchpad_buttons | guest_buttons; + ms->button = touchpad_buttons | guest_buttons | + sc->extended_buttons; } goto SYNAPTICS_END; @@ -2933,30 +2936,26 @@ proc_synaptics(struct psm_softc *sc, pac /* Middle Button */ if ((pb->ipacket[0] ^ pb->ipacket[3]) & 0x01) touchpad_buttons |= MOUSE_BUTTON2DOWN; - } else if (sc->synhw.capExtended && sc->synhw.capClickPad) { - /* ClickPad Button */ - if ((pb->ipacket[0] ^ pb->ipacket[3]) & 0x01) - touchpad_buttons = MOUSE_BUTTON1DOWN; } else if (sc->synhw.capExtended && (sc->synhw.nExtendedButtons > 0)) { /* Extended Buttons */ if ((pb->ipacket[0] ^ pb->ipacket[3]) & 0x02) { if (sc->syninfo.directional_scrolls) { if (pb->ipacket[4] & 0x01) - touchpad_buttons |= MOUSE_BUTTON4DOWN; + extended_buttons |= MOUSE_BUTTON4DOWN; if (pb->ipacket[5] & 0x01) - touchpad_buttons |= MOUSE_BUTTON5DOWN; + extended_buttons |= MOUSE_BUTTON5DOWN; if (pb->ipacket[4] & 0x02) - touchpad_buttons |= MOUSE_BUTTON6DOWN; + extended_buttons |= MOUSE_BUTTON6DOWN; if (pb->ipacket[5] & 0x02) - touchpad_buttons |= MOUSE_BUTTON7DOWN; + extended_buttons |= MOUSE_BUTTON7DOWN; } else { if (pb->ipacket[4] & 0x01) - touchpad_buttons |= MOUSE_BUTTON1DOWN; + extended_buttons |= MOUSE_BUTTON1DOWN; if (pb->ipacket[5] & 0x01) - touchpad_buttons |= MOUSE_BUTTON3DOWN; + extended_buttons |= MOUSE_BUTTON3DOWN; if (pb->ipacket[4] & 0x02) - touchpad_buttons |= MOUSE_BUTTON2DOWN; - sc->extended_buttons = touchpad_buttons; + extended_buttons |= MOUSE_BUTTON2DOWN; + sc->extended_buttons = extended_buttons; } /* @@ -2984,9 +2983,13 @@ proc_synaptics(struct psm_softc *sc, pac * Keep reporting MOUSE DOWN until we get a new packet * indicating otherwise. */ - touchpad_buttons |= sc->extended_buttons; + extended_buttons |= sc->extended_buttons; } } + /* Handle ClickPad */ + if (sc->synhw.capClickPad && + ((pb->ipacket[0] ^ pb->ipacket[3]) & 0x01)) + touchpad_buttons |= MOUSE_BUTTON1DOWN; if (sc->synhw.capReportsV && nfingers > 1) f[0] = (finger_t) { @@ -3023,7 +3026,7 @@ proc_synaptics(struct psm_softc *sc, pac if (id >= nfingers) PSM_FINGER_RESET(f[id]); - ms->button = touchpad_buttons | guest_buttons; + ms->button = touchpad_buttons; /* Palm detection doesn't terminate the current action. */ if (!psmpalmdetect(sc, &f[0], nfingers)) { @@ -3034,6 +3037,8 @@ proc_synaptics(struct psm_softc *sc, pac VLOG(2, (LOG_DEBUG, "synaptics: palm detected! (%d)\n", f[0].w)); } + ms->button |= extended_buttons | guest_buttons; + SYNAPTICS_END: /* * Use the extra buttons as a scrollwheel From owner-svn-src-all@freebsd.org Thu Oct 6 01:14:11 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F21FAF65F3; Thu, 6 Oct 2016 01:14:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 30812ADB; Thu, 6 Oct 2016 01:14:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u961EAHL010090; Thu, 6 Oct 2016 01:14:10 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u961EAET010088; Thu, 6 Oct 2016 01:14:10 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201610060114.u961EAET010088@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 6 Oct 2016 01:14:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306747 - head/sys/cam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 01:14:11 -0000 Author: mav Date: Thu Oct 6 01:14:10 2016 New Revision: 306747 URL: https://svnweb.freebsd.org/changeset/base/306747 Log: Fix ABI compat shims, broken by adding NVMe support. MFC after: 1 week Modified: head/sys/cam/cam_compat.c head/sys/cam/cam_compat.h Modified: head/sys/cam/cam_compat.c ============================================================================== --- head/sys/cam/cam_compat.c Thu Oct 6 01:01:00 2016 (r306746) +++ head/sys/cam/cam_compat.c Thu Oct 6 01:14:10 2016 (r306747) @@ -149,7 +149,24 @@ cam_compat_handle_0x17(struct cdev *dev, ccbb = (uint8_t *)&hdr[1]; ccbb17 = (uint8_t *)&hdr17[1]; - bcopy(ccbb17, ccbb, CAM_0X17_DATA_LEN); + if (ccb->ccb_h.func_code == XPT_SET_TRAN_SETTINGS) { + struct ccb_trans_settings *cts; + struct ccb_trans_settings_0x17 *cts17; + + cts = &ccb->cts; + cts17 = (struct ccb_trans_settings_0x17 *)hdr17; + cts->type = cts17->type; + cts->protocol = cts17->protocol; + cts->protocol_version = cts17->protocol_version; + cts->transport = cts17->transport; + cts->transport_version = cts17->transport_version; + bcopy(&cts17->proto_specific, &cts->proto_specific, + sizeof(cts17->proto_specific)); + bcopy(&cts17->xport_specific, &cts->xport_specific, + sizeof(cts17->xport_specific)); + } else { + bcopy(ccbb17, ccbb, CAM_0X17_DATA_LEN); + } error = (cbfnp)(dev, cmd, (caddr_t)ccb, flag, td); @@ -205,6 +222,21 @@ cam_compat_handle_0x17(struct cdev *dev, cpi17->hba_device = cpi->hba_device; cpi17->hba_subvendor = cpi->hba_subvendor; cpi17->hba_subdevice = cpi->hba_subdevice; + } else if (ccb->ccb_h.func_code == XPT_GET_TRAN_SETTINGS) { + struct ccb_trans_settings *cts; + struct ccb_trans_settings_0x17 *cts17; + + cts = &ccb->cts; + cts17 = (struct ccb_trans_settings_0x17 *)hdr17; + cts17->type = cts17->type; + cts17->protocol = cts->protocol; + cts17->protocol_version = cts->protocol_version; + cts17->transport = cts->transport; + cts17->transport_version = cts->transport_version; + bcopy(&cts->proto_specific, &cts17->proto_specific, + sizeof(cts17->proto_specific)); + bcopy(&cts->xport_specific, &cts17->xport_specific, + sizeof(cts17->xport_specific)); } else if (ccb->ccb_h.func_code == XPT_DEV_MATCH) { /* Copy the rest of the header over */ bcopy(ccbb, ccbb17, CAM_0X17_DATA_LEN); @@ -257,7 +289,24 @@ cam_compat_handle_0x18(struct cdev *dev, ccbb = (uint8_t *)&hdr[1]; ccbb18 = (uint8_t *)&hdr18[1]; - bcopy(ccbb18, ccbb, CAM_0X18_DATA_LEN); + if (ccb->ccb_h.func_code == XPT_SET_TRAN_SETTINGS) { + struct ccb_trans_settings *cts; + struct ccb_trans_settings_0x18 *cts18; + + cts = &ccb->cts; + cts18 = (struct ccb_trans_settings_0x18 *)hdr18; + cts->type = cts18->type; + cts->protocol = cts18->protocol; + cts->protocol_version = cts18->protocol_version; + cts->transport = cts18->transport; + cts->transport_version = cts18->transport_version; + bcopy(&cts18->proto_specific, &cts->proto_specific, + sizeof(cts18->proto_specific)); + bcopy(&cts18->xport_specific, &cts->xport_specific, + sizeof(cts18->xport_specific)); + } else { + bcopy(ccbb18, ccbb, CAM_0X18_DATA_LEN); + } error = (cbfnp)(dev, cmd, (caddr_t)ccb, flag, td); @@ -280,10 +329,27 @@ cam_compat_handle_0x18(struct cdev *dev, hdr18->sim_priv = hdr->sim_priv; hdr18->timeout = hdr->timeout; - bcopy(ccbb, ccbb18, CAM_0X18_DATA_LEN); - - if (ccb->ccb_h.func_code == XPT_DEV_MATCH) + if (ccb->ccb_h.func_code == XPT_GET_TRAN_SETTINGS) { + struct ccb_trans_settings *cts; + struct ccb_trans_settings_0x18 *cts18; + + cts = &ccb->cts; + cts18 = (struct ccb_trans_settings_0x18 *)hdr18; + cts18->type = cts18->type; + cts18->protocol = cts->protocol; + cts18->protocol_version = cts->protocol_version; + cts18->transport = cts->transport; + cts18->transport_version = cts->transport_version; + bcopy(&cts->proto_specific, &cts18->proto_specific, + sizeof(cts18->proto_specific)); + bcopy(&cts->xport_specific, &cts18->xport_specific, + sizeof(cts18->xport_specific)); + } else if (ccb->ccb_h.func_code == XPT_DEV_MATCH) { + bcopy(ccbb, ccbb18, CAM_0X18_DATA_LEN); cam_compat_translate_dev_match_0x18(ccb); + } else { + bcopy(ccbb, ccbb18, CAM_0X18_DATA_LEN); + } xpt_free_ccb(ccb); Modified: head/sys/cam/cam_compat.h ============================================================================== --- head/sys/cam/cam_compat.h Thu Oct 6 01:01:00 2016 (r306746) +++ head/sys/cam/cam_compat.h Thu Oct 6 01:14:10 2016 (r306747) @@ -43,8 +43,8 @@ int cam_compat_ioctl(struct cdev *dev, u #define CAM_VERSION_0x16 0x16 /* The size of the union ccb didn't change when going to 0x17 */ -#define CAMIOCOMMAND_0x16 _IOWR(CAM_VERSION_0x16, 2, union ccb) -#define CAMGETPASSTHRU_0x16 _IOWR(CAM_VERSION_0x16, 3, union ccb) +#define CAMIOCOMMAND_0x16 _IOC(IOC_INOUT, CAM_VERSION_0x16, 2, CAM_0X17_LEN) +#define CAMGETPASSTHRU_0x16 _IOC(IOC_INOUT, CAM_VERSION_0x16, 3, CAM_0X17_LEN) #define CAM_SCATTER_VALID_0x16 0x00000010 #define CAM_SG_LIST_PHYS_0x16 0x00040000 @@ -110,8 +110,30 @@ struct ccb_pathinq_0x17 { u_int16_t hba_subdevice; /* HBA subdevice ID */ }; -#define CAM_0X17_LEN (sizeof(union ccb) - sizeof(struct ccb_hdr) + sizeof(struct ccb_hdr_0x17)) -#define CAM_0X17_DATA_LEN (sizeof(union ccb) - sizeof(struct ccb_hdr_0x17)) +struct ccb_trans_settings_0x17 { + struct ccb_hdr_0x17 ccb_h; + cts_type type; /* Current or User settings */ + cam_proto protocol; + u_int protocol_version; + cam_xport transport; + u_int transport_version; + union { + u_int valid; /* Which fields to honor */ + struct ccb_trans_settings_ata ata; + struct ccb_trans_settings_scsi scsi; + } proto_specific; + union { + u_int valid; /* Which fields to honor */ + struct ccb_trans_settings_spi spi; + struct ccb_trans_settings_fc fc; + struct ccb_trans_settings_sas sas; + struct ccb_trans_settings_pata ata; + struct ccb_trans_settings_sata sata; + } xport_specific; +}; + +#define CAM_0X17_DATA_LEN CAM_0X18_DATA_LEN +#define CAM_0X17_LEN (sizeof(struct ccb_hdr_0x17) + CAM_0X17_DATA_LEN) #define CAMIOCOMMAND_0x17 _IOC(IOC_INOUT, CAM_VERSION_0x17, 2, CAM_0X17_LEN) #define CAMGETPASSTHRU_0x17 _IOC(IOC_INOUT, CAM_VERSION_0x17, 3, CAM_0X17_LEN) @@ -146,6 +168,28 @@ typedef enum { CAM_EXTLUN_VALID_0x18 = 0x00000001,/* 64bit lun field is valid */ } ccb_xflags_0x18; +struct ccb_trans_settings_0x18 { + struct ccb_hdr_0x18 ccb_h; + cts_type type; /* Current or User settings */ + cam_proto protocol; + u_int protocol_version; + cam_xport transport; + u_int transport_version; + union { + u_int valid; /* Which fields to honor */ + struct ccb_trans_settings_ata ata; + struct ccb_trans_settings_scsi scsi; + } proto_specific; + union { + u_int valid; /* Which fields to honor */ + struct ccb_trans_settings_spi spi; + struct ccb_trans_settings_fc fc; + struct ccb_trans_settings_sas sas; + struct ccb_trans_settings_pata ata; + struct ccb_trans_settings_sata sata; + } xport_specific; +}; + struct dev_match_result_0x18 { dev_match_type type; union { @@ -169,8 +213,8 @@ struct dev_match_result_0x18 { } result; }; -#define CAM_0X18_LEN (sizeof(union ccb) - sizeof(struct ccb_hdr) + sizeof(struct ccb_hdr_0x18)) -#define CAM_0X18_DATA_LEN (sizeof(union ccb) - sizeof(struct ccb_hdr_0x18)) +#define CAM_0X18_DATA_LEN (sizeof(union ccb) - 2*sizeof(void *) - sizeof(struct ccb_hdr)) +#define CAM_0X18_LEN (sizeof(struct ccb_hdr_0x18) + CAM_0X18_DATA_LEN) #define CAMIOCOMMAND_0x18 _IOC(IOC_INOUT, CAM_VERSION_0x18, 2, CAM_0X18_LEN) #define CAMGETPASSTHRU_0x18 _IOC(IOC_INOUT, CAM_VERSION_0x18, 3, CAM_0X18_LEN) From owner-svn-src-all@freebsd.org Thu Oct 6 01:52:01 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C79B8AF60E2; Thu, 6 Oct 2016 01:52:01 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7890EAED; Thu, 6 Oct 2016 01:52:01 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u961q0fn024991; Thu, 6 Oct 2016 01:52:00 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u961q0J5024972; Thu, 6 Oct 2016 01:52:00 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201610060152.u961q0J5024972@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Thu, 6 Oct 2016 01:52:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306748 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 01:52:01 -0000 Author: cem Date: Thu Oct 6 01:52:00 2016 New Revision: 306748 URL: https://svnweb.freebsd.org/changeset/base/306748 Log: style(9): Some additional clarification Prompted by an email from bde@. Reviewed by: emaste, imp (earlier version) With input from: wblock Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D7983 Modified: head/share/man/man9/style.9 Modified: head/share/man/man9/style.9 ============================================================================== --- head/share/man/man9/style.9 Thu Oct 6 01:14:10 2016 (r306747) +++ head/share/man/man9/style.9 Thu Oct 6 01:52:00 2016 (r306748) @@ -26,7 +26,7 @@ .\" From: @(#)style 1.14 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd December 5, 2015 +.Dd October 5, 2016 .Dt STYLE 9 .Os .Sh NAME @@ -114,20 +114,28 @@ static char sccsid[] = "@(#)style 1.14 ( __FBSDID("$FreeBSD$"); .Ed .Pp -Leave another blank line before the header files. +Leave one blank line before the header files. .Pp -Kernel include files (i.e.\& -.Pa sys/*.h ) -come first sorted alphabetically where possible. -Include -.In sys/types.h -OR -.In sys/param.h , -but not both and include it first. +Kernel include files +.Pa ( sys/*.h ) +come first. +If +.In sys/cdefs.h +is needed for +.Fn __FBSDID , +include it first. +If either .In sys/types.h +or +.In sys/param.h +is needed, include it before other include files. +.Po +.In sys/param.h includes -.In sys/cdefs.h , -and it is okay to depend on that. +.In sys/types.h ; +do not include both. +.Pc +The remaining kernel headers should be sorted alphabetically. .Bd -literal #include /* Non-local includes in angle brackets. */ #include @@ -144,9 +152,9 @@ For a network program, put the network i #include .Ed .Pp -Do not use files in +Do not include files from .Pa /usr/include -for files in the kernel. +in the kernel. .Pp Leave a blank line before the next group, the .Pa /usr/include @@ -166,7 +174,7 @@ in the local directory. #include .Ed .Pp -Leave another blank line before the user include files. +Leave another blank line before the local include files. .Bd -literal #include "pathnames.h" /* Local includes in double quotes. */ .Ed From owner-svn-src-all@freebsd.org Thu Oct 6 03:20:48 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1D0EAF744F; Thu, 6 Oct 2016 03:20:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB6A21670; Thu, 6 Oct 2016 03:20:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u963KlUU055540; Thu, 6 Oct 2016 03:20:47 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u963Klft055539; Thu, 6 Oct 2016 03:20:47 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201610060320.u963Klft055539@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 6 Oct 2016 03:20:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306750 - stable/10/sys/cam X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 03:20:49 -0000 Author: mav Date: Thu Oct 6 03:20:47 2016 New Revision: 306750 URL: https://svnweb.freebsd.org/changeset/base/306750 Log: Fix ABI compat shims for FreeBSD 9.0-9.1 binaries (CAM_VERSION 0x16). This is a direct commit to stable/10, inspired by some commits to later branches. Modified: stable/10/sys/cam/cam_compat.c stable/10/sys/cam/cam_compat.h Modified: stable/10/sys/cam/cam_compat.c ============================================================================== --- stable/10/sys/cam/cam_compat.c Thu Oct 6 03:14:08 2016 (r306749) +++ stable/10/sys/cam/cam_compat.c Thu Oct 6 03:20:47 2016 (r306750) @@ -63,28 +63,28 @@ cam_compat_ioctl(struct cdev *dev, u_lon switch (cmd) { case CAMIOCOMMAND_0x16: { - union ccb *ccb; + struct ccb_hdr_0x17 *hdr17; - ccb = (union ccb *)addr; - if (ccb->ccb_h.flags & CAM_SG_LIST_PHYS_0x16) { - ccb->ccb_h.flags &= ~CAM_SG_LIST_PHYS_0x16; - ccb->ccb_h.flags |= CAM_DATA_SG_PADDR; + hdr17 = (struct ccb_hdr_0x17 *)addr; + if (hdr17->flags & CAM_SG_LIST_PHYS_0x16) { + hdr17->flags &= ~CAM_SG_LIST_PHYS_0x16; + hdr17->flags |= CAM_DATA_SG_PADDR; } - if (ccb->ccb_h.flags & CAM_DATA_PHYS_0x16) { - ccb->ccb_h.flags &= ~CAM_DATA_PHYS_0x16; - ccb->ccb_h.flags |= CAM_DATA_PADDR; + if (hdr17->flags & CAM_DATA_PHYS_0x16) { + hdr17->flags &= ~CAM_DATA_PHYS_0x16; + hdr17->flags |= CAM_DATA_PADDR; } - if (ccb->ccb_h.flags & CAM_SCATTER_VALID_0x16) { - ccb->ccb_h.flags &= CAM_SCATTER_VALID_0x16; - ccb->ccb_h.flags |= CAM_DATA_SG; + if (hdr17->flags & CAM_SCATTER_VALID_0x16) { + hdr17->flags &= CAM_SCATTER_VALID_0x16; + hdr17->flags |= CAM_DATA_SG; } cmd = CAMIOCOMMAND; - error = (cbfnp)(dev, cmd, addr, flag, td); + error = cam_compat_handle_0x17(dev, cmd, addr, flag, td, cbfnp); break; } case CAMGETPASSTHRU_0x16: cmd = CAMGETPASSTHRU; - error = (cbfnp)(dev, cmd, addr, flag, td); + error = cam_compat_handle_0x17(dev, cmd, addr, flag, td, cbfnp); break; case CAMIOCOMMAND_0x17: cmd = CAMIOCOMMAND; Modified: stable/10/sys/cam/cam_compat.h ============================================================================== --- stable/10/sys/cam/cam_compat.h Thu Oct 6 03:14:08 2016 (r306749) +++ stable/10/sys/cam/cam_compat.h Thu Oct 6 03:20:47 2016 (r306750) @@ -43,8 +43,8 @@ int cam_compat_ioctl(struct cdev *dev, u #define CAM_VERSION_0x16 0x16 /* The size of the union ccb didn't change when going to 0x17 */ -#define CAMIOCOMMAND_0x16 _IOWR(CAM_VERSION_0x16, 2, union ccb) -#define CAMGETPASSTHRU_0x16 _IOWR(CAM_VERSION_0x16, 3, union ccb) +#define CAMIOCOMMAND_0x16 _IOC(IOC_INOUT, CAM_VERSION_0x16, 2, CAM_0X17_LEN) +#define CAMGETPASSTHRU_0x16 _IOC(IOC_INOUT, CAM_VERSION_0x16, 3, CAM_0X17_LEN) #define CAM_SCATTER_VALID_0x16 0x00000010 #define CAM_SG_LIST_PHYS_0x16 0x00040000 @@ -110,8 +110,8 @@ struct ccb_pathinq_0x17 { u_int16_t hba_subdevice; /* HBA subdevice ID */ }; -#define CAM_0X17_LEN (sizeof(union ccb) - sizeof(struct ccb_hdr) + sizeof(struct ccb_hdr_0x17)) -#define CAM_0X17_DATA_LEN (sizeof(union ccb) - sizeof(struct ccb_hdr_0x17)) +#define CAM_0X17_DATA_LEN (sizeof(union ccb) - sizeof(struct ccb_hdr)) +#define CAM_0X17_LEN (sizeof(struct ccb_hdr_0x17) + CAM_0X17_DATA_LEN) #define CAMIOCOMMAND_0x17 _IOC(IOC_INOUT, CAM_VERSION_0x17, 2, CAM_0X17_LEN) #define CAMGETPASSTHRU_0x17 _IOC(IOC_INOUT, CAM_VERSION_0x17, 3, CAM_0X17_LEN) From owner-svn-src-all@freebsd.org Thu Oct 6 03:31:26 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4AD5AF7625; Thu, 6 Oct 2016 03:31:26 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id 8B0F61BF3; Thu, 6 Oct 2016 03:31:26 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-106-163-102.carlnfd1.nsw.optusnet.com.au (c122-106-163-102.carlnfd1.nsw.optusnet.com.au [122.106.163.102]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id 818E8D46BCD; Thu, 6 Oct 2016 14:08:46 +1100 (AEDT) Date: Thu, 6 Oct 2016 14:08:46 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Slawa Olhovchenkov cc: Bruce Evans , Gleb Smirnoff , svn-src-head@freebsd.org, svn-src-all@freebsd.org, Eric van Gyzen , src-committers@freebsd.org Subject: Re: svn commit: r306346 - head/sys/kern In-Reply-To: <20161005204613.GD6177@zxy.spb.ru> Message-ID: <20161006135042.R2235@besplex.bde.org> References: <201609261530.u8QFUUZd020174@repo.freebsd.org> <20161004205600.GN23123@FreeBSD.org> <20161005101932.U984@besplex.bde.org> <20161005204613.GD6177@zxy.spb.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=EfU1O6SC c=1 sm=1 tr=0 a=IXAyHK3mFcy+1kvmsno0Fw==:117 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=rTNt94bjHLVpEKYA9qgA:9 a=vYY6cs5CCQjAfTik:21 a=CjuIK1q_8ugA:10 a=chvjmp5bT-K0Np4W8Gpx:22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 03:31:27 -0000 On Wed, 5 Oct 2016, Slawa Olhovchenkov wrote: > On Wed, Oct 05, 2016 at 11:19:10AM +1100, Bruce Evans wrote: > >> On Tue, 4 Oct 2016, Gleb Smirnoff wrote: >> >>> On Mon, Sep 26, 2016 at 03:30:30PM +0000, Eric van Gyzen wrote: >>> E> ... >>> E> Modified: head/sys/kern/kern_mutex.c >>> E> ============================================================================== >>> E> --- head/sys/kern/kern_mutex.c Mon Sep 26 15:03:31 2016 (r306345) >>> E> +++ head/sys/kern/kern_mutex.c Mon Sep 26 15:30:30 2016 (r306346) >>> E> @@ -924,7 +924,7 @@ __mtx_assert(const volatile uintptr_t *c >>> E> { >>> E> const struct mtx *m; >>> E> >>> E> - if (panicstr != NULL || dumping) >>> E> + if (panicstr != NULL || dumping || SCHEDULER_STOPPED()) >>> E> return; >>> >>> I wonder if all this disjunct can be reduced just to SCHEDULER_STOPPED()? >>> Positive panicstr and dumping imply scheduler stopped. >> >> 'dumping' doesn't imply SCHEDULER_STOPPED(). >> >> Checking 'dumping' here seems to be just an old bug. It just breaks >> __mtx_assert(), while all other mutex operations work normally for dumping >> without panicing. > > [...] > > Is this related to halted (not reboted) 11.0 after ~^B and `panic`? There might be related problems, but I don't see any here. > What I see on serial console: > ===== > db> panic > panic: from debugger I wouldn't trust panic from the debugger, but it is safer than dump from the debugger (both are ddb commands, but this is another bug). > cpuid = 1 > KDB: stack backtrace: > db_trace_self_wrapper() at 0xffffffff8031fadb = db_trace_self_wrapper+0x2b/frame 0xfffffe1f9e198120 > vpanic() at 0xffffffff804a0302 = vpanic+0x182/frame 0xfffffe1f9e1981a0 > panic() at 0xffffffff804a0383 = panic+0x43/frame 0xfffffe1f9e198200 > db_panic() at 0xffffffff8031d987 = db_panic+0x17/frame 0xfffffe1f9e198210 > db_command() at 0xffffffff8031d019 = db_command+0x299/frame 0xfffffe1f9e1982e0 > db_command_loop() at 0xffffffff8031cd74 = db_command_loop+0x64/frame 0xfffffe1f9e1982f0 > db_trap() at 0xffffffff8031fc1b = db_trap+0xdb/frame 0xfffffe1f9e198380 > kdb_trap() at 0xffffffff804dd8c3 = kdb_trap+0x193/frame 0xfffffe1f9e198410 > trap() at 0xffffffff806e3065 = trap+0x255/frame 0xfffffe1f9e198620 > calltrap() at 0xffffffff806cafd1 = calltrap+0x8/frame 0xfffffe1f9e198620 > --- trap 0x3, rip = 0xffffffff804dd11e, rsp = 0xfffffe1f9e1986f0, rbp = 0xfffffe1f9e198710 --- > kdb_alt_break_internal() at 0xffffffff804dd11e = kdb_alt_break_internal+0x18e/frame 0xfffffe1f9e198710 > kdb_alt_break() at 0xffffffff804dcf8b = kdb_alt_break+0xb/frame 0xfffffe1f9e198720 > uart_intr_rxready() at 0xffffffff803e38a8 = uart_intr_rxready+0x98/frame 0xfffffe1f9e198750 > uart_intr() at 0xffffffff803e4621 = uart_intr+0x121/frame 0xfffffe1f9e198790 > intr_event_handle() at 0xffffffff8046c74b = intr_event_handle+0x9b/frame 0xfffffe1f9e1987e0 > intr_execute_handlers() at 0xffffffff8076d2d8 = intr_execute_handlers+0x48/frame 0xfffffe1f9e198810 > lapic_handle_intr() at 0xffffffff8077163f = lapic_handle_intr+0x3f/frame 0xfffffe1f9e198830 > Xapic_isr1() at 0xffffffff806cb6b7 = Xapic_isr1+0xb7/frame 0xfffffe1f9e198830 > --- interrupt, rip = 0xffffffff8032fedf, rsp = 0xfffffe1f9e198900, rbp = 0xfffffe1f9e198940 --- > acpi_cpu_idle() at 0xffffffff8032fedf = acpi_cpu_idle+0x2af/frame 0xfffffe1f9e198940 > cpu_idle_acpi() at 0xffffffff8076ad1f = cpu_idle_acpi+0x3f/frame 0xfffffe1f9e198960 > cpu_idle() at 0xffffffff8076adc5 = cpu_idle+0x95/frame 0xfffffe1f9e198980 > sched_idletd() at 0xffffffff804cbbe5 = sched_idletd+0x495/frame 0xfffffe1f9e198a70 > fork_exit() at 0xffffffff8046a211 = fork_exit+0x71/frame 0xfffffe1f9e198ab0 > fork_trampoline() at 0xffffffff806cb50e = fork_trampoline+0xe/frame 0xfffffe1f9e198ab0 > --- trap 0, rip = 0, rsp = 0, rbp = 0 --- This looks like a normal kdb entry then a not so normal panic from ddb, but no problems. > Uptime: 1d4h53m19s > Dumping 12148 out of 131020 MB:..1%..11%..21%..31%..41%..51%..61%..71%..81%..91% > Dump complete > mps2: Sending StopUnit: path (xpt0:mps2:0:14:ffffffff): handle 12 > mps2: Incrementing SSU count > mps2: Sending StopUnit: path (xpt0:mps2:0:18:ffffffff): handle 9 > mps2: Incrementing SSU count > ===== > > This is normal reboot (by /sbin/reboot): Is the above just a hung dump from reboot, before going near ddb? That case should work, but perhaps it needs to be more careful about waiting for the other CPUs. Just stopping them is no good since it gives an even more fragile environment, like panicing or entering ddb. > > === > Sending StopUnit: path (xpt0:mps2:0:14:ffffffff): handle 13 > mps2: Incrementing SSU count > mps2: Sending StopUnit: path (xpt0:mps2:0:18:ffffffff): handle 9 > mps2: Incrementing SSU count > mps2: Decrementing SSU count. > mps2: Completing stop unit for (xpt0:mps2:0:18:ffffffff): > mps2: Decrementing SSU count. > mps2: Completing stop unit for (xpt0:mps2:0:14:ffffffff): > === > > ==== > mps2: lagg0: link state changed to DOWN > Sending StopUnit: path (xpt0:mps2:0:14:ffffffff): handle 12 > mps2: Incrementing SSU count > mps2: Sending StopUnit: path (xpt0:mps2:0:18:ffffffff): handle 9 > mps2: Incrementing SSU count > mps2: Decrementing SSU count. > mps2: Completing stop unit for (xpt0:mps2:0:18:ffffffff): > mps2: Decrementing SSU count. > mps2: Completing stop unit for (xpt0:mps2:0:14:ffffffff): > ==== Bruce From owner-svn-src-all@freebsd.org Thu Oct 6 03:32:31 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B20E5AF7682; Thu, 6 Oct 2016 03:32:31 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89FE01EEC; Thu, 6 Oct 2016 03:32:31 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u963WUPL062747; Thu, 6 Oct 2016 03:32:30 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u963WUgm062741; Thu, 6 Oct 2016 03:32:30 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201610060332.u963WUgm062741@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Thu, 6 Oct 2016 03:32:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306751 - in head/sys/boot: efi/boot1 efi/loader i386/gptzfsboot i386/zfsboot userboot/zfs zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 03:32:31 -0000 Author: allanjude Date: Thu Oct 6 03:32:30 2016 New Revision: 306751 URL: https://svnweb.freebsd.org/changeset/base/306751 Log: Disable loop unrolling in skein for sys/boot When tsoome@ added skein support to the ZFS boot code and zfsloader, it resulted in an explosion in code size, running close to a number of limits. The default for the C version of skein is to unroll all loops for skein-256 and 512 Disabling the loop unrolling saves 20-28kb from each binary boot1.efi gptzfsboot loader.efi userboot.so zfsloader Reviewed by: emaste, tsoome Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D7826 Modified: head/sys/boot/efi/boot1/Makefile head/sys/boot/efi/loader/Makefile head/sys/boot/i386/gptzfsboot/Makefile head/sys/boot/i386/zfsboot/Makefile head/sys/boot/userboot/zfs/Makefile head/sys/boot/zfs/Makefile Modified: head/sys/boot/efi/boot1/Makefile ============================================================================== --- head/sys/boot/efi/boot1/Makefile Thu Oct 6 03:20:47 2016 (r306750) +++ head/sys/boot/efi/boot1/Makefile Thu Oct 6 03:32:30 2016 (r306751) @@ -28,6 +28,8 @@ SRCS= boot1.c self_reloc.c start.S ufs_m .if ${MK_ZFS} != "no" SRCS+= zfs_module.c SRCS+= skein.c skein_block.c +# Do not unroll skein loops, reduce code size +CFLAGS+= -DSKEIN_LOOP=111 .PATH: ${.CURDIR}/../../../crypto/skein .endif Modified: head/sys/boot/efi/loader/Makefile ============================================================================== --- head/sys/boot/efi/loader/Makefile Thu Oct 6 03:20:47 2016 (r306750) +++ head/sys/boot/efi/loader/Makefile Thu Oct 6 03:32:30 2016 (r306751) @@ -25,6 +25,8 @@ SRCS= autoload.c \ SRCS+= zfs.c .PATH: ${.CURDIR}/../../zfs SRCS+= skein.c skein_block.c +# Do not unroll skein loops, reduce code size +CFLAGS+= -DSKEIN_LOOP=111 .PATH: ${.CURDIR}/../../../crypto/skein # Disable warnings that are currently incompatible with the zfs boot code Modified: head/sys/boot/i386/gptzfsboot/Makefile ============================================================================== --- head/sys/boot/i386/gptzfsboot/Makefile Thu Oct 6 03:20:47 2016 (r306750) +++ head/sys/boot/i386/gptzfsboot/Makefile Thu Oct 6 03:32:30 2016 (r306751) @@ -36,6 +36,9 @@ CFLAGS= -DBOOTPROG=\"gptzfsboot\" \ -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ -Winline -Wno-tentative-definition-incomplete-type -Wno-pointer-sign +# Do not unroll skein loops, reduce code size +CFLAGS+= -DSKEIN_LOOP=111 + .if !defined(LOADER_NO_GELI_SUPPORT) CFLAGS+= -DLOADER_GELI_SUPPORT CFLAGS+= -I${.CURDIR}/../../geli Modified: head/sys/boot/i386/zfsboot/Makefile ============================================================================== --- head/sys/boot/i386/zfsboot/Makefile Thu Oct 6 03:20:47 2016 (r306750) +++ head/sys/boot/i386/zfsboot/Makefile Thu Oct 6 03:32:30 2016 (r306751) @@ -35,6 +35,8 @@ CFLAGS= -DBOOTPROG=\"zfsboot\" \ -Winline CFLAGS.gcc+= --param max-inline-insns-single=100 +# Do not unroll skein loops, reduce code size +CFLAGS+= -DSKEIN_LOOP=111 LD_FLAGS=${LD_FLAGS_BIN} Modified: head/sys/boot/userboot/zfs/Makefile ============================================================================== --- head/sys/boot/userboot/zfs/Makefile Thu Oct 6 03:20:47 2016 (r306750) +++ head/sys/boot/userboot/zfs/Makefile Thu Oct 6 03:32:30 2016 (r306751) @@ -8,6 +8,9 @@ INTERNALLIB= SRCS+= zfs.c skein.c skein_block.c +# Do not unroll skein loops, reduce code size +CFLAGS+= -DSKEIN_LOOP=111 + CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I. CFLAGS+= -I${.CURDIR}/../../../../lib/libstand CFLAGS+= -I${.CURDIR}/../../../cddl/boot/zfs Modified: head/sys/boot/zfs/Makefile ============================================================================== --- head/sys/boot/zfs/Makefile Thu Oct 6 03:20:47 2016 (r306750) +++ head/sys/boot/zfs/Makefile Thu Oct 6 03:32:30 2016 (r306751) @@ -6,6 +6,8 @@ INTERNALLIB= SRCS+= zfs.c SRCS+= skein.c skein_block.c +# Do not unroll skein loops, reduce code size +CFLAGS+= -DSKEIN_LOOP=111 .PATH: ${.CURDIR}/../../crypto/skein CFLAGS+= -DBOOTPROG=\"zfsloader\" From owner-svn-src-all@freebsd.org Thu Oct 6 05:16:45 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73D60BD339F; Thu, 6 Oct 2016 05:16:45 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29461FE1; Thu, 6 Oct 2016 05:16:45 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u965GifP099818; Thu, 6 Oct 2016 05:16:44 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u965GiwY099817; Thu, 6 Oct 2016 05:16:44 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201610060516.u965GiwY099817@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Thu, 6 Oct 2016 05:16:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306752 - head/sbin/savecore X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 05:16:45 -0000 Author: cem Date: Thu Oct 6 05:16:44 2016 New Revision: 306752 URL: https://svnweb.freebsd.org/changeset/base/306752 Log: savecore(8): Fix buffer overrun inspecting disks with varying sector size A premature optimization lead to caching a native-sector sized memory allocation. If the program examined a 512 byte sector disk, then a 4096 byte sector disk, the program would overrun the cached 512 byte buffer. Just remove the optimization to fix the bug. This was introduced with the 4Kn dump support in r298076. Reported by: markj Reviewed by: markj, rpokala Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D8162 Modified: head/sbin/savecore/savecore.c Modified: head/sbin/savecore/savecore.c ============================================================================== --- head/sbin/savecore/savecore.c Thu Oct 6 03:32:30 2016 (r306751) +++ head/sbin/savecore/savecore.c Thu Oct 6 05:16:44 2016 (r306752) @@ -436,7 +436,8 @@ DoFile(const char *savedir, const char * { xo_handle_t *xostdout, *xoinfo; static char infoname[PATH_MAX], corename[PATH_MAX], linkname[PATH_MAX]; - static char *buf = NULL, *temp = NULL; + static char *buf = NULL; + char *temp = NULL; struct kerneldumpheader kdhf, kdhl; off_t mediasize, dumpsize, firsthd, lasthd; FILE *info, *fp; @@ -498,12 +499,10 @@ DoFile(const char *savedir, const char * } lasthd = mediasize - sectorsize; + temp = malloc(sectorsize); if (temp == NULL) { - temp = malloc(sectorsize); - if (temp == NULL) { - syslog(LOG_ERR, "%m"); - goto closefd; - } + syslog(LOG_ERR, "%m"); + goto closefd; } if (lseek(fd, lasthd, SEEK_SET) != lasthd || read(fd, temp, sectorsize) != (ssize_t)sectorsize) { @@ -749,6 +748,7 @@ nuke: } xo_close_container_h(xostdout, "crashdump"); xo_finish_h(xostdout); + free(temp); close(fd); return; @@ -756,6 +756,7 @@ closeall: fclose(fp); closefd: + free(temp); close(fd); } From owner-svn-src-all@freebsd.org Thu Oct 6 08:11:55 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2EDD4BD335D; Thu, 6 Oct 2016 08:11:55 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F2BEFED6; Thu, 6 Oct 2016 08:11:54 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u968Bs5B068404; Thu, 6 Oct 2016 08:11:54 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u968Bsfe068403; Thu, 6 Oct 2016 08:11:54 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201610060811.u968Bsfe068403@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 6 Oct 2016 08:11:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306753 - stable/11/sys/netinet6 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 08:11:55 -0000 Author: ae Date: Thu Oct 6 08:11:53 2016 New Revision: 306753 URL: https://svnweb.freebsd.org/changeset/base/306753 Log: MFC r306459: Fix bug introduced in r274300. In icmp6_reflect() use original source address of erroneous packet as destination address for source selection algorithm when original destination address is not one of our own. Reported by: Mark Kamichoff Modified: stable/11/sys/netinet6/icmp6.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet6/icmp6.c ============================================================================== --- stable/11/sys/netinet6/icmp6.c Thu Oct 6 05:16:44 2016 (r306752) +++ stable/11/sys/netinet6/icmp6.c Thu Oct 6 08:11:53 2016 (r306753) @@ -2146,7 +2146,7 @@ icmp6_reflect(struct mbuf *m, size_t off * that we do not own. Select a source address based on the * source address of the erroneous packet. */ - in6_splitscope(&ip6->ip6_dst, &dst6, &scopeid); + in6_splitscope(&ip6->ip6_src, &dst6, &scopeid); error = in6_selectsrc_addr(RT_DEFAULT_FIB, &dst6, scopeid, NULL, &src6, &hlim); From owner-svn-src-all@freebsd.org Thu Oct 6 10:40:20 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 584CBAF6FEC; Thu, 6 Oct 2016 10:40:20 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A460260; Thu, 6 Oct 2016 10:40:20 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1bs662-000KFb-S0; Thu, 06 Oct 2016 13:40:14 +0300 Date: Thu, 6 Oct 2016 13:40:14 +0300 From: Slawa Olhovchenkov To: Bruce Evans Cc: Eric van Gyzen , src-committers@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , svn-src-head@freebsd.org Subject: Re: svn commit: r306346 - head/sys/kern Message-ID: <20161006104014.GE6177@zxy.spb.ru> References: <201609261530.u8QFUUZd020174@repo.freebsd.org> <20161004205600.GN23123@FreeBSD.org> <20161005101932.U984@besplex.bde.org> <20161005204613.GD6177@zxy.spb.ru> <20161006135042.R2235@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161006135042.R2235@besplex.bde.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 10:40:20 -0000 On Thu, Oct 06, 2016 at 02:08:46PM +1100, Bruce Evans wrote: > On Wed, 5 Oct 2016, Slawa Olhovchenkov wrote: > > > On Wed, Oct 05, 2016 at 11:19:10AM +1100, Bruce Evans wrote: > > > >> On Tue, 4 Oct 2016, Gleb Smirnoff wrote: > >> > >>> On Mon, Sep 26, 2016 at 03:30:30PM +0000, Eric van Gyzen wrote: > >>> E> ... > >>> E> Modified: head/sys/kern/kern_mutex.c > >>> E> ============================================================================== > >>> E> --- head/sys/kern/kern_mutex.c Mon Sep 26 15:03:31 2016 (r306345) > >>> E> +++ head/sys/kern/kern_mutex.c Mon Sep 26 15:30:30 2016 (r306346) > >>> E> @@ -924,7 +924,7 @@ __mtx_assert(const volatile uintptr_t *c > >>> E> { > >>> E> const struct mtx *m; > >>> E> > >>> E> - if (panicstr != NULL || dumping) > >>> E> + if (panicstr != NULL || dumping || SCHEDULER_STOPPED()) > >>> E> return; > >>> > >>> I wonder if all this disjunct can be reduced just to SCHEDULER_STOPPED()? > >>> Positive panicstr and dumping imply scheduler stopped. > >> > >> 'dumping' doesn't imply SCHEDULER_STOPPED(). > >> > >> Checking 'dumping' here seems to be just an old bug. It just breaks > >> __mtx_assert(), while all other mutex operations work normally for dumping > >> without panicing. > > > > [...] > > > > Is this related to halted (not reboted) 11.0 after ~^B and `panic`? > > There might be related problems, but I don't see any here. > > > What I see on serial console: > > ===== > > db> panic > > panic: from debugger > > I wouldn't trust panic from the debugger, but it is safer than dump > from the debugger (both are ddb commands, but this is another bug). > > > cpuid = 1 > > KDB: stack backtrace: > > db_trace_self_wrapper() at 0xffffffff8031fadb = db_trace_self_wrapper+0x2b/frame 0xfffffe1f9e198120 > > vpanic() at 0xffffffff804a0302 = vpanic+0x182/frame 0xfffffe1f9e1981a0 > > panic() at 0xffffffff804a0383 = panic+0x43/frame 0xfffffe1f9e198200 > > db_panic() at 0xffffffff8031d987 = db_panic+0x17/frame 0xfffffe1f9e198210 > > db_command() at 0xffffffff8031d019 = db_command+0x299/frame 0xfffffe1f9e1982e0 > > db_command_loop() at 0xffffffff8031cd74 = db_command_loop+0x64/frame 0xfffffe1f9e1982f0 > > db_trap() at 0xffffffff8031fc1b = db_trap+0xdb/frame 0xfffffe1f9e198380 > > kdb_trap() at 0xffffffff804dd8c3 = kdb_trap+0x193/frame 0xfffffe1f9e198410 > > trap() at 0xffffffff806e3065 = trap+0x255/frame 0xfffffe1f9e198620 > > calltrap() at 0xffffffff806cafd1 = calltrap+0x8/frame 0xfffffe1f9e198620 > > --- trap 0x3, rip = 0xffffffff804dd11e, rsp = 0xfffffe1f9e1986f0, rbp = 0xfffffe1f9e198710 --- > > kdb_alt_break_internal() at 0xffffffff804dd11e = kdb_alt_break_internal+0x18e/frame 0xfffffe1f9e198710 > > kdb_alt_break() at 0xffffffff804dcf8b = kdb_alt_break+0xb/frame 0xfffffe1f9e198720 > > uart_intr_rxready() at 0xffffffff803e38a8 = uart_intr_rxready+0x98/frame 0xfffffe1f9e198750 > > uart_intr() at 0xffffffff803e4621 = uart_intr+0x121/frame 0xfffffe1f9e198790 > > intr_event_handle() at 0xffffffff8046c74b = intr_event_handle+0x9b/frame 0xfffffe1f9e1987e0 > > intr_execute_handlers() at 0xffffffff8076d2d8 = intr_execute_handlers+0x48/frame 0xfffffe1f9e198810 > > lapic_handle_intr() at 0xffffffff8077163f = lapic_handle_intr+0x3f/frame 0xfffffe1f9e198830 > > Xapic_isr1() at 0xffffffff806cb6b7 = Xapic_isr1+0xb7/frame 0xfffffe1f9e198830 > > --- interrupt, rip = 0xffffffff8032fedf, rsp = 0xfffffe1f9e198900, rbp = 0xfffffe1f9e198940 --- > > acpi_cpu_idle() at 0xffffffff8032fedf = acpi_cpu_idle+0x2af/frame 0xfffffe1f9e198940 > > cpu_idle_acpi() at 0xffffffff8076ad1f = cpu_idle_acpi+0x3f/frame 0xfffffe1f9e198960 > > cpu_idle() at 0xffffffff8076adc5 = cpu_idle+0x95/frame 0xfffffe1f9e198980 > > sched_idletd() at 0xffffffff804cbbe5 = sched_idletd+0x495/frame 0xfffffe1f9e198a70 > > fork_exit() at 0xffffffff8046a211 = fork_exit+0x71/frame 0xfffffe1f9e198ab0 > > fork_trampoline() at 0xffffffff806cb50e = fork_trampoline+0xe/frame 0xfffffe1f9e198ab0 > > --- trap 0, rip = 0, rsp = 0, rbp = 0 --- > > This looks like a normal kdb entry then a not so normal panic from ddb, > but no problems. Yes, I am just capture all output from console after command (`panic`). > > Uptime: 1d4h53m19s > > Dumping 12148 out of 131020 MB:..1%..11%..21%..31%..41%..51%..61%..71%..81%..91% > > Dump complete > > mps2: Sending StopUnit: path (xpt0:mps2:0:14:ffffffff): handle 12 > > mps2: Incrementing SSU count > > mps2: Sending StopUnit: path (xpt0:mps2:0:18:ffffffff): handle 9 > > mps2: Incrementing SSU count > > ===== > > > > This is normal reboot (by /sbin/reboot): > > Is the above just a hung dump from reboot, before going near ddb? That > case should work, but perhaps it needs to be more careful about waiting > for the other CPUs. Just stopping them is no good since it gives an > even more fragile environment, like panicing or entering ddb. Above is attempt to collect dump and reboot from KDB. Similar output exist from INAVRIANT: ==== panic: tcp_detach: INP_TIMEWAIT && INP_DROPPED && tp != NULL cpuid = 4 KDB: stack backtrace: db_trace_self_wrapper() at 0xffffffff8032467b = db_trace_self_wrapper+0x2b/frame 0xfffffe1f9e1f8730 vpanic() at 0xffffffff804b5672 = vpanic+0x182/frame 0xfffffe1f9e1f87b0 kassert_panic() at 0xffffffff804b54e6 = kassert_panic+0x126/frame 0xfffffe1f9e1f8820 tcp_usr_detach() at 0xffffffff806564dc = tcp_usr_detach+0x1bc/frame 0xfffffe1f9e1f8850 sofree() at 0xffffffff8053de66 = sofree+0x1a6/frame 0xfffffe1f9e1f8880 tcp_close() at 0xffffffff8064dd8e = tcp_close+0x11e/frame 0xfffffe1f9e1f88b0 tcp_timer_2msl() at 0xffffffff80653c28 = tcp_timer_2msl+0x278/frame 0xfffffe1f9e1f88e0 softclock_call_cc() at 0xffffffff804cbacc = softclock_call_cc+0x19c/frame 0xfffffe1f9e1f89c0 softclock() at 0xffffffff804cbec7 = softclock+0x47/frame 0xfffffe1f9e1f89e0 intr_event_execute_handlers() at 0xffffffff8047aa86 = intr_event_execute_handlers+0x96/frame 0xfffffe1f9e1f8a20 ithread_loop() at 0xffffffff8047b106 = ithread_loop+0xa6/frame 0xfffffe1f9e1f8a70 fork_exit() at 0xffffffff804781b4 = fork_exit+0x84/frame 0xfffffe1f9e1f8ab0 fork_trampoline() at 0xffffffff80713fce = fork_trampoline+0xe/frame 0xfffffe1f9e1f8ab0 --- trap 0, rip = 0, rsp = 0, rbp = 0 --- Uptime: 54m39s Dumping 7780 out of 131019 MB:..1%..11%..21%..31%..41%..51%..61%..71%..81%..91% Dump complete mps2: Sending StopUnit: path (xpt0:mps2:0:14:ffffffff): handle 12 mps2: Incrementing SSU count mps2: Sending StopUnit: path (xpt0:mps2:0:18:ffffffff): handle 9 mps2: Incrementing SSU count ==== And need power reset for reboot. > > > > === > > Sending StopUnit: path (xpt0:mps2:0:14:ffffffff): handle 13 > > mps2: Incrementing SSU count > > mps2: Sending StopUnit: path (xpt0:mps2:0:18:ffffffff): handle 9 > > mps2: Incrementing SSU count > > mps2: Decrementing SSU count. > > mps2: Completing stop unit for (xpt0:mps2:0:18:ffffffff): > > mps2: Decrementing SSU count. > > mps2: Completing stop unit for (xpt0:mps2:0:14:ffffffff): > > === > > > > ==== > > mps2: lagg0: link state changed to DOWN > > Sending StopUnit: path (xpt0:mps2:0:14:ffffffff): handle 12 > > mps2: Incrementing SSU count > > mps2: Sending StopUnit: path (xpt0:mps2:0:18:ffffffff): handle 9 > > mps2: Incrementing SSU count > > mps2: Decrementing SSU count. > > mps2: Completing stop unit for (xpt0:mps2:0:18:ffffffff): > > mps2: Decrementing SSU count. > > mps2: Completing stop unit for (xpt0:mps2:0:14:ffffffff): > > ==== > > Bruce > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-all@freebsd.org Thu Oct 6 11:54:43 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5120BD3B75; Thu, 6 Oct 2016 11:54:43 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 869EA29; Thu, 6 Oct 2016 11:54:43 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96BsggC059577; Thu, 6 Oct 2016 11:54:42 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96BsgXY059576; Thu, 6 Oct 2016 11:54:42 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201610061154.u96BsgXY059576@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Thu, 6 Oct 2016 11:54:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306754 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 11:54:43 -0000 Author: mmel Date: Thu Oct 6 11:54:42 2016 New Revision: 306754 URL: https://svnweb.freebsd.org/changeset/base/306754 Log: ARM: Remove unused variable. Not a functional change. MFC after: 3 days Modified: head/sys/arm/arm/locore-v6.S Modified: head/sys/arm/arm/locore-v6.S ============================================================================== --- head/sys/arm/arm/locore-v6.S Thu Oct 6 08:11:53 2016 (r306753) +++ head/sys/arm/arm/locore-v6.S Thu Oct 6 11:54:42 2016 (r306754) @@ -439,9 +439,6 @@ boot_pt1: .text .align 2 -.Lcpufuncs: - .word _C_LABEL(cpufuncs) - #if defined(SMP) ASENTRY_NP(mpentry) From owner-svn-src-all@freebsd.org Thu Oct 6 12:01:12 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09F14AF52E0; Thu, 6 Oct 2016 12:01:12 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE68F961; Thu, 6 Oct 2016 12:01:11 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96C1Blh060569; Thu, 6 Oct 2016 12:01:11 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96C1ARn060568; Thu, 6 Oct 2016 12:01:10 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201610061201.u96C1ARn060568@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Thu, 6 Oct 2016 12:01:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306755 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 12:01:12 -0000 Author: mmel Date: Thu Oct 6 12:01:10 2016 New Revision: 306755 URL: https://svnweb.freebsd.org/changeset/base/306755 Log: ARM: Add identifiers for ARM Cortex v8 and Marvell Sheeva v7 cores. Not a functional change. MFC after: 3 days Modified: head/sys/arm/arm/cpuinfo.c head/sys/arm/include/cpuinfo.h Modified: head/sys/arm/arm/cpuinfo.c ============================================================================== --- head/sys/arm/arm/cpuinfo.c Thu Oct 6 11:54:42 2016 (r306754) +++ head/sys/arm/arm/cpuinfo.c Thu Oct 6 12:01:10 2016 (r306755) @@ -165,7 +165,11 @@ cpuinfo_get_actlr_modifier(uint32_t *act if (cpuinfo.implementer == CPU_IMPLEMENTER_ARM) { switch (cpuinfo.part_number) { - + case CPU_ARCH_CORTEX_A72: + case CPU_ARCH_CORTEX_A57: + case CPU_ARCH_CORTEX_A53: + /* Nothing to do for AArch32 */ + break; case CPU_ARCH_CORTEX_A17: case CPU_ARCH_CORTEX_A12: /* A12 is merged to A17 */ /* Modified: head/sys/arm/include/cpuinfo.h ============================================================================== --- head/sys/arm/include/cpuinfo.h Thu Oct 6 11:54:42 2016 (r306754) +++ head/sys/arm/include/cpuinfo.h Thu Oct 6 12:01:10 2016 (r306755) @@ -45,10 +45,18 @@ #define CPU_ARCH_CORTEX_A12 0xC0D #define CPU_ARCH_CORTEX_A15 0xC0F #define CPU_ARCH_CORTEX_A17 0xC11 +#define CPU_ARCH_CORTEX_A53 0xD03 +#define CPU_ARCH_CORTEX_A57 0xD07 +#define CPU_ARCH_CORTEX_A72 0xD08 + /* QCOM */ #define CPU_ARCH_KRAIT_300 0x06F +/* MRVL */ +#define CPU_ARCH_SHEEVA_851 0x581 /* PJ4/PJ4B */ +#define CPU_ARCH_SHEEVA_584 0x584 /* PJ4B-MP/PJ4C */ + struct cpuinfo { /* raw id registers */ uint32_t midr; From owner-svn-src-all@freebsd.org Thu Oct 6 13:18:21 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46197BD8CA4; Thu, 6 Oct 2016 13:18:21 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22D9DFA9; Thu, 6 Oct 2016 13:18:21 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96DIK7W091675; Thu, 6 Oct 2016 13:18:20 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96DIILf091659; Thu, 6 Oct 2016 13:18:18 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201610061318.u96DIILf091659@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Thu, 6 Oct 2016 13:18:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306756 - in head/sys/arm: allwinner altera/socfpga amlogic/aml8726 arm broadcom/bcm2835 freescale/imx include mv/armada38x nvidia/tegra124 rockchip samsung/exynos ti/omap4 xilinx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 13:18:21 -0000 Author: mmel Date: Thu Oct 6 13:18:18 2016 New Revision: 306756 URL: https://svnweb.freebsd.org/changeset/base/306756 Log: ARM: SEV/WFE instructions are implemented starting from ARMv6K, use it directly. MFC after: 1 week Modified: head/sys/arm/allwinner/aw_mp.c head/sys/arm/altera/socfpga/socfpga_mp.c head/sys/arm/amlogic/aml8726/aml8726_mp.c head/sys/arm/arm/cpufunc_asm_armv7.S head/sys/arm/arm/mp_machdep.c head/sys/arm/broadcom/bcm2835/bcm2836_mp.c head/sys/arm/freescale/imx/imx6_mp.c head/sys/arm/include/cpu-v6.h head/sys/arm/include/cpufunc.h head/sys/arm/mv/armada38x/pmsu.c head/sys/arm/nvidia/tegra124/tegra124_mp.c head/sys/arm/rockchip/rk30xx_mp.c head/sys/arm/samsung/exynos/exynos5_mp.c head/sys/arm/ti/omap4/omap4_mp.c head/sys/arm/xilinx/zy7_mp.c Modified: head/sys/arm/allwinner/aw_mp.c ============================================================================== --- head/sys/arm/allwinner/aw_mp.c Thu Oct 6 12:01:10 2016 (r306755) +++ head/sys/arm/allwinner/aw_mp.c Thu Oct 6 13:18:18 2016 (r306756) @@ -193,7 +193,8 @@ aw_mp_start_ap(platform_t plat) val |= (1 << i); bus_space_write_4(fdtbus_bs_tag, cpucfg, CPUCFG_DBGCTL1, val); - armv7_sev(); + dsb(); + sev(); bus_space_unmap(fdtbus_bs_tag, cpucfg, CPUCFG_SIZE); if (soc_family != ALLWINNERSOC_SUN7I) bus_space_unmap(fdtbus_bs_tag, prcm, PRCM_SIZE); @@ -279,7 +280,8 @@ a83t_mp_start_ap(platform_t plat) panic("Couldn't map the PRCM\n"); aw_mc_mp_start_ap(cpuscfg, cpuxcfg, prcm); - armv7_sev(); + dsb(); + sev(); bus_space_unmap(fdtbus_bs_tag, cpuxcfg, CPUXCFG_SIZE); bus_space_unmap(fdtbus_bs_tag, cpuscfg, CPUCFG_SIZE); bus_space_unmap(fdtbus_bs_tag, prcm, PRCM_SIZE); Modified: head/sys/arm/altera/socfpga/socfpga_mp.c ============================================================================== --- head/sys/arm/altera/socfpga/socfpga_mp.c Thu Oct 6 12:01:10 2016 (r306755) +++ head/sys/arm/altera/socfpga/socfpga_mp.c Thu Oct 6 13:18:18 2016 (r306756) @@ -151,7 +151,8 @@ platform_mp_start_ap(void) /* Put CPU1 out from reset */ bus_space_write_4(fdtbus_bs_tag, rst, MPUMODRST, 0); - armv7_sev(); + dsb(); + sev(); bus_space_unmap(fdtbus_bs_tag, scu, SCU_SIZE); bus_space_unmap(fdtbus_bs_tag, rst, RSTMGR_SIZE); Modified: head/sys/arm/amlogic/aml8726/aml8726_mp.c ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_mp.c Thu Oct 6 12:01:10 2016 (r306755) +++ head/sys/arm/amlogic/aml8726/aml8726_mp.c Thu Oct 6 13:18:18 2016 (r306756) @@ -487,7 +487,8 @@ platform_mp_start_ap(void) CPUCONF_BARRIER(AML_CPUCONF_CONTROL_REG); /* Wakeup the now enabled APs */ - armv7_sev(); + dsb(); + sev(); /* * Free the resources which are not needed after startup. Modified: head/sys/arm/arm/cpufunc_asm_armv7.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_armv7.S Thu Oct 6 12:01:10 2016 (r306755) +++ head/sys/arm/arm/cpufunc_asm_armv7.S Thu Oct 6 13:18:18 2016 (r306756) @@ -165,10 +165,3 @@ ENTRY(armv7_drain_writebuf) dsb RET END(armv7_drain_writebuf) - -ENTRY(armv7_sev) - dsb - sev - nop - RET -END(armv7_sev) Modified: head/sys/arm/arm/mp_machdep.c ============================================================================== --- head/sys/arm/arm/mp_machdep.c Thu Oct 6 12:01:10 2016 (r306755) +++ head/sys/arm/arm/mp_machdep.c Thu Oct 6 13:18:18 2016 (r306756) @@ -467,9 +467,8 @@ release_aps(void *dummy __unused) #endif atomic_store_rel_int(&aps_ready, 1); /* Wake the other threads up */ -#if __ARM_ARCH >= 7 - armv7_sev(); -#endif + dsb(); + sev(); printf("Release APs\n"); Modified: head/sys/arm/broadcom/bcm2835/bcm2836_mp.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2836_mp.c Thu Oct 6 12:01:10 2016 (r306755) +++ head/sys/arm/broadcom/bcm2835/bcm2836_mp.c Thu Oct 6 13:18:18 2016 (r306756) @@ -135,7 +135,8 @@ bcm2836_mp_start_ap(platform_t plat) } while (1); /* dsb and sev */ - armv7_sev(); + dsb(); + sev(); /* recode AP in CPU map */ CPU_SET(i, &all_cpus); Modified: head/sys/arm/freescale/imx/imx6_mp.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_mp.c Thu Oct 6 12:01:10 2016 (r306755) +++ head/sys/arm/freescale/imx/imx6_mp.c Thu Oct 6 13:18:18 2016 (r306756) @@ -150,7 +150,8 @@ platform_mp_start_ap(void) } bus_space_write_4(fdtbus_bs_tag, src, SRC_CONTROL_REG, val); - armv7_sev(); + dsb(); + sev(); bus_space_unmap(fdtbus_bs_tag, scu, SCU_SIZE); bus_space_unmap(fdtbus_bs_tag, src, SRC_SIZE); Modified: head/sys/arm/include/cpu-v6.h ============================================================================== --- head/sys/arm/include/cpu-v6.h Thu Oct 6 12:01:10 2016 (r306755) +++ head/sys/arm/include/cpu-v6.h Thu Oct 6 13:18:18 2016 (r306756) @@ -56,6 +56,8 @@ extern uint32_t ccnt_hi[MAXCPU]; extern int pmu_attched; #endif /* DEV_PMU */ +#define sev() __asm __volatile("sev" : : : "memory") +#define wfe() __asm __volatile("wfe" : : : "memory") /* * Macros to generate CP15 (system control processor) read/write functions. Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Thu Oct 6 12:01:10 2016 (r306755) +++ head/sys/arm/include/cpufunc.h Thu Oct 6 13:18:18 2016 (r306756) @@ -284,7 +284,6 @@ void armv7_idcache_wbinv_all (void); void armv7_cpu_sleep (int); void armv7_setup (void); void armv7_drain_writebuf (void); -void armv7_sev (void); void armadaxp_idcache_wbinv_all (void); Modified: head/sys/arm/mv/armada38x/pmsu.c ============================================================================== --- head/sys/arm/mv/armada38x/pmsu.c Thu Oct 6 12:01:10 2016 (r306755) +++ head/sys/arm/mv/armada38x/pmsu.c Thu Oct 6 13:18:18 2016 (r306756) @@ -146,7 +146,8 @@ pmsu_boot_secondary_cpu(void) pmap_kextract((vm_offset_t)mpentry)); dcache_wbinv_poc_all(); - armv7_sev(); + dsb(); + sev(); bus_space_unmap(fdtbus_bs_tag, vaddr, MV_PMSU_REGS_LEN); Modified: head/sys/arm/nvidia/tegra124/tegra124_mp.c ============================================================================== --- head/sys/arm/nvidia/tegra124/tegra124_mp.c Thu Oct 6 12:01:10 2016 (r306755) +++ head/sys/arm/nvidia/tegra124/tegra124_mp.c Thu Oct 6 13:18:18 2016 (r306756) @@ -121,7 +121,8 @@ tegra124_mp_start_ap(platform_t plat) } } - armv7_sev(); + dsb(); + sev(); bus_space_unmap(fdtbus_bs_tag, pmc, PMC_SIZE); bus_space_unmap(fdtbus_bs_tag, exvec, TEGRA_EXCEPTION_VECTORS_SIZE); } Modified: head/sys/arm/rockchip/rk30xx_mp.c ============================================================================== --- head/sys/arm/rockchip/rk30xx_mp.c Thu Oct 6 12:01:10 2016 (r306755) +++ head/sys/arm/rockchip/rk30xx_mp.c Thu Oct 6 13:18:18 2016 (r306756) @@ -163,7 +163,8 @@ platform_mp_start_ap(void) val &= ~(1 << i); bus_space_write_4(fdtbus_bs_tag, pmu, PMU_PWRDN_CON, val); - armv7_sev(); + dsb(); + sev(); bus_space_unmap(fdtbus_bs_tag, scu, SCU_SIZE); bus_space_unmap(fdtbus_bs_tag, imem, IMEM_SIZE); Modified: head/sys/arm/samsung/exynos/exynos5_mp.c ============================================================================== --- head/sys/arm/samsung/exynos/exynos5_mp.c Thu Oct 6 12:01:10 2016 (r306755) +++ head/sys/arm/samsung/exynos/exynos5_mp.c Thu Oct 6 13:18:18 2016 (r306756) @@ -124,7 +124,8 @@ platform_mp_start_ap(void) dcache_wbinv_poc_all(); - armv7_sev(); + dsb(); + sev(); bus_space_unmap(fdtbus_bs_tag, sysram, 0x100); bus_space_unmap(fdtbus_bs_tag, pmu, 0x20000); } Modified: head/sys/arm/ti/omap4/omap4_mp.c ============================================================================== --- head/sys/arm/ti/omap4/omap4_mp.c Thu Oct 6 12:01:10 2016 (r306755) +++ head/sys/arm/ti/omap4/omap4_mp.c Thu Oct 6 13:18:18 2016 (r306756) @@ -64,6 +64,7 @@ platform_mp_start_ap(void) ti_smc0(0x200, 0xfffffdff, MODIFY_AUX_CORE_0); ti_smc0(pmap_kextract((vm_offset_t)mpentry), 0, WRITE_AUX_CORE_1); - armv7_sev(); + dsb(); + sev(); bus_space_unmap(fdtbus_bs_tag, scu_addr, 0x1000); } Modified: head/sys/arm/xilinx/zy7_mp.c ============================================================================== --- head/sys/arm/xilinx/zy7_mp.c Thu Oct 6 12:01:10 2016 (r306755) +++ head/sys/arm/xilinx/zy7_mp.c Thu Oct 6 13:18:18 2016 (r306756) @@ -94,5 +94,6 @@ platform_mp_start_ap(void) dcache_wbinv_poc_all(); /* Wake up CPU1. */ - armv7_sev(); + dsb(); + sev(); } From owner-svn-src-all@freebsd.org Thu Oct 6 13:21:43 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 706E6BD8F71; Thu, 6 Oct 2016 13:21:43 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4816B31A; Thu, 6 Oct 2016 13:21:43 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96DLgx3092753; Thu, 6 Oct 2016 13:21:42 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96DLgrx092752; Thu, 6 Oct 2016 13:21:42 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201610061321.u96DLgrx092752@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 6 Oct 2016 13:21:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306757 - head/usr.bin/login X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 13:21:43 -0000 Author: emaste Date: Thu Oct 6 13:21:42 2016 New Revision: 306757 URL: https://svnweb.freebsd.org/changeset/base/306757 Log: login: fix capitalization in errx messages Reported by: bde Modified: head/usr.bin/login/login_audit.c Modified: head/usr.bin/login/login_audit.c ============================================================================== --- head/usr.bin/login/login_audit.c Thu Oct 6 13:18:18 2016 (r306756) +++ head/usr.bin/login/login_audit.c Thu Oct 6 13:21:42 2016 (r306757) @@ -73,14 +73,14 @@ au_login_success(void) if (auditon(A_GETCOND, &au_cond, sizeof(au_cond)) < 0) { if (errno == ENOSYS) return; - errx(1, "Could not determine audit condition"); + errx(1, "could not determine audit condition"); } if (au_cond == AUC_NOAUDIT) return; /* Compute and set the user's preselection mask. */ if (au_user_mask(pwd->pw_name, &aumask) == -1) - errx(1, "Could not set audit mask"); + errx(1, "could not set audit mask"); /* Set the audit info for the user. */ auinfo.ai_auid = uid; @@ -91,19 +91,19 @@ au_login_success(void) err(1, "setaudit failed"); if ((aufd = au_open()) == -1) - errx(1, "Audit Error: au_open() failed"); + errx(1, "audit error: au_open() failed"); if ((tok = au_to_subject32(uid, geteuid(), getegid(), uid, gid, pid, pid, &tid)) == NULL) - errx(1, "Audit Error: au_to_subject32() failed"); + errx(1, "audit error: au_to_subject32() failed"); au_write(aufd, tok); if ((tok = au_to_return32(0, 0)) == NULL) - errx(1, "Audit Error: au_to_return32() failed"); + errx(1, "audit error: au_to_return32() failed"); au_write(aufd, tok); if (au_close(aufd, 1, AUE_login) == -1) - errx(1, "Audit Record was not committed."); + errx(1, "audit record was not committed."); } /* @@ -124,13 +124,13 @@ au_login_fail(const char *errmsg, int na if (auditon(A_GETCOND, &au_cond, sizeof(au_cond)) < 0) { if (errno == ENOSYS) return; - errx(1, "Could not determine audit condition"); + errx(1, "could not determine audit condition"); } if (au_cond == AUC_NOAUDIT) return; if ((aufd = au_open()) == -1) - errx(1, "Audit Error: au_open() failed"); + errx(1, "audit error: au_open() failed"); if (na) { /* @@ -139,28 +139,28 @@ au_login_fail(const char *errmsg, int na */ if ((tok = au_to_subject32(-1, geteuid(), getegid(), -1, -1, pid, -1, &tid)) == NULL) - errx(1, "Audit Error: au_to_subject32() failed"); + errx(1, "audit error: au_to_subject32() failed"); } else { /* We know the subject -- so use its value instead. */ uid = pwd->pw_uid; gid = pwd->pw_gid; if ((tok = au_to_subject32(uid, geteuid(), getegid(), uid, gid, pid, pid, &tid)) == NULL) - errx(1, "Audit Error: au_to_subject32() failed"); + errx(1, "audit error: au_to_subject32() failed"); } au_write(aufd, tok); /* Include the error message. */ if ((tok = au_to_text(errmsg)) == NULL) - errx(1, "Audit Error: au_to_text() failed"); + errx(1, "audit error: au_to_text() failed"); au_write(aufd, tok); if ((tok = au_to_return32(1, errno)) == NULL) - errx(1, "Audit Error: au_to_return32() failed"); + errx(1, "audit error: au_to_return32() failed"); au_write(aufd, tok); if (au_close(aufd, 1, AUE_login) == -1) - errx(1, "Audit Error: au_close() was not committed"); + errx(1, "audit error: au_close() was not committed"); } /* @@ -181,24 +181,24 @@ audit_logout(void) if (auditon(A_GETCOND, &au_cond, sizeof(int)) < 0) { if (errno == ENOSYS) return; - errx(1, "Could not determine audit condition"); + errx(1, "could not determine audit condition"); } if (au_cond == AUC_NOAUDIT) return; if ((aufd = au_open()) == -1) - errx(1, "Audit Error: au_open() failed"); + errx(1, "audit error: au_open() failed"); /* The subject that is created (euid, egid of the current process). */ if ((tok = au_to_subject32(uid, geteuid(), getegid(), uid, gid, pid, pid, &tid)) == NULL) - errx(1, "Audit Error: au_to_subject32() failed"); + errx(1, "audit error: au_to_subject32() failed"); au_write(aufd, tok); if ((tok = au_to_return32(0, 0)) == NULL) - errx(1, "Audit Error: au_to_return32() failed"); + errx(1, "audit error: au_to_return32() failed"); au_write(aufd, tok); if (au_close(aufd, 1, AUE_logout) == -1) - errx(1, "Audit Record was not committed."); + errx(1, "audit record was not committed."); } From owner-svn-src-all@freebsd.org Thu Oct 6 13:37:47 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACE6ABE9470; Thu, 6 Oct 2016 13:37:47 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7EEBAEB6; Thu, 6 Oct 2016 13:37:47 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96Dbkf6099612; Thu, 6 Oct 2016 13:37:46 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96Dbk4x099610; Thu, 6 Oct 2016 13:37:46 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201610061337.u96Dbk4x099610@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 6 Oct 2016 13:37:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306758 - head/usr.bin/locate/locate X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 13:37:47 -0000 Author: emaste Date: Thu Oct 6 13:37:46 2016 New Revision: 306758 URL: https://svnweb.freebsd.org/changeset/base/306758 Log: locate: ANSIfy Modified: head/usr.bin/locate/locate/locate.c head/usr.bin/locate/locate/util.c Modified: head/usr.bin/locate/locate/locate.c ============================================================================== --- head/usr.bin/locate/locate/locate.c Thu Oct 6 13:21:42 2016 (r306757) +++ head/usr.bin/locate/locate/locate.c Thu Oct 6 13:37:46 2016 (r306758) @@ -134,9 +134,7 @@ extern int check_bigram_char(int); extern char *patprep(char *); int -main(argc, argv) - int argc; - char **argv; +main(int argc, char **argv) { register int ch; char **dbv = NULL; @@ -225,10 +223,13 @@ main(argc, argv) } +/* + * Arguments: + * db database + * s search strings + */ void -search_fopen(db, s) - char *db; /* database */ - char **s; /* search strings */ +search_fopen(char *db, char **s) { FILE *fp; #ifdef DEBUG @@ -275,10 +276,13 @@ search_fopen(db, s) } #ifdef MMAP +/* + * Arguments: + * db database + * s search strings + */ void -search_mmap(db, s) - char *db; /* database */ - char **s; /* search strings */ +search_mmap(char *db, char **s) { struct stat sb; int fd; Modified: head/usr.bin/locate/locate/util.c ============================================================================== --- head/usr.bin/locate/locate/util.c Thu Oct 6 13:21:42 2016 (r306757) +++ head/usr.bin/locate/locate/util.c Thu Oct 6 13:37:46 2016 (r306758) @@ -83,10 +83,7 @@ check_bigram_char(ch) * */ char ** -colon(dbv, path, dot) - char **dbv; - char *path; - char *dot; /* default for single ':' */ +colon(char **dbv, char *path, char *dot) { int vlen, slen; char *c, *ch, *p; From owner-svn-src-all@freebsd.org Thu Oct 6 13:53:18 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81C4BBE9BF6; Thu, 6 Oct 2016 13:53:18 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 521F6D7E; Thu, 6 Oct 2016 13:53:18 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96DrHnw007178; Thu, 6 Oct 2016 13:53:17 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96DrHiQ007177; Thu, 6 Oct 2016 13:53:17 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201610061353.u96DrHiQ007177@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Thu, 6 Oct 2016 13:53:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306759 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 13:53:18 -0000 Author: mmel Date: Thu Oct 6 13:53:17 2016 New Revision: 306759 URL: https://svnweb.freebsd.org/changeset/base/306759 Log: ARM: Remove ARMv4 #defines from busdma_machdep-v6.c, it's ARMv6 specific file. Consistently use BUSDMA_DCACHE_ALIGN for cache line alignment. MFC after: 1 week Modified: head/sys/arm/arm/busdma_machdep-v6.c Modified: head/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- head/sys/arm/arm/busdma_machdep-v6.c Thu Oct 6 13:37:46 2016 (r306758) +++ head/sys/arm/arm/busdma_machdep-v6.c Thu Oct 6 13:53:17 2016 (r306759) @@ -60,13 +60,8 @@ __FBSDID("$FreeBSD$"); #include #include -#if __ARM_ARCH < 6 -#define BUSDMA_DCACHE_ALIGN arm_dcache_align -#define BUSDMA_DCACHE_MASK arm_dcache_align_mask -#else #define BUSDMA_DCACHE_ALIGN cpuinfo.dcache_line_size #define BUSDMA_DCACHE_MASK cpuinfo.dcache_line_mask -#endif #define MAX_BPAGES 64 #define MAX_DMA_SEGMENTS 4096 @@ -331,7 +326,7 @@ cacheline_bounce(bus_dmamap_t map, bus_a if (map->flags & (DMAMAP_DMAMEM_ALLOC | DMAMAP_COHERENT | DMAMAP_MBUF)) return (0); - return ((addr | size) & arm_dcache_align_mask); + return ((addr | size) & BUSDMA_DCACHE_MASK); } /* From owner-svn-src-all@freebsd.org Thu Oct 6 14:42:08 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3469EAF6EC1; Thu, 6 Oct 2016 14:42:08 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0503BB62; Thu, 6 Oct 2016 14:42:07 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96Eg7Yd025330; Thu, 6 Oct 2016 14:42:07 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96Eg7WD025328; Thu, 6 Oct 2016 14:42:07 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201610061442.u96Eg7WD025328@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 6 Oct 2016 14:42:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306760 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 14:42:08 -0000 Author: ae Date: Thu Oct 6 14:42:06 2016 New Revision: 306760 URL: https://svnweb.freebsd.org/changeset/base/306760 Log: Replace rw_init/rw_destroy with corresponding macros. Obtained from: Yandex LLC Modified: head/sys/net/route.c head/sys/net/route_var.h Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Thu Oct 6 13:53:17 2016 (r306759) +++ head/sys/net/route.c Thu Oct 6 14:42:06 2016 (r306760) @@ -352,7 +352,7 @@ rt_table_init(int offset) rh->head.rnh_masks = &rh->rmhead; /* Init locks */ - rw_init(&rh->rib_lock, "rib head lock"); + RIB_LOCK_INIT(rh); /* Finally, set base callbacks */ rh->rnh_addaddr = rn_addroute; @@ -384,7 +384,7 @@ rt_table_destroy(struct rib_head *rh) rn_walktree(&rh->rmhead.head, rt_freeentry, &rh->rmhead.head); /* Assume table is already empty */ - rw_destroy(&rh->rib_lock); + RIB_LOCK_DESTROY(rh); free(rh, M_RTABLE); } Modified: head/sys/net/route_var.h ============================================================================== --- head/sys/net/route_var.h Thu Oct 6 13:53:17 2016 (r306759) +++ head/sys/net/route_var.h Thu Oct 6 14:42:06 2016 (r306760) @@ -48,6 +48,8 @@ struct rib_head { struct radix_mask_head rmhead; /* masks radix head */ }; +#define RIB_LOCK_INIT(rh) rw_init(&(rh)->rib_lock, "rib head lock") +#define RIB_LOCK_DESTROY(rh) rw_destroy(&(rh)->rib_lock) #define RIB_RLOCK(rh) rw_rlock(&(rh)->rib_lock) #define RIB_RUNLOCK(rh) rw_runlock(&(rh)->rib_lock) #define RIB_WLOCK(rh) rw_wlock(&(rh)->rib_lock) From owner-svn-src-all@freebsd.org Thu Oct 6 14:55:17 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BFFBBE92F4; Thu, 6 Oct 2016 14:55:17 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0561940E; Thu, 6 Oct 2016 14:55:16 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96EtGP5029463; Thu, 6 Oct 2016 14:55:16 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96EtGZC029462; Thu, 6 Oct 2016 14:55:16 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201610061455.u96EtGZC029462@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Thu, 6 Oct 2016 14:55:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306761 - head/usr.bin/write X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 14:55:17 -0000 Author: cem Date: Thu Oct 6 14:55:15 2016 New Revision: 306761 URL: https://svnweb.freebsd.org/changeset/base/306761 Log: write(1): Capsicumify Enter Capsicum capability sandbox pretty early in this setuid program. Some minor modifications were needed to cache directory fds and use relative lookups. Rights restriction of the stdio descriptors is unfortunately pretty messy because we need an ioctl capability not present in the current libcapsicum helpers (FIODGNAME). Reviewed by: ed Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D7999 Modified: head/usr.bin/write/write.c Modified: head/usr.bin/write/write.c ============================================================================== --- head/usr.bin/write/write.c Thu Oct 6 14:42:06 2016 (r306760) +++ head/usr.bin/write/write.c Thu Oct 6 14:55:15 2016 (r306761) @@ -46,12 +46,16 @@ static char sccsid[] = "@(#)write.c 8.1 __FBSDID("$FreeBSD$"); #include +#include +#include #include #include -#include #include + +#include #include #include +#include #include #include #include @@ -64,23 +68,76 @@ __FBSDID("$FreeBSD$"); #include void done(int); -void do_write(char *, char *, uid_t); +void do_write(int, char *, char *, const char *); static void usage(void); -int term_chk(char *, int *, time_t *, int); +int term_chk(int, char *, int *, time_t *, int); void wr_fputs(wchar_t *s); -void search_utmp(char *, char *, char *, uid_t); +void search_utmp(int, char *, char *, char *, uid_t); int utmp_chk(char *, char *); int main(int argc, char **argv) { + unsigned long cmds[] = { TIOCGETA, TIOCGWINSZ, FIODGNAME }; + cap_rights_t rights; + struct passwd *pwd; time_t atime; uid_t myuid; int msgsok, myttyfd; char tty[MAXPATHLEN], *mytty; + const char *login; + int devfd; (void)setlocale(LC_CTYPE, ""); + devfd = open(_PATH_DEV, O_RDONLY); + if (devfd < 0) + err(1, "open(/dev)"); + cap_rights_init(&rights, CAP_FCNTL, CAP_FSTAT, CAP_IOCTL, CAP_LOOKUP, + CAP_PWRITE); + if (cap_rights_limit(devfd, &rights) < 0 && errno != ENOSYS) + err(1, "can't limit devfd rights"); + + /* + * Can't use capsicum helpers here because we need the additional + * FIODGNAME ioctl. + */ + cap_rights_init(&rights, CAP_FCNTL, CAP_FSTAT, CAP_IOCTL, CAP_READ, + CAP_WRITE); + if ((cap_rights_limit(STDIN_FILENO, &rights) < 0 && errno != ENOSYS) || + (cap_rights_limit(STDOUT_FILENO, &rights) < 0 && errno != ENOSYS) || + (cap_rights_limit(STDERR_FILENO, &rights) < 0 && errno != ENOSYS) || + (cap_ioctls_limit(STDIN_FILENO, cmds, nitems(cmds)) < 0 && errno != ENOSYS) || + (cap_ioctls_limit(STDOUT_FILENO, cmds, nitems(cmds)) < 0 && errno != ENOSYS) || + (cap_ioctls_limit(STDERR_FILENO, cmds, nitems(cmds)) < 0 && errno != ENOSYS) || + (cap_fcntls_limit(STDIN_FILENO, CAP_FCNTL_GETFL) < 0 && errno != ENOSYS) || + (cap_fcntls_limit(STDOUT_FILENO, CAP_FCNTL_GETFL) < 0 && errno != ENOSYS) || + (cap_fcntls_limit(STDERR_FILENO, CAP_FCNTL_GETFL) < 0 && errno != ENOSYS)) + err(1, "can't limit stdio rights"); + + caph_cache_catpages(); + caph_cache_tzdata(); + + /* + * Cache UTX database fds. + */ + setutxent(); + + /* + * Determine our login name before we reopen() stdout + * and before entering capability sandbox. + */ + myuid = getuid(); + if ((login = getlogin()) == NULL) { + if ((pwd = getpwuid(myuid))) + login = pwd->pw_name; + else + login = "???"; + } + + if (cap_enter() < 0 && errno != ENOSYS) + err(1, "cap_enter"); + while (getopt(argc, argv, "") != -1) usage(); argc -= optind; @@ -99,29 +156,27 @@ main(int argc, char **argv) errx(1, "can't find your tty's name"); if (!strncmp(mytty, _PATH_DEV, strlen(_PATH_DEV))) mytty += strlen(_PATH_DEV); - if (term_chk(mytty, &msgsok, &atime, 1)) + if (term_chk(devfd, mytty, &msgsok, &atime, 1)) exit(1); if (!msgsok) errx(1, "you have write permission turned off"); - myuid = getuid(); - /* check args */ switch (argc) { case 1: - search_utmp(argv[0], tty, mytty, myuid); - do_write(tty, mytty, myuid); + search_utmp(devfd, argv[0], tty, mytty, myuid); + do_write(devfd, tty, mytty, login); break; case 2: if (!strncmp(argv[1], _PATH_DEV, strlen(_PATH_DEV))) argv[1] += strlen(_PATH_DEV); if (utmp_chk(argv[0], argv[1])) errx(1, "%s is not logged in on %s", argv[0], argv[1]); - if (term_chk(argv[1], &msgsok, &atime, 1)) + if (term_chk(devfd, argv[1], &msgsok, &atime, 1)) exit(1); if (myuid && !msgsok) errx(1, "%s has messages disabled on %s", argv[0], argv[1]); - do_write(argv[1], mytty, myuid); + do_write(devfd, argv[1], mytty, login); break; default: usage(); @@ -170,7 +225,7 @@ utmp_chk(char *user, char *tty) * writing from, unless that's the only terminal with messages enabled. */ void -search_utmp(char *user, char *tty, char *mytty, uid_t myuid) +search_utmp(int devfd, char *user, char *tty, char *mytty, uid_t myuid) { struct utmpx *u; time_t bestatime, atime; @@ -185,7 +240,7 @@ search_utmp(char *user, char *tty, char if (u->ut_type == USER_PROCESS && strcmp(user, u->ut_user) == 0) { ++nloggedttys; - if (term_chk(u->ut_line, &msgsok, &atime, 0)) + if (term_chk(devfd, u->ut_line, &msgsok, &atime, 0)) continue; /* bad term? skip */ if (myuid && !msgsok) continue; /* skip ttys with msgs off */ @@ -219,15 +274,13 @@ search_utmp(char *user, char *tty, char * and the access time */ int -term_chk(char *tty, int *msgsokP, time_t *atimeP, int showerror) +term_chk(int devfd, char *tty, int *msgsokP, time_t *atimeP, int showerror) { struct stat s; - char path[MAXPATHLEN]; - (void)snprintf(path, sizeof(path), "%s%s", _PATH_DEV, tty); - if (stat(path, &s) < 0) { + if (fstatat(devfd, tty, &s, 0) < 0) { if (showerror) - warn("%s", path); + warn("%s%s", _PATH_DEV, tty); return(1); } *msgsokP = (s.st_mode & (S_IWRITE >> 3)) != 0; /* group write bit */ @@ -239,26 +292,21 @@ term_chk(char *tty, int *msgsokP, time_t * do_write - actually make the connection */ void -do_write(char *tty, char *mytty, uid_t myuid) +do_write(int devfd, char *tty, char *mytty, const char *login) { - const char *login; char *nows; - struct passwd *pwd; time_t now; - char path[MAXPATHLEN], host[MAXHOSTNAMELEN]; + char host[MAXHOSTNAMELEN]; wchar_t line[512]; + int fd; - /* Determine our login name before we reopen() stdout */ - if ((login = getlogin()) == NULL) { - if ((pwd = getpwuid(myuid))) - login = pwd->pw_name; - else - login = "???"; - } - - (void)snprintf(path, sizeof(path), "%s%s", _PATH_DEV, tty); - if ((freopen(path, "w", stdout)) == NULL) - err(1, "%s", path); + fd = openat(devfd, tty, O_WRONLY); + if (fd < 0) + err(1, "openat(%s%s)", _PATH_DEV, tty); + fclose(stdout); + stdout = fdopen(fd, "w"); + if (stdout == NULL) + err(1, "%s%s", _PATH_DEV, tty); (void)signal(SIGINT, done); (void)signal(SIGHUP, done); From owner-svn-src-all@freebsd.org Thu Oct 6 15:20:06 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EACE6BE99C7; Thu, 6 Oct 2016 15:20:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADC92398; Thu, 6 Oct 2016 15:20:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96FK5cT037123; Thu, 6 Oct 2016 15:20:05 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96FK5uH037120; Thu, 6 Oct 2016 15:20:05 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201610061520.u96FK5uH037120@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 6 Oct 2016 15:20:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306762 - head/sys/geom/mirror X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 15:20:07 -0000 Author: mav Date: Thu Oct 6 15:20:05 2016 New Revision: 306762 URL: https://svnweb.freebsd.org/changeset/base/306762 Log: Fix possible geom destruction before final provider close. Introduce internal counter to track opens. Using provider's counters is not very successfull after calling g_wither_provider(). MFC after: 2 weeks Sponsored by: iXsystems, Inc. Modified: head/sys/geom/mirror/g_mirror.c head/sys/geom/mirror/g_mirror.h head/sys/geom/mirror/g_mirror_ctl.c Modified: head/sys/geom/mirror/g_mirror.c ============================================================================== --- head/sys/geom/mirror/g_mirror.c Thu Oct 6 14:55:15 2016 (r306761) +++ head/sys/geom/mirror/g_mirror.c Thu Oct 6 15:20:05 2016 (r306762) @@ -2153,10 +2153,9 @@ g_mirror_destroy_provider(struct g_mirro } } mtx_unlock(&sc->sc_queue_mtx); - G_MIRROR_DEBUG(0, "Device %s: provider %s destroyed.", sc->sc_name, - sc->sc_provider->name); g_wither_provider(sc->sc_provider, ENXIO); sc->sc_provider = NULL; + G_MIRROR_DEBUG(0, "Device %s: provider destroyed.", sc->sc_name); g_topology_unlock(); LIST_FOREACH(disk, &sc->sc_disks, d_next) { if (disk->d_state == G_MIRROR_DISK_STATE_SYNCHRONIZING) @@ -2889,7 +2888,7 @@ static int g_mirror_access(struct g_provider *pp, int acr, int acw, int ace) { struct g_mirror_softc *sc; - int dcr, dcw, dce, error = 0; + int error = 0; g_topology_assert(); G_MIRROR_DEBUG(2, "Access request for %s: r%dw%de%d.", pp->name, acr, @@ -2900,30 +2899,21 @@ g_mirror_access(struct g_provider *pp, i return (0); KASSERT(sc != NULL, ("NULL softc (provider=%s).", pp->name)); - dcr = pp->acr + acr; - dcw = pp->acw + acw; - dce = pp->ace + ace; - g_topology_unlock(); sx_xlock(&sc->sc_lock); if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROY) != 0 || + (sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROYING) != 0 || LIST_EMPTY(&sc->sc_disks)) { if (acr > 0 || acw > 0 || ace > 0) error = ENXIO; goto end; } - if (dcw == 0) - g_mirror_idle(sc, dcw); - if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROYING) != 0) { - if (acr > 0 || acw > 0 || ace > 0) { - error = ENXIO; - goto end; - } - if (dcr == 0 && dcw == 0 && dce == 0) { - g_post_event(g_mirror_destroy_delayed, sc, M_WAITOK, - sc, NULL); - } - } + sc->sc_provider_open += acr + acw + ace; + if (pp->acw + acw == 0) + g_mirror_idle(sc, 0); + if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROYING) != 0 && + sc->sc_provider_open == 0) + g_post_event(g_mirror_destroy_delayed, sc, M_WAITOK, sc, NULL); end: sx_xunlock(&sc->sc_lock); g_topology_lock(); @@ -2980,6 +2970,7 @@ g_mirror_create(struct g_class *mp, cons gp->softc = sc; sc->sc_geom = gp; sc->sc_provider = NULL; + sc->sc_provider_open = 0; /* * Synchronization geom. */ @@ -3020,26 +3011,23 @@ int g_mirror_destroy(struct g_mirror_softc *sc, int how) { struct g_mirror_disk *disk; - struct g_provider *pp; g_topology_assert_not(); if (sc == NULL) return (ENXIO); sx_assert(&sc->sc_lock, SX_XLOCKED); - pp = sc->sc_provider; - if (pp != NULL && (pp->acr != 0 || pp->acw != 0 || pp->ace != 0 || - SCHEDULER_STOPPED())) { + if (sc->sc_provider_open != 0 || SCHEDULER_STOPPED()) { switch (how) { case G_MIRROR_DESTROY_SOFT: G_MIRROR_DEBUG(1, - "Device %s is still open (r%dw%de%d).", pp->name, - pp->acr, pp->acw, pp->ace); + "Device %s is still open (%d).", sc->sc_name, + sc->sc_provider_open); return (EBUSY); case G_MIRROR_DESTROY_DELAYED: G_MIRROR_DEBUG(1, "Device %s will be destroyed on last close.", - pp->name); + sc->sc_name); LIST_FOREACH(disk, &sc->sc_disks, d_next) { if (disk->d_state == G_MIRROR_DISK_STATE_SYNCHRONIZING) { @@ -3050,7 +3038,7 @@ g_mirror_destroy(struct g_mirror_softc * return (EBUSY); case G_MIRROR_DESTROY_HARD: G_MIRROR_DEBUG(1, "Device %s is still open, so it " - "can't be definitely removed.", pp->name); + "can't be definitely removed.", sc->sc_name); } } Modified: head/sys/geom/mirror/g_mirror.h ============================================================================== --- head/sys/geom/mirror/g_mirror.h Thu Oct 6 14:55:15 2016 (r306761) +++ head/sys/geom/mirror/g_mirror.h Thu Oct 6 15:20:05 2016 (r306762) @@ -179,6 +179,7 @@ struct g_mirror_softc { struct g_geom *sc_geom; struct g_provider *sc_provider; + int sc_provider_open; uint32_t sc_id; /* Mirror unique ID. */ Modified: head/sys/geom/mirror/g_mirror_ctl.c ============================================================================== --- head/sys/geom/mirror/g_mirror_ctl.c Thu Oct 6 14:55:15 2016 (r306761) +++ head/sys/geom/mirror/g_mirror_ctl.c Thu Oct 6 15:20:05 2016 (r306762) @@ -658,8 +658,7 @@ g_mirror_ctl_resize(struct gctl_req *req return; } /* Deny shrinking of an opened provider */ - if ((g_debugflags & 16) == 0 && (sc->sc_provider->acr > 0 || - sc->sc_provider->acw > 0 || sc->sc_provider->ace > 0)) { + if ((g_debugflags & 16) == 0 && sc->sc_provider_open > 0) { if (sc->sc_mediasize > mediasize) { gctl_error(req, "Device %s is busy.", sc->sc_provider->name); From owner-svn-src-all@freebsd.org Thu Oct 6 15:35:39 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CA9BBD3220; Thu, 6 Oct 2016 15:35:39 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C2F7283; Thu, 6 Oct 2016 15:35:39 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96FZcjZ044317; Thu, 6 Oct 2016 15:35:38 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96FZbf8044304; Thu, 6 Oct 2016 15:35:37 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201610061535.u96FZbf8044304@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 6 Oct 2016 15:35:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306764 - in stable/11/sys/geom: bde concat gate journal linux_lvm mirror mountver raid3 shsec stripe vinum virstor X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 15:35:39 -0000 Author: mav Date: Thu Oct 6 15:35:36 2016 New Revision: 306764 URL: https://svnweb.freebsd.org/changeset/base/306764 Log: MFC r306279: Use g_wither_provider() where applicable. It is just a helper function combining G_PF_WITHER setting with g_orphan_provider(). Modified: stable/11/sys/geom/bde/g_bde.c stable/11/sys/geom/concat/g_concat.c stable/11/sys/geom/gate/g_gate.c stable/11/sys/geom/journal/g_journal.c stable/11/sys/geom/linux_lvm/g_linux_lvm.c stable/11/sys/geom/mirror/g_mirror.c stable/11/sys/geom/mountver/g_mountver.c stable/11/sys/geom/raid3/g_raid3.c stable/11/sys/geom/shsec/g_shsec.c stable/11/sys/geom/stripe/g_stripe.c stable/11/sys/geom/vinum/geom_vinum_rm.c stable/11/sys/geom/virstor/g_virstor.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/geom/bde/g_bde.c ============================================================================== --- stable/11/sys/geom/bde/g_bde.c Thu Oct 6 15:30:26 2016 (r306763) +++ stable/11/sys/geom/bde/g_bde.c Thu Oct 6 15:35:36 2016 (r306764) @@ -85,7 +85,7 @@ g_bde_orphan(struct g_consumer *cp) sc = gp->softc; gp->flags |= G_GEOM_WITHER; LIST_FOREACH(pp, &gp->provider, provider) - g_orphan_provider(pp, ENXIO); + g_wither_provider(pp, ENXIO); bzero(sc, sizeof(struct g_bde_softc)); /* destroy evidence */ return; } Modified: stable/11/sys/geom/concat/g_concat.c ============================================================================== --- stable/11/sys/geom/concat/g_concat.c Thu Oct 6 15:30:26 2016 (r306763) +++ stable/11/sys/geom/concat/g_concat.c Thu Oct 6 15:35:36 2016 (r306764) @@ -129,10 +129,9 @@ g_concat_remove_disk(struct g_concat_dis } if (sc->sc_provider != NULL) { - sc->sc_provider->flags |= G_PF_WITHER; G_CONCAT_DEBUG(0, "Device %s deactivated.", sc->sc_provider->name); - g_orphan_provider(sc->sc_provider, ENXIO); + g_wither_provider(sc->sc_provider, ENXIO); sc->sc_provider = NULL; } Modified: stable/11/sys/geom/gate/g_gate.c ============================================================================== --- stable/11/sys/geom/gate/g_gate.c Thu Oct 6 15:30:26 2016 (r306763) +++ stable/11/sys/geom/gate/g_gate.c Thu Oct 6 15:35:36 2016 (r306764) @@ -109,8 +109,7 @@ g_gate_destroy(struct g_gate_softc *sc, wakeup(sc); mtx_unlock(&sc->sc_queue_mtx); gp = pp->geom; - pp->flags |= G_PF_WITHER; - g_orphan_provider(pp, ENXIO); + g_wither_provider(pp, ENXIO); callout_drain(&sc->sc_callout); bioq_init(&queue); mtx_lock(&sc->sc_queue_mtx); Modified: stable/11/sys/geom/journal/g_journal.c ============================================================================== --- stable/11/sys/geom/journal/g_journal.c Thu Oct 6 15:30:26 2016 (r306763) +++ stable/11/sys/geom/journal/g_journal.c Thu Oct 6 15:35:36 2016 (r306764) @@ -2462,8 +2462,7 @@ g_journal_destroy(struct g_journal_softc GJ_DEBUG(1, "Marking %s as clean.", sc->sc_name); g_journal_metadata_update(sc); g_topology_lock(); - pp->flags |= G_PF_WITHER; - g_orphan_provider(pp, ENXIO); + g_wither_provider(pp, ENXIO); } else { g_topology_lock(); } Modified: stable/11/sys/geom/linux_lvm/g_linux_lvm.c ============================================================================== --- stable/11/sys/geom/linux_lvm/g_linux_lvm.c Thu Oct 6 15:30:26 2016 (r306763) +++ stable/11/sys/geom/linux_lvm/g_linux_lvm.c Thu Oct 6 15:35:36 2016 (r306764) @@ -333,7 +333,7 @@ g_llvm_remove_disk(struct g_llvm_vg *vg, if (found) { G_LLVM_DEBUG(0, "Device %s removed.", lv->lv_gprov->name); - g_orphan_provider(lv->lv_gprov, ENXIO); + g_wither_provider(lv->lv_gprov, ENXIO); lv->lv_gprov = NULL; } } Modified: stable/11/sys/geom/mirror/g_mirror.c ============================================================================== --- stable/11/sys/geom/mirror/g_mirror.c Thu Oct 6 15:30:26 2016 (r306763) +++ stable/11/sys/geom/mirror/g_mirror.c Thu Oct 6 15:35:36 2016 (r306764) @@ -2139,10 +2139,9 @@ g_mirror_destroy_provider(struct g_mirro mtx_unlock(&sc->sc_queue_mtx); G_MIRROR_DEBUG(0, "Device %s: provider %s destroyed.", sc->sc_name, sc->sc_provider->name); - sc->sc_provider->flags |= G_PF_WITHER; - g_orphan_provider(sc->sc_provider, ENXIO); - g_topology_unlock(); + g_wither_provider(sc->sc_provider, ENXIO); sc->sc_provider = NULL; + g_topology_unlock(); LIST_FOREACH(disk, &sc->sc_disks, d_next) { if (disk->d_state == G_MIRROR_DISK_STATE_SYNCHRONIZING) g_mirror_sync_stop(disk, 1); Modified: stable/11/sys/geom/mountver/g_mountver.c ============================================================================== --- stable/11/sys/geom/mountver/g_mountver.c Thu Oct 6 15:30:26 2016 (r306763) +++ stable/11/sys/geom/mountver/g_mountver.c Thu Oct 6 15:35:36 2016 (r306764) @@ -327,7 +327,7 @@ g_mountver_destroy(struct g_geom *gp, bo G_MOUNTVER_DEBUG(0, "Device %s removed.", gp->name); } if (pp != NULL) - g_orphan_provider(pp, ENXIO); + g_wither_provider(pp, ENXIO); g_mountver_discard_queued(gp); g_free(sc->sc_provider_name); g_free(gp->softc); Modified: stable/11/sys/geom/raid3/g_raid3.c ============================================================================== --- stable/11/sys/geom/raid3/g_raid3.c Thu Oct 6 15:30:26 2016 (r306763) +++ stable/11/sys/geom/raid3/g_raid3.c Thu Oct 6 15:35:36 2016 (r306764) @@ -2368,8 +2368,7 @@ g_raid3_destroy_provider(struct g_raid3_ mtx_unlock(&sc->sc_queue_mtx); G_RAID3_DEBUG(0, "Device %s: provider %s destroyed.", sc->sc_name, sc->sc_provider->name); - sc->sc_provider->flags |= G_PF_WITHER; - g_orphan_provider(sc->sc_provider, ENXIO); + g_wither_provider(sc->sc_provider, ENXIO); g_topology_unlock(); sc->sc_provider = NULL; if (sc->sc_syncdisk != NULL) Modified: stable/11/sys/geom/shsec/g_shsec.c ============================================================================== --- stable/11/sys/geom/shsec/g_shsec.c Thu Oct 6 15:30:26 2016 (r306763) +++ stable/11/sys/geom/shsec/g_shsec.c Thu Oct 6 15:35:36 2016 (r306764) @@ -156,7 +156,7 @@ g_shsec_remove_disk(struct g_consumer *c sc->sc_disks[no] = NULL; if (sc->sc_provider != NULL) { - g_orphan_provider(sc->sc_provider, ENXIO); + g_wither_provider(sc->sc_provider, ENXIO); sc->sc_provider = NULL; G_SHSEC_DEBUG(0, "Device %s removed.", sc->sc_name); } Modified: stable/11/sys/geom/stripe/g_stripe.c ============================================================================== --- stable/11/sys/geom/stripe/g_stripe.c Thu Oct 6 15:30:26 2016 (r306763) +++ stable/11/sys/geom/stripe/g_stripe.c Thu Oct 6 15:35:36 2016 (r306764) @@ -171,10 +171,9 @@ g_stripe_remove_disk(struct g_consumer * } if (sc->sc_provider != NULL) { - sc->sc_provider->flags |= G_PF_WITHER; G_STRIPE_DEBUG(0, "Device %s deactivated.", sc->sc_provider->name); - g_orphan_provider(sc->sc_provider, ENXIO); + g_wither_provider(sc->sc_provider, ENXIO); sc->sc_provider = NULL; } Modified: stable/11/sys/geom/vinum/geom_vinum_rm.c ============================================================================== --- stable/11/sys/geom/vinum/geom_vinum_rm.c Thu Oct 6 15:30:26 2016 (r306763) +++ stable/11/sys/geom/vinum/geom_vinum_rm.c Thu Oct 6 15:35:36 2016 (r306764) @@ -223,8 +223,7 @@ gv_rm_vol(struct gv_softc *sc, struct gv /* Get rid of the volume's provider. */ if (pp != NULL) { g_topology_lock(); - pp->flags |= G_PF_WITHER; - g_orphan_provider(pp, ENXIO); + g_wither_provider(pp, ENXIO); g_topology_unlock(); } } Modified: stable/11/sys/geom/virstor/g_virstor.c ============================================================================== --- stable/11/sys/geom/virstor/g_virstor.c Thu Oct 6 15:30:26 2016 (r306763) +++ stable/11/sys/geom/virstor/g_virstor.c Thu Oct 6 15:35:36 2016 (r306764) @@ -900,11 +900,9 @@ remove_component(struct g_virstor_softc LOG_MSG(LVL_DEBUG, "Component %s removed from %s", c->provider->name, sc->geom->name); if (sc->provider != NULL) { - /* Whither, GEOM? */ - sc->provider->flags |= G_PF_WITHER; - g_orphan_provider(sc->provider, ENXIO); + LOG_MSG(LVL_INFO, "Removing provider %s", sc->provider->name); + g_wither_provider(sc->provider, ENXIO); sc->provider = NULL; - LOG_MSG(LVL_INFO, "Removing provider %s", sc->geom->name); } if (c->acr > 0 || c->acw > 0 || c->ace > 0) From owner-svn-src-all@freebsd.org Thu Oct 6 15:36:16 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6EDAEBD3279; Thu, 6 Oct 2016 15:36:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E6E662B; Thu, 6 Oct 2016 15:36:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96FaFLr044408; Thu, 6 Oct 2016 15:36:15 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96FaEHr044395; Thu, 6 Oct 2016 15:36:14 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201610061536.u96FaEHr044395@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 6 Oct 2016 15:36:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306765 - in stable/10/sys/geom: bde concat gate journal linux_lvm mirror mountver raid3 shsec stripe vinum virstor X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 15:36:16 -0000 Author: mav Date: Thu Oct 6 15:36:13 2016 New Revision: 306765 URL: https://svnweb.freebsd.org/changeset/base/306765 Log: MFC r306279: Use g_wither_provider() where applicable. It is just a helper function combining G_PF_WITHER setting with g_orphan_provider(). Modified: stable/10/sys/geom/bde/g_bde.c stable/10/sys/geom/concat/g_concat.c stable/10/sys/geom/gate/g_gate.c stable/10/sys/geom/journal/g_journal.c stable/10/sys/geom/linux_lvm/g_linux_lvm.c stable/10/sys/geom/mirror/g_mirror.c stable/10/sys/geom/mountver/g_mountver.c stable/10/sys/geom/raid3/g_raid3.c stable/10/sys/geom/shsec/g_shsec.c stable/10/sys/geom/stripe/g_stripe.c stable/10/sys/geom/vinum/geom_vinum_rm.c stable/10/sys/geom/virstor/g_virstor.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/bde/g_bde.c ============================================================================== --- stable/10/sys/geom/bde/g_bde.c Thu Oct 6 15:35:36 2016 (r306764) +++ stable/10/sys/geom/bde/g_bde.c Thu Oct 6 15:36:13 2016 (r306765) @@ -85,7 +85,7 @@ g_bde_orphan(struct g_consumer *cp) sc = gp->softc; gp->flags |= G_GEOM_WITHER; LIST_FOREACH(pp, &gp->provider, provider) - g_orphan_provider(pp, ENXIO); + g_wither_provider(pp, ENXIO); bzero(sc, sizeof(struct g_bde_softc)); /* destroy evidence */ return; } Modified: stable/10/sys/geom/concat/g_concat.c ============================================================================== --- stable/10/sys/geom/concat/g_concat.c Thu Oct 6 15:35:36 2016 (r306764) +++ stable/10/sys/geom/concat/g_concat.c Thu Oct 6 15:36:13 2016 (r306765) @@ -130,10 +130,9 @@ g_concat_remove_disk(struct g_concat_dis } if (sc->sc_provider != NULL) { - sc->sc_provider->flags |= G_PF_WITHER; G_CONCAT_DEBUG(0, "Device %s deactivated.", sc->sc_provider->name); - g_orphan_provider(sc->sc_provider, ENXIO); + g_wither_provider(sc->sc_provider, ENXIO); sc->sc_provider = NULL; } Modified: stable/10/sys/geom/gate/g_gate.c ============================================================================== --- stable/10/sys/geom/gate/g_gate.c Thu Oct 6 15:35:36 2016 (r306764) +++ stable/10/sys/geom/gate/g_gate.c Thu Oct 6 15:36:13 2016 (r306765) @@ -111,8 +111,7 @@ g_gate_destroy(struct g_gate_softc *sc, wakeup(sc); mtx_unlock(&sc->sc_queue_mtx); gp = pp->geom; - pp->flags |= G_PF_WITHER; - g_orphan_provider(pp, ENXIO); + g_wither_provider(pp, ENXIO); callout_drain(&sc->sc_callout); bioq_init(&queue); mtx_lock(&sc->sc_queue_mtx); Modified: stable/10/sys/geom/journal/g_journal.c ============================================================================== --- stable/10/sys/geom/journal/g_journal.c Thu Oct 6 15:35:36 2016 (r306764) +++ stable/10/sys/geom/journal/g_journal.c Thu Oct 6 15:36:13 2016 (r306765) @@ -2465,8 +2465,7 @@ g_journal_destroy(struct g_journal_softc GJ_DEBUG(1, "Marking %s as clean.", sc->sc_name); g_journal_metadata_update(sc); g_topology_lock(); - pp->flags |= G_PF_WITHER; - g_orphan_provider(pp, ENXIO); + g_wither_provider(pp, ENXIO); } else { g_topology_lock(); } Modified: stable/10/sys/geom/linux_lvm/g_linux_lvm.c ============================================================================== --- stable/10/sys/geom/linux_lvm/g_linux_lvm.c Thu Oct 6 15:35:36 2016 (r306764) +++ stable/10/sys/geom/linux_lvm/g_linux_lvm.c Thu Oct 6 15:36:13 2016 (r306765) @@ -334,7 +334,7 @@ g_llvm_remove_disk(struct g_llvm_vg *vg, if (found) { G_LLVM_DEBUG(0, "Device %s removed.", lv->lv_gprov->name); - g_orphan_provider(lv->lv_gprov, ENXIO); + g_wither_provider(lv->lv_gprov, ENXIO); lv->lv_gprov = NULL; } } Modified: stable/10/sys/geom/mirror/g_mirror.c ============================================================================== --- stable/10/sys/geom/mirror/g_mirror.c Thu Oct 6 15:35:36 2016 (r306764) +++ stable/10/sys/geom/mirror/g_mirror.c Thu Oct 6 15:36:13 2016 (r306765) @@ -2145,10 +2145,9 @@ g_mirror_destroy_provider(struct g_mirro mtx_unlock(&sc->sc_queue_mtx); G_MIRROR_DEBUG(0, "Device %s: provider %s destroyed.", sc->sc_name, sc->sc_provider->name); - sc->sc_provider->flags |= G_PF_WITHER; - g_orphan_provider(sc->sc_provider, ENXIO); - g_topology_unlock(); + g_wither_provider(sc->sc_provider, ENXIO); sc->sc_provider = NULL; + g_topology_unlock(); LIST_FOREACH(disk, &sc->sc_disks, d_next) { if (disk->d_state == G_MIRROR_DISK_STATE_SYNCHRONIZING) g_mirror_sync_stop(disk, 1); Modified: stable/10/sys/geom/mountver/g_mountver.c ============================================================================== --- stable/10/sys/geom/mountver/g_mountver.c Thu Oct 6 15:35:36 2016 (r306764) +++ stable/10/sys/geom/mountver/g_mountver.c Thu Oct 6 15:36:13 2016 (r306765) @@ -327,7 +327,7 @@ g_mountver_destroy(struct g_geom *gp, bo G_MOUNTVER_DEBUG(0, "Device %s removed.", gp->name); } if (pp != NULL) - g_orphan_provider(pp, ENXIO); + g_wither_provider(pp, ENXIO); g_mountver_discard_queued(gp); g_free(sc->sc_provider_name); g_free(gp->softc); Modified: stable/10/sys/geom/raid3/g_raid3.c ============================================================================== --- stable/10/sys/geom/raid3/g_raid3.c Thu Oct 6 15:35:36 2016 (r306764) +++ stable/10/sys/geom/raid3/g_raid3.c Thu Oct 6 15:36:13 2016 (r306765) @@ -2378,8 +2378,7 @@ g_raid3_destroy_provider(struct g_raid3_ mtx_unlock(&sc->sc_queue_mtx); G_RAID3_DEBUG(0, "Device %s: provider %s destroyed.", sc->sc_name, sc->sc_provider->name); - sc->sc_provider->flags |= G_PF_WITHER; - g_orphan_provider(sc->sc_provider, ENXIO); + g_wither_provider(sc->sc_provider, ENXIO); g_topology_unlock(); sc->sc_provider = NULL; if (sc->sc_syncdisk != NULL) Modified: stable/10/sys/geom/shsec/g_shsec.c ============================================================================== --- stable/10/sys/geom/shsec/g_shsec.c Thu Oct 6 15:35:36 2016 (r306764) +++ stable/10/sys/geom/shsec/g_shsec.c Thu Oct 6 15:36:13 2016 (r306765) @@ -158,7 +158,7 @@ g_shsec_remove_disk(struct g_consumer *c sc->sc_disks[no] = NULL; if (sc->sc_provider != NULL) { - g_orphan_provider(sc->sc_provider, ENXIO); + g_wither_provider(sc->sc_provider, ENXIO); sc->sc_provider = NULL; G_SHSEC_DEBUG(0, "Device %s removed.", sc->sc_name); } Modified: stable/10/sys/geom/stripe/g_stripe.c ============================================================================== --- stable/10/sys/geom/stripe/g_stripe.c Thu Oct 6 15:35:36 2016 (r306764) +++ stable/10/sys/geom/stripe/g_stripe.c Thu Oct 6 15:36:13 2016 (r306765) @@ -174,10 +174,9 @@ g_stripe_remove_disk(struct g_consumer * } if (sc->sc_provider != NULL) { - sc->sc_provider->flags |= G_PF_WITHER; G_STRIPE_DEBUG(0, "Device %s deactivated.", sc->sc_provider->name); - g_orphan_provider(sc->sc_provider, ENXIO); + g_wither_provider(sc->sc_provider, ENXIO); sc->sc_provider = NULL; } Modified: stable/10/sys/geom/vinum/geom_vinum_rm.c ============================================================================== --- stable/10/sys/geom/vinum/geom_vinum_rm.c Thu Oct 6 15:35:36 2016 (r306764) +++ stable/10/sys/geom/vinum/geom_vinum_rm.c Thu Oct 6 15:36:13 2016 (r306765) @@ -223,8 +223,7 @@ gv_rm_vol(struct gv_softc *sc, struct gv /* Get rid of the volume's provider. */ if (pp != NULL) { g_topology_lock(); - pp->flags |= G_PF_WITHER; - g_orphan_provider(pp, ENXIO); + g_wither_provider(pp, ENXIO); g_topology_unlock(); } } Modified: stable/10/sys/geom/virstor/g_virstor.c ============================================================================== --- stable/10/sys/geom/virstor/g_virstor.c Thu Oct 6 15:35:36 2016 (r306764) +++ stable/10/sys/geom/virstor/g_virstor.c Thu Oct 6 15:36:13 2016 (r306765) @@ -904,11 +904,9 @@ remove_component(struct g_virstor_softc LOG_MSG(LVL_DEBUG, "Component %s removed from %s", c->provider->name, sc->geom->name); if (sc->provider != NULL) { - /* Whither, GEOM? */ - sc->provider->flags |= G_PF_WITHER; - g_orphan_provider(sc->provider, ENXIO); + LOG_MSG(LVL_INFO, "Removing provider %s", sc->provider->name); + g_wither_provider(sc->provider, ENXIO); sc->provider = NULL; - LOG_MSG(LVL_INFO, "Removing provider %s", sc->geom->name); } if (c->acr > 0 || c->acw > 0 || c->ace > 0) From owner-svn-src-all@freebsd.org Thu Oct 6 15:57:16 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CAEC6BD3E21; Thu, 6 Oct 2016 15:57:16 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 91CBDA68; Thu, 6 Oct 2016 15:57:16 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96FvF05052684; Thu, 6 Oct 2016 15:57:15 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96FvFrg052683; Thu, 6 Oct 2016 15:57:15 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201610061557.u96FvFrg052683@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Thu, 6 Oct 2016 15:57:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306766 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 15:57:16 -0000 Author: jtl Date: Thu Oct 6 15:57:15 2016 New Revision: 306766 URL: https://svnweb.freebsd.org/changeset/base/306766 Log: Remove declaration of un-defined function tcp_seq_subtract(). Reviewed by: gnn MFC after: 1 week Sponsored by: Juniper Networks, Netflix Differential Revision: https://reviews.freebsd.org/D7055 Modified: head/sys/netinet/tcp_var.h Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Thu Oct 6 15:36:13 2016 (r306765) +++ head/sys/netinet/tcp_var.h Thu Oct 6 15:57:15 2016 (r306766) @@ -867,7 +867,6 @@ struct sackhole *tcp_sack_output(struct void tcp_sack_partialack(struct tcpcb *, struct tcphdr *); void tcp_free_sackholes(struct tcpcb *tp); int tcp_newreno(struct tcpcb *, struct tcphdr *); -u_long tcp_seq_subtract(u_long, u_long ); int tcp_compute_pipe(struct tcpcb *); static inline void From owner-svn-src-all@freebsd.org Thu Oct 6 16:00:49 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2FB2BE916E; Thu, 6 Oct 2016 16:00:49 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 728F4E1C; Thu, 6 Oct 2016 16:00:49 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96G0mJS052872; Thu, 6 Oct 2016 16:00:48 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96G0mS1052871; Thu, 6 Oct 2016 16:00:48 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201610061600.u96G0mS1052871@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Thu, 6 Oct 2016 16:00:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306767 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 16:00:49 -0000 Author: jtl Date: Thu Oct 6 16:00:48 2016 New Revision: 306767 URL: https://svnweb.freebsd.org/changeset/base/306767 Log: Correctly calculate snd_max in persist case. In the persist case, take the SYN and FIN flags into account when updating the sequence space sent. Reviewed by: gnn MFC after: 2 weeks Sponsored by: Juniper Networks, Netflix Differential Revision: https://reviews.freebsd.org/D7075 Tested by: Limelight, Netflix Modified: head/sys/netinet/tcp_output.c Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Thu Oct 6 15:57:15 2016 (r306766) +++ head/sys/netinet/tcp_output.c Thu Oct 6 16:00:48 2016 (r306767) @@ -1519,7 +1519,7 @@ timer: tp->t_flags |= TF_SENTFIN; } if (SEQ_GT(tp->snd_nxt + xlen, tp->snd_max)) - tp->snd_max = tp->snd_nxt + len; + tp->snd_max = tp->snd_nxt + xlen; } if (error) { From owner-svn-src-all@freebsd.org Thu Oct 6 16:09:47 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E7F7BE9AFB; Thu, 6 Oct 2016 16:09:47 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF3B1915; Thu, 6 Oct 2016 16:09:46 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96G9kjc056799; Thu, 6 Oct 2016 16:09:46 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96G9kes056798; Thu, 6 Oct 2016 16:09:46 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201610061609.u96G9kes056798@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Thu, 6 Oct 2016 16:09:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306768 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 16:09:47 -0000 Author: jtl Date: Thu Oct 6 16:09:45 2016 New Revision: 306768 URL: https://svnweb.freebsd.org/changeset/base/306768 Log: If the new window size is less than the old window size, skip the calculations to check if we should advertise a larger window. Reviewed by: gnn MFC after: 2 weeks Sponsored by: Juniper Networks, Netflix Differential Revision: https://reviews.freebsd.org/D7076 Tested by: Limelight, Netflix Modified: head/sys/netinet/tcp_output.c Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Thu Oct 6 16:00:48 2016 (r306767) +++ head/sys/netinet/tcp_output.c Thu Oct 6 16:09:45 2016 (r306768) @@ -654,10 +654,11 @@ after_sack_rexmit: oldwin = 0; /* - * If the new window size ends up being the same as the old - * size when it is scaled, then don't force a window update. + * If the new window size ends up being the same as or less + * than the old size when it is scaled, then don't force + * a window update. */ - if (oldwin >> tp->rcv_scale == (adv + oldwin) >> tp->rcv_scale) + if (oldwin >> tp->rcv_scale >= (adv + oldwin) >> tp->rcv_scale) goto dontupdate; if (adv >= (long)(2 * tp->t_maxseg) && From owner-svn-src-all@freebsd.org Thu Oct 6 16:28:37 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11139AF60B6; Thu, 6 Oct 2016 16:28:37 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE328676; Thu, 6 Oct 2016 16:28:36 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96GSaIG064218; Thu, 6 Oct 2016 16:28:36 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96GSYFG064203; Thu, 6 Oct 2016 16:28:34 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201610061628.u96GSYFG064203@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Thu, 6 Oct 2016 16:28:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306769 - in head: sys/netinet sys/netinet/cc sys/netinet/khelp sys/netinet/tcp_stacks usr.sbin/trpt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 16:28:37 -0000 Author: jtl Date: Thu Oct 6 16:28:34 2016 New Revision: 306769 URL: https://svnweb.freebsd.org/changeset/base/306769 Log: Remove "long" variables from the TCP stack (not including the modular congestion control framework). Reviewed by: gnn, lstewart (partial) Sponsored by: Juniper Networks, Netflix Differential Revision: (multiple) Tested by: Limelight, Netflix Modified: head/sys/netinet/cc/cc_cdg.c head/sys/netinet/cc/cc_cubic.c head/sys/netinet/cc/cc_htcp.c head/sys/netinet/khelp/h_ertt.c head/sys/netinet/tcp_debug.c head/sys/netinet/tcp_hostcache.c head/sys/netinet/tcp_hostcache.h head/sys/netinet/tcp_input.c head/sys/netinet/tcp_output.c head/sys/netinet/tcp_seq.h head/sys/netinet/tcp_stacks/fastpath.c head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_usrreq.c head/sys/netinet/tcp_var.h head/usr.sbin/trpt/trpt.c Modified: head/sys/netinet/cc/cc_cdg.c ============================================================================== --- head/sys/netinet/cc/cc_cdg.c Thu Oct 6 16:09:45 2016 (r306768) +++ head/sys/netinet/cc/cc_cdg.c Thu Oct 6 16:28:34 2016 (r306769) @@ -374,7 +374,7 @@ cdg_exp_backoff_scale_handler(SYSCTL_HAN return (sysctl_handle_int(oidp, arg1, arg2, req)); } -static inline unsigned long +static inline uint32_t cdg_window_decrease(struct cc_var *ccv, unsigned long owin, unsigned int beta) { @@ -460,7 +460,7 @@ cdg_cong_signal(struct cc_var *ccv, uint cdg_data->shadow_w = cdg_window_decrease(ccv, cdg_data->shadow_w, RENO_BETA); - CCV(ccv, snd_ssthresh) = ulmax(cdg_data->shadow_w, + CCV(ccv, snd_ssthresh) = max(cdg_data->shadow_w, cdg_window_decrease(ccv, CCV(ccv, snd_cwnd), V_cdg_beta_loss)); Modified: head/sys/netinet/cc/cc_cubic.c ============================================================================== --- head/sys/netinet/cc/cc_cubic.c Thu Oct 6 16:09:45 2016 (r306768) +++ head/sys/netinet/cc/cc_cubic.c Thu Oct 6 16:28:34 2016 (r306769) @@ -403,8 +403,8 @@ cubic_ssthresh_update(struct cc_var *ccv if (cubic_data->num_cong_events == 0) CCV(ccv, snd_ssthresh) = CCV(ccv, snd_cwnd) >> 1; else - CCV(ccv, snd_ssthresh) = (CCV(ccv, snd_cwnd) * CUBIC_BETA) - >> CUBIC_SHIFT; + CCV(ccv, snd_ssthresh) = ((u_long)CCV(ccv, snd_cwnd) * + CUBIC_BETA) >> CUBIC_SHIFT; } Modified: head/sys/netinet/cc/cc_htcp.c ============================================================================== --- head/sys/netinet/cc/cc_htcp.c Thu Oct 6 16:09:45 2016 (r306768) +++ head/sys/netinet/cc/cc_htcp.c Thu Oct 6 16:28:34 2016 (r306769) @@ -504,12 +504,12 @@ htcp_ssthresh_update(struct cc_var *ccv) * subsequent congestion events, set it to cwnd * beta. */ if (CCV(ccv, snd_ssthresh) == TCP_MAXWIN << TCP_MAX_WINSHIFT) - CCV(ccv, snd_ssthresh) = (CCV(ccv, snd_cwnd) * HTCP_MINBETA) - >> HTCP_SHIFT; + CCV(ccv, snd_ssthresh) = ((u_long)CCV(ccv, snd_cwnd) * + HTCP_MINBETA) >> HTCP_SHIFT; else { htcp_recalc_beta(ccv); - CCV(ccv, snd_ssthresh) = (CCV(ccv, snd_cwnd) * htcp_data->beta) - >> HTCP_SHIFT; + CCV(ccv, snd_ssthresh) = ((u_long)CCV(ccv, snd_cwnd) * + htcp_data->beta) >> HTCP_SHIFT; } } Modified: head/sys/netinet/khelp/h_ertt.c ============================================================================== --- head/sys/netinet/khelp/h_ertt.c Thu Oct 6 16:09:45 2016 (r306768) +++ head/sys/netinet/khelp/h_ertt.c Thu Oct 6 16:28:34 2016 (r306769) @@ -83,7 +83,7 @@ static void ertt_uma_dtor(void *mem, int */ struct txseginfo { /* Segment length. */ - long len; + uint32_t len; /* Segment sequence number. */ tcp_seq seq; /* Time stamp indicating when the packet was sent. */ @@ -366,8 +366,8 @@ ertt_packet_measurement_hook(int hhook_t &rtt_bytes_adjust, CORRECT_ACK); if (txsi->flags & TXSI_TSO) { - txsi->len -= acked; - if (txsi->len > 0) { + if (txsi->len > acked) { + txsi->len -= acked; /* * This presumes ack for first bytes in * txsi, this may not be true but it @@ -400,6 +400,7 @@ ertt_packet_measurement_hook(int hhook_t */ break; } + txsi->len = 0; } TAILQ_REMOVE(&e_t->txsegi_q, txsi, txsegi_lnk); @@ -435,7 +436,7 @@ ertt_add_tx_segment_info_hook(int hhook_ struct tcpopt *to; struct tcp_hhook_data *thdp; struct txseginfo *txsi; - long len; + uint32_t len; int tso; KASSERT(ctx_data != NULL, ("%s: ctx_data is NULL!", __func__)); Modified: head/sys/netinet/tcp_debug.c ============================================================================== --- head/sys/netinet/tcp_debug.c Thu Oct 6 16:09:45 2016 (r306768) +++ head/sys/netinet/tcp_debug.c Thu Oct 6 16:28:34 2016 (r306769) @@ -215,9 +215,9 @@ tcp_trace(short act, short ostate, struc return; printf( "\trcv_(nxt,wnd,up) (%lx,%lx,%lx) snd_(una,nxt,max) (%lx,%lx,%lx)\n", - (u_long)tp->rcv_nxt, tp->rcv_wnd, (u_long)tp->rcv_up, + (u_long)tp->rcv_nxt, (u_long)tp->rcv_wnd, (u_long)tp->rcv_up, (u_long)tp->snd_una, (u_long)tp->snd_nxt, (u_long)tp->snd_max); printf("\tsnd_(wl1,wl2,wnd) (%lx,%lx,%lx)\n", - (u_long)tp->snd_wl1, (u_long)tp->snd_wl2, tp->snd_wnd); + (u_long)tp->snd_wl1, (u_long)tp->snd_wl2, (u_long)tp->snd_wnd); #endif /* TCPDEBUG */ } Modified: head/sys/netinet/tcp_hostcache.c ============================================================================== --- head/sys/netinet/tcp_hostcache.c Thu Oct 6 16:09:45 2016 (r306768) +++ head/sys/netinet/tcp_hostcache.c Thu Oct 6 16:28:34 2016 (r306769) @@ -470,11 +470,11 @@ tcp_hc_get(struct in_conninfo *inc, stru * discovered path MTU. Returns 0 if no entry is found or value is not * set. */ -u_long +uint32_t tcp_hc_getmtu(struct in_conninfo *inc) { struct hc_metrics *hc_entry; - u_long mtu; + uint32_t mtu; if (!V_tcp_use_hostcache) return 0; @@ -496,7 +496,7 @@ tcp_hc_getmtu(struct in_conninfo *inc) * Creates a new entry if none was found. */ void -tcp_hc_updatemtu(struct in_conninfo *inc, u_long mtu) +tcp_hc_updatemtu(struct in_conninfo *inc, uint32_t mtu) { struct hc_metrics *hc_entry; @@ -558,16 +558,16 @@ tcp_hc_update(struct in_conninfo *inc, s if (hc_entry->rmx_rtt == 0) hc_entry->rmx_rtt = hcml->rmx_rtt; else - hc_entry->rmx_rtt = - (hc_entry->rmx_rtt + hcml->rmx_rtt) / 2; + hc_entry->rmx_rtt = ((uint64_t)hc_entry->rmx_rtt + + (uint64_t)hcml->rmx_rtt) / 2; TCPSTAT_INC(tcps_cachedrtt); } if (hcml->rmx_rttvar != 0) { if (hc_entry->rmx_rttvar == 0) hc_entry->rmx_rttvar = hcml->rmx_rttvar; else - hc_entry->rmx_rttvar = - (hc_entry->rmx_rttvar + hcml->rmx_rttvar) / 2; + hc_entry->rmx_rttvar = ((uint64_t)hc_entry->rmx_rttvar + + (uint64_t)hcml->rmx_rttvar) / 2; TCPSTAT_INC(tcps_cachedrttvar); } if (hcml->rmx_ssthresh != 0) { @@ -582,8 +582,8 @@ tcp_hc_update(struct in_conninfo *inc, s if (hc_entry->rmx_cwnd == 0) hc_entry->rmx_cwnd = hcml->rmx_cwnd; else - hc_entry->rmx_cwnd = - (hc_entry->rmx_cwnd + hcml->rmx_cwnd) / 2; + hc_entry->rmx_cwnd = ((uint64_t)hc_entry->rmx_cwnd + + (uint64_t)hcml->rmx_cwnd) / 2; /* TCPSTAT_INC(tcps_cachedcwnd); */ } if (hcml->rmx_sendpipe != 0) { @@ -591,7 +591,8 @@ tcp_hc_update(struct in_conninfo *inc, s hc_entry->rmx_sendpipe = hcml->rmx_sendpipe; else hc_entry->rmx_sendpipe = - (hc_entry->rmx_sendpipe + hcml->rmx_sendpipe) /2; + ((uint64_t)hc_entry->rmx_sendpipe + + (uint64_t)hcml->rmx_sendpipe) /2; /* TCPSTAT_INC(tcps_cachedsendpipe); */ } if (hcml->rmx_recvpipe != 0) { @@ -599,7 +600,8 @@ tcp_hc_update(struct in_conninfo *inc, s hc_entry->rmx_recvpipe = hcml->rmx_recvpipe; else hc_entry->rmx_recvpipe = - (hc_entry->rmx_recvpipe + hcml->rmx_recvpipe) /2; + ((uint64_t)hc_entry->rmx_recvpipe + + (uint64_t)hcml->rmx_recvpipe) /2; /* TCPSTAT_INC(tcps_cachedrecvpipe); */ } @@ -636,7 +638,7 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) TAILQ_FOREACH(hc_entry, &V_tcp_hostcache.hashbase[i].hch_bucket, rmx_q) { sbuf_printf(&sb, - "%-15s %5lu %8lu %6lums %6lums %8lu %8lu %8lu %4lu " + "%-15s %5u %8u %6lums %6lums %8u %8u %8u %4lu " "%4lu %4i\n", hc_entry->ip4.s_addr ? inet_ntoa(hc_entry->ip4) : #ifdef INET6 @@ -646,9 +648,9 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) #endif hc_entry->rmx_mtu, hc_entry->rmx_ssthresh, - msec(hc_entry->rmx_rtt * + msec((u_long)hc_entry->rmx_rtt * (RTM_RTTUNIT / (hz * TCP_RTT_SCALE))), - msec(hc_entry->rmx_rttvar * + msec((u_long)hc_entry->rmx_rttvar * (RTM_RTTUNIT / (hz * TCP_RTTVAR_SCALE))), hc_entry->rmx_cwnd, hc_entry->rmx_sendpipe, Modified: head/sys/netinet/tcp_hostcache.h ============================================================================== --- head/sys/netinet/tcp_hostcache.h Thu Oct 6 16:09:45 2016 (r306768) +++ head/sys/netinet/tcp_hostcache.h Thu Oct 6 16:28:34 2016 (r306769) @@ -48,22 +48,22 @@ struct hc_head { struct hc_metrics { /* housekeeping */ TAILQ_ENTRY(hc_metrics) rmx_q; - struct hc_head *rmx_head; /* head of bucket tail queue */ - struct in_addr ip4; /* IP address */ - struct in6_addr ip6; /* IP6 address */ - uint32_t ip6_zoneid; /* IPv6 scope zone id */ + struct hc_head *rmx_head; /* head of bucket tail queue */ + struct in_addr ip4; /* IP address */ + struct in6_addr ip6; /* IP6 address */ + uint32_t ip6_zoneid; /* IPv6 scope zone id */ /* endpoint specific values for tcp */ - u_long rmx_mtu; /* MTU for this path */ - u_long rmx_ssthresh; /* outbound gateway buffer limit */ - u_long rmx_rtt; /* estimated round trip time */ - u_long rmx_rttvar; /* estimated rtt variance */ - u_long rmx_cwnd; /* congestion window */ - u_long rmx_sendpipe; /* outbound delay-bandwidth product */ - u_long rmx_recvpipe; /* inbound delay-bandwidth product */ + uint32_t rmx_mtu; /* MTU for this path */ + uint32_t rmx_ssthresh; /* outbound gateway buffer limit */ + uint32_t rmx_rtt; /* estimated round trip time */ + uint32_t rmx_rttvar; /* estimated rtt variance */ + uint32_t rmx_cwnd; /* congestion window */ + uint32_t rmx_sendpipe; /* outbound delay-bandwidth product */ + uint32_t rmx_recvpipe; /* inbound delay-bandwidth product */ /* TCP hostcache internal data */ - int rmx_expire; /* lifetime for object */ - u_long rmx_hits; /* number of hits */ - u_long rmx_updates; /* number of updates */ + int rmx_expire; /* lifetime for object */ + u_long rmx_hits; /* number of hits */ + u_long rmx_updates; /* number of updates */ }; struct tcp_hostcache { Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Thu Oct 6 16:09:45 2016 (r306768) +++ head/sys/netinet/tcp_input.c Thu Oct 6 16:28:34 2016 (r306769) @@ -1496,7 +1496,7 @@ tcp_do_segment(struct mbuf *m, struct tc { int thflags, acked, ourfinisacked, needoutput = 0, sack_changed; int rstreason, todrop, win; - u_long tiwin; + uint32_t tiwin; uint16_t nsegs; char *s; struct in_conninfo *inc; @@ -1736,7 +1736,7 @@ tcp_do_segment(struct mbuf *m, struct tc */ if ((to.to_flags & TOF_TS) != 0 && to.to_tsecr) { - u_int t; + uint32_t t; t = tcp_ts_getticks() - to.to_tsecr; if (!tp->t_rttlow || tp->t_rttlow > t) @@ -2025,7 +2025,7 @@ tcp_do_segment(struct mbuf *m, struct tc (TF_RCVD_SCALE|TF_REQ_SCALE)) { tp->rcv_scale = tp->request_r_scale; } - tp->rcv_adv += imin(tp->rcv_wnd, + tp->rcv_adv += min(tp->rcv_wnd, TCP_MAXWIN << tp->rcv_scale); tp->snd_una++; /* SYN is acked */ /* @@ -2655,7 +2655,7 @@ tcp_do_segment(struct mbuf *m, struct tc */ cc_ack_received(tp, th, nsegs, CC_DUPACK); - u_long oldcwnd = tp->snd_cwnd; + uint32_t oldcwnd = tp->snd_cwnd; tcp_seq oldsndmax = tp->snd_max; u_int sent; int avail; @@ -2785,7 +2785,7 @@ process_ACK: * huge RTT and blow up the retransmit timer. */ if ((to.to_flags & TOF_TS) != 0 && to.to_tsecr) { - u_int t; + uint32_t t; t = tcp_ts_getticks() - to.to_tsecr; if (!tp->t_rttlow || tp->t_rttlow > t) @@ -2834,7 +2834,7 @@ process_ACK: ourfinisacked = 1; } else { mfree = sbcut_locked(&so->so_snd, acked); - if (tp->snd_wnd >= (u_long) acked) + if (tp->snd_wnd >= (uint32_t) acked) tp->snd_wnd -= acked; else tp->snd_wnd = 0; @@ -2995,7 +2995,7 @@ step6: * but if two URG's are pending at once, some out-of-band * data may creep in... ick. */ - if (th->th_urp <= (u_long)tlen && + if (th->th_urp <= (uint32_t)tlen && !(so->so_options & SO_OOBINLINE)) { /* hdr drop is delayed */ tcp_pulloutofband(so, th, m, drop_hdrlen); @@ -3560,7 +3560,7 @@ tcp_mss_update(struct tcpcb *tp, int off struct hc_metrics_lite *metricptr, struct tcp_ifcap *cap) { int mss = 0; - u_long maxmtu = 0; + uint32_t maxmtu = 0; struct inpcb *inp = tp->t_inpcb; struct hc_metrics_lite metrics; #ifdef INET6 @@ -3706,7 +3706,7 @@ void tcp_mss(struct tcpcb *tp, int offer) { int mss; - u_long bufsize; + uint32_t bufsize; struct inpcb *inp; struct socket *so; struct hc_metrics_lite metrics; @@ -3775,8 +3775,8 @@ int tcp_mssopt(struct in_conninfo *inc) { int mss = 0; - u_long maxmtu = 0; - u_long thcmtu = 0; + uint32_t thcmtu = 0; + uint32_t maxmtu = 0; size_t min_protoh; KASSERT(inc != NULL, ("tcp_mssopt with NULL in_conninfo pointer")); @@ -3821,7 +3821,7 @@ void tcp_newreno_partial_ack(struct tcpcb *tp, struct tcphdr *th) { tcp_seq onxt = tp->snd_nxt; - u_long ocwnd = tp->snd_cwnd; + uint32_t ocwnd = tp->snd_cwnd; u_int maxseg = tcp_maxseg(tp); INP_WLOCK_ASSERT(tp->t_inpcb); Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Thu Oct 6 16:09:45 2016 (r306768) +++ head/sys/netinet/tcp_output.c Thu Oct 6 16:28:34 2016 (r306769) @@ -142,7 +142,7 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, send static void inline hhook_run_tcp_est_out(struct tcpcb *tp, struct tcphdr *th, struct tcpopt *to, - long len, int tso); + uint32_t len, int tso); static void inline cc_after_idle(struct tcpcb *tp); /* @@ -150,7 +150,7 @@ static void inline cc_after_idle(struct */ static void inline hhook_run_tcp_est_out(struct tcpcb *tp, struct tcphdr *th, - struct tcpopt *to, long len, int tso) + struct tcpopt *to, uint32_t len, int tso) { struct tcp_hhook_data hhook_data; @@ -185,7 +185,8 @@ int tcp_output(struct tcpcb *tp) { struct socket *so = tp->t_inpcb->inp_socket; - long len, recwin, sendwin; + int32_t len; + uint32_t recwin, sendwin; int off, flags, error = 0; /* Keep compiler happy */ struct mbuf *m; struct ip *ip = NULL; @@ -277,11 +278,10 @@ again: p = NULL; if ((tp->t_flags & TF_SACK_PERMIT) && IN_FASTRECOVERY(tp->t_flags) && (p = tcp_sack_output(tp, &sack_bytes_rxmt))) { - long cwin; + uint32_t cwin; - cwin = min(tp->snd_wnd, tp->snd_cwnd) - sack_bytes_rxmt; - if (cwin < 0) - cwin = 0; + cwin = + imax(min(tp->snd_wnd, tp->snd_cwnd) - sack_bytes_rxmt, 0); /* Do not retransmit SACK segments beyond snd_recover */ if (SEQ_GT(p->end, tp->snd_recover)) { /* @@ -300,10 +300,10 @@ again: goto after_sack_rexmit; } else /* Can rexmit part of the current hole */ - len = ((long)ulmin(cwin, + len = ((int32_t)ulmin(cwin, tp->snd_recover - p->rxmit)); } else - len = ((long)ulmin(cwin, p->end - p->rxmit)); + len = ((int32_t)ulmin(cwin, p->end - p->rxmit)); off = p->rxmit - tp->snd_una; KASSERT(off >= 0,("%s: sack block to the left of una : %d", __func__, off)); @@ -376,17 +376,17 @@ after_sack_rexmit: */ if (sack_rxmit == 0) { if (sack_bytes_rxmt == 0) - len = ((long)ulmin(sbavail(&so->so_snd), sendwin) - + len = ((int32_t)ulmin(sbavail(&so->so_snd), sendwin) - off); else { - long cwin; + int32_t cwin; /* * We are inside of a SACK recovery episode and are * sending new data, having retransmitted all the * data possible in the scoreboard. */ - len = ((long)ulmin(sbavail(&so->so_snd), tp->snd_wnd) - + len = ((int32_t)min(sbavail(&so->so_snd), tp->snd_wnd) - off); /* * Don't remove this (len > 0) check ! @@ -402,7 +402,7 @@ after_sack_rexmit: sack_bytes_rxmt; if (cwin < 0) cwin = 0; - len = lmin(len, cwin); + len = imin(len, cwin); } } } @@ -566,7 +566,8 @@ after_sack_rexmit: flags &= ~TH_FIN; } - recwin = sbspace(&so->so_rcv); + recwin = lmin(lmax(sbspace(&so->so_rcv), 0), + (long)TCP_MAXWIN << tp->rcv_scale); /* * Sender silly window avoidance. We transmit under the following @@ -592,7 +593,7 @@ after_sack_rexmit: */ if (!(tp->t_flags & TF_MORETOCOME) && /* normal case */ (idle || (tp->t_flags & TF_NODELAY)) && - len + off >= sbavail(&so->so_snd) && + (uint32_t)len + (uint32_t)off >= sbavail(&so->so_snd) && (tp->t_flags & TF_NOPUSH) == 0) { goto send; } @@ -643,10 +644,10 @@ after_sack_rexmit: * taking into account that we are limited by * TCP_MAXWIN << tp->rcv_scale. */ - long adv; + int32_t adv; int oldwin; - adv = min(recwin, (long)TCP_MAXWIN << tp->rcv_scale); + adv = recwin; if (SEQ_GT(tp->rcv_adv, tp->rcv_nxt)) { oldwin = (tp->rcv_adv - tp->rcv_nxt); adv -= oldwin; @@ -661,9 +662,9 @@ after_sack_rexmit: if (oldwin >> tp->rcv_scale >= (adv + oldwin) >> tp->rcv_scale) goto dontupdate; - if (adv >= (long)(2 * tp->t_maxseg) && - (adv >= (long)(so->so_rcv.sb_hiwat / 4) || - recwin <= (long)(so->so_rcv.sb_hiwat / 8) || + if (adv >= (int32_t)(2 * tp->t_maxseg) && + (adv >= (int32_t)(so->so_rcv.sb_hiwat / 4) || + recwin <= (so->so_rcv.sb_hiwat / 8) || so->so_rcv.sb_hiwat <= 8 * tp->t_maxseg)) goto send; } @@ -950,7 +951,8 @@ send: * emptied: */ max_len = (tp->t_maxseg - optlen); - if ((off + len) < sbavail(&so->so_snd)) { + if (((uint32_t)off + (uint32_t)len) < + sbavail(&so->so_snd)) { moff = len % max_len; if (moff != 0) { len -= moff; @@ -1046,7 +1048,7 @@ send: mb = sbsndptr(&so->so_snd, off, len, &moff); if (len <= MHLEN - hdrlen - max_linkhdr) { - m_copydata(mb, moff, (int)len, + m_copydata(mb, moff, len, mtod(m, caddr_t) + hdrlen); m->m_len += len; } else { @@ -1066,7 +1068,8 @@ send: * give data to the user when a buffer fills or * a PUSH comes in.) */ - if ((off + len == sbused(&so->so_snd)) && !(flags & TH_SYN)) + if (((uint32_t)off + (uint32_t)len == sbused(&so->so_snd)) && + !(flags & TH_SYN)) flags |= TH_PUSH; SOCKBUF_UNLOCK(&so->so_snd); } else { @@ -1199,14 +1202,12 @@ send: * Calculate receive window. Don't shrink window, * but avoid silly window syndrome. */ - if (recwin < (long)(so->so_rcv.sb_hiwat / 4) && - recwin < (long)tp->t_maxseg) + if (recwin < (so->so_rcv.sb_hiwat / 4) && + recwin < tp->t_maxseg) recwin = 0; if (SEQ_GT(tp->rcv_adv, tp->rcv_nxt) && - recwin < (long)(tp->rcv_adv - tp->rcv_nxt)) - recwin = (long)(tp->rcv_adv - tp->rcv_nxt); - if (recwin > (long)TCP_MAXWIN << tp->rcv_scale) - recwin = (long)TCP_MAXWIN << tp->rcv_scale; + recwin < (tp->rcv_adv - tp->rcv_nxt)) + recwin = (tp->rcv_adv - tp->rcv_nxt); /* * According to RFC1323 the window field in a SYN (i.e., a @@ -1297,11 +1298,11 @@ send: #ifdef IPSEC KASSERT(len + hdrlen + ipoptlen - ipsec_optlen == m_length(m, NULL), - ("%s: mbuf chain shorter than expected: %ld + %u + %u - %u != %u", + ("%s: mbuf chain shorter than expected: %d + %u + %u - %u != %u", __func__, len, hdrlen, ipoptlen, ipsec_optlen, m_length(m, NULL))); #else KASSERT(len + hdrlen + ipoptlen == m_length(m, NULL), - ("%s: mbuf chain shorter than expected: %ld + %u + %u != %u", + ("%s: mbuf chain shorter than expected: %d + %u + %u != %u", __func__, len, hdrlen, ipoptlen, m_length(m, NULL))); #endif @@ -1597,7 +1598,7 @@ timer: * then remember the size of the advertised window. * Any pending ACK has now been sent. */ - if (recwin >= 0 && SEQ_GT(tp->rcv_nxt + recwin, tp->rcv_adv)) + if (SEQ_GT(tp->rcv_nxt + recwin, tp->rcv_adv)) tp->rcv_adv = tp->rcv_nxt + recwin; tp->last_ack_sent = tp->rcv_nxt; tp->t_flags &= ~(TF_ACKNOW | TF_DELACK); Modified: head/sys/netinet/tcp_seq.h ============================================================================== --- head/sys/netinet/tcp_seq.h Thu Oct 6 16:09:45 2016 (r306768) +++ head/sys/netinet/tcp_seq.h Thu Oct 6 16:28:34 2016 (r306769) @@ -75,20 +75,17 @@ * tcp_ts_getticks() in ms, should be 1ms < x < 1000ms according to RFC 1323. * We always use 1ms granularity independent of hz. */ -static __inline u_int +static __inline uint32_t tcp_ts_getticks(void) { struct timeval tv; - u_long ms; /* * getmicrouptime() should be good enough for any 1-1000ms granularity. * Do not use getmicrotime() here as it might break nfsroot/tcp. */ getmicrouptime(&tv); - ms = tv.tv_sec * 1000 + tv.tv_usec / 1000; - - return (ms); + return (tv.tv_sec * 1000 + tv.tv_usec / 1000); } #endif /* _KERNEL */ Modified: head/sys/netinet/tcp_stacks/fastpath.c ============================================================================== --- head/sys/netinet/tcp_stacks/fastpath.c Thu Oct 6 16:09:45 2016 (r306768) +++ head/sys/netinet/tcp_stacks/fastpath.c Thu Oct 6 16:28:34 2016 (r306769) @@ -169,7 +169,7 @@ static void tcp_do_segment_fastack(stru static void tcp_do_fastack(struct mbuf *m, struct tcphdr *th, struct socket *so, struct tcpcb *tp, struct tcpopt *to, int drop_hdrlen, int tlen, - int ti_locked, u_long tiwin) + int ti_locked, uint32_t tiwin) { int acked; uint16_t nsegs; @@ -248,7 +248,7 @@ tcp_do_fastack(struct mbuf *m, struct tc */ if ((to->to_flags & TOF_TS) != 0 && to->to_tsecr) { - u_int t; + uint32_t t; t = tcp_ts_getticks() - to->to_tsecr; if (!tp->t_rttlow || tp->t_rttlow > t) @@ -343,7 +343,7 @@ tcp_do_fastack(struct mbuf *m, struct tc static void tcp_do_fastnewdata(struct mbuf *m, struct tcphdr *th, struct socket *so, struct tcpcb *tp, struct tcpopt *to, int drop_hdrlen, int tlen, - int ti_locked, u_long tiwin) + int ti_locked, uint32_t tiwin) { int newsize = 0; /* automatic sockbuf scaling */ #ifdef TCPDEBUG @@ -501,7 +501,7 @@ tcp_do_fastnewdata(struct mbuf *m, struc static void tcp_do_slowpath(struct mbuf *m, struct tcphdr *th, struct socket *so, struct tcpcb *tp, struct tcpopt *to, int drop_hdrlen, int tlen, - int ti_locked, u_long tiwin, int thflags) + int ti_locked, uint32_t tiwin, int thflags) { int acked, ourfinisacked, needoutput = 0; int rstreason, todrop, win; @@ -595,7 +595,7 @@ tcp_do_slowpath(struct mbuf *m, struct t (TF_RCVD_SCALE|TF_REQ_SCALE)) { tp->rcv_scale = tp->request_r_scale; } - tp->rcv_adv += imin(tp->rcv_wnd, + tp->rcv_adv += min(tp->rcv_wnd, TCP_MAXWIN << tp->rcv_scale); tp->snd_una++; /* SYN is acked */ /* @@ -1179,7 +1179,7 @@ tcp_do_slowpath(struct mbuf *m, struct t */ cc_ack_received(tp, th, nsegs, CC_DUPACK); - u_long oldcwnd = tp->snd_cwnd; + uint32_t oldcwnd = tp->snd_cwnd; tcp_seq oldsndmax = tp->snd_max; u_int sent; int avail; @@ -1296,7 +1296,7 @@ process_ACK: * huge RTT and blow up the retransmit timer. */ if ((to->to_flags & TOF_TS) != 0 && to->to_tsecr) { - u_int t; + uint32_t t; t = tcp_ts_getticks() - to->to_tsecr; if (!tp->t_rttlow || tp->t_rttlow > t) @@ -1500,7 +1500,7 @@ step6: * but if two URG's are pending at once, some out-of-band * data may creep in... ick. */ - if (th->th_urp <= (u_long)tlen && + if (th->th_urp <= (uint32_t)tlen && !(so->so_options & SO_OOBINLINE)) { /* hdr drop is delayed */ tcp_pulloutofband(so, th, m, drop_hdrlen); @@ -1765,7 +1765,7 @@ tcp_do_segment_fastslow(struct mbuf *m, int ti_locked) { int thflags; - u_long tiwin; + uint32_t tiwin; char *s; uint16_t nsegs; int can_enter; @@ -1991,7 +1991,7 @@ tcp_do_segment_fastslow(struct mbuf *m, static int tcp_fastack(struct mbuf *m, struct tcphdr *th, struct socket *so, struct tcpcb *tp, struct tcpopt *to, int drop_hdrlen, int tlen, - int ti_locked, u_long tiwin) + int ti_locked, uint32_t tiwin) { int acked; uint16_t nsegs; @@ -2109,7 +2109,7 @@ tcp_fastack(struct mbuf *m, struct tcphd */ if ((to->to_flags & TOF_TS) != 0 && to->to_tsecr) { - u_int t; + uint32_t t; t = tcp_ts_getticks() - to->to_tsecr; if (!tp->t_rttlow || tp->t_rttlow > t) @@ -2213,7 +2213,7 @@ tcp_do_segment_fastack(struct mbuf *m, s int ti_locked) { int thflags; - u_long tiwin; + uint32_t tiwin; char *s; struct in_conninfo *inc; struct tcpopt to; Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Thu Oct 6 16:09:45 2016 (r306768) +++ head/sys/netinet/tcp_subr.c Thu Oct 6 16:28:34 2016 (r306769) @@ -913,8 +913,8 @@ tcp_respond(struct tcpcb *tp, void *ipge if (tp != NULL) { if (!(flags & TH_RST)) { win = sbspace(&inp->inp_socket->so_rcv); - if (win > (long)TCP_MAXWIN << tp->rcv_scale) - win = (long)TCP_MAXWIN << tp->rcv_scale; + if (win > TCP_MAXWIN << tp->rcv_scale) + win = TCP_MAXWIN << tp->rcv_scale; } if ((tp->t_flags & TF_NOOPT) == 0) incl_opts = true; @@ -1412,7 +1412,7 @@ tcp_discardcb(struct tcpcb *tp) */ if (tp->t_rttupdated >= 4) { struct hc_metrics_lite metrics; - u_long ssthresh; + uint32_t ssthresh; bzero(&metrics, sizeof(metrics)); /* @@ -1433,7 +1433,7 @@ tcp_discardcb(struct tcpcb *tp) ssthresh = (ssthresh + tp->t_maxseg / 2) / tp->t_maxseg; if (ssthresh < 2) ssthresh = 2; - ssthresh *= (u_long)(tp->t_maxseg + + ssthresh *= (tp->t_maxseg + #ifdef INET6 (isipv6 ? sizeof (struct ip6_hdr) + sizeof (struct tcphdr) : @@ -2382,12 +2382,12 @@ tcp_mtudisc(struct inpcb *inp, int mtuof * is called by TCP routines that access the rmx structure and by * tcp_mss_update to get the peer/interface MTU. */ -u_long +uint32_t tcp_maxmtu(struct in_conninfo *inc, struct tcp_ifcap *cap) { struct nhop4_extended nh4; struct ifnet *ifp; - u_long maxmtu = 0; + uint32_t maxmtu = 0; KASSERT(inc != NULL, ("tcp_maxmtu with NULL in_conninfo pointer")); @@ -2417,14 +2417,14 @@ tcp_maxmtu(struct in_conninfo *inc, stru #endif /* INET */ #ifdef INET6 -u_long +uint32_t tcp_maxmtu6(struct in_conninfo *inc, struct tcp_ifcap *cap) { struct nhop6_extended nh6; struct in6_addr dst6; uint32_t scopeid; struct ifnet *ifp; - u_long maxmtu = 0; + uint32_t maxmtu = 0; KASSERT(inc != NULL, ("tcp_maxmtu6 with NULL in_conninfo pointer")); Modified: head/sys/netinet/tcp_usrreq.c ============================================================================== --- head/sys/netinet/tcp_usrreq.c Thu Oct 6 16:09:45 2016 (r306768) +++ head/sys/netinet/tcp_usrreq.c Thu Oct 6 16:28:34 2016 (r306769) @@ -1333,7 +1333,7 @@ tcp_fill_info(struct tcpcb *tp, struct t ti->tcpi_options |= TCPI_OPT_ECN; ti->tcpi_rto = tp->t_rxtcur * tick; - ti->tcpi_last_data_recv = (long)(ticks - (int)tp->t_rcvtime) * tick; + ti->tcpi_last_data_recv = ((uint32_t)ticks - tp->t_rcvtime) * tick; ti->tcpi_rtt = ((u_int64_t)tp->t_srtt * tick) >> TCP_RTT_SHIFT; ti->tcpi_rttvar = ((u_int64_t)tp->t_rttvar * tick) >> TCP_RTTVAR_SHIFT; @@ -2242,15 +2242,15 @@ db_print_tcpcb(struct tcpcb *tp, const c tp->iss, tp->irs, tp->rcv_nxt); db_print_indent(indent); - db_printf("rcv_adv: 0x%08x rcv_wnd: %lu rcv_up: 0x%08x\n", + db_printf("rcv_adv: 0x%08x rcv_wnd: %u rcv_up: 0x%08x\n", tp->rcv_adv, tp->rcv_wnd, tp->rcv_up); db_print_indent(indent); - db_printf("snd_wnd: %lu snd_cwnd: %lu\n", + db_printf("snd_wnd: %u snd_cwnd: %u\n", tp->snd_wnd, tp->snd_cwnd); db_print_indent(indent); - db_printf("snd_ssthresh: %lu snd_recover: " + db_printf("snd_ssthresh: %u snd_recover: " "0x%08x\n", tp->snd_ssthresh, tp->snd_recover); db_print_indent(indent); @@ -2271,7 +2271,7 @@ db_print_tcpcb(struct tcpcb *tp, const c tp->t_rttbest); db_print_indent(indent); - db_printf("t_rttupdated: %lu max_sndwnd: %lu t_softerror: %d\n", + db_printf("t_rttupdated: %lu max_sndwnd: %u t_softerror: %d\n", tp->t_rttupdated, tp->max_sndwnd, tp->t_softerror); db_print_indent(indent); @@ -2289,10 +2289,10 @@ db_print_tcpcb(struct tcpcb *tp, const c db_print_indent(indent); db_printf("ts_offset: %u last_ack_sent: 0x%08x snd_cwnd_prev: " - "%lu\n", tp->ts_offset, tp->last_ack_sent, tp->snd_cwnd_prev); + "%u\n", tp->ts_offset, tp->last_ack_sent, tp->snd_cwnd_prev); db_print_indent(indent); - db_printf("snd_ssthresh_prev: %lu snd_recover_prev: 0x%08x " + db_printf("snd_ssthresh_prev: %u snd_recover_prev: 0x%08x " "t_badrxtwin: %u\n", tp->snd_ssthresh_prev, tp->snd_recover_prev, tp->t_badrxtwin); Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Thu Oct 6 16:09:45 2016 (r306768) +++ head/sys/netinet/tcp_var.h Thu Oct 6 16:28:34 2016 (r306769) @@ -192,13 +192,13 @@ struct tcpcb { tcp_seq rcv_nxt; /* receive next */ tcp_seq rcv_adv; /* advertised window */ - u_long rcv_wnd; /* receive window */ + uint32_t rcv_wnd; /* receive window */ tcp_seq rcv_up; /* receive urgent pointer */ - u_long snd_wnd; /* send window */ - u_long snd_cwnd; /* congestion-controlled window */ + uint32_t snd_wnd; /* send window */ + uint32_t snd_cwnd; /* congestion-controlled window */ u_long snd_spare1; /* unused */ - u_long snd_ssthresh; /* snd_cwnd size threshold for + uint32_t snd_ssthresh; /* snd_cwnd size threshold for * for slow start exponential to * linear switch */ @@ -223,7 +223,7 @@ struct tcpcb { u_int t_rttmin; /* minimum rtt allowed */ u_int t_rttbest; /* best rtt we've seen */ u_long t_rttupdated; /* number of times rtt sampled */ - u_long max_sndwnd; /* largest window peer has offered */ + uint32_t max_sndwnd; /* largest window peer has offered */ int t_softerror; /* possible error not yet reported */ /* out-of-band data */ @@ -239,8 +239,8 @@ struct tcpcb { tcp_seq last_ack_sent; /* experimental */ - u_long snd_cwnd_prev; /* cwnd prior to retransmit */ - u_long snd_ssthresh_prev; /* ssthresh prior to retransmit */ + uint32_t snd_cwnd_prev; /* cwnd prior to retransmit */ + uint32_t snd_ssthresh_prev; /* ssthresh prior to retransmit */ tcp_seq snd_recover_prev; /* snd_recover prior to retransmit */ int t_sndzerowin; /* zero-window updates sent */ u_int t_badrxtwin; /* window for retransmit recovery */ @@ -415,13 +415,13 @@ struct tcpopt { #define TO_SYN 0x01 /* parse SYN-only options */ struct hc_metrics_lite { /* must stay in sync with hc_metrics */ - u_long rmx_mtu; /* MTU for this path */ - u_long rmx_ssthresh; /* outbound gateway buffer limit */ - u_long rmx_rtt; /* estimated round trip time */ - u_long rmx_rttvar; /* estimated rtt variance */ - u_long rmx_cwnd; /* congestion window */ - u_long rmx_sendpipe; /* outbound delay-bandwidth product */ - u_long rmx_recvpipe; /* inbound delay-bandwidth product */ + uint32_t rmx_mtu; /* MTU for this path */ + uint32_t rmx_ssthresh; /* outbound gateway buffer limit */ + uint32_t rmx_rtt; /* estimated round trip time */ + uint32_t rmx_rttvar; /* estimated rtt variance */ + uint32_t rmx_cwnd; /* congestion window */ + uint32_t rmx_sendpipe; /* outbound delay-bandwidth product */ + uint32_t rmx_recvpipe; /* inbound delay-bandwidth product */ }; /* @@ -657,7 +657,7 @@ struct tcp_hhook_data { struct tcpcb *tp; struct tcphdr *th; struct tcpopt *to; - long len; + uint32_t len; int tso; tcp_seq curack; }; @@ -802,8 +802,8 @@ struct tcp_function_block *find_and_ref_ struct tcp_function_block *find_and_ref_tcp_fb(struct tcp_function_block *blk); int tcp_default_ctloutput(struct socket *so, struct sockopt *sopt, struct inpcb *inp, struct tcpcb *tp); -u_long tcp_maxmtu(struct in_conninfo *, struct tcp_ifcap *); -u_long tcp_maxmtu6(struct in_conninfo *, struct tcp_ifcap *); +uint32_t tcp_maxmtu(struct in_conninfo *, struct tcp_ifcap *); +uint32_t tcp_maxmtu6(struct in_conninfo *, struct tcp_ifcap *); u_int tcp_maxseg(const struct tcpcb *); void tcp_mss_update(struct tcpcb *, int, int, struct hc_metrics_lite *, struct tcp_ifcap *); @@ -852,8 +852,8 @@ void tcp_hc_init(void); void tcp_hc_destroy(void); #endif void tcp_hc_get(struct in_conninfo *, struct hc_metrics_lite *); -u_long tcp_hc_getmtu(struct in_conninfo *); -void tcp_hc_updatemtu(struct in_conninfo *, u_long); +uint32_t tcp_hc_getmtu(struct in_conninfo *); +void tcp_hc_updatemtu(struct in_conninfo *, uint32_t); void tcp_hc_update(struct in_conninfo *, struct hc_metrics_lite *); extern struct pr_usrreqs tcp_usrreqs; Modified: head/usr.sbin/trpt/trpt.c ============================================================================== --- head/usr.sbin/trpt/trpt.c Thu Oct 6 16:09:45 2016 (r306768) +++ head/usr.sbin/trpt/trpt.c Thu Oct 6 16:28:34 2016 (r306769) @@ -417,12 +417,12 @@ tcp_trace(short act, short ostate, struc printf("\n"); if (sflag) { printf("\trcv_nxt %lx rcv_wnd %lx snd_una %lx snd_nxt %lx snd_max %lx\n", - (u_long)tp->rcv_nxt, tp->rcv_wnd, + (u_long)tp->rcv_nxt, (u_long)tp->rcv_wnd, (u_long)tp->snd_una, (u_long)tp->snd_nxt, (u_long)tp->snd_max); printf("\tsnd_wl1 %lx snd_wl2 %lx snd_wnd %lx\n", (u_long)tp->snd_wl1, - (u_long)tp->snd_wl2, tp->snd_wnd); + (u_long)tp->snd_wl2, (u_long)tp->snd_wnd); } /* print out timers? */ #if 0 From owner-svn-src-all@freebsd.org Thu Oct 6 17:21:21 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16485BEC6DB; Thu, 6 Oct 2016 17:21:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD67A1A8; Thu, 6 Oct 2016 17:21:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96HLKKO084235; Thu, 6 Oct 2016 17:21:20 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96HLJkI084231; Thu, 6 Oct 2016 17:21:19 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201610061721.u96HLJkI084231@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 6 Oct 2016 17:21:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306770 - in stable/11/sys: dev/cxgbe net sys x86/iommu X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 17:21:21 -0000 Author: jhb Date: Thu Oct 6 17:21:19 2016 New Revision: 306770 URL: https://svnweb.freebsd.org/changeset/base/306770 Log: MFC 303754: Add __printflike() to bus_describe_intr() to enable -Wformat checks. Fix a few places that were passing a raw string as the format to use a "%s" format string instead. Modified: stable/11/sys/dev/cxgbe/t4_main.c stable/11/sys/net/iflib.c stable/11/sys/sys/bus.h stable/11/sys/x86/iommu/intel_drv.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_main.c Thu Oct 6 16:28:34 2016 (r306769) +++ stable/11/sys/dev/cxgbe/t4_main.c Thu Oct 6 17:21:19 2016 (r306770) @@ -4388,7 +4388,7 @@ t4_alloc_irq(struct adapter *sc, struct "failed to setup interrupt for rid %d, name %s: %d\n", rid, name, rc); } else if (name) - bus_describe_intr(sc->dev, irq->res, irq->tag, name); + bus_describe_intr(sc->dev, irq->res, irq->tag, "%s", name); return (rc); } Modified: stable/11/sys/net/iflib.c ============================================================================== --- stable/11/sys/net/iflib.c Thu Oct 6 16:28:34 2016 (r306769) +++ stable/11/sys/net/iflib.c Thu Oct 6 17:21:19 2016 (r306770) @@ -1216,7 +1216,7 @@ _iflib_irq_alloc(if_ctx_t ctx, if_irq_t rid, name ? name : "unknown", rc); return (rc); } else if (name) - bus_describe_intr(dev, res, tag, name); + bus_describe_intr(dev, res, tag, "%s", name); irq->ii_tag = tag; return (0); Modified: stable/11/sys/sys/bus.h ============================================================================== --- stable/11/sys/sys/bus.h Thu Oct 6 16:28:34 2016 (r306769) +++ stable/11/sys/sys/bus.h Thu Oct 6 17:21:19 2016 (r306770) @@ -538,7 +538,7 @@ int bus_setup_intr(device_t dev, struct int bus_teardown_intr(device_t dev, struct resource *r, void *cookie); int bus_bind_intr(device_t dev, struct resource *r, int cpu); int bus_describe_intr(device_t dev, struct resource *irq, void *cookie, - const char *fmt, ...); + const char *fmt, ...) __printflike(4, 5); int bus_set_resource(device_t dev, int type, int rid, rman_res_t start, rman_res_t count); int bus_get_resource(device_t dev, int type, int rid, Modified: stable/11/sys/x86/iommu/intel_drv.c ============================================================================== --- stable/11/sys/x86/iommu/intel_drv.c Thu Oct 6 16:28:34 2016 (r306769) +++ stable/11/sys/x86/iommu/intel_drv.c Thu Oct 6 17:21:19 2016 (r306770) @@ -306,7 +306,7 @@ dmar_alloc_irq(device_t dev, struct dmar dmd->name, error); goto err4; } - bus_describe_intr(dev, dmd->irq_res, dmd->intr_handle, dmd->name); + bus_describe_intr(dev, dmd->irq_res, dmd->intr_handle, "%s", dmd->name); error = PCIB_MAP_MSI(pcib, dev, dmd->irq, &msi_addr, &msi_data); if (error != 0) { device_printf(dev, "cannot map %s interrupt, %d\n", From owner-svn-src-all@freebsd.org Thu Oct 6 17:35:51 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 907DDBECC5F; Thu, 6 Oct 2016 17:35:51 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60638E01; Thu, 6 Oct 2016 17:35:51 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96HZosW091440; Thu, 6 Oct 2016 17:35:50 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96HZocq091439; Thu, 6 Oct 2016 17:35:50 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201610061735.u96HZocq091439@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 6 Oct 2016 17:35:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306771 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 17:35:51 -0000 Author: bdrewery Date: Thu Oct 6 17:35:50 2016 New Revision: 306771 URL: https://svnweb.freebsd.org/changeset/base/306771 Log: Improve grammar. MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/lib/libc/sys/kqueue.2 Modified: head/lib/libc/sys/kqueue.2 ============================================================================== --- head/lib/libc/sys/kqueue.2 Thu Oct 6 17:21:19 2016 (r306770) +++ head/lib/libc/sys/kqueue.2 Thu Oct 6 17:35:50 2016 (r306771) @@ -375,7 +375,7 @@ A file descriptor referencing the monito The closed file descriptor did not have write access. .It Dv NOTE_CLOSE_WRITE A file descriptor referencing the monitored file, was closed. -The closed file descriptor has write access. +The closed file descriptor had write access. .Pp This note, as well as .Dv NOTE_CLOSE , From owner-svn-src-all@freebsd.org Thu Oct 6 17:54:35 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77D69BEC257; Thu, 6 Oct 2016 17:54:35 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49F0FE79; Thu, 6 Oct 2016 17:54:35 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96HsYKs099398; Thu, 6 Oct 2016 17:54:34 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96HsYND099397; Thu, 6 Oct 2016 17:54:34 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201610061754.u96HsYND099397@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Thu, 6 Oct 2016 17:54:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306772 - head/sys/dev/netmap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 17:54:35 -0000 Author: sbruno Date: Thu Oct 6 17:54:34 2016 New Revision: 306772 URL: https://svnweb.freebsd.org/changeset/base/306772 Log: Move netmap selinfo.h in to sensible location. netmap_kern.h currently requires all drivers including it to include selinfo.h. Submitted by: mmacy@nextbsd.org Reviewed by: gnn MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D5334 Modified: head/sys/dev/netmap/netmap_kern.h Modified: head/sys/dev/netmap/netmap_kern.h ============================================================================== --- head/sys/dev/netmap/netmap_kern.h Thu Oct 6 17:35:50 2016 (r306771) +++ head/sys/dev/netmap/netmap_kern.h Thu Oct 6 17:54:34 2016 (r306772) @@ -62,6 +62,7 @@ #endif #if defined(__FreeBSD__) +#include #define likely(x) __builtin_expect((long)!!(x), 1L) #define unlikely(x) __builtin_expect((long)!!(x), 0L) From owner-svn-src-all@freebsd.org Thu Oct 6 18:05:26 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81CA7BEC618; Thu, 6 Oct 2016 18:05:26 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51E3F642; Thu, 6 Oct 2016 18:05:26 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96I5PLo003237; Thu, 6 Oct 2016 18:05:25 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96I5Pw9003236; Thu, 6 Oct 2016 18:05:25 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201610061805.u96I5Pw9003236@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 6 Oct 2016 18:05:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306773 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 18:05:26 -0000 Author: bdrewery Date: Thu Oct 6 18:05:25 2016 New Revision: 306773 URL: https://svnweb.freebsd.org/changeset/base/306773 Log: Add link for vrefl(9). Sponsored by: Dell EMC Isilon MFC after: 1 week Modified: head/share/man/man9/Makefile Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Thu Oct 6 17:54:34 2016 (r306772) +++ head/share/man/man9/Makefile Thu Oct 6 18:05:25 2016 (r306773) @@ -1974,7 +1974,8 @@ MLINKS+=VOP_RDWR.9 VOP_READ.9 \ VOP_RDWR.9 VOP_WRITE.9 MLINKS+=VOP_REMOVE.9 VOP_RMDIR.9 MLINKS+=vnet.9 vimage.9 -MLINKS+=vref.9 VREF.9 +MLINKS+=vref.9 VREF.9 \ + vref.9 vrefl.9 MLINKS+=vrele.9 vput.9 \ vrele.9 vunref.9 MLINKS+=vslock.9 vsunlock.9 From owner-svn-src-all@freebsd.org Thu Oct 6 18:09:24 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E610BEC725; Thu, 6 Oct 2016 18:09:24 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4575952; Thu, 6 Oct 2016 18:09:23 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96I9Nkg003543; Thu, 6 Oct 2016 18:09:23 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96I9Nv5003541; Thu, 6 Oct 2016 18:09:23 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201610061809.u96I9Nv5003541@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 6 Oct 2016 18:09:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306774 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 18:09:24 -0000 Author: bdrewery Date: Thu Oct 6 18:09:22 2016 New Revision: 306774 URL: https://svnweb.freebsd.org/changeset/base/306774 Log: Add vrecyclel() to vrecycle() a vnode with the interlock already held. Obtained from: OneFS Sponsored by: Dell EMC Isilon MFC after: 2 weeks Modified: head/sys/kern/vfs_subr.c head/sys/sys/vnode.h Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Thu Oct 6 18:05:25 2016 (r306773) +++ head/sys/kern/vfs_subr.c Thu Oct 6 18:09:22 2016 (r306774) @@ -3160,15 +3160,28 @@ vrecycle(struct vnode *vp) { int recycled; - ASSERT_VOP_ELOCKED(vp, "vrecycle"); + VI_LOCK(vp); + recycled = vrecyclel(vp); + VI_UNLOCK(vp); + return (recycled); +} + +/* + * vrecycle, with the vp interlock held. + */ +int +vrecyclel(struct vnode *vp) +{ + int recycled; + + ASSERT_VOP_ELOCKED(vp, __func__); + ASSERT_VI_LOCKED(vp, __func__); CTR2(KTR_VFS, "%s: vp %p", __func__, vp); recycled = 0; - VI_LOCK(vp); if (vp->v_usecount == 0) { recycled = 1; vgonel(vp); } - VI_UNLOCK(vp); return (recycled); } Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Thu Oct 6 18:05:25 2016 (r306773) +++ head/sys/sys/vnode.h Thu Oct 6 18:09:22 2016 (r306774) @@ -659,6 +659,7 @@ int vtruncbuf(struct vnode *vp, struct u void vunref(struct vnode *); void vn_printf(struct vnode *vp, const char *fmt, ...) __printflike(2,3); int vrecycle(struct vnode *vp); +int vrecyclel(struct vnode *vp); int vn_bmap_seekhole(struct vnode *vp, u_long cmd, off_t *off, struct ucred *cred); int vn_close(struct vnode *vp, From owner-svn-src-all@freebsd.org Thu Oct 6 18:10:20 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C225BEC7A1; Thu, 6 Oct 2016 18:10:20 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DDECAEB; Thu, 6 Oct 2016 18:10:20 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96IAJ4R003641; Thu, 6 Oct 2016 18:10:19 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96IAJCW003640; Thu, 6 Oct 2016 18:10:19 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201610061810.u96IAJCW003640@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 6 Oct 2016 18:10:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306775 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 18:10:20 -0000 Author: bdrewery Date: Thu Oct 6 18:10:19 2016 New Revision: 306775 URL: https://svnweb.freebsd.org/changeset/base/306775 Log: vrefl: Assert that the interlock is held. Sponsored by: Dell EMC Isilon MFC after: 2 weeks Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Thu Oct 6 18:09:22 2016 (r306774) +++ head/sys/kern/vfs_subr.c Thu Oct 6 18:10:19 2016 (r306775) @@ -2641,6 +2641,7 @@ void vrefl(struct vnode *vp) { + ASSERT_VI_LOCKED(vp, __func__); CTR2(KTR_VFS, "%s: vp %p", __func__, vp); _vhold(vp, true); v_incr_usecount_locked(vp); From owner-svn-src-all@freebsd.org Thu Oct 6 18:52:11 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4EE5CBEC12A; Thu, 6 Oct 2016 18:52:11 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A9575E5; Thu, 6 Oct 2016 18:52:11 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96IqAXd021552; Thu, 6 Oct 2016 18:52:10 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96IqAXg021550; Thu, 6 Oct 2016 18:52:10 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201610061852.u96IqAXg021550@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Thu, 6 Oct 2016 18:52:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306778 - stable/11/sys/dev/qlxgbe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 18:52:11 -0000 Author: davidcs Date: Thu Oct 6 18:52:09 2016 New Revision: 306778 URL: https://svnweb.freebsd.org/changeset/base/306778 Log: MFC r306522 Upgrade Firmware/Bootloader/ResetSeq/Minidump to revision 5.4.62 Modified: stable/11/sys/dev/qlxgbe/ql_boot.c stable/11/sys/dev/qlxgbe/ql_fw.c stable/11/sys/dev/qlxgbe/ql_minidump.c stable/11/sys/dev/qlxgbe/ql_reset.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/qlxgbe/ql_boot.c ============================================================================== --- stable/11/sys/dev/qlxgbe/ql_boot.c Thu Oct 6 18:45:10 2016 (r306777) +++ stable/11/sys/dev/qlxgbe/ql_boot.c Thu Oct 6 18:52:09 2016 (r306778) @@ -35,13 +35,13 @@ __FBSDID("$FreeBSD$"); unsigned int ql83xx_bootloader_version_major = 5; unsigned int ql83xx_bootloader_version_minor = 4; -unsigned int ql83xx_bootloader_version_sub = 58; +unsigned int ql83xx_bootloader_version_sub = 62; unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x04, 0x00, 0xc0, 0x81, 0x05, 0x1f, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x00, 0xc0, 0x83, 0x05, 0x1f, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1e, 0x02, 0x21, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, @@ -71,7 +71,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x83, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, + 0x8b, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -703,11 +703,11 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x80, 0x02, 0xe0, 0x0e, 0x07, 0x84, 0x0b, 0x08, 0x60, 0x00, 0xa0, 0xc3, 0x01, 0x81, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x4f, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x0c, 0x00, 0x0d, 0x01, + 0x57, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x0c, 0x00, 0x0d, 0x01, 0x40, 0x04, 0x1a, 0x03, 0x00, 0x10, 0x78, 0x02, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x4c, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, + 0x54, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0xc0, 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1384,7 +1384,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x81, 0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x14, 0xe0, 0x11, 0x20, 0xa2, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbb, 0x11, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x40, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x5c, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x64, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x02, 0x00, 0x80, 0x40, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0b, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, @@ -1421,14 +1421,14 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xce, 0x11, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x1f, 0x02, 0x16, 0x04, 0x00, 0x00, 0x00, 0x60, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x21, 0x7c, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x5c, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x49, 0x07, + 0x64, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x49, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa2, 0x07, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x80, 0x01, 0xa0, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x5c, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x64, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x40, 0x00, 0x00, 0x0c, 0x1c, 0x00, 0x00, 0x00, 0x40, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x5e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xfe, 0x1f, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, @@ -1535,7 +1535,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x20, 0x50, 0x00, 0x02, 0x00, 0x00, 0x00, 0x60, 0x52, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xb5, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x00, + 0xbd, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0xa0, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1589,7 +1589,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb5, 0x14, 0x7c, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbd, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x40, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0xa0, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, @@ -1624,7 +1624,7 @@ unsigned char ql83xx_bootloader[] = { 0x04, 0x00, 0x00, 0x00, 0x0e, 0x04, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x35, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x3d, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x4c, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x08, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x8d, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x4c, 0x01, @@ -1739,13 +1739,13 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x05, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x04, 0x00, 0x00, 0x40, 0x14, 0x00, 0x00, 0x00, 0xa8, 0x22, 0x00, 0x40, 0x02, 0x00, 0xa0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x07, 0x17, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x07, 0x17, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x0f, 0x17, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0f, 0x17, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x0d, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x00, 0x04, 0x07, 0x00, 0x00, 0x00, 0x20, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x08, 0x00, 0x00, 0x40, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x17, 0x7c, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x17, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x4b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x20, 0x50, 0x04, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x00, 0xe0, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, @@ -1803,8 +1803,8 @@ unsigned char ql83xx_bootloader[] = { 0x0e, 0x1e, 0x00, 0x00, 0x00, 0x80, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x80, 0x40, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xb5, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x35, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0xbd, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x3d, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0xf8, 0x0e, 0x00, 0xe0, 0x01, 0xa0, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x06, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x01, 0x00, @@ -1827,8 +1827,8 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x20, 0x50, 0x04, 0x01, 0x8d, 0x02, 0x32, 0x04, 0x1b, 0x08, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x5c, 0x19, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x5c, 0x19, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x64, 0x19, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x64, 0x19, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x0d, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x85, 0x01, 0x40, 0x06, 0x00, 0x00, 0x00, 0x78, 0x38, 0x04, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x84, 0x02, @@ -1988,7 +1988,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x29, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xa5, 0x03, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc0, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0xc8, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0x00, 0x18, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x80, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, @@ -2104,7 +2104,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x40, 0x00, 0x80, 0x40, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xcf, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0xd7, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xc1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, @@ -2119,7 +2119,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xd0, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, + 0xd8, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -2135,7 +2135,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x4d, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x0a, 0x00, 0x80, 0x01, 0xa0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xd2, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc1, 0x01, + 0xda, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x08, 0x05, 0x00, 0x40, 0x16, 0x00, 0x00, @@ -2196,7 +2196,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x6d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0xc1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x02, 0x00, 0xe0, 0x01, 0xa0, 0x00, 0x10, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0xd0, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x80, 0xd8, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, @@ -2209,7 +2209,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd4, 0x15, 0x7c, 0x00, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x4c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, @@ -2903,7 +2903,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xd6, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc1, 0x02, + 0xde, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc1, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x08, 0x05, 0x00, 0x40, 0x16, 0x00, 0x00, @@ -3097,7 +3097,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfa, 0x08, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x78, 0x00, 0x00, 0xe0, 0x01, 0xa0, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xd7, 0x15, 0x7c, 0x00, + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xdf, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x41, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x78, 0x00, 0x00, 0xe0, 0x01, 0xa0, @@ -3147,7 +3147,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xd9, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, + 0xe1, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -3264,7 +3264,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x2d, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x40, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xdb, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0xe3, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x81, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x08, 0x09, 0x00, @@ -3313,7 +3313,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x80, 0x01, 0xa0, 0x00, 0x0a, 0x0c, 0x03, 0x08, 0x92, 0x20, 0x0b, 0x00, 0x08, 0xf8, 0x08, 0x00, 0x82, 0x01, 0xa0, 0x80, 0x00, 0xcc, 0x02, 0x06, 0x0f, 0x00, 0x00, 0x00, 0x08, 0xf8, 0x09, 0x00, 0x82, 0x01, 0xa0, - 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbd, 0x15, 0x7c, 0x00, + 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc5, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x8c, 0x00, 0x42, 0x03, 0x00, 0x00, 0x00, 0x00, 0x6e, 0x0a, 0xe0, 0x82, 0x01, 0xa0, 0x0a, 0x94, 0xa0, 0x01, 0xa0, 0x7b, 0x10, 0x80, 0x01, 0x13, 0xe8, 0x00, 0xb0, 0x02, 0x40, 0x81, @@ -3329,7 +3329,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x7a, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x20, 0x50, 0x00, 0x01, 0x00, 0xc0, 0x41, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbd, 0x15, 0x7c, 0x00, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc5, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x40, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x01, 0x00, 0xc0, 0x01, 0x00, 0xa0, @@ -3361,18 +3361,18 @@ unsigned char ql83xx_bootloader[] = { 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xdd, 0x15, 0x7c, 0x00, + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe5, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x41, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x08, 0x09, 0x00, 0x40, 0x16, 0x00, 0x00, 0x00, 0xd8, 0x78, 0x00, 0x00, 0xe2, 0x01, 0xa0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xdf, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x01, 0x01, + 0xe7, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9b, 0x0a, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x78, 0x00, 0x00, 0xe0, 0x01, 0xa0, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0xdf, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x80, 0xe7, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x4c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xc1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, @@ -3683,7 +3683,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xe1, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x0c, 0x03, + 0xe9, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xc1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -3707,7 +3707,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xe3, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x81, 0x01, + 0xeb, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x81, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x08, 0x09, 0x00, 0x40, 0x16, 0x00, 0x00, @@ -3888,7 +3888,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xe5, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0xed, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x4c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x41, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, @@ -4067,7 +4067,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0xcd, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x0a, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xe7, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, + 0xef, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -4143,7 +4143,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xe8, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc1, 0x00, + 0xf0, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x08, 0x09, 0x00, 0x40, 0x16, 0x00, 0x00, @@ -4373,7 +4373,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xea, 0x15, 0x7c, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xf2, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, @@ -4448,7 +4448,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x6b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xec, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0xf4, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x08, 0x05, 0x00, @@ -5093,17 +5093,17 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0xcd, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x08, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x0b, 0x20, 0x80, 0x01, 0xa0, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xcd, 0x15, 0x7c, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xd5, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, - 0xd1, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00, 0x0d, 0x01, + 0xd9, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00, 0x0d, 0x01, 0x40, 0x0a, 0x00, 0x00, 0x00, 0x08, 0xf8, 0x08, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x5d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x08, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xfb, 0x0b, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x15, 0x7c, 0x00, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xfa, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x08, + 0x02, 0x16, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x08, 0x20, 0x0f, 0x07, 0x04, 0x00, 0x00, 0x00, 0x02, 0x88, 0xc3, 0x01, 0x81, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -5773,7 +5773,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x15, 0x7c, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x16, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, @@ -5800,7 +5800,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x5a, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0e, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0xff, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x80, 0x07, 0x16, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x01, 0x00, @@ -5840,7 +5840,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x38, 0x00, 0x00, 0xe0, 0x01, 0xa0, 0x00, 0x02, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x01, 0x16, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x80, 0x09, 0x16, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x45, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x01, 0x00, @@ -6426,1136 +6426,1146 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, 0x0e, 0x1e, 0x00, 0x00, 0x10, 0x41, 0x22, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0xc0, 0xf9, 0x3f, - 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x0d, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x68, 0x02, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x8d, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x01, 0xcd, 0x01, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x02, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xa1, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x21, 0x04, - 0x00, 0x00, 0x00, 0x60, 0x20, 0x02, 0x00, 0x00, 0x40, 0x0a, 0x4a, 0x09, - 0x00, 0x08, 0x30, 0x00, 0x20, 0x06, 0x00, 0xa0, 0x00, 0x00, 0x59, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x20, 0x50, + 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0xcd, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xe8, 0x02, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x0d, 0x02, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x02, 0x00, 0x80, 0x01, 0xa0, + 0x00, 0x00, 0x80, 0x01, 0xc0, 0x0f, 0x07, 0x04, 0x0e, 0x00, 0x04, 0x00, + 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0d, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, - 0x47, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x08, 0x00, 0x00, - 0x30, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x00, 0x6b, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x00, 0x00, 0x20, 0x50, 0x00, 0x10, 0x00, 0x00, 0x40, 0x18, 0x00, 0x00, - 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, - 0x00, 0x1a, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xfa, - 0x1f, 0x00, 0x20, 0x50, 0x00, 0x01, 0x00, 0x00, 0x3a, 0x11, 0x00, 0x00, - 0x00, 0x00, 0x26, 0x00, 0xe0, 0x02, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x00, - 0x40, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x03, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x8c, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x0f, 0x03, 0x04, 0x00, 0x00, 0xa0, 0x00, - 0xb8, 0xc3, 0x00, 0x81, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, - 0x0e, 0x9e, 0x20, 0x02, 0x00, 0xc0, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0xc0, 0xf9, 0x3f, - 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x0d, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x68, 0x02, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x8d, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x01, 0xcd, 0x01, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x02, + 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xa1, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, + 0x20, 0x02, 0x00, 0x00, 0x40, 0x0a, 0x4a, 0x09, 0x00, 0x08, 0x30, 0x00, + 0x20, 0x06, 0x00, 0xa0, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x06, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0xcc, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x18, 0x00, 0xfc, 0x1f, 0xbc, 0xbe, 0x00, 0x9c, 0x99, 0x45, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x3c, 0x06, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x20, 0x00, 0x00, + 0x40, 0x1a, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0xf9, 0x1f, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x20, 0x00, 0x00, 0x40, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x68, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, + 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0f, 0x03, 0x04, + 0x00, 0x00, 0xa0, 0x00, 0xb8, 0xc3, 0x00, 0x81, 0x00, 0x00, 0x11, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, + 0x04, 0x80, 0x00, 0x00, 0x0e, 0xbe, 0x20, 0x02, 0x00, 0xc0, 0x31, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, + 0x00, 0xc0, 0xf9, 0x3f, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0xcd, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x02, 0x00, 0x80, 0x01, 0xa0, + 0x00, 0x00, 0x0d, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x02, + 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x80, 0x01, 0xc0, 0x0f, 0x07, 0x04, + 0x0e, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x00, 0x0d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa1, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x20, 0x02, 0x00, 0x00, 0x40, 0x0a, 0x4a, 0x09, 0x00, 0x08, 0x30, 0x00, 0x40, 0x06, 0x00, 0xa0, 0x00, 0x00, 0x59, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x20, 0x50, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, - 0x47, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x08, 0x00, 0x00, - 0x30, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x00, 0x6b, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x00, 0x00, 0x20, 0x50, 0x00, 0x10, 0x00, 0x00, 0x40, 0x18, 0x00, 0x00, - 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, - 0x00, 0x1a, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xfa, - 0x1f, 0x00, 0x20, 0x50, 0x00, 0x01, 0x00, 0x00, 0x3a, 0x11, 0x00, 0x00, - 0x00, 0x00, 0x26, 0x00, 0xe0, 0x02, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x00, - 0x40, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x03, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x8c, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x0f, 0x03, 0x04, 0x00, 0x00, 0xa0, 0x00, - 0xb8, 0xc3, 0x00, 0x81, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, - 0x0e, 0x9e, 0x20, 0x02, 0x00, 0xc0, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x40, 0xf9, 0x3f, - 0x00, 0x82, 0x01, 0xa0, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, - 0x00, 0xd0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8d, 0x03, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x06, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0xcc, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x80, 0x40, 0xcd, 0x41, 0x40, 0x0e, 0x1a, 0x0e, 0x00, 0x00, 0xe8, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, - 0x08, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, 0x00, 0xf8, 0x31, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xb7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x09, 0x00, 0x00, 0x26, 0x00, - 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x20, 0x00, 0x00, 0x00, - 0x40, 0x0a, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xa1, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x01, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x06, 0x00, 0xf8, 0x27, 0x00, - 0x00, 0x04, 0x00, 0xa0, 0x20, 0x00, 0x89, 0x01, 0x40, 0x0a, 0x00, 0x00, - 0x00, 0x00, 0x68, 0x00, 0x00, 0xe0, 0x01, 0xa0, 0x02, 0x00, 0x00, 0xc0, - 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x11, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x80, 0x00, 0x00, 0x0e, 0x1e, 0x1d, 0x02, 0x00, 0x40, 0x31, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, - 0x00, 0x40, 0xf9, 0x3f, 0x00, 0x82, 0x01, 0xa0, 0x08, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x48, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x60, - 0x80, 0x00, 0xcd, 0x41, 0x40, 0x0e, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x03, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x40, 0x8d, 0x03, - 0x40, 0x04, 0x1a, 0x0e, 0x00, 0x10, 0x78, 0x01, 0x00, 0x82, 0x01, 0xa0, - 0x00, 0x02, 0x00, 0x80, 0x40, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x20, 0x50, 0x00, 0x04, 0x00, 0x00, - 0x40, 0x14, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0xa0, 0x18, 0x00, 0xfc, 0x1f, 0xbc, 0xbe, 0x00, 0x9c, + 0x99, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x3c, 0x06, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, + 0x00, 0x20, 0x00, 0x00, 0x40, 0x1a, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xf9, 0x1f, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xe7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x3c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x0e, 0x00, 0x00, 0x26, 0x00, - 0xe0, 0x04, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1c, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x40, 0x04, 0x00, 0x00, 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x04, 0x00, 0x00, 0x3c, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0xc0, 0x41, 0x02, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x8c, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, - 0x0e, 0x5e, 0x20, 0x02, 0x00, 0x40, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x40, 0xf9, 0x3f, - 0x00, 0x82, 0x01, 0xa0, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, - 0x10, 0xd0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8d, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x80, 0x40, 0xcd, 0x41, 0x40, 0x0e, 0x1a, 0x0e, 0x00, 0x00, 0xe8, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, - 0x08, 0x00, 0x00, 0x00, 0x3c, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xc0, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, - 0x08, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, 0x00, 0x28, 0x30, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, 0x40, 0x1a, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x4c, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xb7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x04, 0x00, 0x00, 0x26, 0x00, - 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x06, 0x00, 0x00, 0x00, 0x20, 0x01, 0x60, 0x21, 0x22, 0x00, 0x8c, 0x03, - 0x40, 0x0a, 0x1f, 0x01, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x0a, 0x20, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x41, 0xf8, 0x3f, - 0xb8, 0xc3, 0x00, 0x81, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x80, - 0x41, 0x04, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x14, 0xe0, 0x11, 0x20, 0xa0, - 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xa2, 0x0b, 0x00, 0x80, 0x26, 0x00, - 0x20, 0x04, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, - 0x00, 0x40, 0xf9, 0x3f, 0x00, 0x82, 0x01, 0xa0, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x4a, 0x05, 0x00, 0xf8, 0x27, 0x00, 0x00, 0x04, 0x00, 0xa0, - 0x08, 0xa2, 0x21, 0xe4, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xd8, 0x03, - 0xfd, 0x00, 0x00, 0x87, 0x04, 0x00, 0x20, 0x00, 0x44, 0x08, 0x01, 0x1c, - 0x43, 0x61, 0x18, 0x82, 0x48, 0x10, 0x8a, 0x80, 0x80, 0x04, 0xcd, 0x41, - 0x40, 0x2e, 0x46, 0x0a, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x00, 0x40, 0x8d, 0x03, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xd0, 0x42, 0x01, 0xc0, 0x81, 0x01, 0xa0, 0x08, 0x00, 0x00, 0x00, - 0x3c, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x02, + 0x00, 0x0f, 0x03, 0x04, 0x00, 0x00, 0xa0, 0x00, 0xb8, 0xc3, 0x00, 0x81, + 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, 0x0e, 0xbe, 0x20, 0x02, + 0x00, 0xc0, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, + 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x40, 0xf9, 0x3f, 0x00, 0x82, 0x01, 0xa0, + 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0xd0, 0x0f, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8d, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x80, 0x40, 0xcd, 0x41, + 0x40, 0x0e, 0x1a, 0x0e, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x08, 0x00, 0x00, 0x00, - 0x40, 0x06, 0x00, 0x00, 0x00, 0xe8, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x40, 0x06, 0x00, 0x00, 0x00, 0xf8, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x00, - 0x00, 0x00, 0x9a, 0x0c, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, - 0x00, 0x00, 0x0c, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, - 0x00, 0x00, 0x20, 0x50, 0x00, 0x20, 0x00, 0x00, 0x40, 0x1a, 0x00, 0x00, - 0x00, 0xe8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, - 0x40, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x9a, 0x09, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, + 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, + 0x00, 0x00, 0x20, 0x50, 0x20, 0x00, 0x00, 0x00, 0x40, 0x0a, 0x00, 0x00, + 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa1, 0x01, 0x7c, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x01, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x40, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x4a, 0x06, 0x00, 0xf8, 0x27, 0x00, 0x00, 0x04, 0x00, 0xa0, + 0x20, 0x00, 0x89, 0x01, 0x40, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, + 0x00, 0xe0, 0x01, 0xa0, 0x02, 0x00, 0x00, 0xc0, 0x41, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x8c, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, + 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, + 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, + 0x0e, 0x1e, 0x1d, 0x02, 0x00, 0x40, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x40, 0xf9, 0x3f, + 0x00, 0x82, 0x01, 0xa0, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x48, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x60, 0x80, 0x00, 0xcd, 0x41, + 0x40, 0x0e, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, + 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x12, 0x7c, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x40, 0x8d, 0x03, 0x40, 0x04, 0x1a, 0x0e, + 0x00, 0x10, 0x78, 0x01, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x02, 0x00, 0x80, + 0x40, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, + 0x00, 0x00, 0x20, 0x50, 0x00, 0x04, 0x00, 0x00, 0x40, 0x14, 0x00, 0x00, + 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x12, 0x7c, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x3c, 0x04, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x40, 0x00, 0x00, + 0x00, 0x00, 0x9a, 0x0e, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, + 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x12, 0x7c, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, + 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x04, 0x00, 0x00, + 0x3c, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0xc0, 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, 0x0e, 0xbe, 0x20, 0x02, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, 0x0e, 0x5e, 0x20, 0x02, 0x00, 0x40, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, - 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x80, 0xf9, 0x3f, 0x00, 0x82, 0x01, 0xa0, - 0x00, 0x00, 0x0d, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x80, 0x00, 0xcd, 0x41, 0x40, 0x0e, 0x00, 0x00, - 0x00, 0x00, 0x68, 0x02, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xcf, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x00, 0x01, 0x8d, 0x83, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x09, - 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x20, 0x50, - 0x20, 0x00, 0x00, 0x00, 0x40, 0x0a, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, - 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x03, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0xe8, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x60, 0x00, 0x04, 0x00, 0x80, 0x40, 0x14, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x0a, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x20, 0x50, - 0x20, 0x00, 0x00, 0x00, 0x40, 0x0a, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x29, 0x13, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x30, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x0e, - 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x1c, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x00, 0x10, 0x30, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x20, 0x00, 0x00, 0x00, 0x3c, 0x0a, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x8c, 0xc3, - 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x00, 0x0c, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x68, 0x02, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x11, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x80, 0x00, 0x00, 0x0e, 0x1e, 0x1d, 0x02, 0x00, 0x80, 0x31, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, - 0x00, 0x00, 0xea, 0x3f, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x8d, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x02, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x00, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x03, 0xe0, 0x0e, 0x07, 0x04, - 0x1f, 0x08, 0xa0, 0x00, 0xc0, 0xc3, 0x01, 0x81, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xa1, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x8e, 0x80, 0x02, - 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x04, - 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x40, 0x01, 0x8e, 0x80, 0x02, 0x00, 0x00, 0x00, 0x60, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x05, 0x00, 0x00, 0x30, 0x00, - 0x40, 0x04, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x4d, 0x41, - 0x41, 0x06, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x01, 0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x02, 0x00, 0x00, 0x30, 0x12, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x20, 0x50, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x04, 0x00, 0x00, 0x40, 0x14, 0x00, 0x00, - 0x00, 0x08, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, + 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x40, 0xf9, 0x3f, 0x00, 0x82, 0x01, 0xa0, + 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0xd0, 0x0f, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8d, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x80, 0x40, 0xcd, 0x41, + 0x40, 0x0e, 0x1a, 0x0e, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x00, 0x04, 0x07, 0x00, 0x00, - 0x00, 0xb8, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0xc8, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0xe0, 0x01, 0xa0, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x08, 0x00, 0x00, 0x00, + 0x3c, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x08, 0x00, 0x00, 0x00, - 0x40, 0x06, 0x00, 0x00, 0x00, 0x18, 0x22, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x40, 0x06, 0x00, 0x00, 0x00, 0x28, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x08, 0x00, 0x00, - 0x30, 0x02, 0x9a, 0x0b, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, - 0x00, 0x00, 0x1b, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, - 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, - 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x13, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x00, - 0x00, 0x19, 0x00, 0x00, 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x01, 0x00, - 0xa0, 0x01, 0x00, 0xa0, 0x00, 0x00, 0xc4, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x68, 0x00, 0x00, 0xe0, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x9a, 0x04, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x20, 0x01, 0x60, 0x21, 0x22, 0x00, 0x8c, 0x03, 0x40, 0x0a, 0x1f, 0x01, + 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x0a, 0x20, 0xa8, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x43, 0x41, 0xf8, 0x3f, 0xb8, 0xc3, 0x00, 0x81, + 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x80, 0x41, 0x04, 0x00, 0x00, + 0x00, 0xc0, 0x01, 0x14, 0xe0, 0x11, 0x20, 0xa0, 0x00, 0x08, 0x00, 0x00, + 0x00, 0x00, 0xa2, 0x0b, 0x00, 0x80, 0x26, 0x00, 0x20, 0x04, 0x00, 0xa0, + 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x40, 0xf9, 0x3f, + 0x00, 0x82, 0x01, 0xa0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x05, + 0x00, 0xf8, 0x27, 0x00, 0x00, 0x04, 0x00, 0xa0, 0x08, 0xa2, 0x21, 0xe4, + 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xd8, 0x03, 0xfd, 0x00, 0x00, 0x87, + 0x04, 0x00, 0x20, 0x00, 0x44, 0x08, 0x01, 0x1c, 0x43, 0x61, 0x18, 0x82, + 0x48, 0x10, 0x8a, 0x80, 0x80, 0x04, 0xcd, 0x41, 0x40, 0x2e, 0x46, 0x0a, + 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, + 0x00, 0x40, 0x8d, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x42, 0x01, + 0xc0, 0x81, 0x01, 0xa0, 0x08, 0x00, 0x00, 0x00, 0x3c, 0x06, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x10, 0x21, 0x04, - 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, - 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x08, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, + 0x00, 0xe8, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x08, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, 0x00, 0xf8, 0x23, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x21, 0x04, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x09, - 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x20, 0x50, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x0c, + 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x0c, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x20, 0x50, + 0x00, 0x20, 0x00, 0x00, 0x40, 0x1a, 0x00, 0x00, 0x00, 0xe8, 0x33, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, 0x40, 0x1a, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0xc0, + 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, + 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x11, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, + 0x04, 0x80, 0x00, 0x00, 0x0e, 0xbe, 0x20, 0x02, 0x00, 0x40, 0x31, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, + 0x00, 0x80, 0xf9, 0x3f, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x0d, 0x02, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, + 0x80, 0x00, 0xcd, 0x41, 0x40, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x68, 0x02, + 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xd3, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x01, 0x8d, 0x83, + 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x09, 0x00, 0x00, 0x26, 0x00, + 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x20, 0x50, 0x20, 0x00, 0x00, 0x00, + 0x40, 0x0a, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x04, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x00, 0x10, 0x30, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x48, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x04, 0x00, 0x80, 0x40, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x0a, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x20, 0x50, 0x20, 0x00, 0x00, 0x00, + 0x40, 0x0a, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x20, 0x01, 0x00, 0x00, 0x00, 0x10, 0x20, 0x05, - 0x00, 0x08, 0x30, 0x00, 0xe0, 0x07, 0x00, 0xa1, 0x00, 0x01, 0x00, 0x00, - 0x30, 0x11, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x02, 0x00, 0xa0, - 0x00, 0x00, 0x58, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xeb, - 0x1f, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0xcc, 0x02, + 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x31, 0x13, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, + 0x30, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x0e, 0x00, 0x00, 0x26, 0x00, + 0xe0, 0x04, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x1c, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, + 0x40, 0x04, 0x00, 0x00, 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x20, 0x00, 0x00, 0x00, 0x3c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x8c, 0xc3, 0x41, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x0c, 0x02, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, + 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x02, + 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, + 0x0e, 0x1e, 0x1d, 0x02, 0x00, 0x80, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x00, 0xea, 0x3f, + 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x8d, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x68, 0x02, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x80, 0x00, 0x00, 0x00, 0x40, 0x0e, 0x00, 0x00, 0x00, 0xf8, 0x27, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x40, 0x10, 0x00, 0x00, - 0x26, 0x19, 0x87, 0x06, 0x00, 0x10, 0x34, 0x00, 0x60, 0x07, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0x03, 0xe0, 0x0e, 0x07, 0x04, 0x1f, 0x08, 0xa0, 0x00, + 0xc0, 0xc3, 0x01, 0x81, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xa1, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x40, 0x01, 0x8e, 0x80, 0x02, 0x00, 0x00, 0x00, 0x60, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x04, 0x00, 0x00, 0x26, 0x00, + 0xe0, 0x04, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, + 0x01, 0x8e, 0x80, 0x02, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x44, 0x05, 0x00, 0x00, 0x30, 0x00, 0x40, 0x04, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x80, 0x89, 0x06, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x01, 0x00, 0x00, - 0x00, 0x11, 0x00, 0x00, 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0xa0, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x4d, 0x41, 0x41, 0x06, 0x00, 0x00, + 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x01, 0x00, 0x00, + 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x02, 0x00, 0x00, 0x30, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x04, 0x00, 0x00, 0x40, 0x14, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, + 0x08, 0x00, 0x00, 0x00, 0x04, 0x07, 0x00, 0x00, 0x00, 0xb8, 0x30, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0xe0, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x10, 0x21, 0x04, - 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, - 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x08, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, + 0x00, 0x18, 0x22, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x08, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, 0x00, 0xe8, 0x23, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x21, 0x04, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x0d, - 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x0d, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x20, 0x50, + 0x00, 0x00, 0x00, 0xa0, 0x02, 0x08, 0x00, 0x00, 0x30, 0x02, 0x9a, 0x0b, + 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x1b, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x8e, 0x80, 0x02, + 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc7, 0x13, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x00, 0x02, 0x00, 0x00, 0x40, 0x12, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xa1, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x8e, 0x80, 0x02, - 0x00, 0x00, 0x00, 0x60, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x0a, - 0x00, 0x00, 0x30, 0x00, 0x40, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x0a, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x20, 0x50, + 0x00, 0x00, 0x00, 0x00, 0x98, 0x13, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x8e, 0x80, 0x02, - 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc7, 0x13, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x00, 0x02, 0x00, 0x00, 0x40, 0x12, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x8e, 0x80, 0x02, - 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc7, 0x13, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x00, 0x02, 0x00, 0x00, 0x40, 0x12, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, + 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x01, 0x00, 0xa0, 0x01, 0x00, 0xa0, + 0x00, 0x00, 0xc4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, + 0x00, 0xe0, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x21, 0x04, + 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x00, + 0x40, 0x06, 0x00, 0x00, 0x00, 0xf8, 0x23, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xb7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x09, 0x00, 0x00, 0x26, 0x00, + 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x20, 0x01, 0x00, 0x00, 0x00, 0x10, 0x20, 0x05, 0x00, 0x08, 0x30, 0x00, + 0xe0, 0x07, 0x00, 0xa1, 0x00, 0x01, 0x00, 0x00, 0x30, 0x11, 0x00, 0x00, + 0x00, 0x00, 0x26, 0x00, 0xe0, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x58, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xeb, 0x1f, 0x00, 0x20, 0x50, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0xcc, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x80, 0x00, 0x00, 0x00, + 0x40, 0x0e, 0x00, 0x00, 0x00, 0xf8, 0x27, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x10, 0x21, 0x04, + 0x00, 0x00, 0x00, 0x60, 0x40, 0x10, 0x00, 0x00, 0x26, 0x19, 0x87, 0x06, + 0x00, 0x10, 0x34, 0x00, 0x60, 0x07, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x8e, 0x80, 0x02, - 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc7, 0x13, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x00, 0x02, 0x00, 0x00, 0x40, 0x12, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x02, 0x00, 0x00, 0x40, 0x12, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x4c, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x03, 0x00, 0x80, 0x01, 0xa0, + 0x08, 0x00, 0x00, 0x80, 0x89, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x01, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, + 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x40, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0xc0, 0x01, 0x00, 0xa0, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Oct 6 18:56:07 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF998BEC1C0; Thu, 6 Oct 2016 18:56:07 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CBD184C; Thu, 6 Oct 2016 18:56:07 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96Iu6qb022442; Thu, 6 Oct 2016 18:56:06 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96Iu6QD022440; Thu, 6 Oct 2016 18:56:06 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201610061856.u96Iu6QD022440@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Thu, 6 Oct 2016 18:56:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306779 - stable/10/sys/dev/qlxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 18:56:07 -0000 Author: davidcs Date: Thu Oct 6 18:56:06 2016 New Revision: 306779 URL: https://svnweb.freebsd.org/changeset/base/306779 Log: MFC r306522 Upgrade Firmware/Bootloader/ResetSeq/Minidump to revision 5.4.62 Modified: stable/10/sys/dev/qlxgbe/ql_boot.c stable/10/sys/dev/qlxgbe/ql_fw.c stable/10/sys/dev/qlxgbe/ql_minidump.c stable/10/sys/dev/qlxgbe/ql_reset.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/qlxgbe/ql_boot.c ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_boot.c Thu Oct 6 18:52:09 2016 (r306778) +++ stable/10/sys/dev/qlxgbe/ql_boot.c Thu Oct 6 18:56:06 2016 (r306779) @@ -35,13 +35,13 @@ __FBSDID("$FreeBSD$"); unsigned int ql83xx_bootloader_version_major = 5; unsigned int ql83xx_bootloader_version_minor = 4; -unsigned int ql83xx_bootloader_version_sub = 58; +unsigned int ql83xx_bootloader_version_sub = 62; unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x04, 0x00, 0xc0, 0x81, 0x05, 0x1f, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x00, 0xc0, 0x83, 0x05, 0x1f, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1e, 0x02, 0x21, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, @@ -71,7 +71,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x83, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, + 0x8b, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -703,11 +703,11 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x80, 0x02, 0xe0, 0x0e, 0x07, 0x84, 0x0b, 0x08, 0x60, 0x00, 0xa0, 0xc3, 0x01, 0x81, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x4f, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x0c, 0x00, 0x0d, 0x01, + 0x57, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x0c, 0x00, 0x0d, 0x01, 0x40, 0x04, 0x1a, 0x03, 0x00, 0x10, 0x78, 0x02, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x4c, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, + 0x54, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0xc0, 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1384,7 +1384,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x81, 0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x14, 0xe0, 0x11, 0x20, 0xa2, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbb, 0x11, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x40, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x5c, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x64, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x02, 0x00, 0x80, 0x40, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0b, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, @@ -1421,14 +1421,14 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xce, 0x11, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x1f, 0x02, 0x16, 0x04, 0x00, 0x00, 0x00, 0x60, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x21, 0x7c, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x5c, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x49, 0x07, + 0x64, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x49, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa2, 0x07, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x80, 0x01, 0xa0, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x5c, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x64, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x40, 0x00, 0x00, 0x0c, 0x1c, 0x00, 0x00, 0x00, 0x40, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x5e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xfe, 0x1f, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, @@ -1535,7 +1535,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x20, 0x50, 0x00, 0x02, 0x00, 0x00, 0x00, 0x60, 0x52, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xb5, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x00, + 0xbd, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0xa0, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1589,7 +1589,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb5, 0x14, 0x7c, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbd, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x40, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0xa0, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, @@ -1624,7 +1624,7 @@ unsigned char ql83xx_bootloader[] = { 0x04, 0x00, 0x00, 0x00, 0x0e, 0x04, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x35, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x3d, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x4c, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x08, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x8d, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x4c, 0x01, @@ -1739,13 +1739,13 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x05, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x04, 0x00, 0x00, 0x40, 0x14, 0x00, 0x00, 0x00, 0xa8, 0x22, 0x00, 0x40, 0x02, 0x00, 0xa0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x07, 0x17, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x07, 0x17, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x0f, 0x17, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0f, 0x17, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x0d, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x00, 0x04, 0x07, 0x00, 0x00, 0x00, 0x20, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x08, 0x00, 0x00, 0x40, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x17, 0x7c, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x17, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x4b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x20, 0x50, 0x04, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x00, 0xe0, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, @@ -1803,8 +1803,8 @@ unsigned char ql83xx_bootloader[] = { 0x0e, 0x1e, 0x00, 0x00, 0x00, 0x80, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x80, 0x40, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xb5, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x35, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0xbd, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x3d, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0xf8, 0x0e, 0x00, 0xe0, 0x01, 0xa0, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x06, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x01, 0x00, @@ -1827,8 +1827,8 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x20, 0x50, 0x04, 0x01, 0x8d, 0x02, 0x32, 0x04, 0x1b, 0x08, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x5c, 0x19, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x5c, 0x19, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x64, 0x19, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x64, 0x19, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x0d, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x85, 0x01, 0x40, 0x06, 0x00, 0x00, 0x00, 0x78, 0x38, 0x04, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x84, 0x02, @@ -1988,7 +1988,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x29, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xa5, 0x03, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc0, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0xc8, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0x00, 0x18, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x80, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, @@ -2104,7 +2104,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x40, 0x00, 0x80, 0x40, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xcf, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0xd7, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xc1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, @@ -2119,7 +2119,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xd0, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, + 0xd8, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -2135,7 +2135,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x4d, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x0a, 0x00, 0x80, 0x01, 0xa0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xd2, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc1, 0x01, + 0xda, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x08, 0x05, 0x00, 0x40, 0x16, 0x00, 0x00, @@ -2196,7 +2196,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x6d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0xc1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x02, 0x00, 0xe0, 0x01, 0xa0, 0x00, 0x10, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0xd0, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x80, 0xd8, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, @@ -2209,7 +2209,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd4, 0x15, 0x7c, 0x00, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x4c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, @@ -2903,7 +2903,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xd6, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc1, 0x02, + 0xde, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc1, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x08, 0x05, 0x00, 0x40, 0x16, 0x00, 0x00, @@ -3097,7 +3097,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfa, 0x08, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x78, 0x00, 0x00, 0xe0, 0x01, 0xa0, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xd7, 0x15, 0x7c, 0x00, + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xdf, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x41, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x78, 0x00, 0x00, 0xe0, 0x01, 0xa0, @@ -3147,7 +3147,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xd9, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, + 0xe1, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -3264,7 +3264,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x2d, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x40, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xdb, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0xe3, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x81, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x08, 0x09, 0x00, @@ -3313,7 +3313,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x80, 0x01, 0xa0, 0x00, 0x0a, 0x0c, 0x03, 0x08, 0x92, 0x20, 0x0b, 0x00, 0x08, 0xf8, 0x08, 0x00, 0x82, 0x01, 0xa0, 0x80, 0x00, 0xcc, 0x02, 0x06, 0x0f, 0x00, 0x00, 0x00, 0x08, 0xf8, 0x09, 0x00, 0x82, 0x01, 0xa0, - 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbd, 0x15, 0x7c, 0x00, + 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc5, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x8c, 0x00, 0x42, 0x03, 0x00, 0x00, 0x00, 0x00, 0x6e, 0x0a, 0xe0, 0x82, 0x01, 0xa0, 0x0a, 0x94, 0xa0, 0x01, 0xa0, 0x7b, 0x10, 0x80, 0x01, 0x13, 0xe8, 0x00, 0xb0, 0x02, 0x40, 0x81, @@ -3329,7 +3329,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x7a, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x20, 0x50, 0x00, 0x01, 0x00, 0xc0, 0x41, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbd, 0x15, 0x7c, 0x00, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc5, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x40, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x01, 0x00, 0xc0, 0x01, 0x00, 0xa0, @@ -3361,18 +3361,18 @@ unsigned char ql83xx_bootloader[] = { 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xdd, 0x15, 0x7c, 0x00, + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe5, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x41, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x08, 0x09, 0x00, 0x40, 0x16, 0x00, 0x00, 0x00, 0xd8, 0x78, 0x00, 0x00, 0xe2, 0x01, 0xa0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xdf, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x01, 0x01, + 0xe7, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9b, 0x0a, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x78, 0x00, 0x00, 0xe0, 0x01, 0xa0, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0xdf, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x80, 0xe7, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x4c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xc1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, @@ -3683,7 +3683,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xe1, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x0c, 0x03, + 0xe9, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xc1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -3707,7 +3707,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xe3, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x81, 0x01, + 0xeb, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x81, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x08, 0x09, 0x00, 0x40, 0x16, 0x00, 0x00, @@ -3888,7 +3888,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xe5, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0xed, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x4c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x41, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, @@ -4067,7 +4067,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0xcd, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x0a, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xe7, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, + 0xef, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -4143,7 +4143,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xe8, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc1, 0x00, + 0xf0, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x08, 0x09, 0x00, 0x40, 0x16, 0x00, 0x00, @@ -4373,7 +4373,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xea, 0x15, 0x7c, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xf2, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, @@ -4448,7 +4448,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x6b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xec, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0xf4, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x08, 0x05, 0x00, @@ -5093,17 +5093,17 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0xcd, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x08, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x0b, 0x20, 0x80, 0x01, 0xa0, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xcd, 0x15, 0x7c, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xd5, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, - 0xd1, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00, 0x0d, 0x01, + 0xd9, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00, 0x0d, 0x01, 0x40, 0x0a, 0x00, 0x00, 0x00, 0x08, 0xf8, 0x08, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x5d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x08, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xfb, 0x0b, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x15, 0x7c, 0x00, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xfa, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x08, + 0x02, 0x16, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x08, 0x20, 0x0f, 0x07, 0x04, 0x00, 0x00, 0x00, 0x02, 0x88, 0xc3, 0x01, 0x81, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -5773,7 +5773,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x15, 0x7c, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x16, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, @@ -5800,7 +5800,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x5a, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0e, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0xff, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x80, 0x07, 0x16, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x01, 0x00, @@ -5840,7 +5840,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x38, 0x00, 0x00, 0xe0, 0x01, 0xa0, 0x00, 0x02, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x01, 0x16, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x80, 0x09, 0x16, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x45, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x01, 0x00, @@ -6426,1136 +6426,1146 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, 0x0e, 0x1e, 0x00, 0x00, 0x10, 0x41, 0x22, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0xc0, 0xf9, 0x3f, - 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x0d, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x68, 0x02, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x8d, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x01, 0xcd, 0x01, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x02, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xa1, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x21, 0x04, - 0x00, 0x00, 0x00, 0x60, 0x20, 0x02, 0x00, 0x00, 0x40, 0x0a, 0x4a, 0x09, - 0x00, 0x08, 0x30, 0x00, 0x20, 0x06, 0x00, 0xa0, 0x00, 0x00, 0x59, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x20, 0x50, + 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0xcd, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xe8, 0x02, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x0d, 0x02, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x02, 0x00, 0x80, 0x01, 0xa0, + 0x00, 0x00, 0x80, 0x01, 0xc0, 0x0f, 0x07, 0x04, 0x0e, 0x00, 0x04, 0x00, + 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0d, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, - 0x47, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x08, 0x00, 0x00, - 0x30, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x00, 0x6b, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x00, 0x00, 0x20, 0x50, 0x00, 0x10, 0x00, 0x00, 0x40, 0x18, 0x00, 0x00, - 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, - 0x00, 0x1a, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xfa, - 0x1f, 0x00, 0x20, 0x50, 0x00, 0x01, 0x00, 0x00, 0x3a, 0x11, 0x00, 0x00, - 0x00, 0x00, 0x26, 0x00, 0xe0, 0x02, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x00, - 0x40, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x03, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x8c, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x0f, 0x03, 0x04, 0x00, 0x00, 0xa0, 0x00, - 0xb8, 0xc3, 0x00, 0x81, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, - 0x0e, 0x9e, 0x20, 0x02, 0x00, 0xc0, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0xc0, 0xf9, 0x3f, - 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x0d, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x68, 0x02, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x8d, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x01, 0xcd, 0x01, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x02, + 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xa1, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, + 0x20, 0x02, 0x00, 0x00, 0x40, 0x0a, 0x4a, 0x09, 0x00, 0x08, 0x30, 0x00, + 0x20, 0x06, 0x00, 0xa0, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x06, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0xcc, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x18, 0x00, 0xfc, 0x1f, 0xbc, 0xbe, 0x00, 0x9c, 0x99, 0x45, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x3c, 0x06, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x20, 0x00, 0x00, + 0x40, 0x1a, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0xf9, 0x1f, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x20, 0x00, 0x00, 0x40, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x68, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, + 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0f, 0x03, 0x04, + 0x00, 0x00, 0xa0, 0x00, 0xb8, 0xc3, 0x00, 0x81, 0x00, 0x00, 0x11, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, + 0x04, 0x80, 0x00, 0x00, 0x0e, 0xbe, 0x20, 0x02, 0x00, 0xc0, 0x31, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, + 0x00, 0xc0, 0xf9, 0x3f, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0xcd, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x02, 0x00, 0x80, 0x01, 0xa0, + 0x00, 0x00, 0x0d, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x02, + 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x80, 0x01, 0xc0, 0x0f, 0x07, 0x04, + 0x0e, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x00, 0x0d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa1, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x20, 0x02, 0x00, 0x00, 0x40, 0x0a, 0x4a, 0x09, 0x00, 0x08, 0x30, 0x00, 0x40, 0x06, 0x00, 0xa0, 0x00, 0x00, 0x59, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x20, 0x50, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, - 0x47, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x08, 0x00, 0x00, - 0x30, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x00, 0x6b, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x00, 0x00, 0x20, 0x50, 0x00, 0x10, 0x00, 0x00, 0x40, 0x18, 0x00, 0x00, - 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, - 0x00, 0x1a, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xfa, - 0x1f, 0x00, 0x20, 0x50, 0x00, 0x01, 0x00, 0x00, 0x3a, 0x11, 0x00, 0x00, - 0x00, 0x00, 0x26, 0x00, 0xe0, 0x02, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x00, - 0x40, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x03, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x8c, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x0f, 0x03, 0x04, 0x00, 0x00, 0xa0, 0x00, - 0xb8, 0xc3, 0x00, 0x81, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, - 0x0e, 0x9e, 0x20, 0x02, 0x00, 0xc0, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x40, 0xf9, 0x3f, - 0x00, 0x82, 0x01, 0xa0, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, - 0x00, 0xd0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8d, 0x03, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x06, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0xcc, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x80, 0x40, 0xcd, 0x41, 0x40, 0x0e, 0x1a, 0x0e, 0x00, 0x00, 0xe8, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, - 0x08, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, 0x00, 0xf8, 0x31, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xb7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x09, 0x00, 0x00, 0x26, 0x00, - 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x20, 0x00, 0x00, 0x00, - 0x40, 0x0a, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xa1, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x01, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x06, 0x00, 0xf8, 0x27, 0x00, - 0x00, 0x04, 0x00, 0xa0, 0x20, 0x00, 0x89, 0x01, 0x40, 0x0a, 0x00, 0x00, - 0x00, 0x00, 0x68, 0x00, 0x00, 0xe0, 0x01, 0xa0, 0x02, 0x00, 0x00, 0xc0, - 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x11, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x80, 0x00, 0x00, 0x0e, 0x1e, 0x1d, 0x02, 0x00, 0x40, 0x31, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, - 0x00, 0x40, 0xf9, 0x3f, 0x00, 0x82, 0x01, 0xa0, 0x08, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x48, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x60, - 0x80, 0x00, 0xcd, 0x41, 0x40, 0x0e, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x03, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x40, 0x8d, 0x03, - 0x40, 0x04, 0x1a, 0x0e, 0x00, 0x10, 0x78, 0x01, 0x00, 0x82, 0x01, 0xa0, - 0x00, 0x02, 0x00, 0x80, 0x40, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x20, 0x50, 0x00, 0x04, 0x00, 0x00, - 0x40, 0x14, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0xa0, 0x18, 0x00, 0xfc, 0x1f, 0xbc, 0xbe, 0x00, 0x9c, + 0x99, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x3c, 0x06, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, + 0x00, 0x20, 0x00, 0x00, 0x40, 0x1a, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xf9, 0x1f, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xe7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x3c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x0e, 0x00, 0x00, 0x26, 0x00, - 0xe0, 0x04, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1c, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x40, 0x04, 0x00, 0x00, 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x04, 0x00, 0x00, 0x3c, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0xc0, 0x41, 0x02, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x8c, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, - 0x0e, 0x5e, 0x20, 0x02, 0x00, 0x40, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x40, 0xf9, 0x3f, - 0x00, 0x82, 0x01, 0xa0, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, - 0x10, 0xd0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8d, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x80, 0x40, 0xcd, 0x41, 0x40, 0x0e, 0x1a, 0x0e, 0x00, 0x00, 0xe8, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, - 0x08, 0x00, 0x00, 0x00, 0x3c, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xc0, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, - 0x08, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, 0x00, 0x28, 0x30, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, 0x40, 0x1a, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x4c, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xb7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x04, 0x00, 0x00, 0x26, 0x00, - 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x06, 0x00, 0x00, 0x00, 0x20, 0x01, 0x60, 0x21, 0x22, 0x00, 0x8c, 0x03, - 0x40, 0x0a, 0x1f, 0x01, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x0a, 0x20, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x41, 0xf8, 0x3f, - 0xb8, 0xc3, 0x00, 0x81, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x80, - 0x41, 0x04, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x14, 0xe0, 0x11, 0x20, 0xa0, - 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xa2, 0x0b, 0x00, 0x80, 0x26, 0x00, - 0x20, 0x04, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, - 0x00, 0x40, 0xf9, 0x3f, 0x00, 0x82, 0x01, 0xa0, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x4a, 0x05, 0x00, 0xf8, 0x27, 0x00, 0x00, 0x04, 0x00, 0xa0, - 0x08, 0xa2, 0x21, 0xe4, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xd8, 0x03, - 0xfd, 0x00, 0x00, 0x87, 0x04, 0x00, 0x20, 0x00, 0x44, 0x08, 0x01, 0x1c, - 0x43, 0x61, 0x18, 0x82, 0x48, 0x10, 0x8a, 0x80, 0x80, 0x04, 0xcd, 0x41, - 0x40, 0x2e, 0x46, 0x0a, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x00, 0x40, 0x8d, 0x03, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xd0, 0x42, 0x01, 0xc0, 0x81, 0x01, 0xa0, 0x08, 0x00, 0x00, 0x00, - 0x3c, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x02, + 0x00, 0x0f, 0x03, 0x04, 0x00, 0x00, 0xa0, 0x00, 0xb8, 0xc3, 0x00, 0x81, + 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, 0x0e, 0xbe, 0x20, 0x02, + 0x00, 0xc0, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, + 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x40, 0xf9, 0x3f, 0x00, 0x82, 0x01, 0xa0, + 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0xd0, 0x0f, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8d, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x80, 0x40, 0xcd, 0x41, + 0x40, 0x0e, 0x1a, 0x0e, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x08, 0x00, 0x00, 0x00, - 0x40, 0x06, 0x00, 0x00, 0x00, 0xe8, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x40, 0x06, 0x00, 0x00, 0x00, 0xf8, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x00, - 0x00, 0x00, 0x9a, 0x0c, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, - 0x00, 0x00, 0x0c, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, - 0x00, 0x00, 0x20, 0x50, 0x00, 0x20, 0x00, 0x00, 0x40, 0x1a, 0x00, 0x00, - 0x00, 0xe8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, - 0x40, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x9a, 0x09, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, + 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, + 0x00, 0x00, 0x20, 0x50, 0x20, 0x00, 0x00, 0x00, 0x40, 0x0a, 0x00, 0x00, + 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa1, 0x01, 0x7c, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x01, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x40, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x4a, 0x06, 0x00, 0xf8, 0x27, 0x00, 0x00, 0x04, 0x00, 0xa0, + 0x20, 0x00, 0x89, 0x01, 0x40, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, + 0x00, 0xe0, 0x01, 0xa0, 0x02, 0x00, 0x00, 0xc0, 0x41, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x8c, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, + 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, + 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, + 0x0e, 0x1e, 0x1d, 0x02, 0x00, 0x40, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x40, 0xf9, 0x3f, + 0x00, 0x82, 0x01, 0xa0, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x48, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x60, 0x80, 0x00, 0xcd, 0x41, + 0x40, 0x0e, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, + 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x12, 0x7c, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x40, 0x8d, 0x03, 0x40, 0x04, 0x1a, 0x0e, + 0x00, 0x10, 0x78, 0x01, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x02, 0x00, 0x80, + 0x40, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, + 0x00, 0x00, 0x20, 0x50, 0x00, 0x04, 0x00, 0x00, 0x40, 0x14, 0x00, 0x00, + 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x12, 0x7c, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x3c, 0x04, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x40, 0x00, 0x00, + 0x00, 0x00, 0x9a, 0x0e, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, + 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x12, 0x7c, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, + 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x04, 0x00, 0x00, + 0x3c, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0xc0, 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, 0x0e, 0xbe, 0x20, 0x02, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, 0x0e, 0x5e, 0x20, 0x02, 0x00, 0x40, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, - 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x80, 0xf9, 0x3f, 0x00, 0x82, 0x01, 0xa0, - 0x00, 0x00, 0x0d, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x80, 0x00, 0xcd, 0x41, 0x40, 0x0e, 0x00, 0x00, - 0x00, 0x00, 0x68, 0x02, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xcf, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x00, 0x01, 0x8d, 0x83, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x09, - 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x20, 0x50, - 0x20, 0x00, 0x00, 0x00, 0x40, 0x0a, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, - 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x03, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0xe8, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x60, 0x00, 0x04, 0x00, 0x80, 0x40, 0x14, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x0a, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x20, 0x50, - 0x20, 0x00, 0x00, 0x00, 0x40, 0x0a, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x29, 0x13, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x30, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x0e, - 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x1c, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x00, 0x10, 0x30, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x20, 0x00, 0x00, 0x00, 0x3c, 0x0a, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x8c, 0xc3, - 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x00, 0x0c, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x68, 0x02, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x11, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x80, 0x00, 0x00, 0x0e, 0x1e, 0x1d, 0x02, 0x00, 0x80, 0x31, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, - 0x00, 0x00, 0xea, 0x3f, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x8d, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x02, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x00, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x03, 0xe0, 0x0e, 0x07, 0x04, - 0x1f, 0x08, 0xa0, 0x00, 0xc0, 0xc3, 0x01, 0x81, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xa1, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x8e, 0x80, 0x02, - 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x04, - 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x40, 0x01, 0x8e, 0x80, 0x02, 0x00, 0x00, 0x00, 0x60, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x05, 0x00, 0x00, 0x30, 0x00, - 0x40, 0x04, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x4d, 0x41, - 0x41, 0x06, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x01, 0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x02, 0x00, 0x00, 0x30, 0x12, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x20, 0x50, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x04, 0x00, 0x00, 0x40, 0x14, 0x00, 0x00, - 0x00, 0x08, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, + 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x40, 0xf9, 0x3f, 0x00, 0x82, 0x01, 0xa0, + 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0xd0, 0x0f, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8d, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x80, 0x40, 0xcd, 0x41, + 0x40, 0x0e, 0x1a, 0x0e, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x00, 0x04, 0x07, 0x00, 0x00, - 0x00, 0xb8, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0xc8, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0xe0, 0x01, 0xa0, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x08, 0x00, 0x00, 0x00, + 0x3c, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x08, 0x00, 0x00, 0x00, - 0x40, 0x06, 0x00, 0x00, 0x00, 0x18, 0x22, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x40, 0x06, 0x00, 0x00, 0x00, 0x28, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x08, 0x00, 0x00, - 0x30, 0x02, 0x9a, 0x0b, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, - 0x00, 0x00, 0x1b, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, - 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, - 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x13, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x00, - 0x00, 0x19, 0x00, 0x00, 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x01, 0x00, - 0xa0, 0x01, 0x00, 0xa0, 0x00, 0x00, 0xc4, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x68, 0x00, 0x00, 0xe0, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x9a, 0x04, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x20, 0x01, 0x60, 0x21, 0x22, 0x00, 0x8c, 0x03, 0x40, 0x0a, 0x1f, 0x01, + 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x0a, 0x20, 0xa8, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x43, 0x41, 0xf8, 0x3f, 0xb8, 0xc3, 0x00, 0x81, + 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x80, 0x41, 0x04, 0x00, 0x00, + 0x00, 0xc0, 0x01, 0x14, 0xe0, 0x11, 0x20, 0xa0, 0x00, 0x08, 0x00, 0x00, + 0x00, 0x00, 0xa2, 0x0b, 0x00, 0x80, 0x26, 0x00, 0x20, 0x04, 0x00, 0xa0, + 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x40, 0xf9, 0x3f, + 0x00, 0x82, 0x01, 0xa0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x05, + 0x00, 0xf8, 0x27, 0x00, 0x00, 0x04, 0x00, 0xa0, 0x08, 0xa2, 0x21, 0xe4, + 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xd8, 0x03, 0xfd, 0x00, 0x00, 0x87, + 0x04, 0x00, 0x20, 0x00, 0x44, 0x08, 0x01, 0x1c, 0x43, 0x61, 0x18, 0x82, + 0x48, 0x10, 0x8a, 0x80, 0x80, 0x04, 0xcd, 0x41, 0x40, 0x2e, 0x46, 0x0a, + 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, + 0x00, 0x40, 0x8d, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x42, 0x01, + 0xc0, 0x81, 0x01, 0xa0, 0x08, 0x00, 0x00, 0x00, 0x3c, 0x06, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x10, 0x21, 0x04, - 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, - 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x08, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, + 0x00, 0xe8, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x08, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, 0x00, 0xf8, 0x23, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x21, 0x04, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x09, - 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x20, 0x50, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x0c, + 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x0c, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x20, 0x50, + 0x00, 0x20, 0x00, 0x00, 0x40, 0x1a, 0x00, 0x00, 0x00, 0xe8, 0x33, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, 0x40, 0x1a, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0xc0, + 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, + 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x11, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, + 0x04, 0x80, 0x00, 0x00, 0x0e, 0xbe, 0x20, 0x02, 0x00, 0x40, 0x31, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, + 0x00, 0x80, 0xf9, 0x3f, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x0d, 0x02, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, + 0x80, 0x00, 0xcd, 0x41, 0x40, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x68, 0x02, + 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xd3, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x01, 0x8d, 0x83, + 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x09, 0x00, 0x00, 0x26, 0x00, + 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x20, 0x50, 0x20, 0x00, 0x00, 0x00, + 0x40, 0x0a, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x04, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x00, 0x10, 0x30, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x48, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x04, 0x00, 0x80, 0x40, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x0a, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x20, 0x50, 0x20, 0x00, 0x00, 0x00, + 0x40, 0x0a, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x20, 0x01, 0x00, 0x00, 0x00, 0x10, 0x20, 0x05, - 0x00, 0x08, 0x30, 0x00, 0xe0, 0x07, 0x00, 0xa1, 0x00, 0x01, 0x00, 0x00, - 0x30, 0x11, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x02, 0x00, 0xa0, - 0x00, 0x00, 0x58, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xeb, - 0x1f, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0xcc, 0x02, + 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x31, 0x13, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, + 0x30, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x0e, 0x00, 0x00, 0x26, 0x00, + 0xe0, 0x04, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x1c, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, + 0x40, 0x04, 0x00, 0x00, 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x20, 0x00, 0x00, 0x00, 0x3c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x8c, 0xc3, 0x41, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x0c, 0x02, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, + 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x02, + 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, + 0x0e, 0x1e, 0x1d, 0x02, 0x00, 0x80, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x00, 0xea, 0x3f, + 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x8d, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x68, 0x02, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x80, 0x00, 0x00, 0x00, 0x40, 0x0e, 0x00, 0x00, 0x00, 0xf8, 0x27, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x40, 0x10, 0x00, 0x00, - 0x26, 0x19, 0x87, 0x06, 0x00, 0x10, 0x34, 0x00, 0x60, 0x07, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0x03, 0xe0, 0x0e, 0x07, 0x04, 0x1f, 0x08, 0xa0, 0x00, + 0xc0, 0xc3, 0x01, 0x81, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xa1, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x40, 0x01, 0x8e, 0x80, 0x02, 0x00, 0x00, 0x00, 0x60, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x04, 0x00, 0x00, 0x26, 0x00, + 0xe0, 0x04, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, + 0x01, 0x8e, 0x80, 0x02, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x44, 0x05, 0x00, 0x00, 0x30, 0x00, 0x40, 0x04, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x80, 0x89, 0x06, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x01, 0x00, 0x00, - 0x00, 0x11, 0x00, 0x00, 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0xa0, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x4d, 0x41, 0x41, 0x06, 0x00, 0x00, + 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x01, 0x00, 0x00, + 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x02, 0x00, 0x00, 0x30, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x04, 0x00, 0x00, 0x40, 0x14, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, + 0x08, 0x00, 0x00, 0x00, 0x04, 0x07, 0x00, 0x00, 0x00, 0xb8, 0x30, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0xe0, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x10, 0x21, 0x04, - 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, - 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x08, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, + 0x00, 0x18, 0x22, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x08, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, 0x00, 0xe8, 0x23, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x21, 0x04, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x0d, - 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x0d, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x20, 0x50, + 0x00, 0x00, 0x00, 0xa0, 0x02, 0x08, 0x00, 0x00, 0x30, 0x02, 0x9a, 0x0b, + 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x1b, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x8e, 0x80, 0x02, + 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc7, 0x13, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x00, 0x02, 0x00, 0x00, 0x40, 0x12, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xa1, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x8e, 0x80, 0x02, - 0x00, 0x00, 0x00, 0x60, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x0a, - 0x00, 0x00, 0x30, 0x00, 0x40, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x0a, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x20, 0x50, + 0x00, 0x00, 0x00, 0x00, 0x98, 0x13, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x8e, 0x80, 0x02, - 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc7, 0x13, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x00, 0x02, 0x00, 0x00, 0x40, 0x12, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x8e, 0x80, 0x02, - 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc7, 0x13, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x00, 0x02, 0x00, 0x00, 0x40, 0x12, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, + 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x01, 0x00, 0xa0, 0x01, 0x00, 0xa0, + 0x00, 0x00, 0xc4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, + 0x00, 0xe0, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x21, 0x04, + 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x00, + 0x40, 0x06, 0x00, 0x00, 0x00, 0xf8, 0x23, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xb7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x09, 0x00, 0x00, 0x26, 0x00, + 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x20, 0x01, 0x00, 0x00, 0x00, 0x10, 0x20, 0x05, 0x00, 0x08, 0x30, 0x00, + 0xe0, 0x07, 0x00, 0xa1, 0x00, 0x01, 0x00, 0x00, 0x30, 0x11, 0x00, 0x00, + 0x00, 0x00, 0x26, 0x00, 0xe0, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x58, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xeb, 0x1f, 0x00, 0x20, 0x50, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0xcc, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x80, 0x00, 0x00, 0x00, + 0x40, 0x0e, 0x00, 0x00, 0x00, 0xf8, 0x27, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x10, 0x21, 0x04, + 0x00, 0x00, 0x00, 0x60, 0x40, 0x10, 0x00, 0x00, 0x26, 0x19, 0x87, 0x06, + 0x00, 0x10, 0x34, 0x00, 0x60, 0x07, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x8e, 0x80, 0x02, - 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc7, 0x13, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x00, 0x02, 0x00, 0x00, 0x40, 0x12, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x02, 0x00, 0x00, 0x40, 0x12, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x4c, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x03, 0x00, 0x80, 0x01, 0xa0, + 0x08, 0x00, 0x00, 0x80, 0x89, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x01, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, + 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x40, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0xc0, 0x01, 0x00, 0xa0, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Oct 6 19:06:11 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF4BCBEC501; Thu, 6 Oct 2016 19:06:11 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B4D14EA1; Thu, 6 Oct 2016 19:06:11 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96J6BTX026471; Thu, 6 Oct 2016 19:06:11 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96J6AT9026469; Thu, 6 Oct 2016 19:06:10 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201610061906.u96J6AT9026469@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Thu, 6 Oct 2016 19:06:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r306780 - stable/9/sys/dev/qlxgbe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 19:06:12 -0000 Author: davidcs Date: Thu Oct 6 19:06:10 2016 New Revision: 306780 URL: https://svnweb.freebsd.org/changeset/base/306780 Log: MFC r306522 Upgrade Firmware/Bootloader/ResetSeq/Minidump to revision 5.4.62 Modified: stable/9/sys/dev/qlxgbe/ql_boot.c stable/9/sys/dev/qlxgbe/ql_fw.c stable/9/sys/dev/qlxgbe/ql_minidump.c stable/9/sys/dev/qlxgbe/ql_reset.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/dev/qlxgbe/ql_boot.c ============================================================================== --- stable/9/sys/dev/qlxgbe/ql_boot.c Thu Oct 6 18:56:06 2016 (r306779) +++ stable/9/sys/dev/qlxgbe/ql_boot.c Thu Oct 6 19:06:10 2016 (r306780) @@ -35,13 +35,13 @@ __FBSDID("$FreeBSD$"); unsigned int ql83xx_bootloader_version_major = 5; unsigned int ql83xx_bootloader_version_minor = 4; -unsigned int ql83xx_bootloader_version_sub = 58; +unsigned int ql83xx_bootloader_version_sub = 62; unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x04, 0x00, 0xc0, 0x81, 0x05, 0x1f, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x00, 0xc0, 0x83, 0x05, 0x1f, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1e, 0x02, 0x21, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, @@ -71,7 +71,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x83, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, + 0x8b, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -703,11 +703,11 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x80, 0x02, 0xe0, 0x0e, 0x07, 0x84, 0x0b, 0x08, 0x60, 0x00, 0xa0, 0xc3, 0x01, 0x81, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x4f, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x0c, 0x00, 0x0d, 0x01, + 0x57, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x0c, 0x00, 0x0d, 0x01, 0x40, 0x04, 0x1a, 0x03, 0x00, 0x10, 0x78, 0x02, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x4c, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, + 0x54, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0xc0, 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1384,7 +1384,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x81, 0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x14, 0xe0, 0x11, 0x20, 0xa2, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbb, 0x11, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x40, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x5c, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x64, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x02, 0x00, 0x80, 0x40, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0b, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, @@ -1421,14 +1421,14 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xce, 0x11, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x1f, 0x02, 0x16, 0x04, 0x00, 0x00, 0x00, 0x60, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x21, 0x7c, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x5c, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x49, 0x07, + 0x64, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x49, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa2, 0x07, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x80, 0x01, 0xa0, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x5c, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x64, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x40, 0x00, 0x00, 0x0c, 0x1c, 0x00, 0x00, 0x00, 0x40, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x5e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xfe, 0x1f, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, @@ -1535,7 +1535,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x20, 0x50, 0x00, 0x02, 0x00, 0x00, 0x00, 0x60, 0x52, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xb5, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x00, + 0xbd, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0xa0, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1589,7 +1589,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb5, 0x14, 0x7c, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbd, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x40, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0xa0, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, @@ -1624,7 +1624,7 @@ unsigned char ql83xx_bootloader[] = { 0x04, 0x00, 0x00, 0x00, 0x0e, 0x04, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x35, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x3d, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x4c, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x08, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x8d, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x4c, 0x01, @@ -1739,13 +1739,13 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x05, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x04, 0x00, 0x00, 0x40, 0x14, 0x00, 0x00, 0x00, 0xa8, 0x22, 0x00, 0x40, 0x02, 0x00, 0xa0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x07, 0x17, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x07, 0x17, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x0f, 0x17, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0f, 0x17, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x0d, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x00, 0x04, 0x07, 0x00, 0x00, 0x00, 0x20, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x08, 0x00, 0x00, 0x40, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x17, 0x7c, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x17, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x4b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x20, 0x50, 0x04, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x00, 0xe0, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, @@ -1803,8 +1803,8 @@ unsigned char ql83xx_bootloader[] = { 0x0e, 0x1e, 0x00, 0x00, 0x00, 0x80, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x80, 0x40, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xb5, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x35, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0xbd, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x3d, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0xf8, 0x0e, 0x00, 0xe0, 0x01, 0xa0, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x06, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x01, 0x00, @@ -1827,8 +1827,8 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x20, 0x50, 0x04, 0x01, 0x8d, 0x02, 0x32, 0x04, 0x1b, 0x08, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x5c, 0x19, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x5c, 0x19, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x64, 0x19, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x64, 0x19, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x0d, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x85, 0x01, 0x40, 0x06, 0x00, 0x00, 0x00, 0x78, 0x38, 0x04, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x84, 0x02, @@ -1988,7 +1988,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x29, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xa5, 0x03, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc0, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0xc8, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0x00, 0x18, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x80, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, @@ -2104,7 +2104,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x40, 0x00, 0x80, 0x40, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xcf, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0xd7, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xc1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, @@ -2119,7 +2119,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xd0, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, + 0xd8, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -2135,7 +2135,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x4d, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x0a, 0x00, 0x80, 0x01, 0xa0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xd2, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc1, 0x01, + 0xda, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x08, 0x05, 0x00, 0x40, 0x16, 0x00, 0x00, @@ -2196,7 +2196,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x6d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0xc1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x02, 0x00, 0xe0, 0x01, 0xa0, 0x00, 0x10, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0xd0, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x80, 0xd8, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, @@ -2209,7 +2209,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd4, 0x15, 0x7c, 0x00, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x4c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, @@ -2903,7 +2903,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xd6, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc1, 0x02, + 0xde, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc1, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x08, 0x05, 0x00, 0x40, 0x16, 0x00, 0x00, @@ -3097,7 +3097,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfa, 0x08, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x78, 0x00, 0x00, 0xe0, 0x01, 0xa0, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xd7, 0x15, 0x7c, 0x00, + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xdf, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x41, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x78, 0x00, 0x00, 0xe0, 0x01, 0xa0, @@ -3147,7 +3147,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xd9, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, + 0xe1, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -3264,7 +3264,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x2d, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x40, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xdb, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0xe3, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x81, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x08, 0x09, 0x00, @@ -3313,7 +3313,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x80, 0x01, 0xa0, 0x00, 0x0a, 0x0c, 0x03, 0x08, 0x92, 0x20, 0x0b, 0x00, 0x08, 0xf8, 0x08, 0x00, 0x82, 0x01, 0xa0, 0x80, 0x00, 0xcc, 0x02, 0x06, 0x0f, 0x00, 0x00, 0x00, 0x08, 0xf8, 0x09, 0x00, 0x82, 0x01, 0xa0, - 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbd, 0x15, 0x7c, 0x00, + 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc5, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x8c, 0x00, 0x42, 0x03, 0x00, 0x00, 0x00, 0x00, 0x6e, 0x0a, 0xe0, 0x82, 0x01, 0xa0, 0x0a, 0x94, 0xa0, 0x01, 0xa0, 0x7b, 0x10, 0x80, 0x01, 0x13, 0xe8, 0x00, 0xb0, 0x02, 0x40, 0x81, @@ -3329,7 +3329,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x7a, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x20, 0x50, 0x00, 0x01, 0x00, 0xc0, 0x41, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbd, 0x15, 0x7c, 0x00, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc5, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x40, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x01, 0x00, 0xc0, 0x01, 0x00, 0xa0, @@ -3361,18 +3361,18 @@ unsigned char ql83xx_bootloader[] = { 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xdd, 0x15, 0x7c, 0x00, + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe5, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x41, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x08, 0x09, 0x00, 0x40, 0x16, 0x00, 0x00, 0x00, 0xd8, 0x78, 0x00, 0x00, 0xe2, 0x01, 0xa0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xdf, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x01, 0x01, + 0xe7, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9b, 0x0a, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x78, 0x00, 0x00, 0xe0, 0x01, 0xa0, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0xdf, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x80, 0xe7, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x4c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xc1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, @@ -3683,7 +3683,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xe1, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x0c, 0x03, + 0xe9, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xc1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -3707,7 +3707,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xe3, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x81, 0x01, + 0xeb, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x81, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x08, 0x09, 0x00, 0x40, 0x16, 0x00, 0x00, @@ -3888,7 +3888,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xe5, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0xed, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x4c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x41, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, @@ -4067,7 +4067,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0xcd, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x0a, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xe7, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, + 0xef, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -4143,7 +4143,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xe8, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc1, 0x00, + 0xf0, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x08, 0x09, 0x00, 0x40, 0x16, 0x00, 0x00, @@ -4373,7 +4373,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xea, 0x15, 0x7c, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xf2, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x09, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, @@ -4448,7 +4448,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x6b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xec, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0xf4, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x08, 0x05, 0x00, @@ -5093,17 +5093,17 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0xcd, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x08, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x0b, 0x20, 0x80, 0x01, 0xa0, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xcd, 0x15, 0x7c, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xd5, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, - 0xd1, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00, 0x0d, 0x01, + 0xd9, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00, 0x0d, 0x01, 0x40, 0x0a, 0x00, 0x00, 0x00, 0x08, 0xf8, 0x08, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x5d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x08, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xfb, 0x0b, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x15, 0x7c, 0x00, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xfa, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x08, + 0x02, 0x16, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x08, 0x20, 0x0f, 0x07, 0x04, 0x00, 0x00, 0x00, 0x02, 0x88, 0xc3, 0x01, 0x81, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -5773,7 +5773,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x15, 0x7c, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x16, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, @@ -5800,7 +5800,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x5a, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0e, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0xff, 0x15, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x80, 0x07, 0x16, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x01, 0x00, @@ -5840,7 +5840,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x38, 0x00, 0x00, 0xe0, 0x01, 0xa0, 0x00, 0x02, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x01, 0x16, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x80, 0x09, 0x16, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x45, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x01, 0x00, @@ -6426,1136 +6426,1146 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, 0x0e, 0x1e, 0x00, 0x00, 0x10, 0x41, 0x22, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0xc0, 0xf9, 0x3f, - 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x0d, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x68, 0x02, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x8d, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x01, 0xcd, 0x01, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x02, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xa1, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x21, 0x04, - 0x00, 0x00, 0x00, 0x60, 0x20, 0x02, 0x00, 0x00, 0x40, 0x0a, 0x4a, 0x09, - 0x00, 0x08, 0x30, 0x00, 0x20, 0x06, 0x00, 0xa0, 0x00, 0x00, 0x59, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x20, 0x50, + 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0xcd, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xe8, 0x02, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x0d, 0x02, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x02, 0x00, 0x80, 0x01, 0xa0, + 0x00, 0x00, 0x80, 0x01, 0xc0, 0x0f, 0x07, 0x04, 0x0e, 0x00, 0x04, 0x00, + 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0d, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, - 0x47, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x08, 0x00, 0x00, - 0x30, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x00, 0x6b, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x00, 0x00, 0x20, 0x50, 0x00, 0x10, 0x00, 0x00, 0x40, 0x18, 0x00, 0x00, - 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, - 0x00, 0x1a, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xfa, - 0x1f, 0x00, 0x20, 0x50, 0x00, 0x01, 0x00, 0x00, 0x3a, 0x11, 0x00, 0x00, - 0x00, 0x00, 0x26, 0x00, 0xe0, 0x02, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x00, - 0x40, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x03, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x8c, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x0f, 0x03, 0x04, 0x00, 0x00, 0xa0, 0x00, - 0xb8, 0xc3, 0x00, 0x81, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, - 0x0e, 0x9e, 0x20, 0x02, 0x00, 0xc0, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0xc0, 0xf9, 0x3f, - 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x0d, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x68, 0x02, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x8d, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x01, 0xcd, 0x01, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x02, + 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xa1, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, + 0x20, 0x02, 0x00, 0x00, 0x40, 0x0a, 0x4a, 0x09, 0x00, 0x08, 0x30, 0x00, + 0x20, 0x06, 0x00, 0xa0, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x06, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0xcc, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x18, 0x00, 0xfc, 0x1f, 0xbc, 0xbe, 0x00, 0x9c, 0x99, 0x45, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x3c, 0x06, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, 0x00, 0x20, 0x00, 0x00, + 0x40, 0x1a, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0xf9, 0x1f, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x20, 0x00, 0x00, 0x40, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x68, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, + 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0f, 0x03, 0x04, + 0x00, 0x00, 0xa0, 0x00, 0xb8, 0xc3, 0x00, 0x81, 0x00, 0x00, 0x11, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, + 0x04, 0x80, 0x00, 0x00, 0x0e, 0xbe, 0x20, 0x02, 0x00, 0xc0, 0x31, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, + 0x00, 0xc0, 0xf9, 0x3f, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0xcd, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x02, 0x00, 0x80, 0x01, 0xa0, + 0x00, 0x00, 0x0d, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x02, + 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x80, 0x01, 0xc0, 0x0f, 0x07, 0x04, + 0x0e, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x00, 0x0d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa1, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x20, 0x02, 0x00, 0x00, 0x40, 0x0a, 0x4a, 0x09, 0x00, 0x08, 0x30, 0x00, 0x40, 0x06, 0x00, 0xa0, 0x00, 0x00, 0x59, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x20, 0x50, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, - 0x47, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x08, 0x00, 0x00, - 0x30, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x00, 0x6b, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x00, 0x00, 0x20, 0x50, 0x00, 0x10, 0x00, 0x00, 0x40, 0x18, 0x00, 0x00, - 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, - 0x00, 0x1a, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xfa, - 0x1f, 0x00, 0x20, 0x50, 0x00, 0x01, 0x00, 0x00, 0x3a, 0x11, 0x00, 0x00, - 0x00, 0x00, 0x26, 0x00, 0xe0, 0x02, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x00, - 0x40, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x03, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x8c, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x0f, 0x03, 0x04, 0x00, 0x00, 0xa0, 0x00, - 0xb8, 0xc3, 0x00, 0x81, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, - 0x0e, 0x9e, 0x20, 0x02, 0x00, 0xc0, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x40, 0xf9, 0x3f, - 0x00, 0x82, 0x01, 0xa0, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, - 0x00, 0xd0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8d, 0x03, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x06, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0xcc, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x80, 0x40, 0xcd, 0x41, 0x40, 0x0e, 0x1a, 0x0e, 0x00, 0x00, 0xe8, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, - 0x08, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, 0x00, 0xf8, 0x31, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xb7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x09, 0x00, 0x00, 0x26, 0x00, - 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x20, 0x00, 0x00, 0x00, - 0x40, 0x0a, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xa1, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x01, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x06, 0x00, 0xf8, 0x27, 0x00, - 0x00, 0x04, 0x00, 0xa0, 0x20, 0x00, 0x89, 0x01, 0x40, 0x0a, 0x00, 0x00, - 0x00, 0x00, 0x68, 0x00, 0x00, 0xe0, 0x01, 0xa0, 0x02, 0x00, 0x00, 0xc0, - 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x11, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x80, 0x00, 0x00, 0x0e, 0x1e, 0x1d, 0x02, 0x00, 0x40, 0x31, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, - 0x00, 0x40, 0xf9, 0x3f, 0x00, 0x82, 0x01, 0xa0, 0x08, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x48, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x60, - 0x80, 0x00, 0xcd, 0x41, 0x40, 0x0e, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x03, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x40, 0x8d, 0x03, - 0x40, 0x04, 0x1a, 0x0e, 0x00, 0x10, 0x78, 0x01, 0x00, 0x82, 0x01, 0xa0, - 0x00, 0x02, 0x00, 0x80, 0x40, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x20, 0x50, 0x00, 0x04, 0x00, 0x00, - 0x40, 0x14, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0xa0, 0x18, 0x00, 0xfc, 0x1f, 0xbc, 0xbe, 0x00, 0x9c, + 0x99, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x3c, 0x06, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x50, + 0x00, 0x20, 0x00, 0x00, 0x40, 0x1a, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xf9, 0x1f, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xe7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x3c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x0e, 0x00, 0x00, 0x26, 0x00, - 0xe0, 0x04, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1c, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x40, 0x04, 0x00, 0x00, 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x04, 0x00, 0x00, 0x3c, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0xc0, 0x41, 0x02, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x8c, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, - 0x0e, 0x5e, 0x20, 0x02, 0x00, 0x40, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x40, 0xf9, 0x3f, - 0x00, 0x82, 0x01, 0xa0, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, - 0x10, 0xd0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8d, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x80, 0x40, 0xcd, 0x41, 0x40, 0x0e, 0x1a, 0x0e, 0x00, 0x00, 0xe8, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, - 0x08, 0x00, 0x00, 0x00, 0x3c, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xc0, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, - 0x08, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, 0x00, 0x28, 0x30, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, 0x40, 0x1a, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x4c, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x03, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xb7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x04, 0x00, 0x00, 0x26, 0x00, - 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x06, 0x00, 0x00, 0x00, 0x20, 0x01, 0x60, 0x21, 0x22, 0x00, 0x8c, 0x03, - 0x40, 0x0a, 0x1f, 0x01, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x0a, 0x20, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x41, 0xf8, 0x3f, - 0xb8, 0xc3, 0x00, 0x81, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x80, - 0x41, 0x04, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x14, 0xe0, 0x11, 0x20, 0xa0, - 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xa2, 0x0b, 0x00, 0x80, 0x26, 0x00, - 0x20, 0x04, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, - 0x00, 0x40, 0xf9, 0x3f, 0x00, 0x82, 0x01, 0xa0, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x4a, 0x05, 0x00, 0xf8, 0x27, 0x00, 0x00, 0x04, 0x00, 0xa0, - 0x08, 0xa2, 0x21, 0xe4, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xd8, 0x03, - 0xfd, 0x00, 0x00, 0x87, 0x04, 0x00, 0x20, 0x00, 0x44, 0x08, 0x01, 0x1c, - 0x43, 0x61, 0x18, 0x82, 0x48, 0x10, 0x8a, 0x80, 0x80, 0x04, 0xcd, 0x41, - 0x40, 0x2e, 0x46, 0x0a, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x00, 0x40, 0x8d, 0x03, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xd0, 0x42, 0x01, 0xc0, 0x81, 0x01, 0xa0, 0x08, 0x00, 0x00, 0x00, - 0x3c, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x02, + 0x00, 0x0f, 0x03, 0x04, 0x00, 0x00, 0xa0, 0x00, 0xb8, 0xc3, 0x00, 0x81, + 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, 0x0e, 0xbe, 0x20, 0x02, + 0x00, 0xc0, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, + 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x40, 0xf9, 0x3f, 0x00, 0x82, 0x01, 0xa0, + 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0xd0, 0x0f, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8d, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x80, 0x40, 0xcd, 0x41, + 0x40, 0x0e, 0x1a, 0x0e, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x08, 0x00, 0x00, 0x00, - 0x40, 0x06, 0x00, 0x00, 0x00, 0xe8, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x40, 0x06, 0x00, 0x00, 0x00, 0xf8, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x00, - 0x00, 0x00, 0x9a, 0x0c, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, - 0x00, 0x00, 0x0c, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, - 0x00, 0x00, 0x20, 0x50, 0x00, 0x20, 0x00, 0x00, 0x40, 0x1a, 0x00, 0x00, - 0x00, 0xe8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, - 0x40, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x9a, 0x09, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, + 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, + 0x00, 0x00, 0x20, 0x50, 0x20, 0x00, 0x00, 0x00, 0x40, 0x0a, 0x00, 0x00, + 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa1, 0x01, 0x7c, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x01, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x40, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x4a, 0x06, 0x00, 0xf8, 0x27, 0x00, 0x00, 0x04, 0x00, 0xa0, + 0x20, 0x00, 0x89, 0x01, 0x40, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, + 0x00, 0xe0, 0x01, 0xa0, 0x02, 0x00, 0x00, 0xc0, 0x41, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x8c, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, + 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, + 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, + 0x0e, 0x1e, 0x1d, 0x02, 0x00, 0x40, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x40, 0xf9, 0x3f, + 0x00, 0x82, 0x01, 0xa0, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x48, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x60, 0x80, 0x00, 0xcd, 0x41, + 0x40, 0x0e, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, + 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x12, 0x7c, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x40, 0x8d, 0x03, 0x40, 0x04, 0x1a, 0x0e, + 0x00, 0x10, 0x78, 0x01, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x02, 0x00, 0x80, + 0x40, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, + 0x00, 0x00, 0x20, 0x50, 0x00, 0x04, 0x00, 0x00, 0x40, 0x14, 0x00, 0x00, + 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x12, 0x7c, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x3c, 0x04, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x40, 0x00, 0x00, + 0x00, 0x00, 0x9a, 0x0e, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, + 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x12, 0x7c, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, + 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x04, 0x00, 0x00, + 0x3c, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0xc0, 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, 0x0e, 0xbe, 0x20, 0x02, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, 0x0e, 0x5e, 0x20, 0x02, 0x00, 0x40, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, - 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x80, 0xf9, 0x3f, 0x00, 0x82, 0x01, 0xa0, - 0x00, 0x00, 0x0d, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x80, 0x00, 0xcd, 0x41, 0x40, 0x0e, 0x00, 0x00, - 0x00, 0x00, 0x68, 0x02, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xcf, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x00, 0x01, 0x8d, 0x83, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x09, - 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x20, 0x50, - 0x20, 0x00, 0x00, 0x00, 0x40, 0x0a, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, - 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x03, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0xe8, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x60, 0x00, 0x04, 0x00, 0x80, 0x40, 0x14, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x0a, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x20, 0x50, - 0x20, 0x00, 0x00, 0x00, 0x40, 0x0a, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x29, 0x13, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x30, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x0e, - 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x1c, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x00, 0x10, 0x30, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x20, 0x00, 0x00, 0x00, 0x3c, 0x0a, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x8c, 0xc3, - 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x00, 0x0c, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x68, 0x02, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x11, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x80, 0x00, 0x00, 0x0e, 0x1e, 0x1d, 0x02, 0x00, 0x80, 0x31, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, - 0x00, 0x00, 0xea, 0x3f, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x8d, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x02, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x00, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, - 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x03, 0xe0, 0x0e, 0x07, 0x04, - 0x1f, 0x08, 0xa0, 0x00, 0xc0, 0xc3, 0x01, 0x81, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xa1, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x8e, 0x80, 0x02, - 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x04, - 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x40, 0x01, 0x8e, 0x80, 0x02, 0x00, 0x00, 0x00, 0x60, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x05, 0x00, 0x00, 0x30, 0x00, - 0x40, 0x04, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x4d, 0x41, - 0x41, 0x06, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x00, 0x01, 0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x02, 0x00, 0x00, 0x30, 0x12, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x20, 0x50, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x04, 0x00, 0x00, 0x40, 0x14, 0x00, 0x00, - 0x00, 0x08, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, + 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x40, 0xf9, 0x3f, 0x00, 0x82, 0x01, 0xa0, + 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0xd0, 0x0f, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x8d, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x80, 0x40, 0xcd, 0x41, + 0x40, 0x0e, 0x1a, 0x0e, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x00, 0x04, 0x07, 0x00, 0x00, - 0x00, 0xb8, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0xc8, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0xe0, 0x01, 0xa0, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x08, 0x00, 0x00, 0x00, + 0x3c, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x08, 0x00, 0x00, 0x00, - 0x40, 0x06, 0x00, 0x00, 0x00, 0x18, 0x22, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x40, 0x06, 0x00, 0x00, 0x00, 0x28, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x08, 0x00, 0x00, - 0x30, 0x02, 0x9a, 0x0b, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, - 0x00, 0x00, 0x1b, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, - 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, - 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x13, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x00, - 0x00, 0x19, 0x00, 0x00, 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x01, 0x00, - 0xa0, 0x01, 0x00, 0xa0, 0x00, 0x00, 0xc4, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x68, 0x00, 0x00, 0xe0, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x9a, 0x04, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x20, 0x01, 0x60, 0x21, 0x22, 0x00, 0x8c, 0x03, 0x40, 0x0a, 0x1f, 0x01, + 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x0a, 0x20, 0xa8, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x43, 0x41, 0xf8, 0x3f, 0xb8, 0xc3, 0x00, 0x81, + 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x80, 0x41, 0x04, 0x00, 0x00, + 0x00, 0xc0, 0x01, 0x14, 0xe0, 0x11, 0x20, 0xa0, 0x00, 0x08, 0x00, 0x00, + 0x00, 0x00, 0xa2, 0x0b, 0x00, 0x80, 0x26, 0x00, 0x20, 0x04, 0x00, 0xa0, + 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x40, 0xf9, 0x3f, + 0x00, 0x82, 0x01, 0xa0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x05, + 0x00, 0xf8, 0x27, 0x00, 0x00, 0x04, 0x00, 0xa0, 0x08, 0xa2, 0x21, 0xe4, + 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xd8, 0x03, 0xfd, 0x00, 0x00, 0x87, + 0x04, 0x00, 0x20, 0x00, 0x44, 0x08, 0x01, 0x1c, 0x43, 0x61, 0x18, 0x82, + 0x48, 0x10, 0x8a, 0x80, 0x80, 0x04, 0xcd, 0x41, 0x40, 0x2e, 0x46, 0x0a, + 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, + 0x00, 0x40, 0x8d, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x42, 0x01, + 0xc0, 0x81, 0x01, 0xa0, 0x08, 0x00, 0x00, 0x00, 0x3c, 0x06, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x10, 0x21, 0x04, - 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, - 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x08, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, + 0x00, 0xe8, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x08, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, 0x00, 0xf8, 0x23, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x21, 0x04, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x09, - 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x20, 0x50, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x0c, + 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x0c, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x20, 0x50, + 0x00, 0x20, 0x00, 0x00, 0x40, 0x1a, 0x00, 0x00, 0x00, 0xe8, 0x33, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, 0x40, 0x1a, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0xc0, + 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x00, 0x8c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, + 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x11, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, + 0x04, 0x80, 0x00, 0x00, 0x0e, 0xbe, 0x20, 0x02, 0x00, 0x40, 0x31, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, + 0x00, 0x80, 0xf9, 0x3f, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x0d, 0x02, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, + 0x80, 0x00, 0xcd, 0x41, 0x40, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x68, 0x02, + 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xd3, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x01, 0x8d, 0x83, + 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x09, 0x00, 0x00, 0x26, 0x00, + 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x20, 0x50, 0x20, 0x00, 0x00, 0x00, + 0x40, 0x0a, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x04, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x00, 0x10, 0x30, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x48, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x04, 0x00, 0x80, 0x40, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x0a, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x20, 0x50, 0x20, 0x00, 0x00, 0x00, + 0x40, 0x0a, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x20, 0x01, 0x00, 0x00, 0x00, 0x10, 0x20, 0x05, - 0x00, 0x08, 0x30, 0x00, 0xe0, 0x07, 0x00, 0xa1, 0x00, 0x01, 0x00, 0x00, - 0x30, 0x11, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x02, 0x00, 0xa0, - 0x00, 0x00, 0x58, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xeb, - 0x1f, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0xcc, 0x02, + 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x31, 0x13, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, + 0x30, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x0e, 0x00, 0x00, 0x26, 0x00, + 0xe0, 0x04, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x1c, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, + 0x40, 0x04, 0x00, 0x00, 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x20, 0x00, 0x00, 0x00, 0x3c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x8c, 0xc3, 0x41, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x0c, 0x02, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, + 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x02, + 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x80, 0x00, 0x00, + 0x0e, 0x1e, 0x1d, 0x02, 0x00, 0x80, 0x31, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x00, 0x80, 0x4d, 0x00, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x00, 0xea, 0x3f, + 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x8d, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x68, 0x02, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, - 0x80, 0x00, 0x00, 0x00, 0x40, 0x0e, 0x00, 0x00, 0x00, 0xf8, 0x27, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x40, 0x10, 0x00, 0x00, - 0x26, 0x19, 0x87, 0x06, 0x00, 0x10, 0x34, 0x00, 0x60, 0x07, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0x03, 0xe0, 0x0e, 0x07, 0x04, 0x1f, 0x08, 0xa0, 0x00, + 0xc0, 0xc3, 0x01, 0x81, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xa1, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x40, 0x01, 0x8e, 0x80, 0x02, 0x00, 0x00, 0x00, 0x60, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x04, 0x00, 0x00, 0x26, 0x00, + 0xe0, 0x04, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, + 0x01, 0x8e, 0x80, 0x02, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x44, 0x05, 0x00, 0x00, 0x30, 0x00, 0x40, 0x04, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x80, 0x89, 0x06, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x01, 0x00, 0x00, - 0x00, 0x11, 0x00, 0x00, 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, - 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, - 0xc0, 0x01, 0x00, 0xa0, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x4d, 0x41, 0x41, 0x06, 0x00, 0x00, + 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x01, 0x00, 0x00, + 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x02, 0x00, 0x00, 0x30, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x04, 0x00, 0x00, 0x40, 0x14, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, + 0x08, 0x00, 0x00, 0x00, 0x04, 0x07, 0x00, 0x00, 0x00, 0xb8, 0x30, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0xe0, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x10, 0x21, 0x04, - 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, - 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x08, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, + 0x00, 0x18, 0x22, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x08, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, 0x00, 0xe8, 0x23, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x21, 0x04, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x0d, - 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x0d, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x20, 0x50, + 0x00, 0x00, 0x00, 0xa0, 0x02, 0x08, 0x00, 0x00, 0x30, 0x02, 0x9a, 0x0b, + 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x1b, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x8e, 0x80, 0x02, + 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc7, 0x13, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x00, 0x02, 0x00, 0x00, 0x40, 0x12, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xa1, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x8e, 0x80, 0x02, - 0x00, 0x00, 0x00, 0x60, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x0a, - 0x00, 0x00, 0x30, 0x00, 0x40, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x0a, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x20, 0x50, + 0x00, 0x00, 0x00, 0x00, 0x98, 0x13, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x8e, 0x80, 0x02, - 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc7, 0x13, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x00, 0x02, 0x00, 0x00, 0x40, 0x12, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x8e, 0x80, 0x02, - 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc7, 0x13, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x00, 0x02, 0x00, 0x00, 0x40, 0x12, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xe8, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, + 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x20, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x01, 0x00, 0xa0, 0x01, 0x00, 0xa0, + 0x00, 0x00, 0xc4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, + 0x00, 0xe0, 0x01, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0x00, 0x10, 0x21, 0x04, 0x00, 0x00, 0x00, 0x60, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x21, 0x04, + 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x00, + 0x40, 0x06, 0x00, 0x00, 0x00, 0xf8, 0x23, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xb7, 0x12, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x09, 0x00, 0x00, 0x26, 0x00, + 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, + 0x20, 0x01, 0x00, 0x00, 0x00, 0x10, 0x20, 0x05, 0x00, 0x08, 0x30, 0x00, + 0xe0, 0x07, 0x00, 0xa1, 0x00, 0x01, 0x00, 0x00, 0x30, 0x11, 0x00, 0x00, + 0x00, 0x00, 0x26, 0x00, 0xe0, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x58, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xeb, 0x1f, 0x00, 0x20, 0x50, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0xcc, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x80, 0x00, 0x00, 0x00, + 0x40, 0x0e, 0x00, 0x00, 0x00, 0xf8, 0x27, 0x00, 0x00, 0x02, 0x00, 0xa0, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x10, 0x21, 0x04, + 0x00, 0x00, 0x00, 0x60, 0x40, 0x10, 0x00, 0x00, 0x26, 0x19, 0x87, 0x06, + 0x00, 0x10, 0x34, 0x00, 0x60, 0x07, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x8e, 0x80, 0x02, - 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xc7, 0x13, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x00, 0x02, 0x00, 0x00, 0x40, 0x12, 0x00, 0x00, 0x00, 0xf8, 0x33, 0x00, - 0x00, 0x02, 0x00, 0xa0, 0x00, 0x02, 0x00, 0x00, 0x40, 0x12, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x4c, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x03, 0x00, 0x80, 0x01, 0xa0, + 0x08, 0x00, 0x00, 0x80, 0x89, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x01, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, + 0x00, 0x10, 0x30, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x40, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0xc0, 0x01, 0x00, 0xa0, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Oct 6 19:41:10 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66802BD35C3; Thu, 6 Oct 2016 19:41:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38175BBE; Thu, 6 Oct 2016 19:41:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96Jf90F038375; Thu, 6 Oct 2016 19:41:09 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96Jf9gx038374; Thu, 6 Oct 2016 19:41:09 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201610061941.u96Jf9gx038374@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 6 Oct 2016 19:41:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306781 - stable/10/usr.bin/gcore X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 19:41:10 -0000 Author: jhb Date: Thu Oct 6 19:41:09 2016 New Revision: 306781 URL: https://svnweb.freebsd.org/changeset/base/306781 Log: MFC 299458: Fix buffer overrun in gcore(1) NT_PRPSINFO Use size of destination buffer, rather than a constant that may or may not correspond to the source buffer, to restrict the length of copied strings. In particular, pr_fname has 16+1 characters but MAXCOMLEN is 18+1. Use strlcpy instead of strncpy to ensure the result is nul-terminated. This seems to be what is expected of these fields. Modified: stable/10/usr.bin/gcore/elfcore.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/gcore/elfcore.c ============================================================================== --- stable/10/usr.bin/gcore/elfcore.c Thu Oct 6 19:06:10 2016 (r306780) +++ stable/10/usr.bin/gcore/elfcore.c Thu Oct 6 19:41:09 2016 (r306781) @@ -564,8 +564,8 @@ elf_note_prpsinfo(void *arg, size_t *siz err(1, "kern.proc.pid.%u", pid); if (kip.ki_pid != pid) err(1, "kern.proc.pid.%u", pid); - strncpy(psinfo->pr_fname, kip.ki_comm, MAXCOMLEN); - strncpy(psinfo->pr_psargs, psinfo->pr_fname, PRARGSZ); + strlcpy(psinfo->pr_fname, kip.ki_comm, sizeof(psinfo->pr_fname)); + strlcpy(psinfo->pr_psargs, psinfo->pr_fname, sizeof(psinfo->pr_psargs)); *sizep = sizeof(*psinfo); return (psinfo); From owner-svn-src-all@freebsd.org Thu Oct 6 19:46:44 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5529BD3B2C; Thu, 6 Oct 2016 19:46:44 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84FDCF2D; Thu, 6 Oct 2016 19:46:44 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96JkhsM041910; Thu, 6 Oct 2016 19:46:43 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96Jkhww041909; Thu, 6 Oct 2016 19:46:43 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201610061946.u96Jkhww041909@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 6 Oct 2016 19:46:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306782 - in head: contrib/netbsd-tests/lib/libc/locale usr.bin/localedef X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 19:46:44 -0000 Author: bapt Date: Thu Oct 6 19:46:43 2016 New Revision: 306782 URL: https://svnweb.freebsd.org/changeset/base/306782 Log: localedef: Fix ctype dump (fixed wide spread errors) This commit is from John Marino in dragonfly with the following commit log: ==== This was a CTYPE encoding error involving consecutive points of the same ctype. It was reported by myself to Illumos over a year ago but I was unsure if it was only happening on BSD. Given the cause, the bug is also present on Illumos. Basically, if consecutive points were of the exact same ctype, they would be defined as a range regardless. For example, all of these would be considered equivalent: ... , (converts to .. ) , , (converts to .. ) , ... (converts to .. ) So all the points that shouldn't have been defined got "bridged" by the extreme points. The effects were recently reported to FreeBSD on PR 213013. There are countless places were the ctype flags are misdefined, so this is a major fix that has to be MFC'd. ==== This reveals a bad change I did on the testsuite: while 0x07FF is a valid unicode it is not used yet (reserved for future use) PR: 213013 Submitted by: marino@ Reported by: Kurtis Rader Obtained from: Dragonfly MFC after: 1 month Modified: head/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c head/usr.bin/localedef/ctype.c Modified: head/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c Thu Oct 6 19:41:09 2016 (r306781) +++ head/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c Thu Oct 6 19:46:43 2016 (r306782) @@ -88,7 +88,7 @@ static struct test { 0xFFFF, 0x5D, 0x5B, 0x10000, 0x10FFFF, 0x5D, 0x0A }, #ifdef __FreeBSD__ - { 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, + { 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, #else { 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, #endif Modified: head/usr.bin/localedef/ctype.c ============================================================================== --- head/usr.bin/localedef/ctype.c Thu Oct 6 19:41:09 2016 (r306781) +++ head/usr.bin/localedef/ctype.c Thu Oct 6 19:46:43 2016 (r306782) @@ -407,9 +407,9 @@ dump_ctype(void) continue; } - if ((last_ct != NULL) && (last_ct->ctype == ctn->ctype)) { + if ((last_ct != NULL) && (last_ct->ctype == ctn->ctype) && + (last_ct->wc + 1 == wc)) { ct[rl.runetype_ext_nranges-1].max = wc; - last_ct = ctn; } else { rl.runetype_ext_nranges++; ct = realloc(ct, @@ -417,8 +417,8 @@ dump_ctype(void) ct[rl.runetype_ext_nranges - 1].min = wc; ct[rl.runetype_ext_nranges - 1].max = wc; ct[rl.runetype_ext_nranges - 1].map = ctn->ctype; - last_ct = ctn; } + last_ct = ctn; if (ctn->tolower == 0) { last_lo = NULL; } else if ((last_lo != NULL) && From owner-svn-src-all@freebsd.org Thu Oct 6 19:51:31 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 635CCBEC014; Thu, 6 Oct 2016 19:51:31 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 338CD61F; Thu, 6 Oct 2016 19:51:31 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96JpU9C045172; Thu, 6 Oct 2016 19:51:30 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96JpUiL045171; Thu, 6 Oct 2016 19:51:30 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201610061951.u96JpUiL045171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 6 Oct 2016 19:51:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306783 - head/usr.bin/localedef X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 19:51:31 -0000 Author: bapt Date: Thu Oct 6 19:51:30 2016 New Revision: 306783 URL: https://svnweb.freebsd.org/changeset/base/306783 Log: localedef: Improve cc_list parsing original commit log: ===== I had originally suspected the parsing of ctype definition files as being the source of the ctype flag mis-definitions, but it wasn't. In the process, I simplified the cc_list parsing so I'm committing the no-impact improvement separately. It removes some parsing redundancies and won't parse partial range definitions anymore. ==== Submitted by: marino Obtained from: Dragonfly MFC after: 1 month Modified: head/usr.bin/localedef/parser.y (contents, props changed) Modified: head/usr.bin/localedef/parser.y ============================================================================== --- head/usr.bin/localedef/parser.y Thu Oct 6 19:46:43 2016 (r306782) +++ head/usr.bin/localedef/parser.y Thu Oct 6 19:51:30 2016 (r306783) @@ -27,6 +27,8 @@ * 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$ */ /* @@ -321,21 +323,18 @@ ctype_kw : T_ISUPPER cc_list T_NL | T_TOLOWER conv_list T_NL ; +cc_list : cc_list T_SEMI cc_range_end + | cc_list T_SEMI cc_char + | cc_char + ; -cc_list : cc_list T_SEMI T_CHAR +cc_range_end : T_ELLIPSIS T_SEMI T_CHAR { - add_ctype($3); + add_ctype_range($3); } - | cc_list T_SEMI T_SYMBOL - { - add_charmap_undefined($3); - } - | cc_list T_SEMI T_ELLIPSIS T_SEMI T_CHAR - { - /* note that the endpoints *must* be characters */ - add_ctype_range($5); - } - | T_CHAR + ; + +cc_char : T_CHAR { add_ctype($1); } From owner-svn-src-all@freebsd.org Thu Oct 6 20:27:41 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D12FBBECB82; Thu, 6 Oct 2016 20:27:41 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2F94DE; Thu, 6 Oct 2016 20:27:41 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96KReie058468; Thu, 6 Oct 2016 20:27:40 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96KReDk058467; Thu, 6 Oct 2016 20:27:40 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201610062027.u96KReDk058467@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 6 Oct 2016 20:27:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306784 - head/contrib/netbsd-tests/lib/libc/string X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 20:27:41 -0000 Author: emaste Date: Thu Oct 6 20:27:40 2016 New Revision: 306784 URL: https://svnweb.freebsd.org/changeset/base/306784 Log: Add test for a musl libc memmem bug With a short needle (aka little) musl's memmem could read past the end of the haystack (aka big). This was fixed in musl commit c718f9f. Reviewed by: ed Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8137 Modified: head/contrib/netbsd-tests/lib/libc/string/t_memmem.c Modified: head/contrib/netbsd-tests/lib/libc/string/t_memmem.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/string/t_memmem.c Thu Oct 6 19:51:30 2016 (r306783) +++ head/contrib/netbsd-tests/lib/libc/string/t_memmem.c Thu Oct 6 20:27:40 2016 (r306784) @@ -51,6 +51,8 @@ char p6[] = "9"; int lp6 = 1; char p7[] = "654"; int lp7 = 3; +char p8[] = "89abc"; +int lp8 = 5; char b0[] = ""; int lb0 = 0; @@ -94,6 +96,7 @@ ATF_TC_BODY(memmem_basic, tc) expect(memmem(b2, lb2, p4, lp4) == NULL); expect(memmem(b2, lb2, p7, lp7) == NULL); + expect(memmem(b2, lb2, p8, lp8) == NULL); } ATF_TP_ADD_TCS(tp) From owner-svn-src-all@freebsd.org Thu Oct 6 20:37:24 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92FF1BECFD8; Thu, 6 Oct 2016 20:37:24 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F1C0AF1; Thu, 6 Oct 2016 20:37:24 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96KbNgH062481; Thu, 6 Oct 2016 20:37:23 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96KbNXJ062477; Thu, 6 Oct 2016 20:37:23 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201610062037.u96KbNXJ062477@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 6 Oct 2016 20:37:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306785 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 20:37:24 -0000 Author: adrian Date: Thu Oct 6 20:37:23 2016 New Revision: 306785 URL: https://svnweb.freebsd.org/changeset/base/306785 Log: [ar531x] add default configs for AR531x ports. Submitted by: Mori Hiroki Differential Revision: https://reviews.freebsd.org/D7237 Added: head/sys/mips/conf/AR5312_BASE.hints (contents, props changed) head/sys/mips/conf/AR5315_BASE.hints (contents, props changed) head/sys/mips/conf/std.AR5312 (contents, props changed) head/sys/mips/conf/std.AR5315 (contents, props changed) Added: head/sys/mips/conf/AR5312_BASE.hints ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/AR5312_BASE.hints Thu Oct 6 20:37:23 2016 (r306785) @@ -0,0 +1,29 @@ +# $FreeBSD$ +hint.apb.0.at="nexus0" +hint.apb.0.irq=4 + +# uart0 +hint.uart.0.at="apb0" +# see atheros/uart_cpu_ar71xx.c why +3 +hint.uart.0.maddr=0x1C000003 +hint.uart.0.msize=0x20 +#hint.uart.0.irq=4 +#hint.uart.0.flags="0x30" + +# Watchdog +hint.ar5315_wdog.0.at="apb0" +hint.ar5315_wdog.0.irq=6 + +# Ethernet +hint.are.0.at="nexus0" +hint.are.0.maddr=0x18100000 +hint.are.0.msize=0x00100000 +hint.are.0.irq=1 + +hint.are.1.at="nexus0" +hint.are.1.maddr=0x18200000 +hint.are.1.msize=0x00100000 +hint.are.1.irq=2 + +# GEOM redboot FIS directory offset +#hint.redboot.0.fisoffset="0x007e0000" Added: head/sys/mips/conf/AR5315_BASE.hints ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/AR5315_BASE.hints Thu Oct 6 20:37:23 2016 (r306785) @@ -0,0 +1,34 @@ +# $FreeBSD$ +hint.apb.0.at="nexus0" +hint.apb.0.irq=0 + +# uart0 +hint.uart.0.at="apb0" +hint.uart.0.maddr=0x11100003 +hint.uart.0.msize=0x20 +#hint.uart.0.irq=0 +#hint.uart.0.flags="0x30" + +# Watchdog +hint.ar5315_wdog.0.at="apb0" +hint.ar5315_wdog.0.irq=7 + +# SPI +hint.spi.0.at="nexus0" +hint.spi.0.maddr=0x11300000 +hint.spi.0.msize=0x0000000c +#hint.spi.0.irq=2 + +# Ethernet +hint.are.0.at="nexus0" +hint.are.0.maddr=0x10500000 +hint.are.0.msize=0x500000 +hint.are.0.irq=2 + +# Flash +hint.mx25l.0.at="spibus0" +hint.mx25l.0.cs=0 + +# GEOM redboot FIS directory offset +#hint.redboot.0.fisoffset="0x007e0000" + Added: head/sys/mips/conf/std.AR5312 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/std.AR5312 Thu Oct 6 20:37:23 2016 (r306785) @@ -0,0 +1,80 @@ +# +# AR5312 -- Kernel configuration file for FreeBSD/MIPS for Atheros 5312 systems +# +# This includes all the common drivers for the AR5312 boards +# +# $FreeBSD$ +# + +machine mips mips +#ident AR5312_BASE +cpu CPU_MIPS4KC +makeoptions KERNLOADADDR=0x80050000 +options HZ=1000 + +makeoptions MODULES_OVERRIDE="" + +files "../atheros/ar531x/files.ar5315" + +options INTRNG +options AR531X_1ST_GENERATION + +# For now, hints are per-board. + +hints "AR5312_BASE.hints" + +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols + +# For small memory footprints +options VM_KMEM_SIZE_SCALE=1 + +options DDB +options KDB + +options SCHED_4BSD #4BSD scheduler +options INET #InterNETworking +options INET6 # IPv6 + +# options NFSCL #Network Filesystem Client + +options PSEUDOFS #Pseudo-filesystem framework +options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions + +# options NFS_LEGACYRPC +# Debugging for use in -current +options INVARIANTS +options INVARIANT_SUPPORT +options WITNESS +options WITNESS_SKIPSPIN +options DEBUG_REDZONE +options DEBUG_MEMGUARD + +options FFS #Berkeley Fast Filesystem +# options SOFTUPDATES #Enable FFS soft updates support +# options UFS_ACL #Support for access control lists +# options UFS_DIRHASH #Improve performance on big directories +# options MSDOSFS # Read MSDOS filesystems; useful for USB/CF + +device mii +device are + +device cfi +options CFI_HARDWAREBYTESWAP +device geom_redboot + +device ar5315_wdog + +device uart +device uart_ar5315 + +device loop +device ether +device md +device bpf +device random + +options ARGE_DEBUG # Enable if_arge debugging for now + +# Enable GPIO +device gpio +device gpioled Added: head/sys/mips/conf/std.AR5315 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/std.AR5315 Thu Oct 6 20:37:23 2016 (r306785) @@ -0,0 +1,80 @@ +# +# AR5315 -- Kernel configuration file for FreeBSD/MIPS for Atheros 5315 systems +# +# This includes all the common drivers for the AR5315 boards +# +# $FreeBSD$ +# + +machine mips mips +#ident AR5315_BASE +cpu CPU_MIPS4KC +makeoptions KERNLOADADDR=0x80050000 +options HZ=1000 + +makeoptions MODULES_OVERRIDE="" + +files "../atheros/ar531x/files.ar5315" + +options INTRNG + +# For now, hints are per-board. + +hints "AR5315_BASE.hints" + +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols + +# For small memory footprints +options VM_KMEM_SIZE_SCALE=1 + +options DDB +options KDB + +options SCHED_4BSD #4BSD scheduler +options INET #InterNETworking +options INET6 # IPv6 + +# options NFSCL #Network Filesystem Client + +options PSEUDOFS #Pseudo-filesystem framework +options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions + +# options NFS_LEGACYRPC +# Debugging for use in -current +options INVARIANTS +options INVARIANT_SUPPORT +options WITNESS +options WITNESS_SKIPSPIN +options DEBUG_REDZONE +options DEBUG_MEMGUARD + +options FFS #Berkeley Fast Filesystem +# options SOFTUPDATES #Enable FFS soft updates support +# options UFS_ACL #Support for access control lists +# options UFS_DIRHASH #Improve performance on big directories +# options MSDOSFS # Read MSDOS filesystems; useful for USB/CF + +device mii +device are + +device ar5315_spi +device spibus +device mx25l +device geom_redboot + +device ar5315_wdog + +device uart +device uart_ar5315 + +device loop +device ether +device md +device bpf +device random + +options ARGE_DEBUG # Enable if_arge debugging for now + +# Enable GPIO +device gpio +device gpioled From owner-svn-src-all@freebsd.org Thu Oct 6 21:17:19 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 807EBBECA51; Thu, 6 Oct 2016 21:17:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F955E47; Thu, 6 Oct 2016 21:17:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96LHIa9076989; Thu, 6 Oct 2016 21:17:18 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96LHIOW076987; Thu, 6 Oct 2016 21:17:18 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201610062117.u96LHIOW076987@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 6 Oct 2016 21:17:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306786 - in stable: 10/sys/kern 10/usr.bin/gcore 11/sys/kern 11/usr.bin/gcore X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 21:17:19 -0000 Author: jhb Date: Thu Oct 6 21:17:18 2016 New Revision: 306786 URL: https://svnweb.freebsd.org/changeset/base/306786 Log: MFC 302859: Include command line arguments in core dump process info. Fill in pr_psargs in the NT_PRSINFO ELF core dump note with command line arguments. Modified: stable/10/sys/kern/imgact_elf.c stable/10/usr.bin/gcore/elfcore.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/kern/imgact_elf.c stable/11/usr.bin/gcore/elfcore.c Directory Properties: stable/11/ (props changed) Modified: stable/10/sys/kern/imgact_elf.c ============================================================================== --- stable/10/sys/kern/imgact_elf.c Thu Oct 6 20:37:23 2016 (r306785) +++ stable/10/sys/kern/imgact_elf.c Thu Oct 6 21:17:18 2016 (r306786) @@ -1785,8 +1785,12 @@ typedef vm_offset_t elf_ps_strings_t; static void __elfN(note_prpsinfo)(void *arg, struct sbuf *sb, size_t *sizep) { + struct sbuf sbarg; + size_t len; + char *cp, *end; struct proc *p; elf_prpsinfo_t *psinfo; + int error; p = (struct proc *)arg; if (sb != NULL) { @@ -1795,13 +1799,43 @@ __elfN(note_prpsinfo)(void *arg, struct psinfo->pr_version = PRPSINFO_VERSION; psinfo->pr_psinfosz = sizeof(elf_prpsinfo_t); strlcpy(psinfo->pr_fname, p->p_comm, sizeof(psinfo->pr_fname)); - /* - * XXX - We don't fill in the command line arguments properly - * yet. - */ - strlcpy(psinfo->pr_psargs, p->p_comm, - sizeof(psinfo->pr_psargs)); - + PROC_LOCK(p); + if (p->p_args != NULL) { + len = sizeof(psinfo->pr_psargs) - 1; + if (len > p->p_args->ar_length) + len = p->p_args->ar_length; + memcpy(psinfo->pr_psargs, p->p_args->ar_args, len); + PROC_UNLOCK(p); + error = 0; + } else { + _PHOLD(p); + PROC_UNLOCK(p); + sbuf_new(&sbarg, psinfo->pr_psargs, + sizeof(psinfo->pr_psargs), SBUF_FIXEDLEN); + error = proc_getargv(curthread, p, &sbarg); + PRELE(p); + if (sbuf_finish(&sbarg) == 0) + len = sbuf_len(&sbarg) - 1; + else + len = sizeof(psinfo->pr_psargs) - 1; + sbuf_delete(&sbarg); + } + if (error || len == 0) + strlcpy(psinfo->pr_psargs, p->p_comm, + sizeof(psinfo->pr_psargs)); + else { + KASSERT(len < sizeof(psinfo->pr_psargs), + ("len is too long: %zu vs %zu", len, + sizeof(psinfo->pr_psargs))); + cp = psinfo->pr_psargs; + end = cp + len - 1; + for (;;) { + cp = memchr(cp, '\0', end - cp); + if (cp == NULL) + break; + *cp = ' '; + } + } sbuf_bcat(sb, psinfo, sizeof(*psinfo)); free(psinfo, M_TEMP); } Modified: stable/10/usr.bin/gcore/elfcore.c ============================================================================== --- stable/10/usr.bin/gcore/elfcore.c Thu Oct 6 20:37:23 2016 (r306785) +++ stable/10/usr.bin/gcore/elfcore.c Thu Oct 6 21:17:18 2016 (r306786) @@ -542,6 +542,7 @@ readmap(pid_t pid) static void * elf_note_prpsinfo(void *arg, size_t *sizep) { + char *cp, *end; pid_t pid; elfcore_prpsinfo_t *psinfo; struct kinfo_proc kip; @@ -565,7 +566,20 @@ elf_note_prpsinfo(void *arg, size_t *siz if (kip.ki_pid != pid) err(1, "kern.proc.pid.%u", pid); strlcpy(psinfo->pr_fname, kip.ki_comm, sizeof(psinfo->pr_fname)); - strlcpy(psinfo->pr_psargs, psinfo->pr_fname, sizeof(psinfo->pr_psargs)); + name[2] = KERN_PROC_ARGS; + len = sizeof(psinfo->pr_psargs) - 1; + if (sysctl(name, 4, psinfo->pr_psargs, &len, NULL, 0) == 0 && len > 0) { + cp = psinfo->pr_psargs; + end = cp + len - 1; + for (;;) { + cp = memchr(cp, '\0', end - cp); + if (cp == NULL) + break; + *cp = ' '; + } + } else + strlcpy(psinfo->pr_psargs, kip.ki_comm, + sizeof(psinfo->pr_psargs)); *sizep = sizeof(*psinfo); return (psinfo); From owner-svn-src-all@freebsd.org Thu Oct 6 21:17:19 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C407ABECA57; Thu, 6 Oct 2016 21:17:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0FF1E48; Thu, 6 Oct 2016 21:17:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96LHIQQ076996; Thu, 6 Oct 2016 21:17:18 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96LHIen076994; Thu, 6 Oct 2016 21:17:18 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201610062117.u96LHIen076994@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 6 Oct 2016 21:17:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306786 - in stable: 10/sys/kern 10/usr.bin/gcore 11/sys/kern 11/usr.bin/gcore X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 21:17:19 -0000 Author: jhb Date: Thu Oct 6 21:17:18 2016 New Revision: 306786 URL: https://svnweb.freebsd.org/changeset/base/306786 Log: MFC 302859: Include command line arguments in core dump process info. Fill in pr_psargs in the NT_PRSINFO ELF core dump note with command line arguments. Modified: stable/11/sys/kern/imgact_elf.c stable/11/usr.bin/gcore/elfcore.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/kern/imgact_elf.c stable/10/usr.bin/gcore/elfcore.c Directory Properties: stable/10/ (props changed) Modified: stable/11/sys/kern/imgact_elf.c ============================================================================== --- stable/11/sys/kern/imgact_elf.c Thu Oct 6 20:37:23 2016 (r306785) +++ stable/11/sys/kern/imgact_elf.c Thu Oct 6 21:17:18 2016 (r306786) @@ -1823,8 +1823,12 @@ typedef vm_offset_t elf_ps_strings_t; static void __elfN(note_prpsinfo)(void *arg, struct sbuf *sb, size_t *sizep) { + struct sbuf sbarg; + size_t len; + char *cp, *end; struct proc *p; elf_prpsinfo_t *psinfo; + int error; p = (struct proc *)arg; if (sb != NULL) { @@ -1833,13 +1837,43 @@ __elfN(note_prpsinfo)(void *arg, struct psinfo->pr_version = PRPSINFO_VERSION; psinfo->pr_psinfosz = sizeof(elf_prpsinfo_t); strlcpy(psinfo->pr_fname, p->p_comm, sizeof(psinfo->pr_fname)); - /* - * XXX - We don't fill in the command line arguments properly - * yet. - */ - strlcpy(psinfo->pr_psargs, p->p_comm, - sizeof(psinfo->pr_psargs)); - + PROC_LOCK(p); + if (p->p_args != NULL) { + len = sizeof(psinfo->pr_psargs) - 1; + if (len > p->p_args->ar_length) + len = p->p_args->ar_length; + memcpy(psinfo->pr_psargs, p->p_args->ar_args, len); + PROC_UNLOCK(p); + error = 0; + } else { + _PHOLD(p); + PROC_UNLOCK(p); + sbuf_new(&sbarg, psinfo->pr_psargs, + sizeof(psinfo->pr_psargs), SBUF_FIXEDLEN); + error = proc_getargv(curthread, p, &sbarg); + PRELE(p); + if (sbuf_finish(&sbarg) == 0) + len = sbuf_len(&sbarg) - 1; + else + len = sizeof(psinfo->pr_psargs) - 1; + sbuf_delete(&sbarg); + } + if (error || len == 0) + strlcpy(psinfo->pr_psargs, p->p_comm, + sizeof(psinfo->pr_psargs)); + else { + KASSERT(len < sizeof(psinfo->pr_psargs), + ("len is too long: %zu vs %zu", len, + sizeof(psinfo->pr_psargs))); + cp = psinfo->pr_psargs; + end = cp + len - 1; + for (;;) { + cp = memchr(cp, '\0', end - cp); + if (cp == NULL) + break; + *cp = ' '; + } + } sbuf_bcat(sb, psinfo, sizeof(*psinfo)); free(psinfo, M_TEMP); } Modified: stable/11/usr.bin/gcore/elfcore.c ============================================================================== --- stable/11/usr.bin/gcore/elfcore.c Thu Oct 6 20:37:23 2016 (r306785) +++ stable/11/usr.bin/gcore/elfcore.c Thu Oct 6 21:17:18 2016 (r306786) @@ -548,6 +548,7 @@ readmap(pid_t pid) static void * elf_note_prpsinfo(void *arg, size_t *sizep) { + char *cp, *end; pid_t pid; elfcore_prpsinfo_t *psinfo; struct kinfo_proc kip; @@ -571,7 +572,20 @@ elf_note_prpsinfo(void *arg, size_t *siz if (kip.ki_pid != pid) err(1, "kern.proc.pid.%u", pid); strlcpy(psinfo->pr_fname, kip.ki_comm, sizeof(psinfo->pr_fname)); - strlcpy(psinfo->pr_psargs, psinfo->pr_fname, sizeof(psinfo->pr_psargs)); + name[2] = KERN_PROC_ARGS; + len = sizeof(psinfo->pr_psargs) - 1; + if (sysctl(name, 4, psinfo->pr_psargs, &len, NULL, 0) == 0 && len > 0) { + cp = psinfo->pr_psargs; + end = cp + len - 1; + for (;;) { + cp = memchr(cp, '\0', end - cp); + if (cp == NULL) + break; + *cp = ' '; + } + } else + strlcpy(psinfo->pr_psargs, kip.ki_comm, + sizeof(psinfo->pr_psargs)); *sizep = sizeof(*psinfo); return (psinfo); From owner-svn-src-all@freebsd.org Thu Oct 6 21:25:18 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2562BECCAD; Thu, 6 Oct 2016 21:25:18 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 736B5147A; Thu, 6 Oct 2016 21:25:18 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96LPHbI081101; Thu, 6 Oct 2016 21:25:17 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96LPHsw081100; Thu, 6 Oct 2016 21:25:17 GMT (envelope-from np@FreeBSD.org) Message-Id: <201610062125.u96LPHsw081100@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 6 Oct 2016 21:25:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306787 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 21:25:18 -0000 Author: np Date: Thu Oct 6 21:25:17 2016 New Revision: 306787 URL: https://svnweb.freebsd.org/changeset/base/306787 Log: cxgbe(4): Fix whitespace in the pm_stats display. Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Thu Oct 6 21:17:18 2016 (r306786) +++ head/sys/dev/cxgbe/t4_main.c Thu Oct 6 21:25:17 2016 (r306787) @@ -7099,7 +7099,7 @@ sysctl_pm_stats(SYSCTL_HANDLER_ARGS) }; static const char *rx_stats[MAX_PM_NSTATS] = { "Read:", "Write bypass:", "Write mem:", "Flush:", - " Rx FIFO wait", NULL, "Rx latency" + "Rx FIFO wait", NULL, "Rx latency" }; rc = sysctl_wire_old_buffer(req, 0); From owner-svn-src-all@freebsd.org Thu Oct 6 21:30:11 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73C2EBECE65; Thu, 6 Oct 2016 21:30:11 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2401F16D3; Thu, 6 Oct 2016 21:30:11 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96LUA5t081332; Thu, 6 Oct 2016 21:30:10 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96LUAoJ081329; Thu, 6 Oct 2016 21:30:10 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201610062130.u96LUAoJ081329@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 6 Oct 2016 21:30:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r306788 - in vendor/heirloom-doctools: . dist dist/LICENSE.d dist/checknr dist/col dist/doc dist/doc/fonts dist/doc/just dist/doc/quickstart dist/doc/troff dist/eqn dist/eqn/checkeq.d d... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 21:30:11 -0000 Author: bapt Date: Thu Oct 6 21:30:09 2016 New Revision: 306788 URL: https://svnweb.freebsd.org/changeset/base/306788 Log: Import heirloom doctools snapshot from git as of 161006 Added: vendor/heirloom-doctools/ vendor/heirloom-doctools/dist/ vendor/heirloom-doctools/dist/CHANGES vendor/heirloom-doctools/dist/CHANGES_GR vendor/heirloom-doctools/dist/LICENSE vendor/heirloom-doctools/dist/LICENSE.d/ vendor/heirloom-doctools/dist/LICENSE.d/BERKELEY.LICENSE vendor/heirloom-doctools/dist/LICENSE.d/CALDERA.LICENSE vendor/heirloom-doctools/dist/LICENSE.d/COPYING.LGPL vendor/heirloom-doctools/dist/LICENSE.d/LPPL-1-0.LICENSE vendor/heirloom-doctools/dist/LICENSE.d/LUCENT.LICENSE vendor/heirloom-doctools/dist/LICENSE.d/OPENSOLARIS.LICENSE vendor/heirloom-doctools/dist/README vendor/heirloom-doctools/dist/README.md vendor/heirloom-doctools/dist/checknr/ vendor/heirloom-doctools/dist/checknr/Makefile.mk (contents, props changed) vendor/heirloom-doctools/dist/checknr/checknr.1 (contents, props changed) vendor/heirloom-doctools/dist/checknr/checknr.c (contents, props changed) vendor/heirloom-doctools/dist/col/ vendor/heirloom-doctools/dist/col/Makefile.mk (contents, props changed) vendor/heirloom-doctools/dist/col/col.c (contents, props changed) vendor/heirloom-doctools/dist/configure (contents, props changed) vendor/heirloom-doctools/dist/doc/ vendor/heirloom-doctools/dist/doc/fonts/ vendor/heirloom-doctools/dist/doc/fonts/README vendor/heirloom-doctools/dist/doc/fonts/doc.more vendor/heirloom-doctools/dist/doc/fonts/doc.ps (contents, props changed) vendor/heirloom-doctools/dist/doc/fonts/doc.tr vendor/heirloom-doctools/dist/doc/fonts/makefile (contents, props changed) vendor/heirloom-doctools/dist/doc/just/ vendor/heirloom-doctools/dist/doc/just/README vendor/heirloom-doctools/dist/doc/just/doc.more vendor/heirloom-doctools/dist/doc/just/doc.ps (contents, props changed) vendor/heirloom-doctools/dist/doc/just/doc.tr vendor/heirloom-doctools/dist/doc/just/makefile (contents, props changed) vendor/heirloom-doctools/dist/doc/quickstart/ vendor/heirloom-doctools/dist/doc/quickstart/README vendor/heirloom-doctools/dist/doc/quickstart/doc.more vendor/heirloom-doctools/dist/doc/quickstart/doc.ps (contents, props changed) vendor/heirloom-doctools/dist/doc/quickstart/doc.tr vendor/heirloom-doctools/dist/doc/quickstart/makefile (contents, props changed) vendor/heirloom-doctools/dist/doc/troff/ vendor/heirloom-doctools/dist/doc/troff/README vendor/heirloom-doctools/dist/doc/troff/doc.more vendor/heirloom-doctools/dist/doc/troff/doc.ps (contents, props changed) vendor/heirloom-doctools/dist/doc/troff/doc.tr (contents, props changed) vendor/heirloom-doctools/dist/doc/troff/makefile (contents, props changed) vendor/heirloom-doctools/dist/eqn/ vendor/heirloom-doctools/dist/eqn/checkeq.d/ vendor/heirloom-doctools/dist/eqn/checkeq.d/Makefile.mk (contents, props changed) vendor/heirloom-doctools/dist/eqn/checkeq.d/checkeq.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/diacrit.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/e.h (contents, props changed) vendor/heirloom-doctools/dist/eqn/e.y vendor/heirloom-doctools/dist/eqn/eqn.d/ vendor/heirloom-doctools/dist/eqn/eqn.d/Makefile.mk (contents, props changed) vendor/heirloom-doctools/dist/eqn/eqn.d/eqn.1 (contents, props changed) vendor/heirloom-doctools/dist/eqn/eqn.d/eqnchar.7 (contents, props changed) vendor/heirloom-doctools/dist/eqn/eqnbox.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/eqnchar.d/ vendor/heirloom-doctools/dist/eqn/eqnchar.d/Makefile.mk (contents, props changed) vendor/heirloom-doctools/dist/eqn/eqnchar.d/ascii vendor/heirloom-doctools/dist/eqn/eqnchar.d/eqnchar vendor/heirloom-doctools/dist/eqn/eqnchar.d/genutf8.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/eqnchar.d/greek (contents, props changed) vendor/heirloom-doctools/dist/eqn/eqnchar.d/iso vendor/heirloom-doctools/dist/eqn/font.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/fromto.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/funny.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/glob.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/integral.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/io.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/lex.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/lookup.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/mark.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/matrix.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/move.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/neqn.d/ vendor/heirloom-doctools/dist/eqn/neqn.d/Makefile.mk (contents, props changed) vendor/heirloom-doctools/dist/eqn/over.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/paren.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/pile.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/shift.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/size.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/sqrt.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/text.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/version.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/yyval.sed (contents, props changed) vendor/heirloom-doctools/dist/grap/ vendor/heirloom-doctools/dist/grap/Makefile.mk (contents, props changed) vendor/heirloom-doctools/dist/grap/coord.c (contents, props changed) vendor/heirloom-doctools/dist/grap/for.c (contents, props changed) vendor/heirloom-doctools/dist/grap/frame.c (contents, props changed) vendor/heirloom-doctools/dist/grap/grap.1 (contents, props changed) vendor/heirloom-doctools/dist/grap/grap.defines vendor/heirloom-doctools/dist/grap/grap.h (contents, props changed) vendor/heirloom-doctools/dist/grap/grap.y vendor/heirloom-doctools/dist/grap/grapl.l vendor/heirloom-doctools/dist/grap/input.c (contents, props changed) vendor/heirloom-doctools/dist/grap/label.c (contents, props changed) vendor/heirloom-doctools/dist/grap/main.c (contents, props changed) vendor/heirloom-doctools/dist/grap/misc.c (contents, props changed) vendor/heirloom-doctools/dist/grap/plot.c (contents, props changed) vendor/heirloom-doctools/dist/grap/print.c (contents, props changed) vendor/heirloom-doctools/dist/grap/ticks.c (contents, props changed) vendor/heirloom-doctools/dist/grap/version.c (contents, props changed) vendor/heirloom-doctools/dist/heirloom-doctools.spec vendor/heirloom-doctools/dist/include/ vendor/heirloom-doctools/dist/include/global.h (contents, props changed) vendor/heirloom-doctools/dist/makefile (contents, props changed) vendor/heirloom-doctools/dist/mk.config vendor/heirloom-doctools/dist/mpm/ vendor/heirloom-doctools/dist/mpm/Makefile.mk (contents, props changed) vendor/heirloom-doctools/dist/mpm/README vendor/heirloom-doctools/dist/mpm/misc.cc (contents, props changed) vendor/heirloom-doctools/dist/mpm/misc.h (contents, props changed) vendor/heirloom-doctools/dist/mpm/page.cc (contents, props changed) vendor/heirloom-doctools/dist/mpm/page.h (contents, props changed) vendor/heirloom-doctools/dist/mpm/queue.cc (contents, props changed) vendor/heirloom-doctools/dist/mpm/range.cc (contents, props changed) vendor/heirloom-doctools/dist/mpm/range.h (contents, props changed) vendor/heirloom-doctools/dist/mpm/slug.cc (contents, props changed) vendor/heirloom-doctools/dist/mpm/slug.h (contents, props changed) vendor/heirloom-doctools/dist/mpm/version.c (contents, props changed) vendor/heirloom-doctools/dist/pic/ vendor/heirloom-doctools/dist/pic/Makefile.mk (contents, props changed) vendor/heirloom-doctools/dist/pic/arcgen.c (contents, props changed) vendor/heirloom-doctools/dist/pic/blockgen.c (contents, props changed) vendor/heirloom-doctools/dist/pic/boxgen.c (contents, props changed) vendor/heirloom-doctools/dist/pic/circgen.c (contents, props changed) vendor/heirloom-doctools/dist/pic/for.c (contents, props changed) vendor/heirloom-doctools/dist/pic/input.c (contents, props changed) vendor/heirloom-doctools/dist/pic/linegen.c (contents, props changed) vendor/heirloom-doctools/dist/pic/main.c (contents, props changed) vendor/heirloom-doctools/dist/pic/misc.c (contents, props changed) vendor/heirloom-doctools/dist/pic/movegen.c (contents, props changed) vendor/heirloom-doctools/dist/pic/pic.1 (contents, props changed) vendor/heirloom-doctools/dist/pic/pic.h (contents, props changed) vendor/heirloom-doctools/dist/pic/picl.l vendor/heirloom-doctools/dist/pic/picy.y vendor/heirloom-doctools/dist/pic/pltroff.c (contents, props changed) vendor/heirloom-doctools/dist/pic/print.c (contents, props changed) vendor/heirloom-doctools/dist/pic/symtab.c (contents, props changed) vendor/heirloom-doctools/dist/pic/textgen.c (contents, props changed) vendor/heirloom-doctools/dist/pic/version.c (contents, props changed) vendor/heirloom-doctools/dist/picpack/ vendor/heirloom-doctools/dist/picpack/Makefile.mk (contents, props changed) vendor/heirloom-doctools/dist/picpack/getopt.c (contents, props changed) vendor/heirloom-doctools/dist/picpack/picpack.1 (contents, props changed) vendor/heirloom-doctools/dist/picpack/picpack.c (contents, props changed) vendor/heirloom-doctools/dist/pkginfo vendor/heirloom-doctools/dist/ptx/ vendor/heirloom-doctools/dist/ptx/Makefile.mk (contents, props changed) vendor/heirloom-doctools/dist/ptx/eign vendor/heirloom-doctools/dist/ptx/ptx.1 (contents, props changed) vendor/heirloom-doctools/dist/ptx/ptx.c (contents, props changed) vendor/heirloom-doctools/dist/refer/ vendor/heirloom-doctools/dist/refer/Makefile.mk (contents, props changed) vendor/heirloom-doctools/dist/refer/addbib.1 (contents, props changed) vendor/heirloom-doctools/dist/refer/addbib.c (contents, props changed) vendor/heirloom-doctools/dist/refer/deliv2.c (contents, props changed) vendor/heirloom-doctools/dist/refer/glue1.c (contents, props changed) vendor/heirloom-doctools/dist/refer/glue2.c (contents, props changed) vendor/heirloom-doctools/dist/refer/glue3.c (contents, props changed) vendor/heirloom-doctools/dist/refer/glue4.c (contents, props changed) vendor/heirloom-doctools/dist/refer/glue5.c (contents, props changed) vendor/heirloom-doctools/dist/refer/hunt1.c (contents, props changed) vendor/heirloom-doctools/dist/refer/hunt2.c (contents, props changed) vendor/heirloom-doctools/dist/refer/hunt3.c (contents, props changed) vendor/heirloom-doctools/dist/refer/hunt5.c (contents, props changed) vendor/heirloom-doctools/dist/refer/hunt6.c (contents, props changed) vendor/heirloom-doctools/dist/refer/hunt7.c (contents, props changed) vendor/heirloom-doctools/dist/refer/hunt8.c (contents, props changed) vendor/heirloom-doctools/dist/refer/hunt9.c (contents, props changed) vendor/heirloom-doctools/dist/refer/indxbib.sh (contents, props changed) vendor/heirloom-doctools/dist/refer/inv1.c (contents, props changed) vendor/heirloom-doctools/dist/refer/inv2.c (contents, props changed) vendor/heirloom-doctools/dist/refer/inv3.c (contents, props changed) vendor/heirloom-doctools/dist/refer/inv5.c (contents, props changed) vendor/heirloom-doctools/dist/refer/inv6.c (contents, props changed) vendor/heirloom-doctools/dist/refer/lookbib.1 (contents, props changed) vendor/heirloom-doctools/dist/refer/lookbib.c (contents, props changed) vendor/heirloom-doctools/dist/refer/mkey1.c (contents, props changed) vendor/heirloom-doctools/dist/refer/mkey2.c (contents, props changed) vendor/heirloom-doctools/dist/refer/mkey3.c (contents, props changed) vendor/heirloom-doctools/dist/refer/papers/ vendor/heirloom-doctools/dist/refer/papers/Rbstjissue vendor/heirloom-doctools/dist/refer/papers/Rv7man vendor/heirloom-doctools/dist/refer/papers/runinv.sh (contents, props changed) vendor/heirloom-doctools/dist/refer/refer..c (contents, props changed) vendor/heirloom-doctools/dist/refer/refer.1 (contents, props changed) vendor/heirloom-doctools/dist/refer/refer0.c (contents, props changed) vendor/heirloom-doctools/dist/refer/refer1.c (contents, props changed) vendor/heirloom-doctools/dist/refer/refer2.c (contents, props changed) vendor/heirloom-doctools/dist/refer/refer3.c (contents, props changed) vendor/heirloom-doctools/dist/refer/refer4.c (contents, props changed) vendor/heirloom-doctools/dist/refer/refer5.c (contents, props changed) vendor/heirloom-doctools/dist/refer/refer6.c (contents, props changed) vendor/heirloom-doctools/dist/refer/refer7.c (contents, props changed) vendor/heirloom-doctools/dist/refer/refer8.c (contents, props changed) vendor/heirloom-doctools/dist/refer/roffbib.1 (contents, props changed) vendor/heirloom-doctools/dist/refer/roffbib.sh (contents, props changed) vendor/heirloom-doctools/dist/refer/shell.c (contents, props changed) vendor/heirloom-doctools/dist/refer/sortbib.1 (contents, props changed) vendor/heirloom-doctools/dist/refer/sortbib.c (contents, props changed) vendor/heirloom-doctools/dist/refer/tick.c (contents, props changed) vendor/heirloom-doctools/dist/refer/version.c (contents, props changed) vendor/heirloom-doctools/dist/soelim/ vendor/heirloom-doctools/dist/soelim/Makefile.mk (contents, props changed) vendor/heirloom-doctools/dist/soelim/soelim.1 (contents, props changed) vendor/heirloom-doctools/dist/soelim/soelim.c (contents, props changed) vendor/heirloom-doctools/dist/stuff/ vendor/heirloom-doctools/dist/stuff/bst/ vendor/heirloom-doctools/dist/stuff/bst/Makefile.mk (contents, props changed) vendor/heirloom-doctools/dist/stuff/bst/bst.c (contents, props changed) vendor/heirloom-doctools/dist/stuff/bst/bst.h (contents, props changed) vendor/heirloom-doctools/dist/stuff/demo/ vendor/heirloom-doctools/dist/stuff/demo/PDFX_def.ps (contents, props changed) vendor/heirloom-doctools/dist/stuff/demo/README vendor/heirloom-doctools/dist/stuff/demo/makefile (contents, props changed) vendor/heirloom-doctools/dist/stuff/demo/troffdemo.tr vendor/heirloom-doctools/dist/stuff/demo/troffdemo_otf.tr vendor/heirloom-doctools/dist/stuff/footnotes.tr vendor/heirloom-doctools/dist/stuff/odt2tr.xsl (contents, props changed) vendor/heirloom-doctools/dist/stuff/showfont.sh (contents, props changed) vendor/heirloom-doctools/dist/tbl/ vendor/heirloom-doctools/dist/tbl/Makefile.mk (contents, props changed) vendor/heirloom-doctools/dist/tbl/t..c (contents, props changed) vendor/heirloom-doctools/dist/tbl/t0.c (contents, props changed) vendor/heirloom-doctools/dist/tbl/t1.c (contents, props changed) vendor/heirloom-doctools/dist/tbl/t2.c (contents, props changed) vendor/heirloom-doctools/dist/tbl/t3.c (contents, props changed) vendor/heirloom-doctools/dist/tbl/t4.c (contents, props changed) vendor/heirloom-doctools/dist/tbl/t5.c (contents, props changed) vendor/heirloom-doctools/dist/tbl/t6.c (contents, props changed) vendor/heirloom-doctools/dist/tbl/t7.c (contents, props changed) vendor/heirloom-doctools/dist/tbl/t8.c (contents, props changed) vendor/heirloom-doctools/dist/tbl/t9.c (contents, props changed) vendor/heirloom-doctools/dist/tbl/tb.c (contents, props changed) vendor/heirloom-doctools/dist/tbl/tbl.1 (contents, props changed) vendor/heirloom-doctools/dist/tbl/tc.c (contents, props changed) vendor/heirloom-doctools/dist/tbl/te.c (contents, props changed) vendor/heirloom-doctools/dist/tbl/tf.c (contents, props changed) vendor/heirloom-doctools/dist/tbl/tg.c (contents, props changed) vendor/heirloom-doctools/dist/tbl/ti.c (contents, props changed) vendor/heirloom-doctools/dist/tbl/tm.c (contents, props changed) vendor/heirloom-doctools/dist/tbl/ts.c (contents, props changed) vendor/heirloom-doctools/dist/tbl/tt.c (contents, props changed) vendor/heirloom-doctools/dist/tbl/tu.c (contents, props changed) vendor/heirloom-doctools/dist/tbl/tv.c (contents, props changed) vendor/heirloom-doctools/dist/tbl/version.c (contents, props changed) vendor/heirloom-doctools/dist/test/ vendor/heirloom-doctools/dist/test/eqn/ vendor/heirloom-doctools/dist/test/eqn/eqn.more vendor/heirloom-doctools/dist/test/eqn/eqn.ps (contents, props changed) vendor/heirloom-doctools/dist/test/eqn/eqn.roff vendor/heirloom-doctools/dist/test/eqn/makefile (contents, props changed) vendor/heirloom-doctools/dist/test/grap/ vendor/heirloom-doctools/dist/test/grap/data/ vendor/heirloom-doctools/dist/test/grap/data/rawgrades vendor/heirloom-doctools/dist/test/grap/data/ttrev.data vendor/heirloom-doctools/dist/test/grap/grap.more (contents, props changed) vendor/heirloom-doctools/dist/test/grap/grap.ps (contents, props changed) vendor/heirloom-doctools/dist/test/grap/grap.roff vendor/heirloom-doctools/dist/test/grap/makefile (contents, props changed) vendor/heirloom-doctools/dist/test/makefile (contents, props changed) vendor/heirloom-doctools/dist/test/pic/ vendor/heirloom-doctools/dist/test/pic/makefile (contents, props changed) vendor/heirloom-doctools/dist/test/pic/pic.more (contents, props changed) vendor/heirloom-doctools/dist/test/pic/pic.ps (contents, props changed) vendor/heirloom-doctools/dist/test/pic/pic.roff vendor/heirloom-doctools/dist/test/refer/ vendor/heirloom-doctools/dist/test/refer/32/ vendor/heirloom-doctools/dist/test/refer/32/bib vendor/heirloom-doctools/dist/test/refer/32/makefile (contents, props changed) vendor/heirloom-doctools/dist/test/refer/32/out vendor/heirloom-doctools/dist/test/refer/ab/ vendor/heirloom-doctools/dist/test/refer/ab/ab.bib vendor/heirloom-doctools/dist/test/refer/ab/ab.ms vendor/heirloom-doctools/dist/test/refer/ab/makefile (contents, props changed) vendor/heirloom-doctools/dist/test/refer/ab/out vendor/heirloom-doctools/dist/test/tbl/ vendor/heirloom-doctools/dist/test/tbl/1cell-allbox.roff vendor/heirloom-doctools/dist/test/tbl/ND.roff vendor/heirloom-doctools/dist/test/tbl/ab1.roff vendor/heirloom-doctools/dist/test/tbl/ab2.roff vendor/heirloom-doctools/dist/test/tbl/expand.nr vendor/heirloom-doctools/dist/test/tbl/linienbsp.roff vendor/heirloom-doctools/dist/test/tbl/makefile (contents, props changed) vendor/heirloom-doctools/dist/test/tbl/mid-sq.roff vendor/heirloom-doctools/dist/test/tbl/mm.roff vendor/heirloom-doctools/dist/test/tbl/n.roff vendor/heirloom-doctools/dist/test/tbl/no-unicode.roff vendor/heirloom-doctools/dist/test/tbl/short-v.roff vendor/heirloom-doctools/dist/test/tbl/supermarket.roff vendor/heirloom-doctools/dist/test/tbl/tbl-backslash.roff vendor/heirloom-doctools/dist/test/tbl/tbl.doc vendor/heirloom-doctools/dist/test/tbl/tbl.doc.more vendor/heirloom-doctools/dist/test/tbl/tbl.doc.ps (contents, props changed) vendor/heirloom-doctools/dist/test/tbl/tbl.more (contents, props changed) vendor/heirloom-doctools/dist/test/tbl/tbl.ps (contents, props changed) vendor/heirloom-doctools/dist/test/tbl/tbl.roff vendor/heirloom-doctools/dist/test/tbl/tv.roff vendor/heirloom-doctools/dist/test/tbl/vi.roff vendor/heirloom-doctools/dist/troff/ vendor/heirloom-doctools/dist/troff/ext.h (contents, props changed) vendor/heirloom-doctools/dist/troff/hytab.c (contents, props changed) vendor/heirloom-doctools/dist/troff/libhnj/ vendor/heirloom-doctools/dist/troff/libhnj/AUTHORS vendor/heirloom-doctools/dist/troff/libhnj/Makefile.mk (contents, props changed) vendor/heirloom-doctools/dist/troff/libhnj/README vendor/heirloom-doctools/dist/troff/libhnj/README.hyphen vendor/heirloom-doctools/dist/troff/libhnj/hnjalloc.c (contents, props changed) vendor/heirloom-doctools/dist/troff/libhnj/hnjalloc.h (contents, props changed) vendor/heirloom-doctools/dist/troff/libhnj/hyphen.c (contents, props changed) vendor/heirloom-doctools/dist/troff/libhnj/hyphen.d/ vendor/heirloom-doctools/dist/troff/libhnj/hyphen.d/Makefile.mk (contents, props changed) vendor/heirloom-doctools/dist/troff/libhnj/hyphen.d/NOTES vendor/heirloom-doctools/dist/troff/libhnj/hyphen.d/hyph_de_DE.dic vendor/heirloom-doctools/dist/troff/libhnj/hyphen.d/hyph_de_DE@traditional.dic vendor/heirloom-doctools/dist/troff/libhnj/hyphen.d/hyph_en_US.dic vendor/heirloom-doctools/dist/troff/libhnj/hyphen.d/hyph_fr_FR.dic vendor/heirloom-doctools/dist/troff/libhnj/hyphen.d/hyph_it_IT.dic vendor/heirloom-doctools/dist/troff/libhnj/hyphen.d/hyph_la_VA.dic vendor/heirloom-doctools/dist/troff/libhnj/hyphen.d/hyph_nl_NL.dic vendor/heirloom-doctools/dist/troff/libhnj/hyphen.d/substring.pl (contents, props changed) vendor/heirloom-doctools/dist/troff/libhnj/hyphen.h (contents, props changed) vendor/heirloom-doctools/dist/troff/libhnj/test.c (contents, props changed) vendor/heirloom-doctools/dist/troff/n1.c (contents, props changed) vendor/heirloom-doctools/dist/troff/n2.c (contents, props changed) vendor/heirloom-doctools/dist/troff/n3.c (contents, props changed) vendor/heirloom-doctools/dist/troff/n4.c (contents, props changed) vendor/heirloom-doctools/dist/troff/n5.c (contents, props changed) vendor/heirloom-doctools/dist/troff/n7.c (contents, props changed) vendor/heirloom-doctools/dist/troff/n8.c (contents, props changed) vendor/heirloom-doctools/dist/troff/n9.c (contents, props changed) vendor/heirloom-doctools/dist/troff/ni.c (contents, props changed) vendor/heirloom-doctools/dist/troff/nii.c (contents, props changed) vendor/heirloom-doctools/dist/troff/nroff.d/ vendor/heirloom-doctools/dist/troff/nroff.d/Makefile.mk (contents, props changed) vendor/heirloom-doctools/dist/troff/nroff.d/draw.c (contents, props changed) vendor/heirloom-doctools/dist/troff/nroff.d/draw.h (contents, props changed) vendor/heirloom-doctools/dist/troff/nroff.d/n10.c (contents, props changed) vendor/heirloom-doctools/dist/troff/nroff.d/n6.c (contents, props changed) vendor/heirloom-doctools/dist/troff/nroff.d/nroff.1 (contents, props changed) vendor/heirloom-doctools/dist/troff/nroff.d/pt.h (contents, props changed) vendor/heirloom-doctools/dist/troff/nroff.d/terms.d/ vendor/heirloom-doctools/dist/troff/nroff.d/terms.d/Makefile.mk (contents, props changed) vendor/heirloom-doctools/dist/troff/nroff.d/terms.d/README vendor/heirloom-doctools/dist/troff/nroff.d/terms.d/a.2631 vendor/heirloom-doctools/dist/troff/nroff.d/terms.d/a.2631-c vendor/heirloom-doctools/dist/troff/nroff.d/terms.d/a.2631-e vendor/heirloom-doctools/dist/troff/nroff.d/terms.d/a.300 vendor/heirloom-doctools/dist/troff/nroff.d/terms.d/a.300-12 vendor/heirloom-doctools/dist/troff/nroff.d/terms.d/a.300s vendor/heirloom-doctools/dist/troff/nroff.d/terms.d/a.300s-12 vendor/heirloom-doctools/dist/troff/nroff.d/terms.d/a.382 vendor/heirloom-doctools/dist/troff/nroff.d/terms.d/a.4000a vendor/heirloom-doctools/dist/troff/nroff.d/terms.d/a.450 vendor/heirloom-doctools/dist/troff/nroff.d/terms.d/a.450-12 vendor/heirloom-doctools/dist/troff/nroff.d/terms.d/a.832 vendor/heirloom-doctools/dist/troff/nroff.d/terms.d/a.lp vendor/heirloom-doctools/dist/troff/nroff.d/terms.d/ab.37 vendor/heirloom-doctools/dist/troff/nroff.d/terms.d/ab.8510 vendor/heirloom-doctools/dist/troff/nroff.d/terms.d/ab.X vendor/heirloom-doctools/dist/troff/nroff.d/terms.d/ab.tn300 vendor/heirloom-doctools/dist/troff/nroff.d/terms.d/b.300 vendor/heirloom-doctools/dist/troff/nroff.d/terms.d/b.lp vendor/heirloom-doctools/dist/troff/nroff.d/terms.d/tab.utf8 vendor/heirloom-doctools/dist/troff/nroff.d/tw.h (contents, props changed) vendor/heirloom-doctools/dist/troff/suftab.c (contents, props changed) vendor/heirloom-doctools/dist/troff/tdef.h (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/ vendor/heirloom-doctools/dist/troff/troff.d/Makefile.mk (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/README vendor/heirloom-doctools/dist/troff/troff.d/afm.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/afm.h (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dev.h (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/devaps/ vendor/heirloom-doctools/dist/troff/troff.d/devaps/B vendor/heirloom-doctools/dist/troff/troff.d/devaps/BI vendor/heirloom-doctools/dist/troff/troff.d/devaps/C vendor/heirloom-doctools/dist/troff/troff.d/devaps/CE vendor/heirloom-doctools/dist/troff/troff.d/devaps/CI vendor/heirloom-doctools/dist/troff/troff.d/devaps/CT vendor/heirloom-doctools/dist/troff/troff.d/devaps/CW vendor/heirloom-doctools/dist/troff/troff.d/devaps/CX vendor/heirloom-doctools/dist/troff/troff.d/devaps/DESC vendor/heirloom-doctools/dist/troff/troff.d/devaps/G vendor/heirloom-doctools/dist/troff/troff.d/devaps/GB vendor/heirloom-doctools/dist/troff/troff.d/devaps/GI vendor/heirloom-doctools/dist/troff/troff.d/devaps/GR vendor/heirloom-doctools/dist/troff/troff.d/devaps/GS vendor/heirloom-doctools/dist/troff/troff.d/devaps/H vendor/heirloom-doctools/dist/troff/troff.d/devaps/HB vendor/heirloom-doctools/dist/troff/troff.d/devaps/HI vendor/heirloom-doctools/dist/troff/troff.d/devaps/HK vendor/heirloom-doctools/dist/troff/troff.d/devaps/HL vendor/heirloom-doctools/dist/troff/troff.d/devaps/HX vendor/heirloom-doctools/dist/troff/troff.d/devaps/I vendor/heirloom-doctools/dist/troff/troff.d/devaps/MB vendor/heirloom-doctools/dist/troff/troff.d/devaps/MI vendor/heirloom-doctools/dist/troff/troff.d/devaps/MR vendor/heirloom-doctools/dist/troff/troff.d/devaps/MX vendor/heirloom-doctools/dist/troff/troff.d/devaps/Makefile.mk (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/devaps/PA vendor/heirloom-doctools/dist/troff/troff.d/devaps/PB vendor/heirloom-doctools/dist/troff/troff.d/devaps/PI vendor/heirloom-doctools/dist/troff/troff.d/devaps/PO vendor/heirloom-doctools/dist/troff/troff.d/devaps/PX vendor/heirloom-doctools/dist/troff/troff.d/devaps/R vendor/heirloom-doctools/dist/troff/troff.d/devaps/README vendor/heirloom-doctools/dist/troff/troff.d/devaps/S vendor/heirloom-doctools/dist/troff/troff.d/devaps/S1 vendor/heirloom-doctools/dist/troff/troff.d/devaps/SC vendor/heirloom-doctools/dist/troff/troff.d/devaps/SM vendor/heirloom-doctools/dist/troff/troff.d/devaps/TB vendor/heirloom-doctools/dist/troff/troff.d/devaps/TX vendor/heirloom-doctools/dist/troff/troff.d/devaps/aps.h (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/devaps/build.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/devaps/daps.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/devaps/daps.g vendor/heirloom-doctools/dist/troff/troff.d/devaps/daps.h (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/devaps/dev.h (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/devaps/draw.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/devaps/getopt.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/devaps/makedev.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/devaps/version vendor/heirloom-doctools/dist/troff/troff.d/devaps/version.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dhtml/ vendor/heirloom-doctools/dist/troff/troff.d/dhtml/Makefile.mk (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dhtml/char.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dhtml/char.h (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dhtml/dhtml.1 (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dhtml/dhtml.h (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dhtml/dhtml.l vendor/heirloom-doctools/dist/troff/troff.d/dhtml/lib.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dhtml/lib.h (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dhtml/main.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dhtml/main.h (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dhtml/roff.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dhtml/roff.h (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dhtml/tr_out.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dhtml/tr_out.h (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/ vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/Makefile.mk (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/README vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/afm.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/asciitype.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/asciitype.h (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/color.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/comments.h (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/dpost.1 (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/dpost.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/dpost.h (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/draw.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/ext.h (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/gen.h (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/getopt.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/glob.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/makedev.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/misc.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/otf.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/path.h (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/pictures.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/ps_include.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/request.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/request.h (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/version.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/draw.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/font/ vendor/heirloom-doctools/dist/troff/troff.d/font/Makefile.mk (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/font/README vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/ vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/B vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/BI vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/C vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/CB vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/CHAR vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/CI vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/CR vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/CW vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/DESC vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/H vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/HB vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/HI vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/I vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/Makefile.mk (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/R vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/S vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/charset vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/makefont.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/ vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/AB vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/AB.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/AI vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/AI.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/AR vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/AR.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/AX vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/AX.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/B vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/B.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/BI vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/BI.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/CB vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/CB.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/CI vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/CI.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/CO vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/CO.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/CW vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/CW.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/CX vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/CX.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/DESC vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/DESC.big vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/DESC.small vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/FONTMAP vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/GR vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/GR.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/H vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/H.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/HB vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/HB.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/HI vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/HI.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/HNB vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/HNB.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/HNBI vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/HNBI.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/HNI vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/HNI.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/HNR vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/HNR.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/HX vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/HX.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/I vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/I.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/KB vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/KB.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/KI vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/KI.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/KR vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/KR.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/KX vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/KX.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/NB vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/NB.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/NI vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/NI.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/NR vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/NR.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/NX vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/NX.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/PA vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/PA.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/PB vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/PB.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/PI vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/PI.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/PX vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/PX.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/R vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/R.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/S vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/S.big vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/S.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/S.small vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/S1 vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/S1.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/VB vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/VB.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/VI vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/VI.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/VR vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/VR.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/VX vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/VX.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/ZD vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/ZD.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/ZI vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/ZI.name vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/charlib/ vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/charlib/12 vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/charlib/14 vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/charlib/34 vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/charlib/BRACKETS_NOTE vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/charlib/Fi vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/charlib/Fl vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/charlib/L1 vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/charlib/L1.map vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/charlib/LH.map vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/charlib/LH_uc vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/charlib/Lb vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/charlib/Lb.map vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/charlib/OLD_LH vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/charlib/OLD_LH.map vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/charlib/README vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/charlib/Sl vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/charlib/bx vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/charlib/ci vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/charlib/ff vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/charlib/lc vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/charlib/lf vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/charlib/lh vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/charlib/ob vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/charlib/rc vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/charlib/rf vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/charlib/rh vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/charlib/sq vendor/heirloom-doctools/dist/troff/troff.d/font/devpost/charlib/~= vendor/heirloom-doctools/dist/troff/troff.d/font/devps/ vendor/heirloom-doctools/dist/troff/troff.d/font/devps/B vendor/heirloom-doctools/dist/troff/troff.d/font/devps/B.afm vendor/heirloom-doctools/dist/troff/troff.d/font/devps/BI vendor/heirloom-doctools/dist/troff/troff.d/font/devps/BI.afm vendor/heirloom-doctools/dist/troff/troff.d/font/devps/CB vendor/heirloom-doctools/dist/troff/troff.d/font/devps/CB.afm vendor/heirloom-doctools/dist/troff/troff.d/font/devps/CI vendor/heirloom-doctools/dist/troff/troff.d/font/devps/CI.afm vendor/heirloom-doctools/dist/troff/troff.d/font/devps/CW vendor/heirloom-doctools/dist/troff/troff.d/font/devps/CW.afm vendor/heirloom-doctools/dist/troff/troff.d/font/devps/CX vendor/heirloom-doctools/dist/troff/troff.d/font/devps/CX.afm vendor/heirloom-doctools/dist/troff/troff.d/font/devps/DESC vendor/heirloom-doctools/dist/troff/troff.d/font/devps/FONTMAP vendor/heirloom-doctools/dist/troff/troff.d/font/devps/H vendor/heirloom-doctools/dist/troff/troff.d/font/devps/H.afm vendor/heirloom-doctools/dist/troff/troff.d/font/devps/HB vendor/heirloom-doctools/dist/troff/troff.d/font/devps/HB.afm vendor/heirloom-doctools/dist/troff/troff.d/font/devps/HI vendor/heirloom-doctools/dist/troff/troff.d/font/devps/HI.afm vendor/heirloom-doctools/dist/troff/troff.d/font/devps/HX vendor/heirloom-doctools/dist/troff/troff.d/font/devps/HX.afm vendor/heirloom-doctools/dist/troff/troff.d/font/devps/I vendor/heirloom-doctools/dist/troff/troff.d/font/devps/I.afm vendor/heirloom-doctools/dist/troff/troff.d/font/devps/MustRead.html (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/font/devps/R vendor/heirloom-doctools/dist/troff/troff.d/font/devps/R.afm vendor/heirloom-doctools/dist/troff/troff.d/font/devps/S vendor/heirloom-doctools/dist/troff/troff.d/font/devps/S.afm vendor/heirloom-doctools/dist/troff/troff.d/font/devps/S1 vendor/heirloom-doctools/dist/troff/troff.d/font/devps/S1.afm vendor/heirloom-doctools/dist/troff/troff.d/font/devps/ZD vendor/heirloom-doctools/dist/troff/troff.d/font/devps/ZD.afm vendor/heirloom-doctools/dist/troff/troff.d/font/devpslow/ vendor/heirloom-doctools/dist/troff/troff.d/font/devpslow/DESC vendor/heirloom-doctools/dist/troff/troff.d/font/devpsmed/ vendor/heirloom-doctools/dist/troff/troff.d/font/devpsmed/DESC vendor/heirloom-doctools/dist/troff/troff.d/fontmap.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/fontmap.h (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/makedev.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/otf.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/otfdump.1 (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/otfdump.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/otfdump_vs.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/postscript/ vendor/heirloom-doctools/dist/troff/troff.d/postscript/Makefile.mk (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/postscript/aps.ps (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/postscript/baseline.ps (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/postscript/color.ps (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/postscript/cutmarks.ps (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/postscript/dpost.ps (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/postscript/draw.ps (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/postscript/fatcourier.ps (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/postscript/forms.ps (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/postscript/ps.requests vendor/heirloom-doctools/dist/troff/troff.d/postscript/ps_include.ps (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/pt.h (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/t10.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/t6.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/ta.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/ vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/Makefile.mk (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/acm.me vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/an-ext vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/an.in (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/andoc.in (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/bib.in (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/chars.me vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/color vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/deltext.me vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/doc-common vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/doc-ditroff.in (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/doc-nroff vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/doc-syms vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/doc.in (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/e.in (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/eqn.me vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/float.me vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/footnote.me vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/g.in (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/index.me vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/local.me vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/m.in (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/man.7 (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/mcolor.7 (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/mdoc.7 (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/mmn vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/mmt vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/mpictures.7 (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/ms.acc vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/ms.cov vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/ms.eqn vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/ms.ref vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/ms.tbl vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/ms.ths vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/ms.toc vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/naa (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/null.me vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/padj vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/pictures vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/pm.in (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/ptx vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/refer.me vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/s.in (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/safe vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/sh.me vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/srefs vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/taa vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/tbl.me vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/thesis.me vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/tmac.gchar vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/v vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/vgrind vendor/heirloom-doctools/dist/troff/troff.d/troff.1 (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/troff.h (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/unimap.c (contents, props changed) vendor/heirloom-doctools/dist/troff/troff.d/unimap.h (contents, props changed) vendor/heirloom-doctools/dist/troff/version.c (contents, props changed) vendor/heirloom-doctools/dist/version.mk (contents, props changed) vendor/heirloom-doctools/dist/vgrind/ vendor/heirloom-doctools/dist/vgrind/Makefile.mk (contents, props changed) vendor/heirloom-doctools/dist/vgrind/regexp.c (contents, props changed) vendor/heirloom-doctools/dist/vgrind/retest.c (contents, props changed) vendor/heirloom-doctools/dist/vgrind/version.c (contents, props changed) vendor/heirloom-doctools/dist/vgrind/vfontedpr.c (contents, props changed) vendor/heirloom-doctools/dist/vgrind/vgrind.1 (contents, props changed) vendor/heirloom-doctools/dist/vgrind/vgrind.sh (contents, props changed) vendor/heirloom-doctools/dist/vgrind/vgrindefs.c (contents, props changed) vendor/heirloom-doctools/dist/vgrind/vgrindefs.src Added: vendor/heirloom-doctools/dist/CHANGES ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/heirloom-doctools/dist/CHANGES Thu Oct 6 21:30:09 2016 (r306788) @@ -0,0 +1,353 @@ +2016-09-07 + Escapes \A and \T had unnecessary restrictions regarding the + allowed character set. This let to problems when e.g. gen- + erating man pages with TOC using -dToc. 8-bit characters are + allowed now. + +2016-08-20 + dpost generates valid PostScript when using fonts + with spaces in the glyph names. + (Marcin Cieślak (@FreeBSD)) + +2016-04-27 + -mdoc: Table of contents with hyperlinks and PDF bookmarks + added. + +2016-03-28 + -man: Table of contents with hyperlinks and PDF bookmarks ad- + ded. + +2016-03-15 + eqn bug fixed which had caused crash for DWB neqn test (has + same code). + +2016-03-08 + grap bug fixed which had cause a double free(3) crash. + +Release 160308 +============== + +2016-03-08 + refer: Bug introduced in commit + 89b1284c1de8071f3d7bb3a308cb080b8e2f311b fixed. (Reported by + Anthony J. Bentley (@OpenBSD)) + +Release 160217 +============== + +2016-02-17 + tbl: Invalid memory access bug fixed. (When testing if a + line starts with '_' or '=' it did not check if the string is + empty.) + +2016-02-16 + .tr bugfix: When the first character given to .tr was un- + known, all character translations had been done wrong. + +2016-02-11 + tbl troff bug fixed: Height of table had been calculated + wrong. This could lead to graphics artifacts if a table is + at page bottom. + +2016-02-10 + Many changes to -man and -mdoc. Heirloom's manual page for- + matting is now quite compatible to groff. + +2016-02-08 + Operator 'v' added for ".if". (Some manpages using this.) + +2016-02-02 + -ms: Macros .QS and .QE added. + +2016-01-29 + Support for groff's notation \[uXXXX] added. + +2016-01-26 + nroff: Use of new names for .char now possible. (Up to now + only names found in the tab file could be used.) + +2016-01-01 + Spaces are now allowed in filenames of .cf, .fp, .lf, .nx, + and .so requests. The documentation stated that %20 could be + used to escape spaces. However this was not implemented. + The implementation has now been changed to allow spaces by + quoting the filename with '"'. Additionally character codes + up to 255 are allowed now in filenames. (Bug reported by + Jacob Parker (https://github.com/jacobp100).) + +2015-12-23 + groff's operator ".if F " added. + +2015-12-18 + Support for groff's notation \[char] added. + +2015-12-10 + File system case-sensitivity issue fixed. (Reported by Henry + McGilton.) + +2015-10-28 + Set previous font to current font in case of unknown font. + This is the groff behaviour. E.g. \fIfoo\fP \f(CWbar\fP blah + did underline "blah" in AT&T nroff. + +2015-09-23 + \n[.ns] implemented (had only been documented up to now). + +2015-09-21 + Basic HTML support added. + +2015-09-18 + Escape \I added (test if argument is a valid identifier). \I + is equivalent to groff's \A. + +2015-07-14 + PDFMark: \X'SetBorderStyle' added. + +2015-07-08 + Special groff compatibility mode for manual pages added which + is enabled when register .g is set to 1. + +2015-06-24 + .box bug fixed: .box did discard part of roff's state. + +2015-06-22 + mm(7): .PGFORM added to allow line length change inside docu- + ment. + +2015-06-10 + .ie-.el bug fixed. Up to now .ie-.el did not work fully re- + liable in AT&T roff. (Found during -mdoc debugging.) + +2015-06-08 + mdoc: Macro Lb with library definitions for FreeBSD and + NetBSD added. + +2015-06-05 + nroff -T37 (default), -Tlp and -Tlocale: Display of pic(7) + drawings implemented. + +2015-06-04 + troff -Tpost: All font description files now uppercase (for + use on case-insensitive file systems) and use of groff font + names instead of traditional names now possible with .ft and + \f. + +2015-05-26 + Bugfix: nroff: Local motions had not been local (did stay in + effect across line boundary). + + nroff: Request \D'l ...' added. + +2015-05-02 + mdoc(7): .El: List type stack bug fixed. + +Release 150406 +============== + +2015-04-02 + Renamed otfdump(1) into otf_info(1) to avoid conflicts with + other tools with the same name. + +2015-03-27 + man, mdoc: Special characters for troff updated. + + Bugfix: pic: C precedence error found by clang. + +2015-03-26 + tbl: Key letter 'x' added (a GNU tbl extension). + +2015-03-22 + mdoc macros updated for troff output. + +2015-03-20 + Workaround to handle some .char problems added. The .char + implementation needs to be changed eventually. Currently the + translation takes place in the input stage but it has to be + in the output stage. + + man macros (nroff mode): + - Allow nine instead of six arguments + - Document formated as one large page + - mandoc(1) output layout (indent, left adjust, line length + etc.) adapted + - Workaround for pod2man(1) bug (causes empty first page) ad- + ded + + Minor mdoc macro changes (indent and some special charac- + ters). + +2015-03-19 + \\ can now be used in fields and tables to output a \ but it + is anyway recommended to use \(rs or at least \e instead. + (Traditionally AT&T roff did reduce \\ to \ in fields and + tables so \\\\ had been need to be input for printing one \.) + + Bugfix: roff: Don't recognize . (dot) as a number. Now a + path string like "./." is recognized as "not a number" in- + stead of "division by zero". + +2015-03-18 + Bugfix: roff: Prevent NULL pointer access when using .tr + with characters redefined by .char. + + Bugfix: tbl: Prevent uninitialized pointer access. + +2015-03-13 + Bugfix: Using basic control character (normally ".") or no- + break control charatcer (normally "'") as first argument to + .char made roff unuseable. + +2015-03-02 + tbl: Option -Tlp configures output of table lines with ASCII + characters -, =, |, and + (similar to GNU nroff -Tascii). + Option -Tlocale in a non-UTF-8 locale now behaves as -Tlp. + + Bugfix: tbl with option -TX: Double lines had not been + displayed correctly. + +2015-02-27 + tbl: Option -Tlocale added which (in an UTF-8 locale) en- + ables output of table lines with Unicode glyphs. + +2015-02-26 + Bugfix: The zero width flag (set e.g. by \z or \L) did not + work for Unicode characters. As a consequence e.g. \L could + not be used width \U'2551' to draw a double vertical line. + +2015-02-18 + Bugfix: When there were several .ft requests to not mounted + fonts in short succession the output was wrong. + +2015-02-12 + Read-only register .S added for DWB compatibility. + +2014-12-23 + mdoc: Footer had not been displayed if page length was + reached. + +Release 141217 +============== + +2014-12-16 + mdoc updated for processing up-to-date manpages. Still much + work needs to be done on mdoc. + + nroff: Special character names of arbitrary length are now + possible. + + nroff: Many special characters to -Tlp and -Tlocale (UTF-8) + added. + +2014-12-15 + nroff: Compiled in "tab.lp" and "tab.utf8" removed. The + "nterm" directory is now required for nroff (at least with + file "tab.lp" or "tab.utf8"). + +2014-12-13 + Macro 'lsm' and number registers 'lsn' and 'lss' added. + +2014-12-05 + Bugfix: .unformat: \e gets restored now. + +2014-11-06 + Distingtion between BSD and non-BSD manuals removed (Anthony + J. Bentley). + + pic, tbl, eqn: Allow whitespace between '.' and PS, PE, PF, + TS, TE, EQ, EN. + +2014-11-05 + With command line option '-rcR=1' -man manpages are displayed + as one large single page. + +Release 141029 +============== + +2014-10-29 + Documentation revised by Pierre-Jean Fichet: doc/fonts/ + changed to use free available OTF fonts. + +2014-10-27 + col(1) bugfix: Avoid to access chars before string. + + troff: fdprintf changed back to libc fprintf. + + troff: 32 bit bug in register and macro allocation fixed + (Bug reported by Anthony J. Bentley). + + nroff/troff made -Wall clean. + +2014-10-22 + OpenSolaris col(1) added. + +2014-10-06 + Drawing of filled polygon (\D'P ...'), filled circle (\D'C + ...') and filled ellipse (\D'E ...') added. + +2014-09-21 + *roff: Option -V for version information added. + +2014-09-14 + Any version of roff (e.g. UNIX V7) does count \} as a macro + argument regarding \n(.$. This makes \n(.$ rather random if + you cannot force users to put \} on a separate line *or* to + put it behind the macro call and substract 1 from \n(.$. To + make \n(.$ meaningful again this bug has been fixed now, i.e. + \} is not considered as a macro argument anymore. + +2014-09-07 + Documentation revised by Pierre-Jean Fichet: doc/just/ and + doc/quickstart/ changed to use free available OTF fonts. + +2014-09-03 + Bug reported by Pierre-Jean Fichet fixed: If character '"' + is used in a .char request it did not work in a .if request + as the string compare delimiter. + +2014-08-28 + Bug reported by Blake McBride fixed: Very old versions of + the mm macros inserted cut marks in the document for + typesetters which had used endless paper rolls. Although + they are only of historical significance they had never been + removed in the Solaris version of mm. They are now switched + of (via .rm )k). + +2014-08-23 + Bugfix by Steffen Nurpmeso: In .rm code a function return + value is unchecked used as a pointer. + +2014-08-20 + eqn(1) did not compile because of bison to BSD yacc differ- + ences. Sorry, had not tested on Linux this time... + +2014-08-18 + Experimental bugfix: When .bp is directly followed by .. and + .bp triggers a macro which calls a macro then document text + is printed at that trap position. This bug is also in other + ditroff derivatives (e.g. DWB and Plan9). It is difficult to + track the bug to it's root cause so it is an experimental fix + at the moment. + +2014-08-17 + \fP after \fS did set the font before the previous font and + not the previous one. + +2014-08-16 + Bug reported by Pierre-Jean Fichet fixed: If character "!" + is used in a .char request it did not work in a .if request + as the NOT operator. + +2014-08-14 + The eqn parser used type int for all token values--even + pointers. This may work fine on 32 bit hardware but causes + problems on 64 bit. A new data type had been introduced to + separate int tokens from pointers. + + Also a bug in the parser regarding movements (e.g. FWD) had + been fixed. + +2014-07-27 + A variable had been initilized after use. This variable + minus a literal value is used as an array index. When data + from the array is read an invalid memory segment is accessed. + This had caused crashes on at least OpenBSD. Added: vendor/heirloom-doctools/dist/CHANGES_GR ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/heirloom-doctools/dist/CHANGES_GR Thu Oct 6 21:30:09 2016 (r306788) @@ -0,0 +1,1213 @@ +Release ... +* [nt]roff: Fix the execution order of output line traps to be left-to-right, + and execute them before page traps, as documented (bug report by + Pierre-Jean Fichet). +* troff/dpost: Support for URI links in PDF documents has been added + (contributed by Michael Piotrowski). +* [nt]roff: Hyphenation patterns for Dutch have been added (contributed + by Erwin Koning). +* troff/dpost: "kern" tables in TrueType fonts were indexed wrongly, which + mostly led to missing kerning pairs but might have led to completely wrong + kerning pairs under rare circumstances (patch by Matthew Fischer). +* troff: The ".connectchar" request has been added to customize the set + of characters that are drawn as overlapping with the "\l" function. +* troff: Allow "\~" to shrink, not just to stretch (bugreport by Roy Fisher). +* troff/dpost: Embed TrueType fonts without a PostScript field correctly + (bug reported by FENG Yu Ning). +* troff/dpost: Include the last character in a TrueType "post" 2.0 table + which was previously omitted; same for the last entry of the last subtable + in the "cmap" table (patch by Matthew Fischer). +* troff/dpost: Accept "cmap" entries with Platform ID 3, Encoding ID 0 + (Symbol) as Unicode tables (patch by Matthew Fischer). +* troff/dpost: Handle TrueType fonts with format 12 cmap tables (UCS-4) + (patch by Matthew Fischer). +* troff/dpost: Handle TrueType fonts in which glyphs appear multiple times + in Unicode tables gracefully (bugreport by Matthew Fischer). +* troff/dpost: Handle TrueType files with a unitsPerEm value less than + 1000 ((bugreport by Matthew Fischer). +* troff: Do not apply font-specific character translation inside \D, + which led to wrong output e.g. with \D'l' with an OpenType font with + the small caps feature activated (bug reported by Russ Cox). +* dpost: Fixed the width of the "\(ul" character such that the lines of + wide boxed tables do not stick out at the right end anymore (bugreport + by Roy Fisher). +* troff: The "\X" and "\Y" escape sequences are no longer interpreted + in copy mode, as there is no case when this would be useful, and the + behavior now matches groff and Plan 9 troff (thanks to Russ Cox). +* dpost: Fixed a case in which invalid backslash sequences were generated + when insane sizes appeared in intermediate troff input (bug reported by + Russ Cox). +* refer: The "-p" option now works with files that are not in the + current directory (bug reported by Michael Piotrowski). +* lookbib: This version does not support the "-n" option, which was + described in the BSD-derived manual page (thanks to Michael Piotrowski). +* [nt]roff: Do not go into an infinite loop if a tab character appears in + the arguments to ".warn" (bug reported by Russ Cox). +* [nt]roff: Fixed a possible crash on 64-bit machines due to the choice + of an int for ptrdiff_t in paragraph-at-once justification (Steve Kargl), + and another one in the hyphenation code (Sean Jensen). + +Release 080407 +* [nt]roff: A type definition problem that caused an endless loop on + 64-bit systems has been fixed. +* [nt]roff: The ".warn" request now accepts full numeric expressions + instead of plain numbers only. +* -mg macros: When reading the output of "ls" to emulate ".mso", use + nofill mode to avoid artifacts from paragraph adjustment that cause + the request to fail. +* eqn: Before an equation or binary operator, print a "\|" instead of + a "\^" if the preceding character is italic. The previous behavior + resulted from a too far-reaching change in release 051107. (Bug + reported by Joerg van den Hoff.) +* eqn: Do not displace "hat" and "tilde" horizontally (bug reported by + Joerg van den Hoff). +* eqn: Fixed the types of yylex() and yypv. + +Release 070908 +* troff: The ".hw" request now works correctly for words that contain + ligatures (bug reported by Dirk-Wilhelm Peters). +* troff: Hyphenate correctly when a hyphenation point occurs inside a + ligature that follows a non-ASCII character. Previously, the word was + actually hyphenated too early in this situation (bug reported by + Dirk-Wilhelm Peters). +* troff: Clear the font width cache before mounting a Type 1, TrueType, + or OpenType font. The previous failure to do so could lead to improper + alignment of lines when a font was mounted on the same font position + that was previously used (bug reported by Dirk-Wilhelm Peters). +* [nt]roff: When converting floating point values in exponential notation + (1.234e5 etc.) to integers, apply the exponent before computing the final + position of the decimal point for better rounding behavior (bug reported + by Dirk-Wilhelm Peters). + +Release 070524 +* [nt]roff: Fixed an endless loop that occurred when ".ns" was active at + the end of a document and ".bp" was called from the page trap macro. +* dpost: When including a picture, the PostScript "save" and "restore" + operators are now executed in correct order. Previously, the state + before page initialization was restored before including a picture. + Thus, graphics attributes such as colors were reset to the state + before page initialization, and drawing (as with pic) did not work + afterwards but resulted in a PostScript error. +* [nt]roff: With paragraph-at-once adjustment, if a ".in" was encountered + before any input, its argument was ignored. This lead to zero indent in + combination with the 6h Edition manual page macros, and has been fixed. +* troff: Do not break a line at a zero-width character, as e.g. inside a + "\X'...'" or "\z'...'". +* troff: The ".flig" request can now use the \[] names for ff, ffi, and + ffl ligatures properly, i.e. ".flig R ff \[ff]" works (bug reported by + Sebastian Leusch). +* troff: Pseudo-ligatures for ff, ffi, and ffl are no longer added to fonts + that do not contain the respective base characters. This makes it possible + to use a fallback sequence like ".fallback R XX FF", where XX does not + contain ff ligatures, but FF does, and to get the ligatures from font FF + as expected (bug reported by Sebastian Leusch). +* [nt]roff: Using ".hy" or ".nh" is now effective for the last word of a + "\@{...\@}" inline environment. +* The file "grap.defines" is now installed again; it was omitted in the + previous release. +* When generating a RPM package, install all manual pages into + "/usr/share/man/5man" to avoid conflicts with manual pages of + packages supplied by the distribution default packages. + +Release 070318 +* [nt]roff: The concept of an "inline environment" has been introduced. + An inline environment contains the values of the current point size, the + current font, the current escape character, and other similar parameters. + It can be saved with "\@{" and then restored with "\@}". Unlike the "\s0" + and "\fP" escape sequences, inline environments form a stack. Thus after + executing "\fB...\@{\fR...\@{\fI...\@}...\@}", the current font is "B" + again, while it would be "I" with "\fB...\fR...\fI...\fP...\fP". Inline + environments can be used to represent constructs like "..." in + HTML, which would be translated as "\@{\fI...\@}". +* [nt]roff: A modulo zero operation (N%0) is now ignored and causes a + warning of the "range" type to be issued. It could previously lead to + a core dump because of an arithmetic exception. +* [nt]roff: In paragraph-at-once adjustment mode, ".in" and ".ll", when + invoked from traps, now have a permanent effect; such settings were + previously discarded at the end of the paragraph. What still does not + work is "'in" outside a trap with a value relative to the indent set + inside a trap. +* [nt]roff: An internal problem with paragraph-at-once line breaking mode + has been fixed; it caused a ".in" or ".ll" command to be ignored under + rare circumstances. +* [nt]roff: At the end of input in paragraph-at-once line breaking mode, + make sure that any partial paragraph is flushed before executing other + termination procedures. The previous failure to do so lead to missing + output at the end of the document if it did not fit on the current page. +* troff, dpost: OpenType and TrueType fonts with Unicode platformID cmap + tables are now supported for reading Unicode character mapping tables. + Previously, only Microsoft platformID cmap tables were supported, and + others were ignored. +* troff, dpost: Fixed a null pointer dereference that occurred when an + illegal glyph ID was encountered in the "liga" table of an OpenType + font. +* troff, dpost: Apple TrueType fonts with a "true" header magic are now + actually supported; they could previously only be read by otfdump. +* [nt]roff: ".ev \}" has now been actually fixed (Bugreport by Dirk-Wilhelm + Peters.) +* -man macros: ".P" is now recognized; it is the same as ".PP". +* -man macros: ".I \fR other-args" is not ignored anymore; same for + ".B", ".SM", and ".SB". +* Unix 6th Edition manual macro packages have been added. +* -mandoc macros: Recognize Unix 6th Edition pages. +* showfont.sh: Font file arguments with absolute path names are now + supported. + +Release 070202 +* [nt]roff: The "\J" escape sequence has been introduced to specify a + default line breaking penalty; useful to discourage line breaks within + a person's name or a formula. Relative values in the "\j" sequence now + refer to the default penalty value. +* dpost: A manual page has been added since it has now been released by + Sun under the CDDL license. +* -man macros: The ".TP" macro has been fixed not to spread the initial + string. This is particularly for use in combination with "-mpadj" since + paragraph-at-once line breaking can lead to more spreading in the first + line. +* [nt]roff: Special characters like "\}" do now terminate environment + names in arguments to the ".ev" and ".evc" requests as with other names. + Thus ".ev \}" is no longer misinterpreted as an attempt to change to an + environment named "\}". (Bugreport by Dirk-Wilhelm Peters.) +* dpost: Cast size_t arguments to long for printf (Stefan Tramm). +* The reference manual now uses the free TeX Gyre Termes fonts available + from . For this and the other + documentation texts, README files have been added to explain which + fonts are needed in order to build them. (Thanks to Werner Lemberg for + notification.) +* Several manual pages have been moved from "BSD Compatibility" to the + standard sections if they had not actually been part of the SVR4 BSD + compatibility package. + +Release 061212 +* [nt]roff: Relative numbers can be used with the ".pshape" request now; + they refer to the preceding indent and line length pair, or, for the + initial pair, to the standard indent and line lenght settings. +* [nt]roff: A warning of the "range" category is now printed when the + indent is set to a value exceeding the line length. +* troff: In ".ad p" mode, when a line break was inserted after an + existing hyphen or em dash, another hyphen was added when the previous + characters formed a kerning pair. This has been fixed. +* troff: In ".ad p" mode, when the character before the first interword + space formed a kerning pair with the space character, the line length + was incorrectly computed, and the line was prolongated by this amount. + This has been fixed. +* troff: The "\{", "\}", and "\x" escape sequences inhibited kerning in + the adjustment computation but not in the output routine, which could + lead to prolongated output lines. They now inhibit kerning completely. +* eqn: Generated equations no longer start with "\x'0'". This allows + kerning with the preceding character in an inline equation. +* nroff: The content of a "\X" function is now ignored (instead of being + printed with zero width). +* nroff: Combining UTF-8 characters are now assumed to have width zero. +* nroff: The ".rd" request has been fixed; it had not been working since + the last release. +* troff: The ".rd" request now accepts locale-dependent input characters. +* [nt]roff: Fixed an error in ".ad p" mode which could lead to core dumps + with ".ev" requests that were not properly paired. +* nroff: Hyphenation of words containing non-ASCII characters now really + works; such characters were erroneously dropped with the last release, + leading to incorrect hyphenations in some cases. +* troff: Use of the "\s+[n]", "\s-[n]", "\s+'n'", or "\s-'n'" escape + sequence forms now leaves the arithmetic unit handling in a clean + state. The previous failure to do so lead to wrong numeric results + under certain circumstances; in particular, it caused the "over" eqn + keyword to produce incorrect output. + +Release 061114 +* [nt]roff: The units "t" (printer's point), "T" (printer's pica), "D" + (Didot point) and "C" (cicero) have been introduced. +* [nt]roff: ".ad p" mode no longer employs a temporary diversion; the + lines are now written directly to the current output level, possibly + interrupted by trap processing. This makes it possible to use "'in" + and ".ll" inside a paragraph, although the line breaking decisions + may be suboptimal in this case. +* [nt]roff: The ".hypp" request now accepts a third argument specifying + a penalty for hyphenating the last word of a paragraph. +* nroff: Characters are now internally stored as 64-bit integers as + in troff. As a consequence, hyphenation of words in international + languages now works if non-ASCII characters are involved. +* [nt]roff: A memory allocation error that could occur with extensive + use of output-line traps has been fixed. +* [nt]roff: A control character written in a diversion is now correctly + interpreted when the diversion is re-read (unless in groff compatibility + mode). This fixes the ".AU" macro of "-mm". +* [nt]roff: The "\R" escape sequence works correctly again; in the last + release, it had inserted the letter "R" into the text. +* [nt]roff: Long names including a string in their name are now handled + correctly, e.g. ".nr x\*yz 1" no longer tries to set the register "x\*y" + to the value "z". +* [nt]roff: Fixed some more memory access problems that had been introduced + with support for local variables. +* [nt]roff: Fixed a non-local goto error that could lead to segmentation + faults with ".ad p" at the end of the input. +* [nt]roff: Fixed a problem in ".bp" that could lead to the page number + being reset to zero in ".ad p" mode. +* [nt]roff: A null pointer dereference in ".ad p" mode that occured when + nofill mode was activated while a partial paragraph was present has been + fixed. +* -ms: The ".IX" index macro now works in ".padj" mode. +* -me: The ".(x" and ".)x" index macros now work in ".padj" mode. +* A "-mpadj" macro set has been added. It simply executes ".do padj" + and is useful to enable paragraph-at-once adjustment from the command + line. + +Release 061106 +* [nt]roff: Support for paragraph-based justification has been added, + enabled with ".ad p". The "Justification in Heirloom Troff" document + has been expanded to cover the new features. +* [nt]roff: The ".hylen" request has been introduced to control the + minimum number of characters a word must contain in order to be subject + to hyphenation. The default is 5 independent of whether the ".hylang" + request is active (in that case, it previously had been 4). +* [nt]roff: The ".pshape" request has been introduced to control the shape + of a paragraph in ".ad p" mode. +* [nt]roff: The ".hypp" request has been introduced to control penalties + of hyphenation points in ".ad p" mode. +* [nt]roff: The ".padj" request has been added; it enables ".ad p" mode + globally in all environments. It is most useful to enable paragraph-at- + once adjustment in existing documents. +* [nt]roff: The "\j" escape sequence has been introduced to specify custom + penalties for line breaks in ".ad p" mode. +* troff: The ".char" request is now able to construct replacements for + otherwise unknown locale-specific characters. +* troff: Fixed a typo in the hyphenation code that could result in the + insertion of a large negative vertical motion in a word containing a + character above Unicode point U+0800. +* troff: Fixed "\H" and "\S" to become effective if positioned directly + after a font change (Bugreport by Dirk-Wilhelm Peters). +* [nt]roff: The ".pull" request (introduced in the previous release) has + been removed again. It is recommended that the traditional approach to + re-divert text is used instead. +* [nt]roff: Fixed an invalid memory access that had been introduced with + local strings in the last release. +* troff: Fixed a segmentation violation if a ligature in a hyphenated + word was not in the current font (Bugreport by Dirk-Wilhelm Peters). +* troff, dpost: Fixed a rounding error when reading TrueType metrics. +* dpost: Fixed a bug introduced with the previous release that caused + PostScript errors on a page following colored text unless the "-e" + option was explicitly specified. +* dpost: Now handles DSC font comments in included PostScript files and + supplies glyph data for them if specified with a troff ".fp" request. +* dpost: Fixed to compile on NetBSD again (Bugreport by Dirk-Wilhelm Peters). +* eqn: Handles fractional point sizes with "size" and "gsize" now. +* tbl: Fixed a segmentation fault with empty tables that occurred due + to the changed memory layout introduced in the last release. +* A "Quickstart Guide" document has been added. It is aimed at people + who know other variants of troff to some extent and want to explore + Heirloom troff. + +Release 061010 +* A simplistic XSLT stylesheet to convert OpenDocument text to troff input + has been added. See the comments in the file "stuff/odt2tr.xsl" for usage + instructions. +* [nt]roff: Local strings and number registers are now supported. They can + be defined using ".lds", ".lnr", and ".lnrf". A local string or register + is visible only in the instance of the macro in which is has been defined + and can then be accessed like a standard global string or register. +* [nt]roff: The ".pull" request has been introduced to print text of a given + height from a diversion and remove it afterwards. +* [nt]roff: The ".writem" request has been added to write the contents of + a string, macro, or diversion to a file stream. +* [nt]roff: The ".dwh" and ".dch" requests have been introduced to allow + multiple diversion traps in the same diversion. +* [nt]roff: The ".trin" (translate but retranslate with ".asciify") and + ".trnt" (translate but not in transparent mode) requests have been added. +* [nt]roff: The "\n[.dilev]" register contains the current diversion level. +* [nt]roff: The "\B" escape sequence (check for valid numerical expression) + is now available in regular mode too, not only in groff compatibility mode. +* troff: The second argument to the ".fkern" request now specifies a minimum + absolute amount for kerning pairs read from font metrics files. Kerning + pairs with smaller adjustments are ignored. +* tbl: Can now optionally use graphic drawing commands (troff "\D") instead + of repeated-character line drawing (troff "\l" and "\L"). The "graphics" + option enables it per table, and the "-g" command line option enables it + globally. +* tbl: The static limits on the number of table lines, columns, and heading + lines have been removed. In effect, all lines of a table are considered + when the column widths are computed, and ".T&" can occur at any line. +* tbl: The "nokeep" option causes tbl not to write a ".ne" command for a + boxed table. +* troff: The CW, CI, CB, and CX fonts no longer substitute the "fi" and "fl" + ligatures with the "devps" device. This is consistent with "devpost". +* [nt]roff: If a word starts with a motion followed by a hyphenation + indicator, such as "\h'1m'\%text" or "\|\%text", hyphenation for the + word is now suppressed, and no hyphen is generated. +* [nt]roff: When text from a diversion is output or rediverted, it is no + longer subject to character translations specified with ".tr" and ".ftr". +* [nt]roff: In groff compatibility mode, unless a string is interpolated + with explicit arguments, the arguments to the surrounding macro instance + remain visible and can be referenced by "\$" from within the string. +* [nt]roff: The ".length" and ".index" request now strip an initial """ in + their last argument to allow initial white space. +* [nt]roff: The blank line macro is not called when a diversion is reread + in nofill mode anymore. +* troff: The escape sequence "\s[0]" now resets the point size to the + previous value as "\s0" does. +* [nt]roff: Arbitrary delimiters are now allowed with "\s''" escape + sequences. +* [nt]roff: Fixed a bug that caused ".shift" without arguments to be ignored + if the last previous numerical expression was invalid. +* troff: The indent of the current line is no longer part of a PDF link + that continues from the previous line. +* [nt]roff: ".rm" and ".rr" no longer issue a warning if one of their + arguments is not a defined macro or register, respectively. +* troff: Fixed an error that sometimes caused the "x X Track" command to miss + in intermediate output. +* troff, dpost: The short font name is now part of the "x font" commands + in intermediate output for Type 1, TrueType, and OpenType fonts. +* troff: Before generating an "x X" command because of a "\X" or "\Y" escape + sequence, the current horizonal position is now emitted to intermediate + output. This makes input like "\h'1i'\X'anything'" work as expected. +* troff: Changes between environments with different ".ss" settings are now + handled correctly. +* dpost: The default encoding for the "ps" device is now "3". +* dpost: The PostScript "awidthshow" operator is now used with the "-e2" and + "-e3" encoding options, resulting in reasonable output in combination with + the ".track" request. +* dpost: With the "-e2" and "-e3" encoding options, use only word spaces as + indicated by troff for the "widthshow" PostScript operator. This usually + results in slightly larger PostScript output but is better encodable when + distilled to PDF so that PDF files become smaller. +* troff: An internal character width caching error has been fixed; it could + lead to misaligned characters when setting text in fonts containing more + than 400 characters. +* troff, dpost: Can now handle fonts with up to 65534 characters. +* eqn: Avoid to recognize delimiters inside troff escape sequences with "(" + or "[" as well as directly behind a sequence of backslash characters. +* -mm macros: Fixed a bug which caused .ML output to disappear unless in + troff -x0 mode. + +Release 060905 +* [nt]roff: The new ".brnl" request causes a break each time a newline is + encountered at the end of a text input line. Unlike nofill mode, text is + still wrapped to the line length. +* [nt]roff: The new ".brpnl" request causes a break and a spread each time + a newline is encountered at the end of a text input line (as if it were + attached a "\p"). The "\p" escape sequence changes its semantics in this + mode and causes a break without a spread. +* [nt]roff: The new ".lpfx" request allows to print a string whenever + a new output line is started. This is mainly useful to implement a + historic form of block quotation. +* [nt]roff: The predefined number registers "\n[.in]", "\n[.hy]", + "\n[.int]", "\n[.lt]", "\n[.pn]", "\n[.psr]", and "\n[.sr]" have been + added. +* [nt]roff: The semantics of the number registers "\n(.x" (remaining space + on current output line) and "\n(.y" (current actual indent) are now + documented. +* [nt]roff: The "\n[.kc]" register has been introduced; it holds the width + of a word interrupted with "\c" on output. +* [nt]roff: Control and escape characters written in a diversion are now + regular characters in groff compatibility mode. +* [nt]roff: It is not a fatal error if the file specified with ".so" is not + accessible in groff compatibility mode. +* [nt]roff: The value of the "\n(.k" register is computed differently in + groff compability mode now. +* [nt]roff: The -mg macros now provide the fonts "C" and "CR". +* [nt]roff: The -mg macros now provide an emulation of the ".mso" request. +* [nt]roff: The command line options "-ds=x" and "-ra=N" are now accepted, + thus the string or register name before "=" can consist of more than one + character. +* [nt]roff: The ".rd" request now works again; it caused a segmentation + fault since several releases. +* [nt]roff: Formatting of a ".char" object immediately before a trap is + executed no longer causes pending input text to disappear (bug reported + by Sebastian Leusch). +* troff: The escape sequence form "\s[+-]'n'" now works with fractional + point sizes. +* troff: With xflag 0, fractional parts and units are now ignored with + the ".ps" command. +* [nt]roff: With xflag 0, ".if !..." works correctly again. +* [nt]roff: When copying text to a macro, if a line appeared that was a + prefix of the terminating macro, its last character was copied twice + (e.g. "..." with the standard ".." was copied as "...."). This has been + fixed. +* -me macros: The macros now work with xflag > 0. +* [nt]roff: The distance to the next trap, and, accordingly, the "\n(.t" + register, can now be larger than the maximum allowed motion with "\h" + and "\v". This allows very long pages without a "trap botch" error, + although vertical motions on such pages may require multiple "\v" + commands. +* [nt]roff: Fixed a reallocation problem that caused segmentation faults + with some compilers. +* [nt]roff: Fixed the "-u" option not to cause a segmentation fault. +* [nt]roff: The "\n(.S" predefined number register has been removed again + since it conflicts with use of this name by "dot -Tpic". (The "\n[.tabs]" + register continues to be available with the same semantics.) +* troff: There is now a "lc_ctype" keyword in the DESC file for the sake + of legacy post-processors that do not understand "x X LC_CTYPE". +* dpost: Use the device given by "x T" in intermediate language for reading + font files only if its name starts with "ps" or if it has the "afmfonts" + keyword in its DESC file; otherwise use "devpost". +* tbl: The forms "f (X)", "w (x)", and "fX." are now accepted in column + specifications. + +Release 060813 +* [nt]roff: A new type of traps is available: output-line traps. They are + set with the new "\P" escape sequence and are invoked when the line that + contains the corresponding sequence has been output. +* [nt]roff: The ".index" request has been added to determine the position + of a string within a string or macro. +* [nt]roff: Floating-point registers have been introduced; they can be + created and modified with the ".nrf" request and are otherwise like + standard integer number registers, with which they share a common name + space. +* [nt]roff: The ".if f expr" condition has been introduced to evaluate + an expression with floating-point computation. +* [nt]roff: Exponential notation, as in "1e+10", is now supported in + numerical expressions. +* [nt]roff: Debugging requests for watching macros, strings, and number + registers have been added. +* [nt]roff: The ".errprint" request has been added to write custom strings + in the same format as internal error messages. +* [nt]roff: The ".cp" request has been added to control compatibility with + groff. +* [nt]roff: The "-mg" macro package has been added for improved support of + groff documents, preprocessors, and macro sets. +* [nt]roff: The ".while", ".break", and ".continue" requests have been + added as another method to process input repeatedly. +* [nt]roff: Space characters inside parentheses in numerical expressions + are now permissible, i.e. they are discarded and do not terminate the + expression. +* [nt]roff: The ".char", ".fchar", and ".rchar" requests have been added + to transform a single input character to multiple output characters. +* [nt]roff: The ".ecs" and ".ecr" requests have been added to save and + restore the escape character. +* [nt]roff: The ".shc" request has been added to set the soft hyphen + character. +* [nt]roff: The ".hcode" request has been added to specify character + mappings for hyphenation purposes. +* [nt]roff: The sets of sentence-ending and transparent characters are + now configurable with the ".sentchar" and ".transchar" requests. +* [nt]roff: The set of optional line break characters (normally hyphen + and em dash) is now configurable with the ".breakchar" request. +* [nt]roff: The ".nhychar" request defines a set of hyphenation- + inhibiting characters (as hyphen and em dash with traditional troff + hyphenation). +* troff: The second argument to the ".ss" request now actually sets the + size of the sentence-end space instead of just switching it on or off. +* [nt]roff: The ".unformat" and ".asciify" requests have been added to + remove the effects of adjustment, and font and point size information, + respectively, from a diversion. +* [nt]roff: The "\Z'string'" escape sequence (print string and restore + the position afterwards) has been introduced. +* [nt]roff: The ".als" request has been added to create an alias name + for a request, macro, or string. +* [nt]roff: The ".aln" request has been added to create an alias name + for a number register. +* [nt]roff: The ".rnn" request has been added to rename a number register. +* [nt]roff: The ".box" request has been added; it is like ".di" but saves + and restores a previous partially filled line. +* [nt]roff: The ".spacewidth" request has been introduced to default to + the width of the space character as obtained from the font metrics file. +* [nt]roff: The ".rj" request (right-align next input lines) has been + added. The ".rj" number register that holds the number of remaining + lines to be right-adjusted has been added. +* [nt]roff: The ".ce" number register that holds the number of remaining + lines to be centered with the ".ce" request has been added. +* troff: The "\Yx", "\Y(xx", or "\Y[xxx]" escape sequence has been added + to output the contents of the string or macro x, xx, or xxx, respectively, + as a device control function. +* [nt]roff: The "\$0" escape sequence has been added to refer to the name + of the current macro or string. +* [nt]roff: The "(c;e)" numerical expression function has been added to + evaluate "e" using "c" as default scale indicator. +* [nt]roff: The "M" (Em/100), "s" (= "u"), and "z" (= "p") scale indicators + have been added. +* [nt]roff: The ".ta T Nt Mu" syntax to set tab stops repeatedly is now + supported. +* [nt]roff: The "\n(.S" and "\n[.tabs]" registers have been added to save + and restore tab stops. +* [nt]roff: The "\n[.ev]" number register has been added as a method to + determine the name of the current environment. +* troff: The "\n[rst]" and "\n[rsb]" registers are set by the width function + to the highest and lowest extent of the bounding box of any character. + This currently only works for Type 1 and TrueType fonts. +* troff: The "\n[.cht]" and "\n[.cdp]" registers are set to the highest + and lowest extent of the bounding box of the previous character. This + currently only works for Type 1 and TrueType fonts. +* [nt]roff: In extension level 1, long string "\*[xxx]", register "\n[xxx]", + and font "\f[xxx]" names are no longer recognized unless they are on a + line beginning with the ".do" request. +* [nt]roff: The "\n[.ps]" number register, which holds the current font + size in device units, has been added. +* [nt]roff: The "\E" escape sequence has been fixed; it does not resolve + to a printable but to an effective escape character now. +* [nt]roff: The "\)" escape sequence (like "\&" but transparent for + sentence ending) has been added. +* [nt]roff: Static limits on word and line size have been eliminated. +* [nt]roff: The "\{", "\}", "\&", "\%", "\c", and "\(space)" escape + sequences terminate two-character request names now. +* [nt]roff: The ".tm" and ".write" commands now discard formatted motion + sequences. +* troff: The ".psbb" request now reads a "%%HiResBoundingBox" DSC comment + in preference to "%%BoundingBox"; the registers it assigns to are now + floating-point registers. +* troff: The ".psbb" request now properly supports the "(atend)" syntax in + PostScript DSC input files. +* nroff: The ".psbb" request has been made a no-op since nroff cannot + otherwise handle EPS documents anyway. +* [nt]roff: The "right-brace" warning category has been added. +* [nt]roff: Calls of ".vs" that result in negative numbers are now + ignored. +* [nt]roff: The width function "\w" now takes pairwise kerning into + account. +* [nt]roff: The ".return" request has been fixed not to ignore the next + line of input when followed by text on the same line. +* [nt]roff: The second argument of the ".ss" request now also applies + to sequences of space characters that follow a sentence end character. +* [nt]roff: The "\k[name]" escape sequence has been fixed to work if + "name" has not been previously been used. +* [nt]roff: The "\(dq" character has been introduced as an alternate name + for the ASCII double quote character. +* dpost: Character height and slant changes now only apply to the current + font as documented. +* tbl: When ending macros in generated code, ".00" is now used instead + of "..". This allows the use of ".ig" and similar requests within "T{" + etc. without interference. +* pic: Accept "{lower|upper} {left|right} of" as aliases for ".nw", ".sw", + ".ne", and ".se". +* pic: Continued newlines in expressions like "center \of" are + now accepted. + +Release 060716 +* troff: The ".letadj" request has been added to enable dynamic letter + spacing and letter reshaping when justifying lines. +* troff: Font and size attributes of space (and newline) characters in + input are now honored for computing widths and kerning pairs. Previously, + font and size of space characters were always that of the next printable + character; this is retained with the -x0 option. This means that e.g. in + "\f(CWabc \fRdef", the size of the space is now computed from the + constant width font instead of the roman font. +* [nt]roff, dpost, daps: The character name "\(rs" for backslash has been + introduced. +* nroff: "\[xx]" and "\C'xx'" result in the same character as "\(xx" now. +* [nt]roff: The ".nx" request now works again, it previously caused + a segmentation fault because of a null pointer dereference (bug + reported by Michael Hobgood). +* [nt]roff: With the ".hylang" request, words that consist of four + characters are now subject to hyphenation (with the traditional + hyphenation, five characters are the minimum length). +* [nt]roff: The ".hy" request accepts the additional flags 16 and 32 that + allow the last or first character of a word, respectively, to be split + off. +* troff: Giving no arguments to ".minss" now deactivates this mechanism. +* troff: ".minss" now has no effect unless in ".ad b" mode as documented. +* [nt]roff: The ".ss", ".sss", ".minss", ".lspmin", ".letss", ".lspmax", + ".lshmin", ".lshmax", ".lc_ctype", ".hylang", and ".fzoom" number + registers have been added to retrieve the current values set with the + respective requests. +* [nt]roff: The forms "\s+-'dd'", "\s+-[dd]", and "\s[+-dd]" of the size + change escape sequence are now understood. +* [nt]roff: The ".nop text" request (use text as input) has been added. +* [nt]roff: The escape sequence "\R'R +-N'" to set the value of a number + register has been added. +* [nt]roff: String references now accept arguments with the \*[xx arg ...] + escape sequence. +* [nt]roff: The ".blm xx" request has been added, it causes ".xx" to be + called whenever a blank line is encountered. +* [nt]roff: The ".itc" request (input trap not counting "\c") has been + added. +* [nt]roff: The ".hlm" request and the ".hln" and ".hlc" number registers + have been added to control the maximum number of consecutive hyphenated + lines. +* [nt]roff: The "\#" escape sequence (comment including newline) has been + added. +* [nt]roff: With xflag 3 and warning "mac" deactivated, if ".xx" was a + defined request and ".xxx" was not, ".xx" was executed for ".xxx". +* [nt]roff: Several segmentation violations that occurred with arbitrary + binary data as input have been fixed. +* troff, dpost, otfdump: The operator 12 in CFF Top DICT entries was not + handled correctly, resulting in misleading error messages with some + OpenType fonts. This has been fixed (bug reported by D. Jeff Dionne). + +Release 060619 +* troff: The ".minss" request has been added. It allows troff to decrease + the size of the word space below the value set by ".ss" when adjusting + lines at both margins. +* troff: The ".kernpair", ".kernafter", ".kernbefore", ".lhang", and + ".rhang" requests now also accept groups of characters to which the + same kerning/hanging value is applied. +* [nt]roff: It is now possible to use strings inside macros names (e.g. + ".xx\*(yy" as documented. +* [nt]roff: The ".if d", ".if n", and ".rr" requests erroneously applied + to a shorter two-character name if an undefined longer name was given + as an argument; this has been fixed. +* troff: The ".fkern" request now properly refers to a single mounted + instance of a font; it previously affected all mounted instances of + one font metrics file. +* troff: Character replacements with ".tr" where the target character + does not originate from the current font but is found in the fallback + sequence are now performed correctly. Previously, an invalid heap + access could occur, resulting in the choice of random characters. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Oct 6 21:32:05 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E72DBECEE4; Thu, 6 Oct 2016 21:32:05 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D623D1A1D; Thu, 6 Oct 2016 21:32:04 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96LW33s082687; Thu, 6 Oct 2016 21:32:03 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96LW3VS082686; Thu, 6 Oct 2016 21:32:03 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201610062132.u96LW3VS082686@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 6 Oct 2016 21:32:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r306789 - vendor/heirloom-doctools/20161006 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 21:32:05 -0000 Author: bapt Date: Thu Oct 6 21:32:03 2016 New Revision: 306789 URL: https://svnweb.freebsd.org/changeset/base/306789 Log: Tag import of heirloom-doctools 20161006 Added: vendor/heirloom-doctools/20161006/ - copied from r306788, vendor/heirloom-doctools/dist/ From owner-svn-src-all@freebsd.org Thu Oct 6 21:39:06 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08DA0BEC132; Thu, 6 Oct 2016 21:39:06 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BDE6B1DA2; Thu, 6 Oct 2016 21:39:05 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96Ld4Hx084988; Thu, 6 Oct 2016 21:39:04 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96Ld4Rk084984; Thu, 6 Oct 2016 21:39:04 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201610062139.u96Ld4Rk084984@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Thu, 6 Oct 2016 21:39:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306790 - head/sys/dev/qlxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 21:39:06 -0000 Author: davidcs Date: Thu Oct 6 21:39:04 2016 New Revision: 306790 URL: https://svnweb.freebsd.org/changeset/base/306790 Log: Add support for adding up to 64 Multicast addresses with a single mailbox command MFC after:5 days Modified: head/sys/dev/qlxgbe/ql_hw.c head/sys/dev/qlxgbe/ql_hw.h head/sys/dev/qlxgbe/ql_os.c head/sys/dev/qlxgbe/ql_ver.h Modified: head/sys/dev/qlxgbe/ql_hw.c ============================================================================== --- head/sys/dev/qlxgbe/ql_hw.c Thu Oct 6 21:32:03 2016 (r306789) +++ head/sys/dev/qlxgbe/ql_hw.c Thu Oct 6 21:39:04 2016 (r306790) @@ -1128,12 +1128,21 @@ qla_config_intr_coalesce(qla_host_t *ha, * Can be unicast, multicast or broadcast. */ static int -qla_config_mac_addr(qla_host_t *ha, uint8_t *mac_addr, uint32_t add_mac) +qla_config_mac_addr(qla_host_t *ha, uint8_t *mac_addr, uint32_t add_mac, + uint32_t num_mac) { q80_config_mac_addr_t *cmac; q80_config_mac_addr_rsp_t *cmac_rsp; uint32_t err; device_t dev = ha->pci_dev; + int i; + uint8_t *mac_cpy = mac_addr; + + if (num_mac > Q8_MAX_MAC_ADDRS) { + device_printf(dev, "%s: %s num_mac [0x%x] > Q8_MAX_MAC_ADDRS\n", + __func__, (add_mac ? "Add" : "Del"), num_mac); + return (-1); + } cmac = (q80_config_mac_addr_t *)ha->hw.mbox; bzero(cmac, (sizeof (q80_config_mac_addr_t))); @@ -1149,9 +1158,13 @@ qla_config_mac_addr(qla_host_t *ha, uint cmac->cmd |= Q8_MBX_CMAC_CMD_CAM_INGRESS; - cmac->nmac_entries = 1; + cmac->nmac_entries = num_mac; cmac->cntxt_id = ha->hw.rcv_cntxt_id; - bcopy(mac_addr, cmac->mac_addr[0].addr, 6); + + for (i = 0; i < num_mac; i++) { + bcopy(mac_addr, cmac->mac_addr[i].addr, Q8_ETHER_ADDR_LEN); + mac_addr = mac_addr + ETHER_ADDR_LEN; + } if (qla_mbx_cmd(ha, (uint32_t *)cmac, (sizeof (q80_config_mac_addr_t) >> 2), @@ -1165,11 +1178,14 @@ qla_config_mac_addr(qla_host_t *ha, uint err = Q8_MBX_RSP_STATUS(cmac_rsp->regcnt_status); if (err) { - device_printf(dev, "%s: %s " - "%02x:%02x:%02x:%02x:%02x:%02x failed1 [0x%08x]\n", - __func__, (add_mac ? "Add" : "Del"), - mac_addr[0], mac_addr[1], mac_addr[2], - mac_addr[3], mac_addr[4], mac_addr[5], err); + device_printf(dev, "%s: %s failed1 [0x%08x]\n", __func__, + (add_mac ? "Add" : "Del"), err); + for (i = 0; i < num_mac; i++) { + device_printf(dev, "%s: %02x:%02x:%02x:%02x:%02x:%02x\n", + __func__, mac_cpy[0], mac_cpy[1], mac_cpy[2], + mac_cpy[3], mac_cpy[4], mac_cpy[5]); + mac_cpy += ETHER_ADDR_LEN; + } return (-1); } @@ -2254,6 +2270,7 @@ ql_del_hw_if(qla_host_t *ha) (void)qla_stop_nic_func(ha); qla_del_rcv_cntxt(ha); + qla_del_xmt_cntxt(ha); if (ha->hw.flags.init_intr_cnxt) { @@ -2270,6 +2287,7 @@ ql_del_hw_if(qla_host_t *ha) ha->hw.flags.init_intr_cnxt = 0; } + return; } @@ -2368,7 +2386,7 @@ ql_init_hw_if(qla_host_t *ha) } ha->hw.max_tx_segs = 0; - if (qla_config_mac_addr(ha, ha->hw.mac_addr, 1)) + if (qla_config_mac_addr(ha, ha->hw.mac_addr, 1, 1)) return(-1); ha->hw.flags.unicast_mac = 1; @@ -2376,7 +2394,7 @@ ql_init_hw_if(qla_host_t *ha) bcast_mac[0] = 0xFF; bcast_mac[1] = 0xFF; bcast_mac[2] = 0xFF; bcast_mac[3] = 0xFF; bcast_mac[4] = 0xFF; bcast_mac[5] = 0xFF; - if (qla_config_mac_addr(ha, bcast_mac, 1)) + if (qla_config_mac_addr(ha, bcast_mac, 1, 1)) return (-1); ha->hw.flags.bcast_mac = 1; @@ -2733,14 +2751,14 @@ qla_del_rcv_cntxt(qla_host_t *ha) bcast_mac[0] = 0xFF; bcast_mac[1] = 0xFF; bcast_mac[2] = 0xFF; bcast_mac[3] = 0xFF; bcast_mac[4] = 0xFF; bcast_mac[5] = 0xFF; - if (qla_config_mac_addr(ha, bcast_mac, 0)) + if (qla_config_mac_addr(ha, bcast_mac, 0, 1)) return; ha->hw.flags.bcast_mac = 0; } if (ha->hw.flags.unicast_mac) { - if (qla_config_mac_addr(ha, ha->hw.mac_addr, 0)) + if (qla_config_mac_addr(ha, ha->hw.mac_addr, 0, 1)) return; ha->hw.flags.unicast_mac = 0; } @@ -2926,12 +2944,20 @@ qla_init_xmt_cntxt(qla_host_t *ha) } static int -qla_hw_add_all_mcast(qla_host_t *ha) +qla_hw_all_mcast(qla_host_t *ha, uint32_t add_mcast) { int i, nmcast; + uint32_t count = 0; + uint8_t *mcast; nmcast = ha->hw.nmcast; + QL_DPRINT2(ha, (ha->pci_dev, + "%s:[0x%x] enter nmcast = %d \n", __func__, add_mcast, nmcast)); + + mcast = ha->hw.mac_addr_arr; + memset(mcast, 0, (Q8_MAX_MAC_ADDRS * ETHER_ADDR_LEN)); + for (i = 0 ; ((i < Q8_MAX_NUM_MULTICAST_ADDRS) && nmcast); i++) { if ((ha->hw.mcast[i].addr[0] != 0) || (ha->hw.mcast[i].addr[1] != 0) || @@ -2940,52 +2966,80 @@ qla_hw_add_all_mcast(qla_host_t *ha) (ha->hw.mcast[i].addr[4] != 0) || (ha->hw.mcast[i].addr[5] != 0)) { - if (qla_config_mac_addr(ha, ha->hw.mcast[i].addr, 1)) { - device_printf(ha->pci_dev, "%s: failed\n", - __func__); - return (-1); + bcopy(ha->hw.mcast[i].addr, mcast, ETHER_ADDR_LEN); + mcast = mcast + ETHER_ADDR_LEN; + count++; + + if (count == Q8_MAX_MAC_ADDRS) { + if (qla_config_mac_addr(ha, ha->hw.mac_addr_arr, + add_mcast, count)) { + device_printf(ha->pci_dev, + "%s: failed\n", __func__); + return (-1); + } + + count = 0; + mcast = ha->hw.mac_addr_arr; + memset(mcast, 0, + (Q8_MAX_MAC_ADDRS * ETHER_ADDR_LEN)); } nmcast--; } } + + if (count) { + if (qla_config_mac_addr(ha, ha->hw.mac_addr_arr, add_mcast, + count)) { + device_printf(ha->pci_dev, "%s: failed\n", __func__); + return (-1); + } + } + QL_DPRINT2(ha, (ha->pci_dev, + "%s:[0x%x] exit nmcast = %d \n", __func__, add_mcast, nmcast)); + return 0; } static int -qla_hw_del_all_mcast(qla_host_t *ha) +qla_hw_add_all_mcast(qla_host_t *ha) { - int i, nmcast; + int ret; - nmcast = ha->hw.nmcast; + ret = qla_hw_all_mcast(ha, 1); - for (i = 0 ; ((i < Q8_MAX_NUM_MULTICAST_ADDRS) && nmcast); i++) { - if ((ha->hw.mcast[i].addr[0] != 0) || - (ha->hw.mcast[i].addr[1] != 0) || - (ha->hw.mcast[i].addr[2] != 0) || - (ha->hw.mcast[i].addr[3] != 0) || - (ha->hw.mcast[i].addr[4] != 0) || - (ha->hw.mcast[i].addr[5] != 0)) { + return (ret); +} - if (qla_config_mac_addr(ha, ha->hw.mcast[i].addr, 0)) - return (-1); +static int +qla_hw_del_all_mcast(qla_host_t *ha) +{ + int ret; - nmcast--; - } - } - return 0; + ret = qla_hw_all_mcast(ha, 0); + + bzero(ha->hw.mcast, (sizeof (qla_mcast_t) * Q8_MAX_NUM_MULTICAST_ADDRS)); + ha->hw.nmcast = 0; + + return (ret); } static int -qla_hw_add_mcast(qla_host_t *ha, uint8_t *mta) +qla_hw_mac_addr_present(qla_host_t *ha, uint8_t *mta) { int i; for (i = 0; i < Q8_MAX_NUM_MULTICAST_ADDRS; i++) { - if (QL_MAC_CMP(ha->hw.mcast[i].addr, mta) == 0) - return 0; /* its been already added */ + return (0); /* its been already added */ } + return (-1); +} + +static int +qla_hw_add_mcast(qla_host_t *ha, uint8_t *mta, uint32_t nmcast) +{ + int i; for (i = 0; i < Q8_MAX_NUM_MULTICAST_ADDRS; i++) { @@ -2996,29 +3050,28 @@ qla_hw_add_mcast(qla_host_t *ha, uint8_t (ha->hw.mcast[i].addr[4] == 0) && (ha->hw.mcast[i].addr[5] == 0)) { - if (qla_config_mac_addr(ha, mta, 1)) - return (-1); - bcopy(mta, ha->hw.mcast[i].addr, Q8_MAC_ADDR_LEN); ha->hw.nmcast++; - return 0; + mta = mta + ETHER_ADDR_LEN; + nmcast--; + + if (nmcast == 0) + break; } + } return 0; } static int -qla_hw_del_mcast(qla_host_t *ha, uint8_t *mta) +qla_hw_del_mcast(qla_host_t *ha, uint8_t *mta, uint32_t nmcast) { int i; for (i = 0; i < Q8_MAX_NUM_MULTICAST_ADDRS; i++) { if (QL_MAC_CMP(ha->hw.mcast[i].addr, mta) == 0) { - if (qla_config_mac_addr(ha, mta, 0)) - return (-1); - ha->hw.mcast[i].addr[0] = 0; ha->hw.mcast[i].addr[1] = 0; ha->hw.mcast[i].addr[2] = 0; @@ -3028,7 +3081,11 @@ qla_hw_del_mcast(qla_host_t *ha, uint8_t ha->hw.nmcast--; - return 0; + mta = mta + ETHER_ADDR_LEN; + nmcast--; + + if (nmcast == 0) + break; } } return 0; @@ -3036,30 +3093,75 @@ qla_hw_del_mcast(qla_host_t *ha, uint8_t /* * Name: ql_hw_set_multi - * Function: Sets the Multicast Addresses provided the host O.S into the + * Function: Sets the Multicast Addresses provided by the host O.S into the * hardware (for the given interface) */ int -ql_hw_set_multi(qla_host_t *ha, uint8_t *mcast, uint32_t mcnt, +ql_hw_set_multi(qla_host_t *ha, uint8_t *mcast_addr, uint32_t mcnt, uint32_t add_mac) { + uint8_t *mta = mcast_addr; int i; - uint8_t *mta = mcast; int ret = 0; + uint32_t count = 0; + uint8_t *mcast; + + mcast = ha->hw.mac_addr_arr; + memset(mcast, 0, (Q8_MAX_MAC_ADDRS * ETHER_ADDR_LEN)); for (i = 0; i < mcnt; i++) { - if (add_mac) { - ret = qla_hw_add_mcast(ha, mta); - if (ret) - break; - } else { - ret = qla_hw_del_mcast(ha, mta); - if (ret) - break; + if (mta[0] || mta[1] || mta[2] || mta[3] || mta[4] || mta[5]) { + if (add_mac) { + if (qla_hw_mac_addr_present(ha, mta) != 0) { + bcopy(mta, mcast, ETHER_ADDR_LEN); + mcast = mcast + ETHER_ADDR_LEN; + count++; + } + } else { + if (qla_hw_mac_addr_present(ha, mta) == 0) { + bcopy(mta, mcast, ETHER_ADDR_LEN); + mcast = mcast + ETHER_ADDR_LEN; + count++; + } + } + } + if (count == Q8_MAX_MAC_ADDRS) { + if (qla_config_mac_addr(ha, ha->hw.mac_addr_arr, + add_mac, count)) { + device_printf(ha->pci_dev, "%s: failed\n", + __func__); + return (-1); + } + + if (add_mac) { + qla_hw_add_mcast(ha, ha->hw.mac_addr_arr, + count); + } else { + qla_hw_del_mcast(ha, ha->hw.mac_addr_arr, + count); + } + + count = 0; + mcast = ha->hw.mac_addr_arr; + memset(mcast, 0, (Q8_MAX_MAC_ADDRS * ETHER_ADDR_LEN)); } mta += Q8_MAC_ADDR_LEN; } + + if (count) { + if (qla_config_mac_addr(ha, ha->hw.mac_addr_arr, add_mac, + count)) { + device_printf(ha->pci_dev, "%s: failed\n", __func__); + return (-1); + } + if (add_mac) { + qla_hw_add_mcast(ha, ha->hw.mac_addr_arr, count); + } else { + qla_hw_del_mcast(ha, ha->hw.mac_addr_arr, count); + } + } + return (ret); } Modified: head/sys/dev/qlxgbe/ql_hw.h ============================================================================== --- head/sys/dev/qlxgbe/ql_hw.h Thu Oct 6 21:32:03 2016 (r306789) +++ head/sys/dev/qlxgbe/ql_hw.h Thu Oct 6 21:39:04 2016 (r306790) @@ -210,7 +210,7 @@ #define Q8_NUM_MBOX 512 -#define Q8_MAX_NUM_MULTICAST_ADDRS 1023 +#define Q8_MAX_NUM_MULTICAST_ADDRS 1022 #define Q8_MAC_ADDR_LEN 6 /* @@ -511,8 +511,9 @@ typedef struct _q80_config_intr_coalesc_ /* * Configure MAC Address */ +#define Q8_ETHER_ADDR_LEN 6 typedef struct _q80_mac_addr { - uint8_t addr[6]; + uint8_t addr[Q8_ETHER_ADDR_LEN]; uint16_t vlan_tci; } __packed q80_mac_addr_t; @@ -1548,7 +1549,7 @@ typedef struct _qla_hw_tx_cntxt { typedef struct _qla_mcast { uint16_t rsrvd; - uint8_t addr[6]; + uint8_t addr[ETHER_ADDR_LEN]; } __packed qla_mcast_t; typedef struct _qla_rdesc { @@ -1660,6 +1661,7 @@ typedef struct _qla_hw { /* multicast address list */ uint32_t nmcast; qla_mcast_t mcast[Q8_MAX_NUM_MULTICAST_ADDRS]; + uint8_t mac_addr_arr[(Q8_MAX_MAC_ADDRS * ETHER_ADDR_LEN)]; /* reset sequence */ #define Q8_MAX_RESET_SEQ_IDX 16 Modified: head/sys/dev/qlxgbe/ql_os.c ============================================================================== --- head/sys/dev/qlxgbe/ql_os.c Thu Oct 6 21:32:03 2016 (r306789) +++ head/sys/dev/qlxgbe/ql_os.c Thu Oct 6 21:39:04 2016 (r306790) @@ -243,6 +243,8 @@ qla_watchdog(void *arg) ha->flags.qla_watchdog_pause = 1; ha->qla_initiate_recovery = 0; ha->err_inject = 0; + device_printf(ha->pci_dev, + "%s: taskqueue_enqueue(err_task) \n", __func__); taskqueue_enqueue(ha->err_tq, &ha->err_task); } else if (ha->flags.qla_interface_up) { @@ -452,7 +454,7 @@ qla_pci_attach(device_t dev) TASK_INIT(&ha->tx_task, 0, qla_tx_done, ha); - ha->tx_tq = taskqueue_create_fast("qla_txq", M_NOWAIT, + ha->tx_tq = taskqueue_create("qla_txq", M_NOWAIT, taskqueue_thread_enqueue, &ha->tx_tq); taskqueue_start_threads(&ha->tx_tq, 1, PI_NET, "%s txq", device_get_nameunit(ha->pci_dev)); @@ -470,13 +472,13 @@ qla_pci_attach(device_t dev) qla_watchdog, ha); TASK_INIT(&ha->err_task, 0, qla_error_recovery, ha); - ha->err_tq = taskqueue_create_fast("qla_errq", M_NOWAIT, + ha->err_tq = taskqueue_create("qla_errq", M_NOWAIT, taskqueue_thread_enqueue, &ha->err_tq); taskqueue_start_threads(&ha->err_tq, 1, PI_NET, "%s errq", device_get_nameunit(ha->pci_dev)); TASK_INIT(&ha->async_event_task, 0, qla_async_event, ha); - ha->async_event_tq = taskqueue_create_fast("qla_asyncq", M_NOWAIT, + ha->async_event_tq = taskqueue_create("qla_asyncq", M_NOWAIT, taskqueue_thread_enqueue, &ha->async_event_tq); taskqueue_start_threads(&ha->async_event_tq, 1, PI_NET, "%s asyncq", device_get_nameunit(ha->pci_dev)); Modified: head/sys/dev/qlxgbe/ql_ver.h ============================================================================== --- head/sys/dev/qlxgbe/ql_ver.h Thu Oct 6 21:32:03 2016 (r306789) +++ head/sys/dev/qlxgbe/ql_ver.h Thu Oct 6 21:39:04 2016 (r306790) @@ -36,6 +36,6 @@ #define QLA_VERSION_MAJOR 3 #define QLA_VERSION_MINOR 10 -#define QLA_VERSION_BUILD 30 +#define QLA_VERSION_BUILD 31 #endif /* #ifndef _QL_VER_H_ */ From owner-svn-src-all@freebsd.org Thu Oct 6 21:53:57 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 717A6BEC73E; Thu, 6 Oct 2016 21:53:57 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-it0-x243.google.com (mail-it0-x243.google.com [IPv6:2607:f8b0:4001:c0b::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 39634971; Thu, 6 Oct 2016 21:53:57 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-it0-x243.google.com with SMTP id o19so2489635ito.3; Thu, 06 Oct 2016 14:53:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=FxsEVdWIhmg3XbA1H4C1PecZPSovyPhBzCliPE5LY78=; b=AVNcKLT1+Cp+P/EansTuH0bBB2LUkh5nLcudmUc5l0iLs9yGcM/5DsyjonqGYtNOfD 0BNnzMMENsK41RhD3GTxzqCYXiCb1La4ZmElTvRvFTLxWoWNgEDP82OwMlIwUXrI51LR zVtxVb2aMWsC8E2pllrzFpvvQhPHu9FCqJcb10waYcPOzDsPf2L3fgZiUam2QUdql2Dt 4w0Vge8nmBqQk8tePZhq0xrVySxwcluSH3x1VHNL9KuR7XA3p3+0HTLMMpioVrTNiDgq d9U1qvWqkI/SsMaFpjGjO5rrmuIh7JAIbo/BbgvsZSKsorRXW7qf6hMjlnY6cMSnzhJ4 4X9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=FxsEVdWIhmg3XbA1H4C1PecZPSovyPhBzCliPE5LY78=; b=V9deeT1Nk0E3JIB+v0/wLmq45sZR+z08FOYKL1hhUFQIOeXQdUM1dIN4IVqqowTDDr 8tVYZFwC79YmDX/7mtE9/74o3UhRAF4iEXdQGWrNOwXR0Ye2BaSfsD8/NuUgupfFrb4s 4uKKAmZZMO+GGb8mhN0p0Ktt3RNYXWGRKRu9q6gC8zXNihIq4X/wCoYfa9WDIXWZeF59 PaGb9FRTJzw0V63hRwkf7PMINUKvGU5UHkglmA0RpEt+fS6ucybYDvl+zuN1ERd3fZ1P 2GC++/6ESp22qKpPcGYrZndSCm8Hvq5uBfxukUsRam2VbjwiSD6+0lKIplHAPhmuIXsp pp+g== X-Gm-Message-State: AA6/9RlQfdEklffMKFiM8jnnZ8KybJNhQw0hu9p1JuOUETUP/UE28CzS0g+DCRp+MGG9iw== X-Received: by 10.36.85.195 with SMTP id e186mr36849611itb.56.1475790836435; Thu, 06 Oct 2016 14:53:56 -0700 (PDT) Received: from [22.66.200.5] ([172.56.12.135]) by smtp.gmail.com with ESMTPSA id b133sm6417271iti.14.2016.10.06.14.53.55 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 06 Oct 2016 14:53:55 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r306762 - head/sys/geom/mirror From: Ngie Cooper X-Mailer: iPhone Mail (13G36) In-Reply-To: <201610061520.u96FK5uH037120@repo.freebsd.org> Date: Thu, 6 Oct 2016 14:53:53 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Mark Johnston Content-Transfer-Encoding: quoted-printable Message-Id: <11B3DF25-71B6-4F0C-A11A-9ADD2CB81AE4@gmail.com> References: <201610061520.u96FK5uH037120@repo.freebsd.org> To: Alexander Motin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 21:53:57 -0000 > On Oct 6, 2016, at 08:20, Alexander Motin wrote: >=20 > Author: mav > Date: Thu Oct 6 15:20:05 2016 > New Revision: 306762 > URL: https://svnweb.freebsd.org/changeset/base/306762 >=20 > Log: > Fix possible geom destruction before final provider close. >=20 > Introduce internal counter to track opens. Using provider's counters is > not very successfull after calling g_wither_provider(). >=20 > MFC after: 2 weeks > Sponsored by: iXsystems, Inc. Could you please include Mark and me on all reviews for gmirror? Thanks! -Ngie > Modified: > head/sys/geom/mirror/g_mirror.c > head/sys/geom/mirror/g_mirror.h > head/sys/geom/mirror/g_mirror_ctl.c >=20 > Modified: head/sys/geom/mirror/g_mirror.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/sys/geom/mirror/g_mirror.c Thu Oct 6 14:55:15 2016 (r30676= 1) > +++ head/sys/geom/mirror/g_mirror.c Thu Oct 6 15:20:05 2016 (r30676= 2) > @@ -2153,10 +2153,9 @@ g_mirror_destroy_provider(struct g_mirro > } > } > mtx_unlock(&sc->sc_queue_mtx); > - G_MIRROR_DEBUG(0, "Device %s: provider %s destroyed.", sc->sc_name, > - sc->sc_provider->name); > g_wither_provider(sc->sc_provider, ENXIO); > sc->sc_provider =3D NULL; > + G_MIRROR_DEBUG(0, "Device %s: provider destroyed.", sc->sc_name); > g_topology_unlock(); > LIST_FOREACH(disk, &sc->sc_disks, d_next) { > if (disk->d_state =3D=3D G_MIRROR_DISK_STATE_SYNCHRONIZING) > @@ -2889,7 +2888,7 @@ static int > g_mirror_access(struct g_provider *pp, int acr, int acw, int ace) > { > struct g_mirror_softc *sc; > - int dcr, dcw, dce, error =3D 0; > + int error =3D 0; >=20 > g_topology_assert(); > G_MIRROR_DEBUG(2, "Access request for %s: r%dw%de%d.", pp->name, acr, > @@ -2900,30 +2899,21 @@ g_mirror_access(struct g_provider *pp, i > return (0); > KASSERT(sc !=3D NULL, ("NULL softc (provider=3D%s).", pp->name)); >=20 > - dcr =3D pp->acr + acr; > - dcw =3D pp->acw + acw; > - dce =3D pp->ace + ace; > - > g_topology_unlock(); > sx_xlock(&sc->sc_lock); > if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROY) !=3D 0 || > + (sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROYING) !=3D 0 || > LIST_EMPTY(&sc->sc_disks)) { > if (acr > 0 || acw > 0 || ace > 0) > error =3D ENXIO; > goto end; > } > - if (dcw =3D=3D 0) > - g_mirror_idle(sc, dcw); > - if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROYING) !=3D 0) { > - if (acr > 0 || acw > 0 || ace > 0) { > - error =3D ENXIO; > - goto end; > - } > - if (dcr =3D=3D 0 && dcw =3D=3D 0 && dce =3D=3D 0) { > - g_post_event(g_mirror_destroy_delayed, sc, M_WAITOK, > - sc, NULL); > - } > - } > + sc->sc_provider_open +=3D acr + acw + ace; > + if (pp->acw + acw =3D=3D 0) > + g_mirror_idle(sc, 0); > + if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROYING) !=3D 0 && > + sc->sc_provider_open =3D=3D 0) > + g_post_event(g_mirror_destroy_delayed, sc, M_WAITOK, sc, NULL); > end: > sx_xunlock(&sc->sc_lock); > g_topology_lock(); > @@ -2980,6 +2970,7 @@ g_mirror_create(struct g_class *mp, cons > gp->softc =3D sc; > sc->sc_geom =3D gp; > sc->sc_provider =3D NULL; > + sc->sc_provider_open =3D 0; > /* > * Synchronization geom. > */ > @@ -3020,26 +3011,23 @@ int > g_mirror_destroy(struct g_mirror_softc *sc, int how) > { > struct g_mirror_disk *disk; > - struct g_provider *pp; >=20 > g_topology_assert_not(); > if (sc =3D=3D NULL) > return (ENXIO); > sx_assert(&sc->sc_lock, SX_XLOCKED); >=20 > - pp =3D sc->sc_provider; > - if (pp !=3D NULL && (pp->acr !=3D 0 || pp->acw !=3D 0 || pp->ace !=3D= 0 || > - SCHEDULER_STOPPED())) { > + if (sc->sc_provider_open !=3D 0 || SCHEDULER_STOPPED()) { > switch (how) { > case G_MIRROR_DESTROY_SOFT: > G_MIRROR_DEBUG(1, > - "Device %s is still open (r%dw%de%d).", pp->name, > - pp->acr, pp->acw, pp->ace); > + "Device %s is still open (%d).", sc->sc_name, > + sc->sc_provider_open); > return (EBUSY); > case G_MIRROR_DESTROY_DELAYED: > G_MIRROR_DEBUG(1, > "Device %s will be destroyed on last close.", > - pp->name); > + sc->sc_name); > LIST_FOREACH(disk, &sc->sc_disks, d_next) { > if (disk->d_state =3D=3D > G_MIRROR_DISK_STATE_SYNCHRONIZING) { > @@ -3050,7 +3038,7 @@ g_mirror_destroy(struct g_mirror_softc * > return (EBUSY); > case G_MIRROR_DESTROY_HARD: > G_MIRROR_DEBUG(1, "Device %s is still open, so it " > - "can't be definitely removed.", pp->name); > + "can't be definitely removed.", sc->sc_name); > } > } >=20 >=20 > Modified: head/sys/geom/mirror/g_mirror.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/sys/geom/mirror/g_mirror.h Thu Oct 6 14:55:15 2016 (r30676= 1) > +++ head/sys/geom/mirror/g_mirror.h Thu Oct 6 15:20:05 2016 (r30676= 2) > @@ -179,6 +179,7 @@ struct g_mirror_softc { >=20 > struct g_geom *sc_geom; > struct g_provider *sc_provider; > + int sc_provider_open; >=20 > uint32_t sc_id; /* Mirror unique ID. */ >=20 >=20 > Modified: head/sys/geom/mirror/g_mirror_ctl.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/sys/geom/mirror/g_mirror_ctl.c Thu Oct 6 14:55:15 2016 (r3= 06761) > +++ head/sys/geom/mirror/g_mirror_ctl.c Thu Oct 6 15:20:05 2016 (r3= 06762) > @@ -658,8 +658,7 @@ g_mirror_ctl_resize(struct gctl_req *req > return; > } > /* Deny shrinking of an opened provider */ > - if ((g_debugflags & 16) =3D=3D 0 && (sc->sc_provider->acr > 0 || > - sc->sc_provider->acw > 0 || sc->sc_provider->ace > 0)) { > + if ((g_debugflags & 16) =3D=3D 0 && sc->sc_provider_open > 0) { > if (sc->sc_mediasize > mediasize) { > gctl_error(req, "Device %s is busy.", > sc->sc_provider->name); >=20 From owner-svn-src-all@freebsd.org Fri Oct 7 00:26:38 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28413BEC12E; Fri, 7 Oct 2016 00:26:38 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EADA1894; Fri, 7 Oct 2016 00:26:37 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u970QbVo048390; Fri, 7 Oct 2016 00:26:37 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u970QbfG048389; Fri, 7 Oct 2016 00:26:37 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201610070026.u970QbfG048389@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 7 Oct 2016 00:26:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306792 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 00:26:38 -0000 Author: markj Date: Fri Oct 7 00:26:36 2016 New Revision: 306792 URL: https://svnweb.freebsd.org/changeset/base/306792 Log: Use a const reference to prefixes in nd6_is_new_addr_neighbor(). MFC after: 1 week Modified: head/sys/netinet6/nd6.c Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Thu Oct 6 21:43:19 2016 (r306791) +++ head/sys/netinet6/nd6.c Fri Oct 7 00:26:36 2016 (r306792) @@ -1227,7 +1227,7 @@ nd6_is_new_addr_neighbor(const struct so struct ifaddr *dstaddr; struct rt_addrinfo info; struct sockaddr_in6 rt_key; - struct sockaddr *dst6; + const struct sockaddr *dst6; int fibnum; /* @@ -1273,7 +1273,7 @@ nd6_is_new_addr_neighbor(const struct so if (!(pr->ndpr_stateflags & NDPRF_ONLINK)) { /* Always use the default FIB here. */ - dst6 = (struct sockaddr *)&pr->ndpr_prefix; + dst6 = (const struct sockaddr *)&pr->ndpr_prefix; /* Restore length field before retrying lookup */ rt_key.sin6_len = sizeof(rt_key); From owner-svn-src-all@freebsd.org Fri Oct 7 00:34:58 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB7D0BEC36B; Fri, 7 Oct 2016 00:34:58 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7360CC9D; Fri, 7 Oct 2016 00:34:58 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u970Yv61051983; Fri, 7 Oct 2016 00:34:57 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u970YvUd051982; Fri, 7 Oct 2016 00:34:57 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201610070034.u970YvUd051982@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 7 Oct 2016 00:34:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306793 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 00:34:58 -0000 Author: markj Date: Fri Oct 7 00:34:57 2016 New Revision: 306793 URL: https://svnweb.freebsd.org/changeset/base/306793 Log: Shorten and simplify some of the loops in pfxlist_onlink_check(). No functional change intended. MFC after: 1 week Modified: head/sys/netinet6/nd6_rtr.c Modified: head/sys/netinet6/nd6_rtr.c ============================================================================== --- head/sys/netinet6/nd6_rtr.c Fri Oct 7 00:26:36 2016 (r306792) +++ head/sys/netinet6/nd6_rtr.c Fri Oct 7 00:34:57 2016 (r306793) @@ -1485,40 +1485,26 @@ pfxlist_onlink_check(void) */ LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) { /* XXX: a link-local prefix should never be detached */ - if (IN6_IS_ADDR_LINKLOCAL(&pr->ndpr_prefix.sin6_addr)) - continue; - - /* - * we aren't interested in prefixes without the L bit - * set. - */ - if (pr->ndpr_raf_onlink == 0) - continue; - - if (pr->ndpr_raf_auto == 0) + if (IN6_IS_ADDR_LINKLOCAL(&pr->ndpr_prefix.sin6_addr) || + pr->ndpr_raf_onlink == 0 || + pr->ndpr_raf_auto == 0) continue; if ((pr->ndpr_stateflags & NDPRF_DETACHED) == 0 && find_pfxlist_reachable_router(pr) == NULL) pr->ndpr_stateflags |= NDPRF_DETACHED; - if ((pr->ndpr_stateflags & NDPRF_DETACHED) != 0 && + else if ((pr->ndpr_stateflags & NDPRF_DETACHED) != 0 && find_pfxlist_reachable_router(pr) != NULL) pr->ndpr_stateflags &= ~NDPRF_DETACHED; } } else { /* there is no prefix that has a reachable router */ LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) { - if (IN6_IS_ADDR_LINKLOCAL(&pr->ndpr_prefix.sin6_addr)) - continue; - - if (pr->ndpr_raf_onlink == 0) - continue; - - if (pr->ndpr_raf_auto == 0) + if (IN6_IS_ADDR_LINKLOCAL(&pr->ndpr_prefix.sin6_addr) || + pr->ndpr_raf_onlink == 0 || + pr->ndpr_raf_auto == 0) continue; - - if ((pr->ndpr_stateflags & NDPRF_DETACHED) != 0) - pr->ndpr_stateflags &= ~NDPRF_DETACHED; + pr->ndpr_stateflags &= ~NDPRF_DETACHED; } } @@ -1531,16 +1517,12 @@ pfxlist_onlink_check(void) * so we don't have to care about them. */ LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) { - int e; char ip6buf[INET6_ADDRSTRLEN]; + int e; - if (IN6_IS_ADDR_LINKLOCAL(&pr->ndpr_prefix.sin6_addr)) - continue; - - if (pr->ndpr_raf_onlink == 0) - continue; - - if (pr->ndpr_raf_auto == 0) + if (IN6_IS_ADDR_LINKLOCAL(&pr->ndpr_prefix.sin6_addr) || + pr->ndpr_raf_onlink == 0 || + pr->ndpr_raf_auto == 0) continue; if ((pr->ndpr_stateflags & NDPRF_DETACHED) != 0 && From owner-svn-src-all@freebsd.org Fri Oct 7 00:35:29 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADCCABEC3EE; Fri, 7 Oct 2016 00:35:29 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79C39E11; Fri, 7 Oct 2016 00:35:29 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u970ZSdA052060; Fri, 7 Oct 2016 00:35:28 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u970ZSfM052059; Fri, 7 Oct 2016 00:35:28 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201610070035.u970ZSfM052059@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 7 Oct 2016 00:35:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306794 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 00:35:29 -0000 Author: markj Date: Fri Oct 7 00:35:28 2016 New Revision: 306794 URL: https://svnweb.freebsd.org/changeset/base/306794 Log: Fix a typo. MFC after: 1 week Modified: head/sys/netinet6/nd6_rtr.c Modified: head/sys/netinet6/nd6_rtr.c ============================================================================== --- head/sys/netinet6/nd6_rtr.c Fri Oct 7 00:34:57 2016 (r306793) +++ head/sys/netinet6/nd6_rtr.c Fri Oct 7 00:35:28 2016 (r306794) @@ -1432,7 +1432,7 @@ find_pfxlist_reachable_router(struct nd_ * we have moved from the network but the lifetime of the prefix has not * expired yet. So we should not use the prefix if there is another prefix * that has an available router. - * But, if there is no prefix that has an available router, we still regards + * But, if there is no prefix that has an available router, we still regard * all the prefixes as on-link. This is because we can't tell if all the * routers are simply dead or if we really moved from the network and there * is no router around us. From owner-svn-src-all@freebsd.org Fri Oct 7 00:36:20 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A4BDBEC469; Fri, 7 Oct 2016 00:36:20 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED7A5F78; Fri, 7 Oct 2016 00:36:19 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u970aJ00052132; Fri, 7 Oct 2016 00:36:19 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u970aJCJ052131; Fri, 7 Oct 2016 00:36:19 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201610070036.u970aJCJ052131@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 7 Oct 2016 00:36:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306795 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 00:36:20 -0000 Author: markj Date: Fri Oct 7 00:36:18 2016 New Revision: 306795 URL: https://svnweb.freebsd.org/changeset/base/306795 Log: Fix whitespace around prototypes in nd6_rtr.c. MFC after: 1 week Modified: head/sys/netinet6/nd6_rtr.c Modified: head/sys/netinet6/nd6_rtr.c ============================================================================== --- head/sys/netinet6/nd6_rtr.c Fri Oct 7 00:35:28 2016 (r306794) +++ head/sys/netinet6/nd6_rtr.c Fri Oct 7 00:36:18 2016 (r306795) @@ -76,17 +76,16 @@ static int prelist_update(struct nd_pref struct mbuf *, int); static struct in6_ifaddr *in6_ifadd(struct nd_prefixctl *, int); static struct nd_pfxrouter *pfxrtr_lookup(struct nd_prefix *, - struct nd_defrouter *); + struct nd_defrouter *); static void pfxrtr_add(struct nd_prefix *, struct nd_defrouter *); static void pfxrtr_del(struct nd_pfxrouter *); -static struct nd_pfxrouter *find_pfxlist_reachable_router -(struct nd_prefix *); +static struct nd_pfxrouter *find_pfxlist_reachable_router(struct nd_prefix *); static void defrouter_delreq(struct nd_defrouter *); static void nd6_rtmsg(int, struct rtentry *); static int in6_init_prefix_ltimes(struct nd_prefix *); static void in6_init_address_ltimes(struct nd_prefix *, - struct in6_addrlifetime *); + struct in6_addrlifetime *); static int nd6_prefix_onlink(struct nd_prefix *); static int nd6_prefix_offlink(struct nd_prefix *); From owner-svn-src-all@freebsd.org Fri Oct 7 01:33:04 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72D8FBECE68; Fri, 7 Oct 2016 01:33:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41F05889; Fri, 7 Oct 2016 01:33:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u971X3tL074667; Fri, 7 Oct 2016 01:33:03 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u971X3N5074666; Fri, 7 Oct 2016 01:33:03 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201610070133.u971X3N5074666@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 7 Oct 2016 01:33:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306797 - stable/10/usr.sbin/sesutil X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 01:33:04 -0000 Author: mav Date: Fri Oct 7 01:33:03 2016 New Revision: 306797 URL: https://svnweb.freebsd.org/changeset/base/306797 Log: MFC r306528: Fix `sesutil fault` operation. Fault and ident bits are located in different control bytes, so previous code was just doing nothing, writing into reserved bit. Modified: stable/10/usr.sbin/sesutil/sesutil.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/sesutil/sesutil.c ============================================================================== --- stable/10/usr.sbin/sesutil/sesutil.c Fri Oct 7 01:32:29 2016 (r306796) +++ stable/10/usr.sbin/sesutil/sesutil.c Fri Oct 7 01:33:03 2016 (r306797) @@ -119,10 +119,16 @@ do_led(int fd, unsigned int idx, bool on err(EXIT_FAILURE, "ENCIOC_GETELMSTAT"); } o.cstat[0] |= 0x80; - if (onoff) { - o.cstat[2] |= (setfault ? 0x20 : 0x02); + if (setfault) { + if (onoff) + o.cstat[3] |= 0x20; + else + o.cstat[3] &= 0xdf; } else { - o.cstat[2] &= (setfault ? 0xdf : 0xfd); + if (onoff) + o.cstat[2] |= 0x02; + else + o.cstat[2] &= 0xfd; } if (ioctl(fd, ENCIOC_SETELMSTAT, (caddr_t) &o) < 0) { From owner-svn-src-all@freebsd.org Fri Oct 7 01:32:31 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2569DBECE24; Fri, 7 Oct 2016 01:32:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB6E765C; Fri, 7 Oct 2016 01:32:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u971WUDw074572; Fri, 7 Oct 2016 01:32:30 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u971WUrv074571; Fri, 7 Oct 2016 01:32:30 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201610070132.u971WUrv074571@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 7 Oct 2016 01:32:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306796 - stable/11/usr.sbin/sesutil X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 01:32:31 -0000 Author: mav Date: Fri Oct 7 01:32:29 2016 New Revision: 306796 URL: https://svnweb.freebsd.org/changeset/base/306796 Log: MFC r306528: Fix `sesutil fault` operation. Fault and ident bits are located in different control bytes, so previous code was just doing nothing, writing into reserved bit. Modified: stable/11/usr.sbin/sesutil/sesutil.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/sesutil/sesutil.c ============================================================================== --- stable/11/usr.sbin/sesutil/sesutil.c Fri Oct 7 00:36:18 2016 (r306795) +++ stable/11/usr.sbin/sesutil/sesutil.c Fri Oct 7 01:32:29 2016 (r306796) @@ -118,10 +118,16 @@ do_led(int fd, unsigned int idx, bool on err(EXIT_FAILURE, "ENCIOC_GETELMSTAT"); } o.cstat[0] |= 0x80; - if (onoff) { - o.cstat[2] |= (setfault ? 0x20 : 0x02); + if (setfault) { + if (onoff) + o.cstat[3] |= 0x20; + else + o.cstat[3] &= 0xdf; } else { - o.cstat[2] &= (setfault ? 0xdf : 0xfd); + if (onoff) + o.cstat[2] |= 0x02; + else + o.cstat[2] &= 0xfd; } if (ioctl(fd, ENCIOC_SETELMSTAT, (caddr_t) &o) < 0) { From owner-svn-src-all@freebsd.org Fri Oct 7 02:32:02 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 661ABBED871; Fri, 7 Oct 2016 02:32:02 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2DC9CD1E; Fri, 7 Oct 2016 02:32:02 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u972W13G094140; Fri, 7 Oct 2016 02:32:01 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u972W1hD094139; Fri, 7 Oct 2016 02:32:01 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201610070232.u972W1hD094139@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Fri, 7 Oct 2016 02:32:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306798 - stable/11/contrib/blacklist/bin X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 02:32:02 -0000 Author: lidl Date: Fri Oct 7 02:32:01 2016 New Revision: 306798 URL: https://svnweb.freebsd.org/changeset/base/306798 Log: MFC r306507: Update blacklistd.8 with changes from NetBSD Sponsored by: The FreeBSD Foundation Modified: stable/11/contrib/blacklist/bin/blacklistd.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/blacklist/bin/blacklistd.8 ============================================================================== --- stable/11/contrib/blacklist/bin/blacklistd.8 Fri Oct 7 01:33:03 2016 (r306797) +++ stable/11/contrib/blacklist/bin/blacklistd.8 Fri Oct 7 02:32:01 2016 (r306798) @@ -1,4 +1,4 @@ -.\" $NetBSD: blacklistd.8,v 1.15 2016/03/11 17:16:40 christos Exp $ +.\" $NetBSD: blacklistd.8,v 1.18 2016/07/30 06:09:29 dholland Exp $ .\" .\" Copyright (c) 2015 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -47,7 +47,7 @@ .Nm is a daemon similar to .Xr syslogd 8 -that listens to a sockets at paths specified in the +that listens to sockets at paths specified in the .Ar sockpathsfile for notifications from other daemons about successful or failed connection attempts. @@ -218,7 +218,8 @@ Socket to receive connection notificatio .Nm first appeared in .Nx 7 . -.Fx support for +.Fx +support for .Nm was implemented in .Fx 11 . From owner-svn-src-all@freebsd.org Fri Oct 7 02:33:46 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62BA7BED8DC; Fri, 7 Oct 2016 02:33:46 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25C14EDC; Fri, 7 Oct 2016 02:33:46 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u972Xjxg096867; Fri, 7 Oct 2016 02:33:45 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u972XjGO096865; Fri, 7 Oct 2016 02:33:45 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201610070233.u972XjGO096865@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Fri, 7 Oct 2016 02:33:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306799 - stable/11/contrib/blacklist/bin X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 02:33:46 -0000 Author: lidl Date: Fri Oct 7 02:33:45 2016 New Revision: 306799 URL: https://svnweb.freebsd.org/changeset/base/306799 Log: MFC r306508: Fix blacklistd's state restoral at startup The blacklistd daemon attempted to restore the filtering rules before the database of blocked addresses was opened, so no rules were being reloaded. Now the rules are properly recreated when the daemon is started with '-r'. This bug was fixed locally, and then sent upstream to NetBSD. This changeset is the import the NetBSD version of the change, which added debugging output to alert about a null database. Sponsored by: The FreeBSD Foundation Modified: stable/11/contrib/blacklist/bin/blacklistd.c stable/11/contrib/blacklist/bin/state.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/blacklist/bin/blacklistd.c ============================================================================== --- stable/11/contrib/blacklist/bin/blacklistd.c Fri Oct 7 02:32:01 2016 (r306798) +++ stable/11/contrib/blacklist/bin/blacklistd.c Fri Oct 7 02:33:45 2016 (r306799) @@ -1,4 +1,4 @@ -/* $NetBSD: blacklistd.c,v 1.34 2016/04/04 15:52:56 christos Exp $ */ +/* $NetBSD: blacklistd.c,v 1.35 2016/09/26 19:43:43 christos Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include "config.h" #endif #include -__RCSID("$NetBSD: blacklistd.c,v 1.34 2016/04/04 15:52:56 christos Exp $"); +__RCSID("$NetBSD: blacklistd.c,v 1.35 2016/09/26 19:43:43 christos Exp $"); #include #include @@ -473,9 +473,6 @@ main(int argc, char *argv[]) flags |= O_TRUNC; } - if (restore) - rules_restore(); - struct pollfd *pfd = NULL; bl_t *bl = NULL; size_t nfd = 0; @@ -500,6 +497,9 @@ main(int argc, char *argv[]) if (state == NULL) return EXIT_FAILURE; + if (restore) + rules_restore(); + if (!debug) { if (daemon(0, 0) == -1) err(EXIT_FAILURE, "daemon failed"); Modified: stable/11/contrib/blacklist/bin/state.c ============================================================================== --- stable/11/contrib/blacklist/bin/state.c Fri Oct 7 02:32:01 2016 (r306798) +++ stable/11/contrib/blacklist/bin/state.c Fri Oct 7 02:33:45 2016 (r306799) @@ -1,4 +1,4 @@ -/* $NetBSD: state.c,v 1.18 2016/04/04 15:52:56 christos Exp $ */ +/* $NetBSD: state.c,v 1.19 2016/09/26 19:43:43 christos Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #endif #include -__RCSID("$NetBSD: state.c,v 1.18 2016/04/04 15:52:56 christos Exp $"); +__RCSID("$NetBSD: state.c,v 1.19 2016/09/26 19:43:43 christos Exp $"); #include #include @@ -200,8 +200,10 @@ state_iterate(DB *db, struct conf *c, st int rv; DBT k, v; - if (db == NULL) + if (db == NULL) { + (*lfun)(LOG_ERR, "%s: called with no database file", __func__); return -1; + } first = first ? R_FIRST : R_NEXT; From owner-svn-src-all@freebsd.org Fri Oct 7 06:11:16 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A2B9BD3FED; Fri, 7 Oct 2016 06:11:16 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11BCD21C; Fri, 7 Oct 2016 06:11:16 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u976BFfg076347; Fri, 7 Oct 2016 06:11:15 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u976BFll076346; Fri, 7 Oct 2016 06:11:15 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201610070611.u976BFll076346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 7 Oct 2016 06:11:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306800 - stable/11/contrib/dma X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 06:11:16 -0000 Author: bapt Date: Fri Oct 7 06:11:15 2016 New Revision: 306800 URL: https://svnweb.freebsd.org/changeset/base/306800 Log: MFC r306541 Import dma 20160929 Modified: stable/11/contrib/dma/dma-mbox-create.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/dma/dma-mbox-create.c ============================================================================== --- stable/11/contrib/dma/dma-mbox-create.c Fri Oct 7 02:33:45 2016 (r306799) +++ stable/11/contrib/dma/dma-mbox-create.c Fri Oct 7 06:11:15 2016 (r306800) @@ -89,9 +89,7 @@ main(int argc, char **argv) struct group *gr; uid_t user_uid; gid_t mail_gid; - int error; - char fn[PATH_MAX+1]; - int f; + int f, maildirfd; openlog("dma-mbox-create", 0, LOG_MAIL); @@ -131,26 +129,22 @@ main(int argc, char **argv) if (!pw) logfail(EX_NOUSER, "cannot find user `%s'", user); - user_uid = pw->pw_uid; + maildirfd = open(_PATH_MAILDIR, O_RDONLY); + if (maildirfd < 0) + logfail(EX_NOINPUT, "cannot open maildir %s", _PATH_MAILDIR); - error = snprintf(fn, sizeof(fn), "%s/%s", _PATH_MAILDIR, user); - if (error < 0 || (size_t)error >= sizeof(fn)) { - if (error >= 0) { - errno = 0; - logfail(EX_USAGE, "mbox path too long"); - } - logfail(EX_CANTCREAT, "cannot build mbox path for `%s/%s'", _PATH_MAILDIR, user); - } + user_uid = pw->pw_uid; - f = open(fn, O_RDONLY|O_CREAT|O_NOFOLLOW, 0600); + f = openat(maildirfd, user, O_RDONLY|O_CREAT|O_NOFOLLOW, 0600); if (f < 0) - logfail(EX_NOINPUT, "cannt open mbox `%s'", fn); + logfail(EX_NOINPUT, "cannot open mbox `%s'", user); if (fchown(f, user_uid, mail_gid)) - logfail(EX_OSERR, "cannot change owner of mbox `%s'", fn); + logfail(EX_OSERR, "cannot change owner of mbox `%s'", user); if (fchmod(f, 0620)) - logfail(EX_OSERR, "cannot change permissions of mbox `%s'", fn); + logfail(EX_OSERR, "cannot change permissions of mbox `%s'", + user); /* file should be present with the right owner and permissions */ From owner-svn-src-all@freebsd.org Fri Oct 7 06:29:26 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53AB0BEC580; Fri, 7 Oct 2016 06:29:26 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 275F9DF1; Fri, 7 Oct 2016 06:29:26 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u976TPxi083947; Fri, 7 Oct 2016 06:29:25 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u976TPxQ083944; Fri, 7 Oct 2016 06:29:25 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201610070629.u976TPxQ083944@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 7 Oct 2016 06:29:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306801 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 06:29:26 -0000 Author: avg Date: Fri Oct 7 06:29:24 2016 New Revision: 306801 URL: https://svnweb.freebsd.org/changeset/base/306801 Log: implement zfs_vptocnp() using z_parent property This should allow vn_fullpath() to work even when vfs name cache is disabled for zfs, which is the case when zfs properties like casesensitivity and normalization are set non-default values. The new code should be 100% reliable for directories and "mostly" reliable for files, that is, when hardlinks across directories are not used. Reported by: Frederic Chardon Reviewed by: kib (vfs contract) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D8146 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h Fri Oct 7 06:11:15 2016 (r306800) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h Fri Oct 7 06:29:24 2016 (r306801) @@ -355,6 +355,8 @@ extern zil_get_data_t zfs_get_data; extern zil_replay_func_t *zfs_replay_vector[TX_MAX_TYPE]; extern int zfsfstype; +extern int zfs_znode_parent_and_name(znode_t *zp, znode_t **dzpp, char *buf); + #endif /* _KERNEL */ extern int zfs_obj_to_path(objset_t *osp, uint64_t obj, char *buf, int len); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Oct 7 06:11:15 2016 (r306800) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Oct 7 06:29:24 2016 (r306801) @@ -5934,8 +5934,19 @@ zfs_vptocnp(struct vop_vptocnp_args *ap) } if (zp->z_id != parent || zfsvfs->z_parent == zfsvfs) { + char name[MAXNAMLEN + 1]; + znode_t *dzp; + size_t len; + + error = zfs_znode_parent_and_name(zp, &dzp, name); + if (error == 0) { + len = strlen(name); + *ap->a_buflen -= len; + bcopy(name, ap->a_buf + *ap->a_buflen, len); + *ap->a_vpp = ZTOV(dzp); + } ZFS_EXIT(zfsvfs); - return (vop_stdvptocnp(ap)); + return (error); } ZFS_EXIT(zfsvfs); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Fri Oct 7 06:11:15 2016 (r306800) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Fri Oct 7 06:29:24 2016 (r306801) @@ -1936,7 +1936,6 @@ zfs_create_fs(objset_t *os, cred_t *cr, mutex_destroy(&zfsvfs->z_hold_mtx[i]); kmem_free(zfsvfs, sizeof (zfsvfs_t)); } - #endif /* _KERNEL */ static int @@ -2192,3 +2191,35 @@ zfs_obj_to_stats(objset_t *osp, uint64_t zfs_release_sa_handle(hdl, db, FTAG); return (error); } + +#ifdef _KERNEL +int +zfs_znode_parent_and_name(znode_t *zp, znode_t **dzpp, char *buf) +{ + zfsvfs_t *zfsvfs = zp->z_zfsvfs; + uint64_t parent; + int is_xattrdir; + int err; + + /* Extended attributes should not be visible as regular files. */ + if ((zp->z_pflags & ZFS_XATTR) != 0) + return (SET_ERROR(EINVAL)); + + err = zfs_obj_to_pobj(zfsvfs->z_os, zp->z_sa_hdl, zfsvfs->z_attr_table, + &parent, &is_xattrdir); + if (err != 0) + return (err); + ASSERT0(is_xattrdir); + + /* No name as this is a root object. */ + if (parent == zp->z_id) + return (SET_ERROR(EINVAL)); + + err = zap_value_search(zfsvfs->z_os, parent, zp->z_id, + ZFS_DIRENT_OBJ(-1ULL), buf); + if (err != 0) + return (err); + err = zfs_zget(zfsvfs, parent, dzpp); + return (err); +} +#endif /* _KERNEL */ From owner-svn-src-all@freebsd.org Fri Oct 7 10:47:33 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A3BEC022E7; Fri, 7 Oct 2016 10:47:33 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39A11C24; Fri, 7 Oct 2016 10:47:33 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u97AlWrI080813; Fri, 7 Oct 2016 10:47:32 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u97AlW30080812; Fri, 7 Oct 2016 10:47:32 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201610071047.u97AlW30080812@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Fri, 7 Oct 2016 10:47:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306802 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 10:47:33 -0000 Author: jtl Date: Fri Oct 7 10:47:32 2016 New Revision: 306802 URL: https://svnweb.freebsd.org/changeset/base/306802 Log: MFC r296454: Some cleanup in tcp_respond() in preparation for another change: - Reorder variables by size - Move initializer closer to where it is used - Remove unneeded variable MFC r296455: As reported on the transport@ and current@ mailing lists, the FreeBSD TCP stack is not compliant with RFC 7323, which requires that TCP stacks send a timestamp option on all packets (except, optionally, RSTs) after the session is established. This patch adds that support. It also adds a TCP signature option to the packet, if appropriate. MFC r300764 (by jhb@): Don't reuse the source mbuf in tcp_respond() if it is not writable. Not all mbufs passed up from device drivers are M_WRITABLE(). In particular, the Chelsio T4/T5 driver uses a feature called "buffer packing" to receive multiple frames in a single receive buffer. The mbufs to receive multiple frames in a single receive buffer. The mbufs for these frames all share the same external storage so are treated as read-only by the rest of the stack when multiple frames are in flight. Previously tcp_respond() would blindly overwrite read-only mbufs when INVARIANTS was disabled or panic with an assertion failure if INVARIANTS was enabled. Note that the new case is a bit of a mix of the two other cases in tcp_respond(). The TCP and IP headers must be copied explicitly into the new mbuf instead of being inherited (similar to the m == NULL case), but the addresses and ports must be swapped in the reply (similar to the m != NULL case). Modified: stable/10/sys/netinet/tcp_subr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/tcp_subr.c ============================================================================== --- stable/10/sys/netinet/tcp_subr.c Fri Oct 7 06:29:24 2016 (r306801) +++ stable/10/sys/netinet/tcp_subr.c Fri Oct 7 10:47:32 2016 (r306802) @@ -556,16 +556,18 @@ void tcp_respond(struct tcpcb *tp, void *ipgen, struct tcphdr *th, struct mbuf *m, tcp_seq ack, tcp_seq seq, int flags) { - int tlen; - int win = 0; + struct tcpopt to; + struct inpcb *inp; struct ip *ip; + struct mbuf *optm; struct tcphdr *nth; + u_char *optp; #ifdef INET6 struct ip6_hdr *ip6; int isipv6; #endif /* INET6 */ - int ipflags = 0; - struct inpcb *inp; + int optlen, tlen, win; + bool incl_opts; KASSERT(tp != NULL || m != NULL, ("tcp_respond: tp and m both NULL")); @@ -582,18 +584,21 @@ tcp_respond(struct tcpcb *tp, void *ipge } else inp = NULL; + incl_opts = false; + win = 0; if (tp != NULL) { if (!(flags & TH_RST)) { win = sbspace(&inp->inp_socket->so_rcv); if (win > (long)TCP_MAXWIN << tp->rcv_scale) win = (long)TCP_MAXWIN << tp->rcv_scale; } + if ((tp->t_flags & TF_NOOPT) == 0) + incl_opts = true; } if (m == NULL) { m = m_gethdr(M_NOWAIT, MT_DATA); if (m == NULL) return; - tlen = 0; m->m_data += max_linkhdr; #ifdef INET6 if (isipv6) { @@ -610,17 +615,54 @@ tcp_respond(struct tcpcb *tp, void *ipge } bcopy((caddr_t)th, (caddr_t)nth, sizeof(struct tcphdr)); flags = TH_ACK; + } else if (!M_WRITABLE(m)) { + struct mbuf *n; + + /* Can't reuse 'm', allocate a new mbuf. */ + n = m_gethdr(M_NOWAIT, MT_DATA); + if (n == NULL) { + m_freem(m); + return; + } + + if (!m_dup_pkthdr(n, m, M_NOWAIT)) { + m_freem(m); + m_freem(n); + return; + } + + n->m_data += max_linkhdr; + /* m_len is set later */ +#define xchg(a,b,type) { type t; t=a; a=b; b=t; } +#ifdef INET6 + if (isipv6) { + bcopy((caddr_t)ip6, mtod(n, caddr_t), + sizeof(struct ip6_hdr)); + ip6 = mtod(n, struct ip6_hdr *); + xchg(ip6->ip6_dst, ip6->ip6_src, struct in6_addr); + nth = (struct tcphdr *)(ip6 + 1); + } else +#endif /* INET6 */ + { + bcopy((caddr_t)ip, mtod(n, caddr_t), sizeof(struct ip)); + ip = mtod(n, struct ip *); + xchg(ip->ip_dst.s_addr, ip->ip_src.s_addr, uint32_t); + nth = (struct tcphdr *)(ip + 1); + } + bcopy((caddr_t)th, (caddr_t)nth, sizeof(struct tcphdr)); + xchg(nth->th_dport, nth->th_sport, uint16_t); + th = nth; + m_freem(m); + m = n; } else { /* * reuse the mbuf. - * XXX MRT We inherrit the FIB, which is lucky. + * XXX MRT We inherit the FIB, which is lucky. */ m_freem(m->m_next); m->m_next = NULL; m->m_data = (caddr_t)ipgen; /* m_len is set later */ - tlen = 0; -#define xchg(a,b,type) { type t; t=a; a=b; b=t; } #ifdef INET6 if (isipv6) { xchg(ip6->ip6_dst, ip6->ip6_src, struct in6_addr); @@ -643,12 +685,64 @@ tcp_respond(struct tcpcb *tp, void *ipge xchg(nth->th_dport, nth->th_sport, uint16_t); #undef xchg } + tlen = 0; +#ifdef INET6 + if (isipv6) + tlen = sizeof (struct ip6_hdr) + sizeof (struct tcphdr); +#endif +#if defined(INET) && defined(INET6) + else +#endif +#ifdef INET + tlen = sizeof (struct tcpiphdr); +#endif +#ifdef INVARIANTS + m->m_len = 0; + KASSERT(M_TRAILINGSPACE(m) >= tlen, + ("Not enough trailing space for message (m=%p, need=%d, have=%ld)", + m, tlen, (long)M_TRAILINGSPACE(m))); +#endif + m->m_len = tlen; + to.to_flags = 0; + if (incl_opts) { + /* Make sure we have room. */ + if (M_TRAILINGSPACE(m) < TCP_MAXOLEN) { + m->m_next = m_get(M_NOWAIT, MT_DATA); + if (m->m_next) { + optp = mtod(m->m_next, u_char *); + optm = m->m_next; + } else + incl_opts = false; + } else { + optp = (u_char *) (nth + 1); + optm = m; + } + } + if (incl_opts) { + /* Timestamps. */ + if (tp->t_flags & TF_RCVD_TSTMP) { + to.to_tsval = tcp_ts_getticks() + tp->ts_offset; + to.to_tsecr = tp->ts_recent; + to.to_flags |= TOF_TS; + } +#ifdef TCP_SIGNATURE + /* TCP-MD5 (RFC2385). */ + if (tp->t_flags & TF_SIGNATURE) + to.to_flags |= TOF_SIGNATURE; +#endif + + /* Add the options. */ + tlen += optlen = tcp_addoptions(&to, optp); + + /* Update m_len in the correct mbuf. */ + optm->m_len += optlen; + } else + optlen = 0; #ifdef INET6 if (isipv6) { ip6->ip6_flow = 0; ip6->ip6_vfc = IPV6_VERSION; ip6->ip6_nxt = IPPROTO_TCP; - tlen += sizeof (struct ip6_hdr) + sizeof (struct tcphdr); ip6->ip6_plen = htons(tlen - sizeof(*ip6)); } #endif @@ -657,14 +751,12 @@ tcp_respond(struct tcpcb *tp, void *ipge #endif #ifdef INET { - tlen += sizeof (struct tcpiphdr); ip->ip_len = htons(tlen); ip->ip_ttl = V_ip_defttl; if (V_path_mtu_discovery) ip->ip_off |= htons(IP_DF); } #endif - m->m_len = tlen; m->m_pkthdr.len = tlen; m->m_pkthdr.rcvif = NULL; #ifdef MAC @@ -686,7 +778,7 @@ tcp_respond(struct tcpcb *tp, void *ipge nth->th_seq = htonl(seq); nth->th_ack = htonl(ack); nth->th_x2 = 0; - nth->th_off = sizeof (struct tcphdr) >> 2; + nth->th_off = (sizeof (struct tcphdr) + optlen) >> 2; nth->th_flags = flags; if (tp != NULL) nth->th_win = htons((u_short) (win >> tp->rcv_scale)); @@ -694,6 +786,13 @@ tcp_respond(struct tcpcb *tp, void *ipge nth->th_win = htons((u_short)win); nth->th_urp = 0; +#ifdef TCP_SIGNATURE + if (to.to_flags & TOF_SIGNATURE) { + tcp_signature_compute(m, 0, 0, optlen, to.to_signature, + IPSEC_DIR_OUTBOUND); + } +#endif + m->m_pkthdr.csum_data = offsetof(struct tcphdr, th_sum); #ifdef INET6 if (isipv6) { @@ -725,13 +824,13 @@ tcp_respond(struct tcpcb *tp, void *ipge TCP_PROBE5(send, NULL, tp, mtod(m, const char *), tp, nth); #ifdef INET6 if (isipv6) - (void) ip6_output(m, NULL, NULL, ipflags, NULL, NULL, inp); + (void) ip6_output(m, NULL, NULL, 0, NULL, NULL, inp); #endif /* INET6 */ #if defined(INET) && defined(INET6) else #endif #ifdef INET - (void) ip_output(m, NULL, NULL, ipflags, NULL, inp); + (void) ip_output(m, NULL, NULL, 0, NULL, inp); #endif } From owner-svn-src-all@freebsd.org Fri Oct 7 11:38:29 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1F81BEC70B; Fri, 7 Oct 2016 11:38:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC42AAF1; Fri, 7 Oct 2016 11:38:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u97BcSXL099390; Fri, 7 Oct 2016 11:38:28 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u97BcSpB099384; Fri, 7 Oct 2016 11:38:28 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201610071138.u97BcSpB099384@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 7 Oct 2016 11:38:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306803 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 11:38:29 -0000 Author: kib Date: Fri Oct 7 11:38:28 2016 New Revision: 306803 URL: https://svnweb.freebsd.org/changeset/base/306803 Log: Limit scope of the optimization in r306608 to dounmount() caller only. Other uses of cache_purgevfs() do rely on the cache purge for correct operations, when paths are invalidated without unmount. Reported and tested by: jkim Discussed with: mjg Sponsored by: The FreeBSD Foundation Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c head/sys/kern/vfs_cache.c head/sys/kern/vfs_mount.c head/sys/kern/vfs_mountroot.c head/sys/sys/vnode.h Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Fri Oct 7 10:47:32 2016 (r306802) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Fri Oct 7 11:38:28 2016 (r306803) @@ -1843,7 +1843,7 @@ zfsvfs_teardown(zfsvfs_t *zfsvfs, boolea */ (void) dnlc_purge_vfsp(zfsvfs->z_parent->z_vfs, 0); #ifdef FREEBSD_NAMECACHE - cache_purgevfs(zfsvfs->z_parent->z_vfs); + cache_purgevfs(zfsvfs->z_parent->z_vfs, true); #endif } Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Fri Oct 7 10:47:32 2016 (r306802) +++ head/sys/kern/vfs_cache.c Fri Oct 7 11:38:28 2016 (r306803) @@ -1756,7 +1756,7 @@ cache_purge_negative(struct vnode *vp) * Flush all entries referencing a particular filesystem. */ void -cache_purgevfs(struct mount *mp) +cache_purgevfs(struct mount *mp, bool force) { TAILQ_HEAD(, namecache) ncps; struct mtx *vlp1, *vlp2; @@ -1768,7 +1768,7 @@ cache_purgevfs(struct mount *mp) /* Scan hash tables for applicable entries */ SDT_PROBE1(vfs, namecache, purgevfs, done, mp); - if (mp->mnt_nvnodelistsize <= ncpurgeminvnodes) + if (!force && mp->mnt_nvnodelistsize <= ncpurgeminvnodes) return; TAILQ_INIT(&ncps); n_nchash = nchash + 1; Modified: head/sys/kern/vfs_mount.c ============================================================================== --- head/sys/kern/vfs_mount.c Fri Oct 7 10:47:32 2016 (r306802) +++ head/sys/kern/vfs_mount.c Fri Oct 7 11:38:28 2016 (r306803) @@ -1352,7 +1352,7 @@ dounmount(struct mount *mp, int flags, s mp->mnt_flag &= ~MNT_ASYNC; mp->mnt_kern_flag &= ~MNTK_ASYNC; MNT_IUNLOCK(mp); - cache_purgevfs(mp); /* remove cache entries for this file sys */ + cache_purgevfs(mp, false); /* remove cache entries for this file sys */ vfs_deallocate_syncvnode(mp); /* * For forced unmounts, move process cdir/rdir refs on the fs root Modified: head/sys/kern/vfs_mountroot.c ============================================================================== --- head/sys/kern/vfs_mountroot.c Fri Oct 7 10:47:32 2016 (r306802) +++ head/sys/kern/vfs_mountroot.c Fri Oct 7 11:38:28 2016 (r306803) @@ -298,9 +298,9 @@ vfs_mountroot_shuffle(struct thread *td, TAILQ_INSERT_TAIL(&mountlist, mpdevfs, mnt_list); mtx_unlock(&mountlist_mtx); - cache_purgevfs(mporoot); + cache_purgevfs(mporoot, true); if (mporoot != mpdevfs) - cache_purgevfs(mpdevfs); + cache_purgevfs(mpdevfs, true); VFS_ROOT(mporoot, LK_EXCLUSIVE, &vporoot); @@ -315,7 +315,7 @@ vfs_mountroot_shuffle(struct thread *td, /* Set up the new rootvnode, and purge the cache */ mpnroot->mnt_vnodecovered = NULL; set_rootvnode(); - cache_purgevfs(rootvnode->v_mount); + cache_purgevfs(rootvnode->v_mount, true); if (mporoot != mpdevfs) { /* Remount old root under /.mount or /mnt */ Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Fri Oct 7 10:47:32 2016 (r306802) +++ head/sys/sys/vnode.h Fri Oct 7 11:38:28 2016 (r306803) @@ -608,7 +608,7 @@ int cache_lookup(struct vnode *dvp, stru struct componentname *cnp, struct timespec *tsp, int *ticksp); void cache_purge(struct vnode *vp); void cache_purge_negative(struct vnode *vp); -void cache_purgevfs(struct mount *mp); +void cache_purgevfs(struct mount *mp, bool force); int change_dir(struct vnode *vp, struct thread *td); void cvtstat(struct stat *st, struct ostat *ost); void cvtnstat(struct stat *sb, struct nstat *nsb); From owner-svn-src-all@freebsd.org Fri Oct 7 11:47:19 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92D88BECC95; Fri, 7 Oct 2016 11:47:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6475B215; Fri, 7 Oct 2016 11:47:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u97BlIYi003528; Fri, 7 Oct 2016 11:47:18 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u97BlI4X003527; Fri, 7 Oct 2016 11:47:18 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201610071147.u97BlI4X003527@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 7 Oct 2016 11:47:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306804 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 11:47:19 -0000 Author: kib Date: Fri Oct 7 11:47:18 2016 New Revision: 306804 URL: https://svnweb.freebsd.org/changeset/base/306804 Log: MFC r306674: Style. Modified: stable/11/sys/kern/imgact_elf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/imgact_elf.c ============================================================================== --- stable/11/sys/kern/imgact_elf.c Fri Oct 7 11:38:28 2016 (r306803) +++ stable/11/sys/kern/imgact_elf.c Fri Oct 7 11:47:18 2016 (r306804) @@ -454,7 +454,7 @@ __elfN(map_insert)(vm_map_t map, vm_obje rv = vm_map_find(map, NULL, 0, &start, end - start, 0, VMFS_NO_SPACE, prot | VM_PROT_WRITE, VM_PROT_ALL, 0); - if (rv) + if (rv != KERN_SUCCESS) return (rv); if (object == NULL) return (KERN_SUCCESS); @@ -469,9 +469,8 @@ __elfN(map_insert)(vm_map_t map, vm_obje error = copyout((caddr_t)sf_buf_kva(sf) + off, (caddr_t)start, sz); vm_imgact_unmap_page(sf); - if (error) { + if (error != 0) return (KERN_FAILURE); - } offset += sz; } rv = KERN_SUCCESS; From owner-svn-src-all@freebsd.org Fri Oct 7 11:51:01 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2AF77BECD41; Fri, 7 Oct 2016 11:51:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB8E962F; Fri, 7 Oct 2016 11:51:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u97Bp0TN003731; Fri, 7 Oct 2016 11:51:00 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u97Bp0fe003730; Fri, 7 Oct 2016 11:51:00 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201610071151.u97Bp0fe003730@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 7 Oct 2016 11:51:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306805 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 11:51:01 -0000 Author: kib Date: Fri Oct 7 11:50:59 2016 New Revision: 306805 URL: https://svnweb.freebsd.org/changeset/base/306805 Log: MFC r306674: Style. Modified: stable/10/sys/kern/imgact_elf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/imgact_elf.c ============================================================================== --- stable/10/sys/kern/imgact_elf.c Fri Oct 7 11:47:18 2016 (r306804) +++ stable/10/sys/kern/imgact_elf.c Fri Oct 7 11:50:59 2016 (r306805) @@ -440,7 +440,7 @@ __elfN(map_insert)(vm_map_t map, vm_obje rv = vm_map_find(map, NULL, 0, &start, end - start, 0, VMFS_NO_SPACE, prot | VM_PROT_WRITE, VM_PROT_ALL, 0); - if (rv) + if (rv != KERN_SUCCESS) return (rv); if (object == NULL) return (KERN_SUCCESS); @@ -455,9 +455,8 @@ __elfN(map_insert)(vm_map_t map, vm_obje error = copyout((caddr_t)sf_buf_kva(sf) + off, (caddr_t)start, sz); vm_imgact_unmap_page(sf); - if (error) { + if (error != 0) return (KERN_FAILURE); - } offset += sz; } rv = KERN_SUCCESS; From owner-svn-src-all@freebsd.org Fri Oct 7 12:57:37 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F701AF5B74; Fri, 7 Oct 2016 12:57:37 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB678E39; Fri, 7 Oct 2016 12:57:36 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u97CvaUZ029742; Fri, 7 Oct 2016 12:57:36 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u97CvZ3V029734; Fri, 7 Oct 2016 12:57:35 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201610071257.u97CvZ3V029734@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 7 Oct 2016 12:57:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306806 - head/usr.bin/dtc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 12:57:37 -0000 Author: emaste Date: Fri Oct 7 12:57:35 2016 New Revision: 306806 URL: https://svnweb.freebsd.org/changeset/base/306806 Log: Improvements to BSD-licensed DTC. - Numerous crash and bug fixes - Improved warning and error messages - Permit multiple labels on nodes and properties - Fix node@address references - Add support for /delete-node/ - Consume whitespace after a node - Read the next token before the second /memreserve/ - Fix parsing of whitespace - Clean up /delete-node/ and add support for /delete-property/ - Handle /delete-node/ specifying a unit address Obtained from: https://github.com/davidchisnall/dtc @df5ede4 Modified: head/usr.bin/dtc/checking.cc head/usr.bin/dtc/checking.hh head/usr.bin/dtc/dtb.cc head/usr.bin/dtc/dtb.hh head/usr.bin/dtc/dtc.1 head/usr.bin/dtc/dtc.cc head/usr.bin/dtc/fdt.cc head/usr.bin/dtc/fdt.hh head/usr.bin/dtc/input_buffer.cc head/usr.bin/dtc/input_buffer.hh head/usr.bin/dtc/string.cc head/usr.bin/dtc/util.hh Modified: head/usr.bin/dtc/checking.cc ============================================================================== --- head/usr.bin/dtc/checking.cc Fri Oct 7 11:50:59 2016 (r306805) +++ head/usr.bin/dtc/checking.cc Fri Oct 7 12:57:35 2016 (r306806) @@ -33,7 +33,7 @@ #include "checking.hh" #include - +using std::string; namespace dtc { @@ -44,6 +44,30 @@ namespace checking namespace { + struct deleted_node_checker : public checker + { + deleted_node_checker(const char *name) : checker(name) {} + virtual bool check_node(device_tree *, const node_ptr &n) + { + auto &deleted = n->deleted_child_nodes(); + if (deleted.empty()) + { + return true; + } + bool plural = deleted.size() > 1; + string errmsg("Attempts to delete "); + errmsg += plural ? "nodes" : "node"; + errmsg += " that "; + errmsg += plural ? "were" : "was"; + errmsg += " not added in merge: "; + for (auto &d : deleted) + { + errmsg += d; + } + report_error(errmsg.c_str()); + return false; + } + }; /** * Checker that verifies that every node that has children has * #address-cells and #size-cells properties. @@ -73,16 +97,16 @@ namespace } if (found_size && found_address) { - break; + break; } } if (!found_address) { - report_error("Missing #address-cells property"); + report_error("Missing #address-cells property"); } if (!found_size) { - report_error("Missing #size-cells property"); + report_error("Missing #size-cells property"); } return found_address && found_size; } @@ -126,11 +150,11 @@ checker::report_error(const char *errmsg for (auto &p : path) { putc('/', stderr); - p.first.dump(); + puts(p.first.c_str()); if (!(p.second.empty())) { putc('@', stderr); - p.second.dump(); + puts(p.second.c_str()); } } fprintf(stderr, " [-W%s]\n", checker_name); @@ -167,7 +191,7 @@ property_size_checker::check(device_tree template void -check_manager::add_property_type_checker(const char *name, string prop) +check_manager::add_property_type_checker(const char *name, const string &prop) { checkers.insert(std::make_pair(string(name), new property_type_checker(name, prop))); @@ -175,7 +199,7 @@ check_manager::add_property_type_checker void check_manager::add_property_size_checker(const char *name, - string prop, + const string &prop, uint32_t size) { checkers.insert(std::make_pair(string(name), @@ -207,6 +231,8 @@ check_manager::check_manager() add_property_size_checker("type-phandle", string("phandle"), 4); disabled_checkers.insert(std::make_pair(string("cells-attributes"), new address_cells_checker("cells-attributes"))); + checkers.insert(std::make_pair(string("deleted-nodes"), + new deleted_node_checker("deleted-nodes"))); } bool @@ -225,7 +251,7 @@ check_manager::run_checks(device_tree *t } bool -check_manager::disable_checker(string name) +check_manager::disable_checker(const string &name) { auto checker = checkers.find(name); if (checker != checkers.end()) @@ -239,7 +265,7 @@ check_manager::disable_checker(string na } bool -check_manager::enable_checker(string name) +check_manager::enable_checker(const string &name) { auto checker = disabled_checkers.find(name); if (checker != disabled_checkers.end()) Modified: head/usr.bin/dtc/checking.hh ============================================================================== --- head/usr.bin/dtc/checking.hh Fri Oct 7 11:50:59 2016 (r306805) +++ head/usr.bin/dtc/checking.hh Fri Oct 7 12:57:35 2016 (r306806) @@ -32,7 +32,7 @@ #ifndef _CHECKING_HH_ #define _CHECKING_HH_ -#include "string.hh" +#include #include "fdt.hh" namespace dtc @@ -58,7 +58,7 @@ class checker /** * The name of the checker. This is used for printing error messages * and for enabling / disabling specific checkers from the command - * line. + * line. */ const char *checker_name; /** @@ -118,18 +118,18 @@ class property_checker : public checker /** * The name of the property that this checker is looking for. */ - string key; + std::string key; public: /** * Implementation of the generic property-checking method that checks - * for a property with the name specified in the constructor + * for a property with the name specified in the constructor. */ virtual bool check_property(device_tree *tree, const node_ptr &n, property_ptr p); /** * Constructor. Takes the name of the checker and the name of the * property to check. */ - property_checker(const char* name, string property_name) + property_checker(const char* name, const std::string &property_name) : checker(name), key(property_name) {} /** * The check method, which subclasses should implement. @@ -147,7 +147,7 @@ struct property_type_checker : public pr * Constructor, takes the name of the checker and the name of the * property to check as arguments. */ - property_type_checker(const char* name, string property_name) : + property_type_checker(const char* name, const std::string &property_name) : property_checker(name, property_name) {} virtual bool check(device_tree *tree, const node_ptr &n, property_ptr p) = 0; }; @@ -158,7 +158,7 @@ struct property_type_checker : public pr template<> struct property_type_checker : public property_checker { - property_type_checker(const char* name, string property_name) : + property_type_checker(const char* name, const std::string &property_name) : property_checker(name, property_name) {} virtual bool check(device_tree *, const node_ptr &, property_ptr p) { @@ -173,7 +173,7 @@ struct property_type_checker struct property_type_checker : public property_checker { - property_type_checker(const char* name, string property_name) : + property_type_checker(const char* name, const std::string &property_name) : property_checker(name, property_name) {} virtual bool check(device_tree *, const node_ptr &, property_ptr p) { @@ -188,7 +188,7 @@ template<> struct property_type_checker : public property_checker { - property_type_checker(const char* name, string property_name) : + property_type_checker(const char* name, const std::string &property_name) : property_checker(name, property_name) {} virtual bool check(device_tree *, const node_ptr &, property_ptr p) { @@ -211,11 +211,11 @@ struct property_type_checker struct property_type_checker : public property_checker { - property_type_checker(const char* name, string property_name) : + property_type_checker(const char* name, const std::string &property_name) : property_checker(name, property_name) {} virtual bool check(device_tree *tree, const node_ptr &, property_ptr p) { - return (p->begin() + 1 == p->end()) && + return (p->begin() + 1 == p->end()) && (tree->referenced_node(*p->begin()) != 0); } }; @@ -234,7 +234,9 @@ struct property_size_checker : public pr * Constructor, takes the name of the checker, the name of the property * to check, and its expected size as arguments. */ - property_size_checker(const char* name, string property_name, uint32_t bytes) + property_size_checker(const char* name, + const std::string &property_name, + uint32_t bytes) : property_checker(name, property_name), size(bytes) {} /** * Check, validates that the property has the correct size. @@ -254,26 +256,26 @@ class check_manager * disabling checkers from the command line. When this manager runs, * it will only run the checkers from this map. */ - std::unordered_map checkers; + std::unordered_map checkers; /** * The disabled checkers. Moving checkers to this list disables them, * but allows them to be easily moved back. */ - std::unordered_map disabled_checkers; + std::unordered_map disabled_checkers; /** * Helper function for adding a property value checker. */ template - void add_property_type_checker(const char *name, string prop); + void add_property_type_checker(const char *name, const std::string &prop); /** * Helper function for adding a simple type checker. */ - void add_property_type_checker(const char *name, string prop); + void add_property_type_checker(const char *name, const std::string &prop); /** * Helper function for adding a property value checker. */ void add_property_size_checker(const char *name, - string prop, + const std::string &prop, uint32_t size); public: /** @@ -292,11 +294,11 @@ class check_manager /** * Disables the named checker. */ - bool disable_checker(string name); + bool disable_checker(const std::string &name); /** - * Enables the named checker. + * Enables the named checker. */ - bool enable_checker(string name); + bool enable_checker(const std::string &name); }; } // namespace checking Modified: head/usr.bin/dtc/dtb.cc ============================================================================== --- head/usr.bin/dtc/dtb.cc Fri Oct 7 11:50:59 2016 (r306805) +++ head/usr.bin/dtc/dtb.cc Fri Oct 7 12:57:35 2016 (r306806) @@ -36,6 +36,7 @@ #include #include +using std::string; namespace dtc { @@ -51,9 +52,9 @@ void output_writer::write_data(byte_buff } void -binary_writer::write_string(string name) +binary_writer::write_string(const string &name) { - name.push_to_buffer(buffer); + push_string(buffer, name); // Trailing nul buffer.push_back(0); } @@ -98,15 +99,6 @@ binary_writer::size() } void -asm_writer::write_string(const char *c) -{ - while (*c) - { - buffer.push_back((uint8_t)*(c++)); - } -} - -void asm_writer::write_line(const char *c) { if (byte_count != 0) @@ -142,34 +134,44 @@ asm_writer::write_byte(uint8_t b) } void -asm_writer::write_label(string name) +asm_writer::write_label(const string &name) { write_line("\t.globl "); - name.push_to_buffer(buffer); + push_string(buffer, name); buffer.push_back('\n'); - name.push_to_buffer(buffer); + push_string(buffer, name); buffer.push_back(':'); buffer.push_back('\n'); buffer.push_back('_'); - name.push_to_buffer(buffer); + push_string(buffer, name); buffer.push_back(':'); buffer.push_back('\n'); } void -asm_writer::write_comment(string name) +asm_writer::write_comment(const string &name) { write_line("\t/* "); - name.push_to_buffer(buffer); + push_string(buffer, name); write_string(" */\n"); } void -asm_writer::write_string(string name) +asm_writer::write_string(const char *c) +{ + while (*c) + { + buffer.push_back((uint8_t)*(c++)); + } +} + + +void +asm_writer::write_string(const string &name) { write_line("\t.string \""); - name.push_to_buffer(buffer); + push_string(buffer, name); write_line("\"\n"); bytes_written += name.size() + 1; } @@ -231,8 +233,8 @@ asm_writer::size() void header::write(output_writer &out) { - out.write_label(string("dt_blob_start")); - out.write_label(string("dt_header")); + out.write_label("dt_blob_start"); + out.write_label("dt_header"); out.write_comment("magic"); out.write_data(magic); out.write_comment("totalsize"); @@ -275,7 +277,7 @@ header::read_dtb(input_buffer &input) input.consume_binary(size_dt_struct); } uint32_t -string_table::add_string(string str) +string_table::add_string(const string &str) { auto old = string_offsets.find(str); if (old == string_offsets.end()) @@ -296,13 +298,13 @@ string_table::add_string(string str) void string_table::write(dtb::output_writer &writer) { - writer.write_comment(string("Strings table.")); - writer.write_label(string("dt_strings_start")); + writer.write_comment("Strings table."); + writer.write_label("dt_strings_start"); for (auto &i : strings) { writer.write_string(i); } - writer.write_label(string("dt_strings_end")); + writer.write_label("dt_strings_end"); } } // namespace dtb Modified: head/usr.bin/dtc/dtb.hh ============================================================================== --- head/usr.bin/dtc/dtb.hh Fri Oct 7 11:50:59 2016 (r306805) +++ head/usr.bin/dtc/dtb.hh Fri Oct 7 12:57:35 2016 (r306806) @@ -33,10 +33,13 @@ #ifndef _DTB_HH_ #define _DTB_HH_ #include -#include "string.hh" +#include #include +#include "input_buffer.hh" +#include "util.hh" + namespace dtc { /** @@ -121,16 +124,16 @@ struct output_writer * assembly output, where the labels become symbols that can be * resolved at link time. */ - virtual void write_label(string name) = 0; + virtual void write_label(const std::string &name) = 0; /** * Writes a comment into the output stream. Useful only when debugging * the output. */ - virtual void write_comment(string name) = 0; + virtual void write_comment(const std::string &name) = 0; /** * Writes a string. A nul terminator is implicitly added. */ - virtual void write_string(string name) = 0; + virtual void write_string(const std::string &name) = 0; /** * Writes a single 8-bit value. */ @@ -186,12 +189,12 @@ class binary_writer : public output_writ * The binary format does not support labels, so this method * does nothing. */ - virtual void write_label(string) {} + virtual void write_label(const std::string &) {} /** * Comments are ignored by the binary writer. */ - virtual void write_comment(string) {} - virtual void write_string(string name); + virtual void write_comment(const std::string&) {} + virtual void write_string(const std::string &name); virtual void write_data(uint8_t v); virtual void write_data(uint32_t v); virtual void write_data(uint64_t v); @@ -224,11 +227,15 @@ class asm_writer : public output_writer uint32_t bytes_written; /** - * Writes a C string directly to the output as-is. This is mainly used - * for writing directives. + * Writes a string directly to the output as-is. This is the function that + * performs the real output. */ void write_string(const char *c); /** + * Write a string to the output. + */ + void write_string(const std::string &c); + /** * Writes the string, starting on a new line. */ void write_line(const char *c); @@ -239,9 +246,8 @@ class asm_writer : public output_writer void write_byte(uint8_t b); public: asm_writer() : byte_count(0), bytes_written(0) {} - virtual void write_label(string name); - virtual void write_comment(string name); - virtual void write_string(string name); + virtual void write_label(const std::string &name); + virtual void write_comment(const std::string &name); virtual void write_data(uint8_t v); virtual void write_data(uint32_t v); virtual void write_data(uint64_t v); @@ -328,14 +334,14 @@ class string_table { /** * Map from strings to their offset. */ - std::map string_offsets; + std::map string_offsets; /** * The strings, in the order in which they should be written to the * output. The order must be stable - adding another string must not * change the offset of any that we have already referenced - and so we * simply write the strings in the order that they are passed. */ - std::vector strings; + std::vector strings; /** * The current size of the strings section. */ @@ -351,7 +357,7 @@ class string_table { * will return its existing offset, otherwise it will return a new * offset. */ - uint32_t add_string(string str); + uint32_t add_string(const std::string &str); /** * Writes the strings table to the specified output. */ Modified: head/usr.bin/dtc/dtc.1 ============================================================================== --- head/usr.bin/dtc/dtc.1 Fri Oct 7 11:50:59 2016 (r306805) +++ head/usr.bin/dtc/dtc.1 Fri Oct 7 12:57:35 2016 (r306806) @@ -237,6 +237,10 @@ Checks that all nodes with children have and .Va #size-cells properties. +.It deleted-nodes +Checks that all +.Va /delete-node/ +statements refer to nodes that are merged. .El .Sh EXAMPLES The command: Modified: head/usr.bin/dtc/dtc.cc ============================================================================== --- head/usr.bin/dtc/dtc.cc Fri Oct 7 11:50:59 2016 (r306805) +++ head/usr.bin/dtc/dtc.cc Fri Oct 7 12:57:35 2016 (r306806) @@ -42,8 +42,10 @@ #include "fdt.hh" #include "checking.hh" +#include "util.hh" using namespace dtc; +using std::string; /** * The current major version of the tool. @@ -58,7 +60,7 @@ int version_minor = 4; */ int version_patch = 0; -static void usage(const char* argv0) +static void usage(const string &argv0) { fprintf(stderr, "Usage:\n" "\t%s\t[-fhsv] [-b boot_cpu_id] [-d dependency_file]" @@ -67,7 +69,7 @@ static void usage(const char* argv0) "[-O output_format]\n" "\t\t[-o output_file] [-R entries] [-S bytes] [-p bytes]" "[-V blob_version]\n" - "\t\t-W [no-]checker_name] input_file\n", basename((char*)argv0)); + "\t\t-W [no-]checker_name] input_file\n", basename(argv0).c_str()); } /** @@ -90,9 +92,8 @@ main(int argc, char **argv) const char *in_file = "-"; FILE *depfile = 0; bool debug_mode = false; - void (device_tree::*write_fn)(int) = &device_tree::write_binary; - void (device_tree::*read_fn)(const char*, FILE*) = - &device_tree::parse_dts; + auto write_fn = &device_tree::write_binary; + auto read_fn = &device_tree::parse_dts; uint32_t boot_cpu; bool boot_cpu_specified = false; bool keep_going = false; @@ -115,12 +116,12 @@ main(int argc, char **argv) return EXIT_SUCCESS; case 'I': { - string arg = string(optarg); - if (arg == string("dtb")) + string arg(optarg); + if (arg == "dtb") { read_fn = &device_tree::parse_dtb; } - else if (arg == string("dts")) + else if (arg == "dts") { read_fn = &device_tree::parse_dts; } @@ -133,16 +134,16 @@ main(int argc, char **argv) } case 'O': { - string arg = string(optarg); - if (arg == string("dtb")) + string arg(optarg); + if (arg == "dtb") { write_fn = &device_tree::write_binary; } - else if (arg == string("asm")) + else if (arg == "asm") { write_fn = &device_tree::write_asm; } - else if (arg == string("dts")) + else if (arg == "dts") { write_fn = &device_tree::write_dts; } @@ -168,7 +169,7 @@ main(int argc, char **argv) debug_mode = true; break; case 'V': - if (string(optarg) != string("17")) + if (string(optarg) != "17") { fprintf(stderr, "Unknown output format version: %s\n", optarg); return EXIT_FAILURE; @@ -180,7 +181,7 @@ main(int argc, char **argv) { fclose(depfile); } - if (string(optarg) == string("-")) + if (string(optarg) == "-") { depfile = stdout; } @@ -197,16 +198,16 @@ main(int argc, char **argv) } case 'H': { - string arg = string(optarg); - if (arg == string("both")) + string arg(optarg); + if (arg == "both") { tree.set_phandle_format(device_tree::BOTH); } - else if (arg == string("epapr")) + else if (arg == "epapr") { tree.set_phandle_format(device_tree::EPAPR); } - else if (arg == string("linux")) + else if (arg == "linux") { tree.set_phandle_format(device_tree::LINUX); } @@ -229,7 +230,7 @@ main(int argc, char **argv) case 'W': case 'E': { - string arg = string(optarg); + string arg(optarg); if ((arg.size() > 3) && (strncmp(optarg, "no-", 3) == 0)) { arg = string(optarg+3); @@ -307,7 +308,7 @@ main(int argc, char **argv) } if (!(tree.is_valid() || keep_going)) { - fprintf(stderr, "Failed to parse tree. Unhappy face!\n"); + fprintf(stderr, "Failed to parse tree.\n"); return EXIT_FAILURE; } clock_t c2 = clock(); Modified: head/usr.bin/dtc/fdt.cc ============================================================================== --- head/usr.bin/dtc/fdt.cc Fri Oct 7 11:50:59 2016 (r306805) +++ head/usr.bin/dtc/fdt.cc Fri Oct 7 12:57:35 2016 (r306806) @@ -36,6 +36,7 @@ #include "dtb.hh" #include +#include #include #include @@ -48,6 +49,8 @@ #include #include +using std::string; + namespace dtc { @@ -78,7 +81,7 @@ property_value::push_to_buffer(byte_buff } else { - string_data.push_to_buffer(buffer, true); + push_string(buffer, string_data, true); // Trailing nul buffer.push_back(0); } @@ -172,7 +175,7 @@ property_value::write_as_string(FILE *fi putc('"', file); if (byte_data.empty()) { - string_data.print(file); + fputs(string_data.c_str(), file); } else { @@ -240,31 +243,32 @@ property_value::write_as_bytes(FILE *fil } void -property::parse_string(input_buffer &input) +property::parse_string(text_input_buffer &input) { property_value v; - assert(input[0] == '"'); + assert(*input == '"'); ++input; - const char *start = (const char*)input; - int length = 0; - while (char c = input[0]) + std::vector bytes; + bool isEscaped = false; + while (char c = *input) { - if (c == '"' && input[-1] != '\\') + if (c == '"' && !isEscaped) { input.consume('"'); break; } + isEscaped = (c == '\\'); + bytes.push_back(c); ++input; - ++length; } - v.string_data = string(start, length); + v.string_data = string(bytes.begin(), bytes.end()); values.push_back(v); } void -property::parse_cells(input_buffer &input, int cell_size) +property::parse_cells(text_input_buffer &input, int cell_size) { - assert(input[0] == '<'); + assert(*input == '<'); ++input; property_value v; input.next_token(); @@ -282,9 +286,18 @@ property::parse_cells(input_buffer &inpu return; } input.next_token(); - // FIXME: We should support full paths here, but we - // don't. - string referenced = string::parse_node_name(input); + bool isPath = false; + string referenced; + if (!input.consume('{')) + { + referenced = input.parse_node_name(); + } + else + { + referenced = input.parse_to('}'); + input.consume('}'); + isPath = true; + } if (referenced.empty()) { input.parse_error("Expected node name"); @@ -343,9 +356,9 @@ property::parse_cells(input_buffer &inpu } void -property::parse_bytes(input_buffer &input) +property::parse_bytes(text_input_buffer &input) { - assert(input[0] == '['); + assert(*input == '['); ++input; property_value v; input.next_token(); @@ -370,13 +383,13 @@ property::parse_bytes(input_buffer &inpu } void -property::parse_reference(input_buffer &input) +property::parse_reference(text_input_buffer &input) { - assert(input[0] == '&'); + assert(*input == '&'); ++input; input.next_token(); property_value v; - v.string_data = string::parse_node_name(input); + v.string_data = input.parse_node_name(); if (v.string_data.empty()) { input.parse_error("Expected node name"); @@ -400,7 +413,7 @@ property::property(input_buffer &structs } // Find the name input_buffer name_buffer = strings.buffer_from_offset(name_offset); - if (name_buffer.empty()) + if (name_buffer.finished()) { fprintf(stderr, "Property name offset %" PRIu32 " is past the end of the strings table\n", @@ -408,7 +421,7 @@ property::property(input_buffer &structs valid = false; return; } - key = string(name_buffer); + key = name_buffer.parse_to(0); // If we're empty, do not push anything as value. if (!length) @@ -429,7 +442,7 @@ property::property(input_buffer &structs values.push_back(v); } -void property::parse_define(input_buffer &input, define_map *defines) +void property::parse_define(text_input_buffer &input, define_map *defines) { input.consume('$'); if (!defines) @@ -438,7 +451,7 @@ void property::parse_define(input_buffer valid = false; return; } - string name = string::parse_property_name(input); + string name = input.parse_property_name(); define_map::iterator found; if ((name == string()) || ((found = defines->find(name)) == defines->end())) @@ -450,15 +463,15 @@ void property::parse_define(input_buffer values.push_back((*found).second->values[0]); } -property::property(input_buffer &input, - string k, - string l, +property::property(text_input_buffer &input, + string &&k, + string_set &&l, bool semicolonTerminated, - define_map *defines) : key(k), label(l), valid(true) + define_map *defines) : key(k), labels(l), valid(true) { do { input.next_token(); - switch (input[0]) + switch (*input) { case '$': { @@ -487,7 +500,7 @@ property::property(input_buffer &input, } if (!valid) return; input.next_token(); - if (input[0] != '<') + if (*input != '<') { input.parse_error("/bits/ directive is only valid on arrays"); valid = false; @@ -534,10 +547,14 @@ property::parse_dtb(input_buffer &struct } property_ptr -property::parse(input_buffer &input, string key, string label, +property::parse(text_input_buffer &input, string &&key, string_set &&label, bool semicolonTerminated, define_map *defines) { - property_ptr p(new property(input, key, label, semicolonTerminated, defines)); + property_ptr p(new property(input, + std::move(key), + std::move(label), + semicolonTerminated, + defines)); if (!p->valid) { p = nullptr; @@ -596,14 +613,16 @@ property::write_dts(FILE *file, int inde { putc('\t', file); } - if (label != string()) +#ifdef PRINT_LABELS + for (auto &l : labels) { - label.print(file); + fputs(l.c_str(), file); fputs(": ", file); } +#endif if (key != string()) { - key.print(file); + fputs(key.c_str(), file); } if (!values.empty()) { @@ -637,7 +656,7 @@ property::write_dts(FILE *file, int inde } string -node::parse_name(input_buffer &input, bool &is_property, const char *error) +node::parse_name(text_input_buffer &input, bool &is_property, const char *error) { if (!valid) { @@ -646,9 +665,9 @@ node::parse_name(input_buffer &input, bo input.next_token(); if (is_property) { - return string::parse_property_name(input); + return input.parse_property_name(); } - string n = string::parse_node_or_property_name(input, is_property); + string n = input.parse_node_or_property_name(is_property); if (n.empty()) { if (n.empty()) @@ -672,25 +691,23 @@ node::visit(std::function f node::node(input_buffer &structs, input_buffer &strings) : valid(true) { - const char *name_start = (const char*)structs; - int name_length = 0; + std::vector bytes; while (structs[0] != '\0' && structs[0] != '@') { - name_length++; + bytes.push_back(structs[0]); ++structs; } - name = string(name_start, name_length); + name = string(bytes.begin(), bytes.end()); + bytes.clear(); if (structs[0] == '@') { ++structs; - name_start = (const char*)structs; - name_length = 0; while (structs[0] != '\0') { - name_length++; + bytes.push_back(structs[0]); ++structs; } - unit_address = string(name_start, name_length); + unit_address = string(bytes.begin(), bytes.end()); } ++structs; uint32_t token; @@ -747,8 +764,12 @@ node::node(input_buffer &structs, input_ return; } -node::node(input_buffer &input, string n, string l, string a, define_map *defines) : - label(l), name(n), unit_address(a), valid(true) +node::node(text_input_buffer &input, + string &&n, + std::unordered_set &&l, + string &&a, + define_map *defines) + : labels(l), name(n), unit_address(a), valid(true) { if (!input.consume('{')) { @@ -760,15 +781,60 @@ node::node(input_buffer &input, string n // flag set if we find any characters that are only in // the property name character set, not the node bool is_property = false; - string child_name, child_label, child_address; + string child_name, child_address; + std::unordered_set child_labels; + auto parse_delete = [&](const char *expected, bool at) + { + if (child_name == string()) + { + input.parse_error(expected); + valid = false; + return; + } + input.next_token(); + if (at && input.consume('@')) + { + child_name += '@'; + child_name += parse_name(input, is_property, "Expected unit address"); + } + if (!input.consume(';')) + { + input.parse_error("Expected semicolon"); + valid = false; + return; + } + input.next_token(); + }; + if (input.consume("/delete-node/")) + { + input.next_token(); + child_name = input.parse_node_name(); + parse_delete("Expected node name", true); + if (valid) + { + deleted_children.insert(child_name); + } + continue; + } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Oct 7 13:41:30 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04268BEAC27; Fri, 7 Oct 2016 13:41:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA360898; Fri, 7 Oct 2016 13:41:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u97DfTC1047153; Fri, 7 Oct 2016 13:41:29 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u97DfTY5047152; Fri, 7 Oct 2016 13:41:29 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201610071341.u97DfTY5047152@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 7 Oct 2016 13:41:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306807 - head/sbin/init X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 13:41:30 -0000 Author: kib Date: Fri Oct 7 13:41:28 2016 New Revision: 306807 URL: https://svnweb.freebsd.org/changeset/base/306807 Log: When making a pause after detecting hard kill of the single-user shell, ensure that we do sleep for at least the specified time, in presence of signals. Interrupted sleep(3) is followed by _exit(), which might cause 'Going nowhere without my init' panic if init(8) exits before the reboot(2) really started, or before SIGTSTP stopped init(8) (both events are initiated by the parallel reboot(8) operation). I do not see other calls to sleep(STALL_TIMEOUT) as having the same disasterous consequences and kept them as is until the similar change is proven required. Reported and tested by: Andy Farkas Sponsored by: The FreeBSD Foundation MFC after: 3 weeks Modified: head/sbin/init/init.c Modified: head/sbin/init/init.c ============================================================================== --- head/sbin/init/init.c Fri Oct 7 12:57:35 2016 (r306806) +++ head/sbin/init/init.c Fri Oct 7 13:41:28 2016 (r306807) @@ -870,6 +870,7 @@ single_user(void) sigset_t mask; const char *shell; char *argv[2]; + struct timeval tv, tn; #ifdef SECURE struct ttyent *typ; struct passwd *pp; @@ -1002,7 +1003,14 @@ single_user(void) * reboot(8) killed shell? */ warning("single user shell terminated."); - sleep(STALL_TIMEOUT); + gettimeofday(&tv, NULL); + tn = tv; + tv.tv_sec += STALL_TIMEOUT; + while (tv.tv_sec > tn.tv_sec || (tv.tv_sec == + tn.tv_sec && tv.tv_usec > tn.tv_usec)) { + sleep(1); + gettimeofday(&tn, NULL); + } _exit(0); } else { warning("single user shell terminated, restarting"); From owner-svn-src-all@freebsd.org Fri Oct 7 13:43:39 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE2EFBEACBB; Fri, 7 Oct 2016 13:43:39 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D619BAD; Fri, 7 Oct 2016 13:43:39 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u97Dhc4M048532; Fri, 7 Oct 2016 13:43:38 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u97Dhcc6048531; Fri, 7 Oct 2016 13:43:38 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201610071343.u97Dhcc6048531@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 7 Oct 2016 13:43:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306808 - head/sbin/init X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 13:43:39 -0000 Author: kib Date: Fri Oct 7 13:43:38 2016 New Revision: 306808 URL: https://svnweb.freebsd.org/changeset/base/306808 Log: Add verbosity around failed reboot(2) call. Sponsored by: The FreeBSD Foundation MFC after: 3 weeks Modified: head/sbin/init/init.c Modified: head/sbin/init/init.c ============================================================================== --- head/sbin/init/init.c Fri Oct 7 13:41:28 2016 (r306807) +++ head/sbin/init/init.c Fri Oct 7 13:43:38 2016 (r306808) @@ -885,8 +885,13 @@ single_user(void) if (Reboot) { /* Instead of going single user, let's reboot the machine */ sync(); - reboot(howto); - _exit(0); + if (reboot(howto) == -1) { + emergency("reboot(%#x) failed, %s", howto, + strerror(errno)); + _exit(1); /* panic and reboot */ + } + warning("reboot(%#x) returned", howto); + _exit(0); /* panic as well */ } shell = get_shell(); From owner-svn-src-all@freebsd.org Fri Oct 7 14:46:35 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5808CC04E3D; Fri, 7 Oct 2016 14:46:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27AC6B23; Fri, 7 Oct 2016 14:46:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u97EkYqe070846; Fri, 7 Oct 2016 14:46:34 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u97EkYgu070845; Fri, 7 Oct 2016 14:46:34 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201610071446.u97EkYgu070845@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 7 Oct 2016 14:46:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306809 - stable/10/sys/fs/nfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 14:46:35 -0000 Author: emaste Date: Fri Oct 7 14:46:34 2016 New Revision: 306809 URL: https://svnweb.freebsd.org/changeset/base/306809 Log: MFC r299199: Add nid_namelen bounds check to nfssvc system call This is only allowed by root and only used by the nfs daemon, which should not provide an incorrect value. However, it's still good practice to validate data provided by userland. PR: 206626 Modified: stable/10/sys/fs/nfs/nfs_commonsubs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- stable/10/sys/fs/nfs/nfs_commonsubs.c Fri Oct 7 13:43:38 2016 (r306808) +++ stable/10/sys/fs/nfs/nfs_commonsubs.c Fri Oct 7 14:46:34 2016 (r306809) @@ -3167,6 +3167,10 @@ nfssvc_idname(struct nfsd_idargs *nidp) static int onethread = 0; static time_t lasttime = 0; + if (nidp->nid_namelen <= 0 || nidp->nid_namelen > MAXHOSTNAMELEN) { + error = EINVAL; + goto out; + } if (nidp->nid_flag & NFSID_INITIALIZE) { cp = malloc(nidp->nid_namelen + 1, M_NFSSTRING, M_WAITOK); error = copyin(CAST_USER_ADDR_T(nidp->nid_name), cp, From owner-svn-src-all@freebsd.org Fri Oct 7 15:42:23 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5097EC042DE; Fri, 7 Oct 2016 15:42:23 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1CADCA14; Fri, 7 Oct 2016 15:42:23 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u97FgMna092349; Fri, 7 Oct 2016 15:42:22 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u97FgLgU092008; Fri, 7 Oct 2016 15:42:21 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201610071542.u97FgLgU092008@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Fri, 7 Oct 2016 15:42:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306811 - in head: etc/mtree include sys/sys sys/sys/disk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 15:42:23 -0000 Author: marcel Date: Fri Oct 7 15:42:20 2016 New Revision: 306811 URL: https://svnweb.freebsd.org/changeset/base/306811 Log: In order to allow mkimg(1) (and other tools) to become a build tool that can be compiled on various OSes (including on older versions of FreeBSD), make it possible to have it include the partitioning scheme definitions without pulling in FreeBSD specifics. In particular this means: o move the scheme definitions iand related defines to header files under sys/disk, o make them (more) portable by using uint#_t (where applicable) and renaming defines so that they at least have a good prefix, o make the new headers stand-alone so that they don't need FreeBSD definitions, like struct uuid(*) o keep the original headers for compatibility, but rewrite them to get the scheme definitions from . (*) since UUID/GUID type definitions are non-portable and the GPT scheme uses them, make it possible to have the scheme definitions use an external type by allowing consumers of the header to set GPT_UUID_TYPE. When GPT_UUID_TYPE has not been defined, the header will use it's own type definition, which is the same as struct uuid. The gpt_uuid_t typedef is created to abstract the details and allows consumers to refer to a single type. There is not conflict between the partitioning scheme headers and what is defined in them. All headers can be included in the same source files. Note: consumers of the old headers have not been changed yet. Such will be done if and when needed/beneficial. Reviewed by: imp, jhb MFC after: 1 month Sponsored by: Bracket Computing Added: head/sys/sys/disk/ head/sys/sys/disk/apm.h - copied, changed from r306810, head/sys/sys/apm.h head/sys/sys/disk/bsd.h - copied, changed from r306810, head/sys/sys/disklabel.h head/sys/sys/disk/gpt.h - copied, changed from r306810, head/sys/sys/gpt.h head/sys/sys/disk/mbr.h - copied, changed from r306810, head/sys/sys/diskmbr.h head/sys/sys/disk/pc98.h - copied, changed from r306810, head/sys/sys/diskpc98.h head/sys/sys/disk/vtoc.h - copied, changed from r306810, head/sys/sys/vtoc.h Replaced: head/sys/sys/apm.h (contents, props changed) head/sys/sys/disklabel.h (contents, props changed) head/sys/sys/diskmbr.h (contents, props changed) head/sys/sys/diskpc98.h (contents, props changed) head/sys/sys/gpt.h (contents, props changed) head/sys/sys/vtoc.h (contents, props changed) Modified: head/etc/mtree/BSD.include.dist head/include/Makefile Modified: head/etc/mtree/BSD.include.dist ============================================================================== --- head/etc/mtree/BSD.include.dist Fri Oct 7 14:54:16 2016 (r306810) +++ head/etc/mtree/BSD.include.dist Fri Oct 7 15:42:20 2016 (r306811) @@ -336,6 +336,8 @@ ssp .. sys + disk + .. .. teken .. Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Fri Oct 7 14:54:16 2016 (r306810) +++ head/include/Makefile Fri Oct 7 15:42:20 2016 (r306811) @@ -59,6 +59,7 @@ LSUBDIRS= cam/ata cam/nvme cam/scsi \ security/audit \ security/mac_biba security/mac_bsdextended security/mac_lomac \ security/mac_mls security/mac_partition \ + sys/disk \ ufs/ffs ufs/ufs LSUBSUBDIRS= dev/mpt/mpilib Added: head/sys/sys/apm.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/sys/apm.h Fri Oct 7 15:42:20 2016 (r306811) @@ -0,0 +1,5 @@ +/*- + * This file is in the public domain. + */ +/* $FreeBSD$ */ +#include Copied and modified: head/sys/sys/disk/apm.h (from r306810, head/sys/sys/apm.h) ============================================================================== --- head/sys/sys/apm.h Fri Oct 7 14:54:16 2016 (r306810, copy source) +++ head/sys/sys/disk/apm.h Fri Oct 7 15:42:20 2016 (r306811) @@ -26,8 +26,8 @@ * $FreeBSD$ */ -#ifndef _SYS_APM_H_ -#define _SYS_APM_H_ +#ifndef _SYS_DISK_APM_H_ +#define _SYS_DISK_APM_H_ /* Driver Descriptor Record. */ struct apm_ddr { @@ -66,4 +66,4 @@ struct apm_ent { #define APM_ENT_TYPE_APPLE_HFS "Apple_HFS" #define APM_ENT_TYPE_APPLE_UFS "Apple_UNIX_SVR2" -#endif /* _SYS_APM_H_ */ +#endif /* _SYS_DISK_APM_H_ */ Copied and modified: head/sys/sys/disk/bsd.h (from r306810, head/sys/sys/disklabel.h) ============================================================================== --- head/sys/sys/disklabel.h Fri Oct 7 14:54:16 2016 (r306810, copy source) +++ head/sys/sys/disk/bsd.h Fri Oct 7 15:42:20 2016 (r306811) @@ -30,60 +30,45 @@ * $FreeBSD$ */ -#ifndef _SYS_DISKLABEL_H_ -#define _SYS_DISKLABEL_H_ +#ifndef _SYS_DISK_BSD_H_ +#define _SYS_DISK_BSD_H_ -#ifndef _KERNEL -#include -#endif -#include +/* The disk magic number */ +#define BSD_MAGIC 0x82564557U -/* - * Disk description table, see disktab(5) - */ -#define _PATH_DISKTAB "/etc/disktab" +#define BSD_NPARTS_MIN 8 +#define BSD_NPARTS_MAX 20 -/* - * Each disk has a label which includes information about the hardware - * disk geometry, filesystem partitions, and drive specific information. - * The label is in block 0 or 1, possibly offset from the beginning - * to leave room for a bootstrap, etc. - */ +/* Size of bootblock area in sector-size neutral bytes */ +#define BSD_BOOTBLOCK_SIZE 8192 -/* XXX these should be defined per controller (or drive) elsewhere, not here! */ -#if defined(__i386__) || defined(__amd64__) || defined(__arm__) || \ - defined(__powerpc__) || defined(__mips__) -#define LABELSECTOR 1 /* sector containing label */ -#define LABELOFFSET 0 /* offset of label in sector */ -#endif +/* partition containing whole disk */ +#define BSD_PART_RAW 2 -#define DISKMAGIC ((u_int32_t)0x82564557) /* The disk magic number */ -#ifndef MAXPARTITIONS -#define MAXPARTITIONS 8 -#endif +/* partition normally containing swap */ +#define BSD_PART_SWAP 1 -/* Size of bootblock area in sector-size neutral bytes */ -#define BBSIZE 8192 +/* Drive-type specific data size (in number of 32-bit inegrals) */ +#define BSD_NDRIVEDATA 5 -#define LABEL_PART 2 /* partition containing label */ -#define RAW_PART 2 /* partition containing whole disk */ -#define SWAP_PART 1 /* partition normally containing swap */ +/* Number of spare 32-bit integrals following drive-type data */ +#define BSD_NSPARE 5 struct disklabel { - u_int32_t d_magic; /* the magic number */ - u_int16_t d_type; /* drive type */ - u_int16_t d_subtype; /* controller/d_type specific */ - char d_typename[16]; /* type name, e.g. "eagle" */ + uint32_t d_magic; /* the magic number */ + uint16_t d_type; /* drive type */ + uint16_t d_subtype; /* controller/d_type specific */ + char d_typename[16]; /* type name, e.g. "eagle" */ - char d_packname[16]; /* pack identifier */ + char d_packname[16]; /* pack identifier */ /* disk geometry: */ - u_int32_t d_secsize; /* # of bytes per sector */ - u_int32_t d_nsectors; /* # of data sectors per track */ - u_int32_t d_ntracks; /* # of tracks per cylinder */ - u_int32_t d_ncylinders; /* # of data cylinders per unit */ - u_int32_t d_secpercyl; /* # of data sectors per cylinder */ - u_int32_t d_secperunit; /* # of data sectors per unit */ + uint32_t d_secsize; /* # of bytes per sector */ + uint32_t d_nsectors; /* # of data sectors per track */ + uint32_t d_ntracks; /* # of tracks per cylinder */ + uint32_t d_ncylinders; /* # of data cylinders per unit */ + uint32_t d_secpercyl; /* # of data sectors per cylinder */ + uint32_t d_secperunit; /* # of data sectors per unit */ /* * Spares (bad sector replacements) below are not counted in @@ -91,13 +76,13 @@ struct disklabel { * be physical sectors which occupy space at the end of each * track and/or cylinder. */ - u_int16_t d_sparespertrack; /* # of spare sectors per track */ - u_int16_t d_sparespercyl; /* # of spare sectors per cylinder */ + uint16_t d_sparespertrack; /* # of spare sectors per track */ + uint16_t d_sparespercyl; /* # of spare sectors per cylinder */ /* * Alternate cylinders include maintenance, replacement, configuration * description areas, etc. */ - u_int32_t d_acylinders; /* # of alt. cylinders per unit */ + uint32_t d_acylinders; /* # of alt. cylinders per unit */ /* hardware characteristics: */ /* @@ -116,53 +101,35 @@ struct disklabel { * is the offset of sector 0 on cylinder N relative to sector 0 * on cylinder N-1. */ - u_int16_t d_rpm; /* rotational speed */ - u_int16_t d_interleave; /* hardware sector interleave */ - u_int16_t d_trackskew; /* sector 0 skew, per track */ - u_int16_t d_cylskew; /* sector 0 skew, per cylinder */ - u_int32_t d_headswitch; /* head switch time, usec */ - u_int32_t d_trkseek; /* track-to-track seek, usec */ - u_int32_t d_flags; /* generic flags */ -#define NDDATA 5 - u_int32_t d_drivedata[NDDATA]; /* drive-type specific information */ -#define NSPARE 5 - u_int32_t d_spare[NSPARE]; /* reserved for future use */ - u_int32_t d_magic2; /* the magic number (again) */ - u_int16_t d_checksum; /* xor of data incl. partitions */ + uint16_t d_rpm; /* rotational speed */ + uint16_t d_interleave; /* hardware sector interleave */ + uint16_t d_trackskew; /* sector 0 skew, per track */ + uint16_t d_cylskew; /* sector 0 skew, per cylinder */ + uint32_t d_headswitch; /* head switch time, usec */ + uint32_t d_trkseek; /* track-to-track seek, usec */ + uint32_t d_flags; /* generic flags */ + uint32_t d_drivedata[BSD_NDRIVEDATA]; /* drive-type specific data */ + uint32_t d_spare[BSD_NSPARE]; /* reserved for future use */ + uint32_t d_magic2; /* the magic number (again) */ + uint16_t d_checksum; /* xor of data incl. partitions */ /* filesystem and partition information: */ - u_int16_t d_npartitions; /* number of partitions in following */ - u_int32_t d_bbsize; /* size of boot area at sn0, bytes */ - u_int32_t d_sbsize; /* max size of fs superblock, bytes */ + uint16_t d_npartitions; /* number of partitions in following */ + uint32_t d_bbsize; /* size of boot area at sn0, bytes */ + uint32_t d_sbsize; /* max size of fs superblock, bytes */ struct partition { /* the partition table */ - u_int32_t p_size; /* number of sectors in partition */ - u_int32_t p_offset; /* starting sector */ - u_int32_t p_fsize; /* filesystem basic fragment size */ - u_int8_t p_fstype; /* filesystem type, see below */ - u_int8_t p_frag; /* filesystem fragments per block */ - u_int16_t p_cpg; /* filesystem cylinders per group */ - } d_partitions[MAXPARTITIONS]; /* actually may be more */ + uint32_t p_size; /* number of sectors in partition */ + uint32_t p_offset; /* starting sector */ + uint32_t p_fsize; /* filesystem basic fragment size */ + uint8_t p_fstype; /* filesystem type, see below */ + uint8_t p_frag; /* filesystem fragments per block */ + uint16_t p_cpg; /* filesystem cylinders per group */ + } d_partitions[BSD_NPARTS_MIN]; /* actually may be more */ }; - #ifdef CTASSERT -CTASSERT(sizeof(struct disklabel) == 148 + MAXPARTITIONS * 16); +CTASSERT(sizeof(struct disklabel) == 148 + BSD_NPARTS_MIN * 16); #endif -static __inline u_int16_t dkcksum(struct disklabel *lp); -static __inline u_int16_t -dkcksum(struct disklabel *lp) -{ - u_int16_t *start, *end; - u_int16_t sum = 0; - - start = (u_int16_t *)lp; - end = (u_int16_t *)&lp->d_partitions[lp->d_npartitions]; - while (start < end) - sum ^= *start++; - return (sum); -} - - /* d_type values: */ #define DTYPE_SMD 1 /* SMD, XSMD; VAX hp/up */ #define DTYPE_MSCP 2 /* MSCP */ @@ -179,30 +146,6 @@ dkcksum(struct disklabel *lp) #define DTYPE_RAID 14 /* CMU RAIDFrame */ #define DTYPE_JFS2 16 /* IBM JFS 2 */ -#ifdef DKTYPENAMES -static const char *dktypenames[] = { - "unknown", - "SMD", - "MSCP", - "old DEC", - "SCSI", - "ESDI", - "ST506", - "HP-IB", - "HP-FL", - "type 9", - "floppy", - "CCD", - "Vinum", - "DOC2K", - "Raid", - "?", - "jfs", - NULL -}; -#define DKMAXTYPES (sizeof(dktypenames) / sizeof(dktypenames[0]) - 1) -#endif - /* * Filesystem type and version. * Used to interpret other filesystem-specific @@ -236,44 +179,6 @@ static const char *dktypenames[] = { #define FS_ZFS 27 /* Sun's ZFS */ #define FS_NANDFS 30 /* FreeBSD nandfs (NiLFS derived) */ -#ifdef FSTYPENAMES -static const char *fstypenames[] = { - "unused", - "swap", - "Version 6", - "Version 7", - "System V", - "4.1BSD", - "Eighth Edition", - "4.2BSD", - "MSDOS", - "4.4LFS", - "unknown", - "HPFS", - "ISO9660", - "boot", - "vinum", - "raid", - "Filecore", - "EXT2FS", - "NTFS", - "?", - "ccd", - "jfs", - "HAMMER", - "HAMMER2", - "UDF", - "?", - "EFS", - "ZFS", - "?", - "?", - "nandfs", - NULL -}; -#define FSMAXTYPES (sizeof(fstypenames) / sizeof(fstypenames[0]) - 1) -#endif - /* * flags shared by various drives: */ @@ -283,23 +188,4 @@ static const char *fstypenames[] = { #define D_RAMDISK 0x08 /* disk emulator */ #define D_CHAIN 0x10 /* can do back-back transfers */ -/* - * NB: defines ioctls from 'd'/128 and up. - */ - -/* - * Functions for proper encoding/decoding of struct disklabel into/from - * bytestring. - */ -void bsd_partition_le_dec(u_char *ptr, struct partition *d); -int bsd_disklabel_le_dec(u_char *ptr, struct disklabel *d, int maxpart); -void bsd_partition_le_enc(u_char *ptr, struct partition *d); -void bsd_disklabel_le_enc(u_char *ptr, struct disklabel *d); - -#ifndef _KERNEL -__BEGIN_DECLS -struct disklabel *getdiskbyname(const char *); -__END_DECLS -#endif - -#endif /* !_SYS_DISKLABEL_H_ */ +#endif /* !_SYS_DISK_BSD_H_ */ Copied and modified: head/sys/sys/disk/gpt.h (from r306810, head/sys/sys/gpt.h) ============================================================================== --- head/sys/sys/gpt.h Fri Oct 7 14:54:16 2016 (r306810, copy source) +++ head/sys/sys/disk/gpt.h Fri Oct 7 15:42:20 2016 (r306811) @@ -26,10 +26,31 @@ * $FreeBSD$ */ -#ifndef _SYS_GPT_H_ -#define _SYS_GPT_H_ +#ifndef _SYS_DISK_GPT_H_ +#define _SYS_DISK_GPT_H_ -#include +/* + * Applications can define GPT_UUID_TYPE if they want the GPT structures + * to use a particular type definition for UUIDs/GUIDs. This header uses + * a generic (DCE 1.1 compatible) definition otherwise. + */ +#ifndef GPT_UUID_TYPE +struct gpt_uuid { + uint32_t time_low; + uint16_t time_mid; + uint16_t time_hi_and_version; + uint8_t clock_seq_hi_and_reserved; + uint8_t clock_seq_low; + uint8_t node[6]; +}; +#define GPT_UUID_TYPE struct gpt_uuid +#endif /* !GPT_UUID_TYPE */ + +typedef GPT_UUID_TYPE gpt_uuid_t; + +#ifdef CTASSERT +CTASSERT(sizeof(gpt_uuid_t) == 16); +#endif struct gpt_hdr { char hdr_sig[8]; @@ -43,7 +64,7 @@ struct gpt_hdr { uint64_t hdr_lba_alt; uint64_t hdr_lba_start; uint64_t hdr_lba_end; - struct uuid hdr_uuid; + gpt_uuid_t hdr_uuid; uint64_t hdr_lba_table; uint32_t hdr_entries; uint32_t hdr_entsz; @@ -57,10 +78,13 @@ struct gpt_hdr { */ uint32_t padding; }; +#ifdef CTASSERT +CTASSERT(offsetof(struct gpt_hdr, padding) == 92); +#endif struct gpt_ent { - struct uuid ent_type; - struct uuid ent_uuid; + gpt_uuid_t ent_type; + gpt_uuid_t ent_uuid; uint64_t ent_lba_start; uint64_t ent_lba_end; uint64_t ent_attr; @@ -70,6 +94,9 @@ struct gpt_ent { #define GPT_ENT_ATTR_BOOTFAILED (1ULL << 57) uint16_t ent_name[36]; /* UTF-16. */ }; +#ifdef CTASSERT +CTASSERT(sizeof(struct gpt_ent) == 128); +#endif /* CTASSERT */ #define GPT_ENT_TYPE_UNUSED \ {0x00000000,0x0000,0x0000,0x00,0x00,{0x00,0x00,0x00,0x00,0x00,0x00}} @@ -207,4 +234,4 @@ struct gpt_ent { #define GPT_ENT_TYPE_BIOS_BOOT \ {0x21686148,0x6449,0x6e6f,0x74,0x4e,{0x65,0x65,0x64,0x45,0x46,0x49}} -#endif /* _SYS_GPT_H_ */ +#endif /* _SYS_DISK_GPT_H_ */ Copied and modified: head/sys/sys/disk/mbr.h (from r306810, head/sys/sys/diskmbr.h) ============================================================================== --- head/sys/sys/diskmbr.h Fri Oct 7 14:54:16 2016 (r306810, copy source) +++ head/sys/sys/disk/mbr.h Fri Oct 7 15:42:20 2016 (r306811) @@ -30,10 +30,8 @@ * $FreeBSD$ */ -#ifndef _SYS_DISKMBR_H_ -#define _SYS_DISKMBR_H_ - -#include +#ifndef _SYS_DISK_MBR_H_ +#define _SYS_DISK_MBR_H_ #define DOSBBSECTOR 0 /* DOS boot block relative sector number */ #define DOSDSNOFF 440 /* WinNT/2K/XP Drive Serial Number offset */ @@ -73,19 +71,14 @@ struct dos_partition { unsigned char dp_ehd; /* end head */ unsigned char dp_esect; /* end sector */ unsigned char dp_ecyl; /* end cylinder */ - u_int32_t dp_start; /* absolute starting sector number */ - u_int32_t dp_size; /* partition size in sectors */ + uint32_t dp_start; /* absolute starting sector number */ + uint32_t dp_size; /* partition size in sectors */ }; #ifdef CTASSERT CTASSERT(sizeof (struct dos_partition) == DOSPARTSIZE); #endif -void dos_partition_dec(void const *pp, struct dos_partition *d); -void dos_partition_enc(void *pp, struct dos_partition *d); - #define DPSECT(s) ((s) & 0x3f) /* isolate relevant bits of sector */ #define DPCYL(c, s) ((c) + (((s) & 0xc0)<<2)) /* and those that are cylinder */ -#define DIOCSMBR _IOW('M', 129, u_char[512]) - -#endif /* !_SYS_DISKMBR_H_ */ +#endif /* !_SYS_DISK_MBR_H_ */ Copied and modified: head/sys/sys/disk/pc98.h (from r306810, head/sys/sys/diskpc98.h) ============================================================================== --- head/sys/sys/diskpc98.h Fri Oct 7 14:54:16 2016 (r306810, copy source) +++ head/sys/sys/disk/pc98.h Fri Oct 7 15:42:20 2016 (r306811) @@ -30,10 +30,8 @@ * $FreeBSD$ */ -#ifndef _SYS_DISKPC98_H_ -#define _SYS_DISKPC98_H_ - -#include +#ifndef _SYS_DISK_PC98_H_ +#define _SYS_DISK_PC98_H_ #define PC98_BBSECTOR 1 /* DOS boot block relative sector number */ #define PC98_PARTOFF 0 @@ -50,12 +48,12 @@ #define PC98_SID_MASK 0x7f #define PC98_SID_386BSD 0x44 -#define DOSMID_386BSD (PC98_MID_386BSD | PC98_MID_BOOTABLE) -#define DOSSID_386BSD (PC98_SID_386BSD | PC98_SID_ACTIVE) -#define PC98_PTYP_386BSD (DOSSID_386BSD << 8 | DOSMID_386BSD) +#define __DOSMID_386BSD (PC98_MID_386BSD | PC98_MID_BOOTABLE) +#define __DOSSID_386BSD (PC98_SID_386BSD | PC98_SID_ACTIVE) +#define PC98_PTYP_386BSD (__DOSSID_386BSD << 8 | __DOSMID_386BSD) struct pc98_partition { - unsigned char dp_mid; + unsigned char dp_mid; unsigned char dp_sid; unsigned char dp_dum1; unsigned char dp_dum2; @@ -74,9 +72,4 @@ struct pc98_partition { CTASSERT(sizeof (struct pc98_partition) == PC98_PARTSIZE); #endif -void pc98_partition_dec(void const *pp, struct pc98_partition *d); -void pc98_partition_enc(void *pp, struct pc98_partition *d); - -#define DIOCSPC98 _IOW('M', 129, u_char[8192]) - -#endif /* !_SYS_DISKPC98_H_ */ +#endif /* !_SYS_DISK_PC98_H_ */ Copied and modified: head/sys/sys/disk/vtoc.h (from r306810, head/sys/sys/vtoc.h) ============================================================================== --- head/sys/sys/vtoc.h Fri Oct 7 14:54:16 2016 (r306810, copy source) +++ head/sys/sys/disk/vtoc.h Fri Oct 7 15:42:20 2016 (r306811) @@ -26,8 +26,8 @@ * $FreeBSD$ */ -#ifndef _SYS_VTOC_H_ -#define _SYS_VTOC_H_ +#ifndef _SYS_DISK_VTOC_H_ +#define _SYS_DISK_VTOC_H_ #define VTOC_TAG_UNASSIGNED 0x00 #define VTOC_TAG_BOOT 0x01 @@ -74,7 +74,7 @@ struct vtoc8 { struct { uint16_t tag; uint16_t flag; - } part[VTOC8_NPARTS] __packed; + } part[VTOC8_NPARTS]; uint16_t __alignment; uint32_t bootinfo[3]; uint32_t sanity; @@ -99,10 +99,10 @@ struct vtoc8 { } map[VTOC8_NPARTS]; uint16_t magic; uint16_t cksum; -} __packed; +}; #ifdef CTASSERT CTASSERT(sizeof(struct vtoc8) == 512); #endif -#endif /* _SYS_VTOC_H_ */ +#endif /* _SYS_DISK_VTOC_H_ */ Added: head/sys/sys/disklabel.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/sys/disklabel.h Fri Oct 7 15:42:20 2016 (r306811) @@ -0,0 +1,169 @@ +/*- + * Copyright (c) 1987, 1988, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University 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 REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS 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. + * + * @(#)disklabel.h 8.2 (Berkeley) 7/10/94 + * $FreeBSD$ + */ + +#ifndef _SYS_DISKLABEL_H_ +#define _SYS_DISKLABEL_H_ + +#ifndef _KERNEL +#include +#endif +#include + +#include + +/* Disk description table, see disktab(5) */ +#define _PATH_DISKTAB "/etc/disktab" + +/* + * The label is in block 0 or 1, possibly offset from the beginning + * to leave room for a bootstrap, etc. + * XXX these should be defined per controller (or drive) elsewhere, not here! + * XXX in actuality it can't even be per controller or drive. It should be + * constant/fixed across storage hardware and CPU architectures. Disks can + * travel from one machine to another and a label created on one machine + * should be detectable and understood by the other. + */ +#define LABELSECTOR 1 /* sector containing label */ +#define LABELOFFSET 0 /* offset of label in sector */ + +#define DISKMAGIC BSD_MAGIC /* The disk magic number */ + +#ifndef MAXPARTITIONS +#define MAXPARTITIONS BSD_NPARTS_MIN +#endif + +/* Size of bootblock area in sector-size neutral bytes */ +#define BBSIZE BSD_BOOTBLOCK_SIZE + +#define LABEL_PART BSD_PART_RAW +#define RAW_PART BSD_PART_RAW +#define SWAP_PART BSD_PART_SWAP + +#define NDDATA BSD_NDRIVEDATA +#define NSPARE BSD_NSPARE + +static __inline u_int16_t dkcksum(struct disklabel *lp); +static __inline u_int16_t +dkcksum(struct disklabel *lp) +{ + u_int16_t *start, *end; + u_int16_t sum = 0; + + start = (u_int16_t *)lp; + end = (u_int16_t *)&lp->d_partitions[lp->d_npartitions]; + while (start < end) + sum ^= *start++; + return (sum); +} + +#ifdef DKTYPENAMES +static const char *dktypenames[] = { + "unknown", + "SMD", + "MSCP", + "old DEC", + "SCSI", + "ESDI", + "ST506", + "HP-IB", + "HP-FL", + "type 9", + "floppy", + "CCD", + "Vinum", + "DOC2K", + "Raid", + "?", + "jfs", + NULL +}; +#define DKMAXTYPES (sizeof(dktypenames) / sizeof(dktypenames[0]) - 1) +#endif + +#ifdef FSTYPENAMES +static const char *fstypenames[] = { + "unused", + "swap", + "Version 6", + "Version 7", + "System V", + "4.1BSD", + "Eighth Edition", + "4.2BSD", + "MSDOS", + "4.4LFS", + "unknown", + "HPFS", + "ISO9660", + "boot", + "vinum", + "raid", + "Filecore", + "EXT2FS", + "NTFS", + "?", + "ccd", + "jfs", + "HAMMER", + "HAMMER2", + "UDF", + "?", + "EFS", + "ZFS", + "?", + "?", + "nandfs", + NULL +}; +#define FSMAXTYPES (sizeof(fstypenames) / sizeof(fstypenames[0]) - 1) +#endif + +/* + * NB: defines ioctls from 'd'/128 and up. + */ + +/* + * Functions for proper encoding/decoding of struct disklabel into/from + * bytestring. + */ +void bsd_partition_le_dec(u_char *ptr, struct partition *d); +int bsd_disklabel_le_dec(u_char *ptr, struct disklabel *d, int maxpart); +void bsd_partition_le_enc(u_char *ptr, struct partition *d); +void bsd_disklabel_le_enc(u_char *ptr, struct disklabel *d); + +#ifndef _KERNEL +__BEGIN_DECLS +struct disklabel *getdiskbyname(const char *); +__END_DECLS +#endif + +#endif /* !_SYS_DISKLABEL_H_ */ Added: head/sys/sys/diskmbr.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/sys/diskmbr.h Fri Oct 7 15:42:20 2016 (r306811) @@ -0,0 +1,44 @@ +/*- + * Copyright (c) 1987, 1988, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University 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 REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS 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. + * + * @(#)disklabel.h 8.2 (Berkeley) 7/10/94 + * $FreeBSD$ + */ + +#ifndef _SYS_DISKMBR_H_ +#define _SYS_DISKMBR_H_ + +#include +#include + +void dos_partition_dec(void const *pp, struct dos_partition *d); +void dos_partition_enc(void *pp, struct dos_partition *d); + +#define DIOCSMBR _IOW('M', 129, u_char[512]) + +#endif /* !_SYS_DISKMBR_H_ */ Added: head/sys/sys/diskpc98.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/sys/diskpc98.h Fri Oct 7 15:42:20 2016 (r306811) @@ -0,0 +1,47 @@ +/*- + * Copyright (c) 1987, 1988, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University 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 REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS 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. + * + * @(#)disklabel.h 8.2 (Berkeley) 7/10/94 + * $FreeBSD$ + */ + +#ifndef _SYS_DISKPC98_H_ +#define _SYS_DISKPC98_H_ + +#include +#include + +#define DOSMID_386BSD __DOSMID_386BSD +#define DOSSID_386BSD __DOSSID_386BSD + +void pc98_partition_dec(void const *pp, struct pc98_partition *d); +void pc98_partition_enc(void *pp, struct pc98_partition *d); + +#define DIOCSPC98 _IOW('M', 129, u_char[8192]) + +#endif /* !_SYS_DISKPC98_H_ */ Added: head/sys/sys/gpt.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/sys/gpt.h Fri Oct 7 15:42:20 2016 (r306811) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2002 Marcel Moolenaar + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _SYS_GPT_H_ +#define _SYS_GPT_H_ + +#include + +#define GPT_UUID_TYPE struct uuid +#include + +#endif /* _SYS_GPT_H_ */ Added: head/sys/sys/vtoc.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/sys/vtoc.h Fri Oct 7 15:42:20 2016 (r306811) @@ -0,0 +1,5 @@ +/*- + * This file is in the public domain. + */ +/* $FreeBSD$ */ +#include From owner-svn-src-all@freebsd.org Fri Oct 7 16:17:52 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48F59C04F70; Fri, 7 Oct 2016 16:17:52 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F529252; Fri, 7 Oct 2016 16:17:51 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u97GHpp4005855; Fri, 7 Oct 2016 16:17:51 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u97GHpLf005854; Fri, 7 Oct 2016 16:17:51 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201610071617.u97GHpLf005854@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 7 Oct 2016 16:17:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306812 - head/sys/boot/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 16:17:52 -0000 Author: andrew Date: Fri Oct 7 16:17:51 2016 New Revision: 306812 URL: https://svnweb.freebsd.org/changeset/base/306812 Log: The bootloader self relocation code was slightly wrong for the R_AARCH64_RELATIVE relocation found on arm64. It would try to add the contents of the memory location being relocated to the base address and the relocation addend. This worked when the contents was zero, however this now seems to be set to the value of the addend so we add this twice. Fix this by just setting the memory to the computed value. Reviewed by: emaste MFC after: 1 week Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D8177 Modified: head/sys/boot/common/self_reloc.c Modified: head/sys/boot/common/self_reloc.c ============================================================================== --- head/sys/boot/common/self_reloc.c Fri Oct 7 15:42:20 2016 (r306811) +++ head/sys/boot/common/self_reloc.c Fri Oct 7 16:17:51 2016 (r306812) @@ -108,12 +108,18 @@ self_reloc(Elf_Addr baseaddr, ElfW_Dyn * break; case RELOC_TYPE_RELATIVE: - /* Address relative to the base address. */ newaddr = (Elf_Addr *)(rel->r_offset + baseaddr); - *newaddr += baseaddr; - /* Add the addend when the ABI uses them */ #ifdef ELF_RELA - *newaddr += rel->r_addend; + /* + * For R_AARCH64_RELATIVE we need to calculate the + * delta between the address we are run from and the + * address we are linked at. As the latter is 0 we + * just use the address we are run from for this. + */ + *newaddr = baseaddr + rel->r_addend; +#else + /* Address relative to the base address. */ + *newaddr += baseaddr; #endif break; default: From owner-svn-src-all@freebsd.org Fri Oct 7 17:56:59 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E20EC0496E; Fri, 7 Oct 2016 17:56:59 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC330774; Fri, 7 Oct 2016 17:56:58 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u97HuwBp043515; Fri, 7 Oct 2016 17:56:58 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u97HuvML043509; Fri, 7 Oct 2016 17:56:57 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201610071756.u97HuvML043509@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Fri, 7 Oct 2016 17:56:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306813 - in head/usr.bin: cmp col elfdump kdump tee tr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 17:56:59 -0000 Author: oshogbo Date: Fri Oct 7 17:56:57 2016 New Revision: 306813 URL: https://svnweb.freebsd.org/changeset/base/306813 Log: Remove the duplicated code using Capsicum helpers. Reviewed by: cem, ed, bapt, emaste Differential Revision https://reviews.freebsd.org/D8140 Modified: head/usr.bin/cmp/cmp.c head/usr.bin/col/col.c head/usr.bin/elfdump/elfdump.c head/usr.bin/kdump/kdump.c head/usr.bin/tee/tee.c head/usr.bin/tr/tr.c Modified: head/usr.bin/cmp/cmp.c ============================================================================== --- head/usr.bin/cmp/cmp.c Fri Oct 7 16:17:51 2016 (r306812) +++ head/usr.bin/cmp/cmp.c Fri Oct 7 17:56:57 2016 (r306813) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -53,7 +54,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include "extern.h" @@ -70,7 +70,6 @@ main(int argc, char *argv[]) int ch, fd1, fd2, oflag, special; const char *file1, *file2; cap_rights_t rights; - unsigned long cmd; uint32_t fcntls; oflag = O_RDONLY; @@ -165,20 +164,10 @@ main(int argc, char *argv[]) if (cap_fcntls_limit(fd2, fcntls) < 0 && errno != ENOSYS) err(ERR_EXIT, "unable to limit fcntls for %s", file2); - cap_rights_init(&rights, CAP_FSTAT, CAP_WRITE, CAP_IOCTL); - if (cap_rights_limit(STDOUT_FILENO, &rights) < 0 && errno != ENOSYS) - err(ERR_EXIT, "unable to limit rights for stdout"); - - /* Required for printf(3) via isatty(3). */ - cmd = TIOCGETA; - if (cap_ioctls_limit(STDOUT_FILENO, &cmd, 1) < 0 && errno != ENOSYS) - err(ERR_EXIT, "unable to limit ioctls for stdout"); - - /* - * Cache NLS data, for strerror, for err(3), before entering capability - * mode. - */ - (void)catopen("libc", NL_CAT_LOCALE); + if (caph_limit_stdout() == -1 || caph_limit_stderr() == -1) + err(ERR_EXIT, "unable to limit stdio"); + + caph_cache_catpages(); if (cap_enter() < 0 && errno != ENOSYS) err(ERR_EXIT, "unable to enter capability mode"); Modified: head/usr.bin/col/col.c ============================================================================== --- head/usr.bin/col/col.c Fri Oct 7 16:17:51 2016 (r306812) +++ head/usr.bin/col/col.c Fri Oct 7 17:56:57 2016 (r306813) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -135,20 +136,11 @@ main(int argc, char **argv) int nflushd_lines; /* number of lines that were flushed */ int adjust, opt, warned, width; const char *errstr; - cap_rights_t rights; - unsigned long cmd; (void)setlocale(LC_CTYPE, ""); - cap_rights_init(&rights, CAP_FSTAT, CAP_READ); - if (cap_rights_limit(STDIN_FILENO, &rights) < 0 && errno != ENOSYS) - err(1, "unable to limit rights for stdin"); - cap_rights_init(&rights, CAP_FSTAT, CAP_WRITE, CAP_IOCTL); - if (cap_rights_limit(STDOUT_FILENO, &rights) < 0 && errno != ENOSYS) - err(1, "unable to limit rights for stdout"); - cmd = TIOCGETA; /* required by isatty(3) in printf(3) */ - if (cap_ioctls_limit(STDOUT_FILENO, &cmd, 1) < 0 && errno != ENOSYS) - err(1, "unable to limit ioctls for stdout"); + if (caph_limit_stdio() == -1) + err(1, "unable to limit stdio"); if (cap_enter() < 0 && errno != ENOSYS) err(1, "unable to enter capability mode"); Modified: head/usr.bin/elfdump/elfdump.c ============================================================================== --- head/usr.bin/elfdump/elfdump.c Fri Oct 7 16:17:51 2016 (r306812) +++ head/usr.bin/elfdump/elfdump.c Fri Oct 7 17:56:57 2016 (r306813) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -44,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #define ED_DYN (1<<0) @@ -505,7 +505,6 @@ main(int ac, char **av) u_int64_t name; u_int64_t type; struct stat sb; - unsigned long cmd; u_int flags; Elf32_Ehdr *e; void *p; @@ -573,14 +572,11 @@ main(int ac, char **av) cap_rights_init(&rights, CAP_MMAP_R); if (cap_rights_limit(fd, &rights) < 0 && errno != ENOSYS) err(1, "unable to limit rights for %s", *av); - cap_rights_limit(STDIN_FILENO, cap_rights_init(&rights)); - cap_rights_init(&rights, CAP_FSTAT, CAP_IOCTL, CAP_WRITE); - cmd = TIOCGETA; /* required by isatty(3) in printf(3) */ - if ((cap_rights_limit(STDOUT_FILENO, &rights) < 0 && errno != ENOSYS) || - (cap_ioctls_limit(STDOUT_FILENO, &cmd, 1) < 0 && errno != ENOSYS) || - (cap_rights_limit(STDERR_FILENO, &rights) < 0 && errno != ENOSYS) || - (cap_ioctls_limit(STDERR_FILENO, &cmd, 1) < 0 && errno != ENOSYS)) - err(1, "unable to limit rights for stdout/stderr"); + cap_rights_init(&rights); + if ((cap_rights_limit(STDIN_FILENO, &rights) < 0 && errno != ENOSYS) || + caph_limit_stdout() < 0 || caph_limit_stderr() < 0) { + err(1, "unable to limit rights for stdio"); + } if (cap_enter() < 0 && errno != ENOSYS) err(1, "unable to enter capability mode"); e = mmap(NULL, sb.st_size, PROT_READ, MAP_SHARED, fd, 0); Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Fri Oct 7 16:17:51 2016 (r306812) +++ head/usr.bin/kdump/kdump.c Fri Oct 7 17:56:57 2016 (r306813) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -74,7 +75,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -110,7 +110,6 @@ void ktrstruct(char *, size_t); void ktrcapfail(struct ktr_cap_fail *); void ktrfault(struct ktr_fault *); void ktrfaultend(struct ktr_faultend *); -void limitfd(int fd); void usage(void); #define TIMESTAMP_NONE 0x0 @@ -337,9 +336,8 @@ main(int argc, char *argv[]) err(1, "unable to enter capability mode"); } #endif - limitfd(STDIN_FILENO); - limitfd(STDOUT_FILENO); - limitfd(STDERR_FILENO); + if (caph_limit_stdio() == -1) + err(1, "unable to limit stdio"); TAILQ_INIT(&trace_procs); drop_logged = 0; @@ -432,40 +430,6 @@ main(int argc, char *argv[]) return 0; } -void -limitfd(int fd) -{ - cap_rights_t rights; - unsigned long cmd; - - cap_rights_init(&rights, CAP_FSTAT); - cmd = 0; - - switch (fd) { - case STDIN_FILENO: - cap_rights_set(&rights, CAP_READ); - break; - case STDOUT_FILENO: - cap_rights_set(&rights, CAP_IOCTL, CAP_WRITE); - cmd = TIOCGETA; /* required by isatty(3) in printf(3) */ - break; - case STDERR_FILENO: - cap_rights_set(&rights, CAP_WRITE); - if (!suppressdata) { - cap_rights_set(&rights, CAP_IOCTL); - cmd = TIOCGWINSZ; - } - break; - default: - abort(); - } - - if (cap_rights_limit(fd, &rights) < 0 && errno != ENOSYS) - err(1, "unable to limit rights for descriptor %d", fd); - if (cmd != 0 && cap_ioctls_limit(fd, &cmd, 1) < 0 && errno != ENOSYS) - err(1, "unable to limit ioctls for descriptor %d", fd); -} - int fread_tail(void *buf, int size, int num) { Modified: head/usr.bin/tee/tee.c ============================================================================== --- head/usr.bin/tee/tee.c Fri Oct 7 16:17:51 2016 (r306812) +++ head/usr.bin/tee/tee.c Fri Oct 7 17:56:57 2016 (r306813) @@ -45,6 +45,7 @@ static const char rcsid[] = #include #include +#include #include #include #include @@ -52,7 +53,6 @@ static const char rcsid[] = #include #include #include -#include #include typedef struct _list { @@ -73,8 +73,6 @@ main(int argc, char *argv[]) char *bp; int append, ch, exitval; char *buf; - cap_rights_t rights; - unsigned long cmd; #define BSIZE (8 * 1024) append = 0; @@ -96,15 +94,8 @@ main(int argc, char *argv[]) if ((buf = malloc(BSIZE)) == NULL) err(1, "malloc"); - cap_rights_init(&rights, CAP_READ, CAP_FSTAT); - if (cap_rights_limit(STDIN_FILENO, &rights) < 0 && errno != ENOSYS) - err(EXIT_FAILURE, "unable to limit rights for stdin"); - cap_rights_init(&rights, CAP_WRITE, CAP_FSTAT, CAP_IOCTL); - if (cap_rights_limit(STDERR_FILENO, &rights) < 0 && errno != ENOSYS) - err(EXIT_FAILURE, "unable to limit rights for stderr"); - cmd = TIOCGETA; - if (cap_ioctls_limit(STDERR_FILENO, &cmd, 1) < 0 && errno != ENOSYS) - err(EXIT_FAILURE, "unable to limit ioctls for stderr"); + if (caph_limit_stdin() == -1 || caph_limit_stderr() == -1) + err(EXIT_FAILURE, "unable to limit stdio"); add(STDOUT_FILENO, "stdout"); @@ -148,19 +139,14 @@ add(int fd, const char *name) { LIST *p; cap_rights_t rights; - unsigned long cmd; - - if (fd == STDOUT_FILENO) - cap_rights_init(&rights, CAP_WRITE, CAP_FSTAT, CAP_IOCTL); - else - cap_rights_init(&rights, CAP_WRITE, CAP_FSTAT); - if (cap_rights_limit(fd, &rights) < 0 && errno != ENOSYS) - err(EXIT_FAILURE, "unable to limit rights"); if (fd == STDOUT_FILENO) { - cmd = TIOCGETA; - if (cap_ioctls_limit(fd, &cmd, 1) < 0 && errno != ENOSYS) - err(EXIT_FAILURE, "unable to limit ioctls for stdout"); + if (caph_limit_stdout() == -1) + err(EXIT_FAILURE, "unable to limit stdout"); + } else { + cap_rights_init(&rights, CAP_WRITE, CAP_FSTAT); + if (cap_rights_limit(fd, &rights) < 0 && errno != ENOSYS) + err(EXIT_FAILURE, "unable to limit rights"); } if ((p = malloc(sizeof(LIST))) == NULL) Modified: head/usr.bin/tr/tr.c ============================================================================== --- head/usr.bin/tr/tr.c Fri Oct 7 16:17:51 2016 (r306812) +++ head/usr.bin/tr/tr.c Fri Oct 7 17:56:57 2016 (r306813) @@ -44,16 +44,15 @@ static const char sccsid[] = "@(#)tr.c 8 #include #include +#include #include #include -#include #include #include #include #include #include #include -#include #include #include #include @@ -72,8 +71,6 @@ int main(int argc, char **argv) { static int carray[NCHARS_SB]; - cap_rights_t rights; - unsigned long cmd; struct cmap *map; struct cset *delete, *squeeze; int n, *p; @@ -82,23 +79,8 @@ main(int argc, char **argv) (void)setlocale(LC_ALL, ""); - cap_rights_init(&rights, CAP_FSTAT, CAP_IOCTL, CAP_READ); - if (cap_rights_limit(STDIN_FILENO, &rights) < 0 && errno != ENOSYS) - err(1, "unable to limit rights for stdin"); - cap_rights_init(&rights, CAP_FSTAT, CAP_IOCTL, CAP_WRITE); - if (cap_rights_limit(STDOUT_FILENO, &rights) < 0 && errno != ENOSYS) - err(1, "unable to limit rights for stdout"); - if (cap_rights_limit(STDERR_FILENO, &rights) < 0 && errno != ENOSYS) - err(1, "unable to limit rights for stderr"); - - /* Required for isatty(3). */ - cmd = TIOCGETA; - if (cap_ioctls_limit(STDIN_FILENO, &cmd, 1) < 0 && errno != ENOSYS) - err(1, "unable to limit ioctls for stdin"); - if (cap_ioctls_limit(STDOUT_FILENO, &cmd, 1) < 0 && errno != ENOSYS) - err(1, "unable to limit ioctls for stdout"); - if (cap_ioctls_limit(STDERR_FILENO, &cmd, 1) < 0 && errno != ENOSYS) - err(1, "unable to limit ioctls for stderr"); + if (caph_limit_stdio() == -1) + err(1, "unable to limit stdio"); if (cap_enter() < 0 && errno != ENOSYS) err(1, "unable to enter capability mode"); From owner-svn-src-all@freebsd.org Fri Oct 7 18:02:43 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B420BC04C1C; Fri, 7 Oct 2016 18:02:43 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F8C9DFF; Fri, 7 Oct 2016 18:02:43 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 05C9110AF7C; Fri, 7 Oct 2016 14:02:42 -0400 (EDT) From: John Baldwin To: Marcel Moolenaar Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306811 - in head: etc/mtree include sys/sys sys/sys/disk Date: Fri, 07 Oct 2016 11:02:38 -0700 Message-ID: <1910643.6VW4zuRaGg@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-PRERELEASE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201610071542.u97FgLgU092008@repo.freebsd.org> References: <201610071542.u97FgLgU092008@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Fri, 07 Oct 2016 14:02:42 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 18:02:43 -0000 On Friday, October 07, 2016 03:42:21 PM Marcel Moolenaar wrote: > Author: marcel > Date: Fri Oct 7 15:42:20 2016 > New Revision: 306811 > URL: https://svnweb.freebsd.org/changeset/base/306811 > > Log: > In order to allow mkimg(1) (and other tools) to become a build tool > that can be compiled on various OSes (including on older versions > of FreeBSD), make it possible to have it include the partitioning > scheme definitions without pulling in FreeBSD specifics. > In particular this means: > o move the scheme definitions iand related defines to header files > under sys/disk, > o make them (more) portable by using uint#_t (where applicable) > and renaming defines so that they at least have a good prefix, > o make the new headers stand-alone so that they don't need FreeBSD > definitions, like struct uuid(*) > o keep the original headers for compatibility, but rewrite them to > get the scheme definitions from . > > (*) since UUID/GUID type definitions are non-portable and the GPT > scheme uses them, make it possible to have the scheme definitions > use an external type by allowing consumers of the header to set > GPT_UUID_TYPE. When GPT_UUID_TYPE has not been defined, the header > will use it's own type definition, which is the same as struct uuid. > The gpt_uuid_t typedef is created to abstract the details and allows > consumers to refer to a single type. > > There is not conflict between the partitioning scheme headers and > what is defined in them. All headers can be included in the same > source files. > > Note: consumers of the old headers have not been changed yet. Such > will be done if and when needed/beneficial. > > Reviewed by: imp, jhb > MFC after: 1 month > Sponsored by: Bracket Computing > > Added: > head/sys/sys/disk/ > head/sys/sys/disk/apm.h > - copied, changed from r306810, head/sys/sys/apm.h > head/sys/sys/disk/bsd.h > - copied, changed from r306810, head/sys/sys/disklabel.h > head/sys/sys/disk/gpt.h > - copied, changed from r306810, head/sys/sys/gpt.h > head/sys/sys/disk/mbr.h > - copied, changed from r306810, head/sys/sys/diskmbr.h > head/sys/sys/disk/pc98.h > - copied, changed from r306810, head/sys/sys/diskpc98.h > head/sys/sys/disk/vtoc.h > - copied, changed from r306810, head/sys/sys/vtoc.h > Replaced: > head/sys/sys/apm.h (contents, props changed) > head/sys/sys/disklabel.h (contents, props changed) > head/sys/sys/diskmbr.h (contents, props changed) > head/sys/sys/diskpc98.h (contents, props changed) > head/sys/sys/gpt.h (contents, props changed) > head/sys/sys/vtoc.h (contents, props changed) Somehow this destroyed the history on these files. They showed up as deleted and then added instead of modified. If you 'svn log' on them now you only get this commit and none of the previous history. I've no idea if there's a way to recover this? Had you originally done an 'svn mv' in your checkout and then copied the files back over or some such? -- John Baldwin From owner-svn-src-all@freebsd.org Fri Oct 7 18:50:51 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B633BC05741; Fri, 7 Oct 2016 18:50:51 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79626B75; Fri, 7 Oct 2016 18:50:51 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u97IooLj063266; Fri, 7 Oct 2016 18:50:50 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u97IooqP063261; Fri, 7 Oct 2016 18:50:50 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201610071850.u97IooqP063261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 7 Oct 2016 18:50:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306814 - in stable/11: share/man/man4 sys/dev/amdsbwd sys/dev/intpm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 18:50:51 -0000 Author: avg Date: Fri Oct 7 18:50:50 2016 New Revision: 306814 URL: https://svnweb.freebsd.org/changeset/base/306814 Log: MFC r306218,306290: amdsbwd, intpm: unify bits specific to AMD chipsets Added: stable/11/sys/dev/amdsbwd/amd_chipset.h - copied, changed from r306218, head/sys/dev/amdsbwd/amd_chipset.h Modified: stable/11/share/man/man4/intpm.4 stable/11/sys/dev/amdsbwd/amdsbwd.c stable/11/sys/dev/intpm/intpm.c Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/intpm.4 ============================================================================== --- stable/11/share/man/man4/intpm.4 Fri Oct 7 17:56:57 2016 (r306813) +++ stable/11/share/man/man4/intpm.4 Fri Oct 7 18:50:50 2016 (r306814) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 20, 2016 +.Dd September 22, 2016 .Dt INTPM 4 .Os .Sh NAME @@ -59,7 +59,9 @@ AMD SB600/7x0/8x0/9x0 southbridges .It AMD Axx/Hudson/Bolton FCHs .It -AMD FCH integrated into Family 16h Models 00h-0Fh Processors +AMD FCH integrated into Family 15h Models 60h-6Fh, 70h-7Fh Processors +.It +AMD FCH integrated into Family 16h Models 00h-0Fh, 30h-3Fh Processors .El .Sh SEE ALSO .Xr amdpm 4 , Copied and modified: stable/11/sys/dev/amdsbwd/amd_chipset.h (from r306218, head/sys/dev/amdsbwd/amd_chipset.h) ============================================================================== --- head/sys/dev/amdsbwd/amd_chipset.h Thu Sep 22 21:34:35 2016 (r306218, copy source) +++ stable/11/sys/dev/amdsbwd/amd_chipset.h Fri Oct 7 18:50:50 2016 (r306814) @@ -36,18 +36,23 @@ * At present there are three classes of supported chipsets: * - SB600 and S7x0 southbridges where the SMBus controller device has * a PCI Device ID of 0x43851002 and a revision less than 0x40 - * - SB8x0, SB9x0 southbridges and FCHs where the SMBus controller device has - * a PCI Device ID of 0x43851002 and a revision greater than or equal to 0x40 - * or the controller has an ID of 0x780b1022 and a revision less than 0x41 - * - FCHs where the SMBus controller device has a PCI Device ID of 0x780b1022 - * and a revision greater than or equal to 0x41 + * - several types of southbridges and FCHs: + * o SB8x0, SB9x0 southbridges where the SMBus controller device has a PCI + * Device ID of 0x43851002 and a revision greater than or equal to 0x40 + * o FCHs where the controller has an ID of 0x780b1022 and a revision less + * than 0x41 (various revisions of "Hudson" and "Bolton") + * o FCHs where the controller has an ID of 0x790b1022 and a revision less + * than 0x49 + * - several types of southbridges and FCHs: + * o FCHs where the SMBus controller device has a PCI Device ID of 0x780b1022 + * and a revision greater than or equal to 0x41 (integrated into "Mullins" + * processors, code named "ML") + * o FCHs where the controller has an ID of 0x790b1022 and a revision greater + * than or equal to 0x49 (integrated into "Carrizo" processors, code named + * "KERNCZ" or "CZ") + * * The register definitions are compatible within the classes and may be * incompatible accross them. - * So far there is no public documentation for "KERNCZ" FCH where the SMBus - * controller has a PCI ID of 0x790b1022. Based on some code in Linux it is - * assumed that revisions less than 0x49 are compatible with the SB8x0 class - * and revisions greater than or equal to 0x49 are compatible with the class - * of FCHs with 0x41+ revisions. */ /* Modified: stable/11/sys/dev/amdsbwd/amdsbwd.c ============================================================================== --- stable/11/sys/dev/amdsbwd/amdsbwd.c Fri Oct 7 17:56:57 2016 (r306813) +++ stable/11/sys/dev/amdsbwd/amdsbwd.c Fri Oct 7 18:50:50 2016 (r306814) @@ -59,38 +59,13 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include -/* SB7xx RRG 2.3.3.1.1. */ -#define AMDSB_PMIO_INDEX 0xcd6 -#define AMDSB_PMIO_DATA (PMIO_INDEX + 1) -#define AMDSB_PMIO_WIDTH 2 -/* SB7xx RRG 2.3.3.2. */ -#define AMDSB_PM_RESET_STATUS0 0x44 -#define AMDSB_PM_RESET_STATUS1 0x45 -#define AMDSB_WD_RST_STS 0x02 -/* SB7xx RRG 2.3.3.2, RPR 2.36. */ -#define AMDSB_PM_WDT_CTRL 0x69 -#define AMDSB_WDT_DISABLE 0x01 -#define AMDSB_WDT_RES_MASK (0x02 | 0x04) -#define AMDSB_WDT_RES_32US 0x00 -#define AMDSB_WDT_RES_10MS 0x02 -#define AMDSB_WDT_RES_100MS 0x04 -#define AMDSB_WDT_RES_1S 0x06 -#define AMDSB_PM_WDT_BASE_LSB 0x6c -#define AMDSB_PM_WDT_BASE_MSB 0x6f -/* SB8xx RRG 2.3.3. */ -#define AMDSB8_PM_WDT_EN 0x48 -#define AMDSB8_WDT_DEC_EN 0x01 -#define AMDSB8_WDT_DISABLE 0x02 -#define AMDSB8_PM_WDT_CTRL 0x4c -#define AMDSB8_WDT_32KHZ 0x00 -#define AMDSB8_WDT_1HZ 0x03 -#define AMDSB8_WDT_RES_MASK 0x03 -#define AMDSB8_PM_RESET_STATUS0 0xC0 -#define AMDSB8_PM_RESET_STATUS1 0xC1 -#define AMDSB8_WD_RST_STS 0x20 -/* SB7xx RRG 2.3.4, WDRT. */ +/* + * Registers in the Watchdog IO space. + * See SB7xx RRG 2.3.4, WDRT. + */ #define AMDSB_WD_CTRL 0x00 #define AMDSB_WD_RUN 0x01 #define AMDSB_WD_FIRED 0x02 @@ -101,28 +76,6 @@ __FBSDID("$FreeBSD$"); #define AMDSB_WD_COUNT 0x04 #define AMDSB_WD_COUNT_MASK 0xffff #define AMDSB_WDIO_REG_WIDTH 4 -/* WDRT */ -#define MAXCOUNT_MIN_VALUE 511 -/* SB7xx RRG 2.3.1.1, SB600 RRG 2.3.1.1, SB8xx RRG 2.3.1. */ -#define AMDSB_SMBUS_DEVID 0x43851002 -#define AMDSB8_SMBUS_REVID 0x40 -#define AMDHUDSON_SMBUS_DEVID 0x780b1022 -#define AMDKERNCZ_SMBUS_DEVID 0x790b1022 -/* BKDG Family 16h Models 30h - 3Fh */ -#define AMDFCH16H3XH_PM_WDT_EN 0x00 -#define AMDFCH_WDT_DEC_EN 0x80 -#define AMDFCH16H3XH_PM_WDT_CTRL 0x03 -#define AMDFCH_WDT_RES_MASK 0x03 -#define AMDFCH_WDT_RES_32US 0x00 -#define AMDFCH_WDT_RES_10MS 0x01 -#define AMDFCH_WDT_RES_100MS 0x02 -#define AMDFCH_WDT_RES_1S 0x03 -#define AMDFCH_WDT_ENABLE_MASK 0x0c -#define AMDFCH_WDT_ENABLE 0x00 -#define AMDFCH16H3XH_PM_MMIO_CTRL 0x04 -#define AMDFCH_WDT_MMIO_EN 0x02 -#define AMDFCH16H3XH_WDT_ADDR1 0xfed80b00u -#define AMDFCH16H3XH_WDT_ADDR2 0xfeb00000u #define amdsbwd_verbose_printf(dev, ...) \ do { \ @@ -297,8 +250,8 @@ amdsbwd_identify(driver_t *driver, devic if (smb_dev == NULL) return; if (pci_get_devid(smb_dev) != AMDSB_SMBUS_DEVID && - pci_get_devid(smb_dev) != AMDHUDSON_SMBUS_DEVID && - pci_get_devid(smb_dev) != AMDKERNCZ_SMBUS_DEVID) + pci_get_devid(smb_dev) != AMDFCH_SMBUS_DEVID && + pci_get_devid(smb_dev) != AMDCZ_SMBUS_DEVID) return; child = BUS_ADD_CHILD(parent, ISA_ORDER_SPECULATIVE, "amdsbwd", -1); @@ -397,48 +350,48 @@ amdsbwd_probe_sb8xx(device_t dev, struct } static void -amdsbwd_probe_fch_16h_3xh(device_t dev, struct resource *pmres, uint32_t *addr) +amdsbwd_probe_fch41(device_t dev, struct resource *pmres, uint32_t *addr) { uint8_t val; - val = pmio_read(pmres, AMDFCH16H3XH_PM_MMIO_CTRL); - if ((val & AMDFCH_WDT_MMIO_EN) != 0) { + val = pmio_read(pmres, AMDFCH41_PM_ISA_CTRL); + if ((val & AMDFCH41_MMIO_EN) != 0) { /* Fixed offset for the watchdog within ACPI MMIO range. */ amdsbwd_verbose_printf(dev, "ACPI MMIO range is enabled\n"); - *addr = AMDFCH16H3XH_WDT_ADDR1; + *addr = AMDFCH41_MMIO_ADDR + AMDFCH41_MMIO_WDT_OFF; } else { /* * Enable decoding of watchdog MMIO address. */ - val = pmio_read(pmres, AMDFCH16H3XH_PM_WDT_EN); - val |= AMDFCH_WDT_DEC_EN; - pmio_write(pmres, AMDFCH16H3XH_PM_WDT_EN, val); + val = pmio_read(pmres, AMDFCH41_PM_DECODE_EN0); + val |= AMDFCH41_WDT_EN; + pmio_write(pmres, AMDFCH41_PM_DECODE_EN0, val); #ifdef AMDSBWD_DEBUG - val = pmio_read(pmres, AMDFCH16H3XH_PM_WDT_EN); - device_printf(dev, "AMDFCH16H3XH_PM_WDT_EN value = %#04x\n", + val = pmio_read(pmres, AMDFCH41_PM_DECODE_EN0); + device_printf(dev, "AMDFCH41_PM_DECODE_EN0 value = %#04x\n", val); #endif /* Special fixed MMIO range for the watchdog. */ - *addr = AMDFCH16H3XH_WDT_ADDR2; + *addr = AMDFCH41_WDT_FIXED_ADDR; } /* * Set watchdog timer tick to 1s and * enable the watchdog device (in stopped state). */ - val = pmio_read(pmres, AMDFCH16H3XH_PM_WDT_CTRL); - val &= ~AMDFCH_WDT_RES_MASK; - val |= AMDFCH_WDT_RES_1S; - val &= ~AMDFCH_WDT_ENABLE_MASK; - val |= AMDFCH_WDT_ENABLE; - pmio_write(pmres, AMDFCH16H3XH_PM_WDT_CTRL, val); + val = pmio_read(pmres, AMDFCH41_PM_DECODE_EN3); + val &= ~AMDFCH41_WDT_RES_MASK; + val |= AMDFCH41_WDT_RES_1S; + val &= ~AMDFCH41_WDT_EN_MASK; + val |= AMDFCH41_WDT_ENABLE; + pmio_write(pmres, AMDFCH41_PM_DECODE_EN3, val); #ifdef AMDSBWD_DEBUG - val = pmio_read(pmres, AMDFCH16H3XH_PM_WDT_CTRL); - amdsbwd_verbose_printf(dev, "AMDFCH16H3XH_PM_WDT_CTRL value = %#04x\n", + val = pmio_read(pmres, AMDFCH41_PM_DECODE_EN3); + amdsbwd_verbose_printf(dev, "AMDFCH41_PM_DECODE_EN3 value = %#04x\n", val); #endif - device_set_desc(dev, "AMD FCH Rev 42h+ Watchdog Timer"); + device_set_desc(dev, "AMD FCH Rev 41h+ Watchdog Timer"); } static int @@ -476,11 +429,12 @@ amdsbwd_probe(device_t dev) revid = pci_get_revid(smb_dev); if (devid == AMDSB_SMBUS_DEVID && revid < AMDSB8_SMBUS_REVID) amdsbwd_probe_sb7xx(dev, res, &addr); - else if (devid == AMDSB_SMBUS_DEVID || devid == AMDKERNCZ_SMBUS_DEVID || - (devid == AMDHUDSON_SMBUS_DEVID && revid < 0x42)) + else if (devid == AMDSB_SMBUS_DEVID || + (devid == AMDFCH_SMBUS_DEVID && revid < AMDFCH41_SMBUS_REVID) || + (devid == AMDCZ_SMBUS_DEVID && revid < AMDCZ49_SMBUS_REVID)) amdsbwd_probe_sb8xx(dev, res, &addr); else - amdsbwd_probe_fch_16h_3xh(dev, res, &addr); + amdsbwd_probe_fch41(dev, res, &addr); bus_release_resource(dev, SYS_RES_IOPORT, rid, res); bus_delete_resource(dev, SYS_RES_IOPORT, rid); Modified: stable/11/sys/dev/intpm/intpm.c ============================================================================== --- stable/11/sys/dev/intpm/intpm.c Fri Oct 7 17:56:57 2016 (r306813) +++ stable/11/sys/dev/intpm/intpm.c Fri Oct 7 18:50:50 2016 (r306814) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "opt_intpm.h" @@ -103,12 +104,11 @@ intsmb_probe(device_t dev) case 0x43721002: device_set_desc(dev, "ATI IXP400 SMBus Controller"); break; - case 0x43851002: + case AMDSB_SMBUS_DEVID: device_set_desc(dev, "AMD SB600/7xx/8xx/9xx SMBus Controller"); break; - case 0x780b1022: /* AMD FCH */ - if (pci_get_revid(dev) < 0x40) - return (ENXIO); + case AMDFCH_SMBUS_DEVID: /* AMD FCH */ + case AMDCZ_SMBUS_DEVID: /* AMD Carizzo FCH */ device_set_desc(dev, "AMD FCH SMBus Controller"); break; default: @@ -119,7 +119,7 @@ intsmb_probe(device_t dev) } static uint8_t -sb8xx_pmio_read(struct resource *res, uint8_t reg) +amd_pmio_read(struct resource *res, uint8_t reg) { bus_write_1(res, 0, reg); /* Index */ return (bus_read_1(res, 1)); /* Data */ @@ -128,27 +128,18 @@ sb8xx_pmio_read(struct resource *res, ui static int sb8xx_attach(device_t dev) { - static const int AMDSB_PMIO_INDEX = 0xcd6; - static const int AMDSB_PMIO_WIDTH = 2; - static const int AMDSB8_SMBUS_ADDR = 0x2c; - static const int AMDSB8_SMBUS_EN = 0x01; - static const int AMDSB8_SMBUS_ADDR_MASK = ~0x1fu; static const int AMDSB_SMBIO_WIDTH = 0x14; - static const int AMDSB_SMBUS_CFG = 0x10; - static const int AMDSB_SMBUS_IRQ = 0x01; - static const int AMDSB_SMBUS_REV_MASK = ~0x0fu; - static const int AMDSB_SMBUS_REV_SHIFT = 4; - static const int AMDSB_IO_RID = 0; - struct intsmb_softc *sc; struct resource *res; + uint32_t devid; + uint8_t revid; uint16_t addr; - uint8_t cfg; int rid; int rc; + bool enabled; sc = device_get_softc(dev); - rid = AMDSB_IO_RID; + rid = 0; rc = bus_set_resource(dev, SYS_RES_IOPORT, rid, AMDSB_PMIO_INDEX, AMDSB_PMIO_WIDTH); if (rc != 0) { @@ -156,26 +147,38 @@ sb8xx_attach(device_t dev) return (ENXIO); } res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, - RF_ACTIVE | RF_SHAREABLE); + RF_ACTIVE); if (res == NULL) { device_printf(dev, "bus_alloc_resource for PM IO failed\n"); return (ENXIO); } - addr = sb8xx_pmio_read(res, AMDSB8_SMBUS_ADDR + 1); - addr <<= 8; - addr |= sb8xx_pmio_read(res, AMDSB8_SMBUS_ADDR); + devid = pci_get_devid(dev); + revid = pci_get_revid(dev); + if (devid == AMDSB_SMBUS_DEVID || + (devid == AMDFCH_SMBUS_DEVID && revid < AMDFCH41_SMBUS_REVID) || + (devid == AMDCZ_SMBUS_DEVID && revid < AMDCZ49_SMBUS_REVID)) { + addr = amd_pmio_read(res, AMDSB8_PM_SMBUS_EN + 1); + addr <<= 8; + addr |= amd_pmio_read(res, AMDSB8_PM_SMBUS_EN); + enabled = (addr & AMDSB8_SMBUS_EN) != 0; + addr &= AMDSB8_SMBUS_ADDR_MASK; + } else { + addr = amd_pmio_read(res, AMDFCH41_PM_DECODE_EN0); + enabled = (addr & AMDFCH41_SMBUS_EN) != 0; + addr = amd_pmio_read(res, AMDFCH41_PM_DECODE_EN1); + addr <<= 8; + } bus_release_resource(dev, SYS_RES_IOPORT, rid, res); bus_delete_resource(dev, SYS_RES_IOPORT, rid); - if ((addr & AMDSB8_SMBUS_EN) == 0) { - device_printf(dev, "SB8xx SMBus not enabled\n"); + if (!enabled) { + device_printf(dev, "SB8xx/SB9xx/FCH SMBus not enabled\n"); return (ENXIO); } - addr &= AMDSB8_SMBUS_ADDR_MASK; - sc->io_rid = AMDSB_IO_RID; + sc->io_rid = 0; rc = bus_set_resource(dev, SYS_RES_IOPORT, sc->io_rid, addr, AMDSB_SMBIO_WIDTH); if (rc != 0) { @@ -187,15 +190,8 @@ sb8xx_attach(device_t dev) return (ENXIO); } sc->io_res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &sc->io_rid, - RF_ACTIVE | RF_SHAREABLE); - cfg = bus_read_1(sc->io_res, AMDSB_SMBUS_CFG); - + RF_ACTIVE); sc->poll = 1; - device_printf(dev, "intr %s disabled ", - (cfg & AMDSB_SMBUS_IRQ) != 0 ? "IRQ" : "SMI"); - printf("revision %d\n", - (cfg & AMDSB_SMBUS_REV_MASK) >> AMDSB_SMBUS_REV_SHIFT); - return (0); } @@ -237,11 +233,12 @@ intsmb_attach(device_t dev) sc->cfg_irq9 = 1; break; #endif - case 0x43851002: - if (pci_get_revid(dev) >= 0x40) + case AMDSB_SMBUS_DEVID: + if (pci_get_revid(dev) >= AMDSB8_SMBUS_REVID) sc->sb8xx = 1; break; - case 0x780b1022: + case AMDFCH_SMBUS_DEVID: + case AMDCZ_SMBUS_DEVID: sc->sb8xx = 1; break; } From owner-svn-src-all@freebsd.org Fri Oct 7 18:51:05 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4CB8C05786; Fri, 7 Oct 2016 18:51:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A3371CE2; Fri, 7 Oct 2016 18:51:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u97Ip4Mb063325; Fri, 7 Oct 2016 18:51:04 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u97Ip48p063321; Fri, 7 Oct 2016 18:51:04 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201610071851.u97Ip48p063321@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 7 Oct 2016 18:51:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306815 - in stable/10: share/man/man4 sys/dev/amdsbwd sys/pci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 18:51:05 -0000 Author: avg Date: Fri Oct 7 18:51:04 2016 New Revision: 306815 URL: https://svnweb.freebsd.org/changeset/base/306815 Log: MFC r306218,306290: amdsbwd, intpm: unify bits specific to AMD chipsets Added: stable/10/sys/dev/amdsbwd/amd_chipset.h - copied, changed from r306218, head/sys/dev/amdsbwd/amd_chipset.h Modified: stable/10/share/man/man4/intpm.4 stable/10/sys/dev/amdsbwd/amdsbwd.c stable/10/sys/pci/intpm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/intpm.4 ============================================================================== --- stable/10/share/man/man4/intpm.4 Fri Oct 7 18:50:50 2016 (r306814) +++ stable/10/share/man/man4/intpm.4 Fri Oct 7 18:51:04 2016 (r306815) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 20, 2016 +.Dd September 22, 2016 .Dt INTPM 4 .Os .Sh NAME @@ -59,7 +59,9 @@ AMD SB600/7x0/8x0/9x0 southbridges .It AMD Axx/Hudson/Bolton FCHs .It -AMD FCH integrated into Family 16h Models 00h-0Fh Processors +AMD FCH integrated into Family 15h Models 60h-6Fh, 70h-7Fh Processors +.It +AMD FCH integrated into Family 16h Models 00h-0Fh, 30h-3Fh Processors .El .Sh SEE ALSO .Xr amdpm 4 , Copied and modified: stable/10/sys/dev/amdsbwd/amd_chipset.h (from r306218, head/sys/dev/amdsbwd/amd_chipset.h) ============================================================================== --- head/sys/dev/amdsbwd/amd_chipset.h Thu Sep 22 21:34:35 2016 (r306218, copy source) +++ stable/10/sys/dev/amdsbwd/amd_chipset.h Fri Oct 7 18:51:04 2016 (r306815) @@ -36,18 +36,23 @@ * At present there are three classes of supported chipsets: * - SB600 and S7x0 southbridges where the SMBus controller device has * a PCI Device ID of 0x43851002 and a revision less than 0x40 - * - SB8x0, SB9x0 southbridges and FCHs where the SMBus controller device has - * a PCI Device ID of 0x43851002 and a revision greater than or equal to 0x40 - * or the controller has an ID of 0x780b1022 and a revision less than 0x41 - * - FCHs where the SMBus controller device has a PCI Device ID of 0x780b1022 - * and a revision greater than or equal to 0x41 + * - several types of southbridges and FCHs: + * o SB8x0, SB9x0 southbridges where the SMBus controller device has a PCI + * Device ID of 0x43851002 and a revision greater than or equal to 0x40 + * o FCHs where the controller has an ID of 0x780b1022 and a revision less + * than 0x41 (various revisions of "Hudson" and "Bolton") + * o FCHs where the controller has an ID of 0x790b1022 and a revision less + * than 0x49 + * - several types of southbridges and FCHs: + * o FCHs where the SMBus controller device has a PCI Device ID of 0x780b1022 + * and a revision greater than or equal to 0x41 (integrated into "Mullins" + * processors, code named "ML") + * o FCHs where the controller has an ID of 0x790b1022 and a revision greater + * than or equal to 0x49 (integrated into "Carrizo" processors, code named + * "KERNCZ" or "CZ") + * * The register definitions are compatible within the classes and may be * incompatible accross them. - * So far there is no public documentation for "KERNCZ" FCH where the SMBus - * controller has a PCI ID of 0x790b1022. Based on some code in Linux it is - * assumed that revisions less than 0x49 are compatible with the SB8x0 class - * and revisions greater than or equal to 0x49 are compatible with the class - * of FCHs with 0x41+ revisions. */ /* Modified: stable/10/sys/dev/amdsbwd/amdsbwd.c ============================================================================== --- stable/10/sys/dev/amdsbwd/amdsbwd.c Fri Oct 7 18:50:50 2016 (r306814) +++ stable/10/sys/dev/amdsbwd/amdsbwd.c Fri Oct 7 18:51:04 2016 (r306815) @@ -59,38 +59,13 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include -/* SB7xx RRG 2.3.3.1.1. */ -#define AMDSB_PMIO_INDEX 0xcd6 -#define AMDSB_PMIO_DATA (PMIO_INDEX + 1) -#define AMDSB_PMIO_WIDTH 2 -/* SB7xx RRG 2.3.3.2. */ -#define AMDSB_PM_RESET_STATUS0 0x44 -#define AMDSB_PM_RESET_STATUS1 0x45 -#define AMDSB_WD_RST_STS 0x02 -/* SB7xx RRG 2.3.3.2, RPR 2.36. */ -#define AMDSB_PM_WDT_CTRL 0x69 -#define AMDSB_WDT_DISABLE 0x01 -#define AMDSB_WDT_RES_MASK (0x02 | 0x04) -#define AMDSB_WDT_RES_32US 0x00 -#define AMDSB_WDT_RES_10MS 0x02 -#define AMDSB_WDT_RES_100MS 0x04 -#define AMDSB_WDT_RES_1S 0x06 -#define AMDSB_PM_WDT_BASE_LSB 0x6c -#define AMDSB_PM_WDT_BASE_MSB 0x6f -/* SB8xx RRG 2.3.3. */ -#define AMDSB8_PM_WDT_EN 0x48 -#define AMDSB8_WDT_DEC_EN 0x01 -#define AMDSB8_WDT_DISABLE 0x02 -#define AMDSB8_PM_WDT_CTRL 0x4c -#define AMDSB8_WDT_32KHZ 0x00 -#define AMDSB8_WDT_1HZ 0x03 -#define AMDSB8_WDT_RES_MASK 0x03 -#define AMDSB8_PM_RESET_STATUS0 0xC0 -#define AMDSB8_PM_RESET_STATUS1 0xC1 -#define AMDSB8_WD_RST_STS 0x20 -/* SB7xx RRG 2.3.4, WDRT. */ +/* + * Registers in the Watchdog IO space. + * See SB7xx RRG 2.3.4, WDRT. + */ #define AMDSB_WD_CTRL 0x00 #define AMDSB_WD_RUN 0x01 #define AMDSB_WD_FIRED 0x02 @@ -101,28 +76,6 @@ __FBSDID("$FreeBSD$"); #define AMDSB_WD_COUNT 0x04 #define AMDSB_WD_COUNT_MASK 0xffff #define AMDSB_WDIO_REG_WIDTH 4 -/* WDRT */ -#define MAXCOUNT_MIN_VALUE 511 -/* SB7xx RRG 2.3.1.1, SB600 RRG 2.3.1.1, SB8xx RRG 2.3.1. */ -#define AMDSB_SMBUS_DEVID 0x43851002 -#define AMDSB8_SMBUS_REVID 0x40 -#define AMDHUDSON_SMBUS_DEVID 0x780b1022 -#define AMDKERNCZ_SMBUS_DEVID 0x790b1022 -/* BKDG Family 16h Models 30h - 3Fh */ -#define AMDFCH16H3XH_PM_WDT_EN 0x00 -#define AMDFCH_WDT_DEC_EN 0x80 -#define AMDFCH16H3XH_PM_WDT_CTRL 0x03 -#define AMDFCH_WDT_RES_MASK 0x03 -#define AMDFCH_WDT_RES_32US 0x00 -#define AMDFCH_WDT_RES_10MS 0x01 -#define AMDFCH_WDT_RES_100MS 0x02 -#define AMDFCH_WDT_RES_1S 0x03 -#define AMDFCH_WDT_ENABLE_MASK 0x0c -#define AMDFCH_WDT_ENABLE 0x00 -#define AMDFCH16H3XH_PM_MMIO_CTRL 0x04 -#define AMDFCH_WDT_MMIO_EN 0x02 -#define AMDFCH16H3XH_WDT_ADDR1 0xfed80b00u -#define AMDFCH16H3XH_WDT_ADDR2 0xfeb00000u #define amdsbwd_verbose_printf(dev, ...) \ do { \ @@ -297,8 +250,8 @@ amdsbwd_identify(driver_t *driver, devic if (smb_dev == NULL) return; if (pci_get_devid(smb_dev) != AMDSB_SMBUS_DEVID && - pci_get_devid(smb_dev) != AMDHUDSON_SMBUS_DEVID && - pci_get_devid(smb_dev) != AMDKERNCZ_SMBUS_DEVID) + pci_get_devid(smb_dev) != AMDFCH_SMBUS_DEVID && + pci_get_devid(smb_dev) != AMDCZ_SMBUS_DEVID) return; child = BUS_ADD_CHILD(parent, ISA_ORDER_SPECULATIVE, "amdsbwd", -1); @@ -397,48 +350,48 @@ amdsbwd_probe_sb8xx(device_t dev, struct } static void -amdsbwd_probe_fch_16h_3xh(device_t dev, struct resource *pmres, uint32_t *addr) +amdsbwd_probe_fch41(device_t dev, struct resource *pmres, uint32_t *addr) { uint8_t val; - val = pmio_read(pmres, AMDFCH16H3XH_PM_MMIO_CTRL); - if ((val & AMDFCH_WDT_MMIO_EN) != 0) { + val = pmio_read(pmres, AMDFCH41_PM_ISA_CTRL); + if ((val & AMDFCH41_MMIO_EN) != 0) { /* Fixed offset for the watchdog within ACPI MMIO range. */ amdsbwd_verbose_printf(dev, "ACPI MMIO range is enabled\n"); - *addr = AMDFCH16H3XH_WDT_ADDR1; + *addr = AMDFCH41_MMIO_ADDR + AMDFCH41_MMIO_WDT_OFF; } else { /* * Enable decoding of watchdog MMIO address. */ - val = pmio_read(pmres, AMDFCH16H3XH_PM_WDT_EN); - val |= AMDFCH_WDT_DEC_EN; - pmio_write(pmres, AMDFCH16H3XH_PM_WDT_EN, val); + val = pmio_read(pmres, AMDFCH41_PM_DECODE_EN0); + val |= AMDFCH41_WDT_EN; + pmio_write(pmres, AMDFCH41_PM_DECODE_EN0, val); #ifdef AMDSBWD_DEBUG - val = pmio_read(pmres, AMDFCH16H3XH_PM_WDT_EN); - device_printf(dev, "AMDFCH16H3XH_PM_WDT_EN value = %#04x\n", + val = pmio_read(pmres, AMDFCH41_PM_DECODE_EN0); + device_printf(dev, "AMDFCH41_PM_DECODE_EN0 value = %#04x\n", val); #endif /* Special fixed MMIO range for the watchdog. */ - *addr = AMDFCH16H3XH_WDT_ADDR2; + *addr = AMDFCH41_WDT_FIXED_ADDR; } /* * Set watchdog timer tick to 1s and * enable the watchdog device (in stopped state). */ - val = pmio_read(pmres, AMDFCH16H3XH_PM_WDT_CTRL); - val &= ~AMDFCH_WDT_RES_MASK; - val |= AMDFCH_WDT_RES_1S; - val &= ~AMDFCH_WDT_ENABLE_MASK; - val |= AMDFCH_WDT_ENABLE; - pmio_write(pmres, AMDFCH16H3XH_PM_WDT_CTRL, val); + val = pmio_read(pmres, AMDFCH41_PM_DECODE_EN3); + val &= ~AMDFCH41_WDT_RES_MASK; + val |= AMDFCH41_WDT_RES_1S; + val &= ~AMDFCH41_WDT_EN_MASK; + val |= AMDFCH41_WDT_ENABLE; + pmio_write(pmres, AMDFCH41_PM_DECODE_EN3, val); #ifdef AMDSBWD_DEBUG - val = pmio_read(pmres, AMDFCH16H3XH_PM_WDT_CTRL); - amdsbwd_verbose_printf(dev, "AMDFCH16H3XH_PM_WDT_CTRL value = %#04x\n", + val = pmio_read(pmres, AMDFCH41_PM_DECODE_EN3); + amdsbwd_verbose_printf(dev, "AMDFCH41_PM_DECODE_EN3 value = %#04x\n", val); #endif - device_set_desc(dev, "AMD FCH Rev 42h+ Watchdog Timer"); + device_set_desc(dev, "AMD FCH Rev 41h+ Watchdog Timer"); } static int @@ -476,11 +429,12 @@ amdsbwd_probe(device_t dev) revid = pci_get_revid(smb_dev); if (devid == AMDSB_SMBUS_DEVID && revid < AMDSB8_SMBUS_REVID) amdsbwd_probe_sb7xx(dev, res, &addr); - else if (devid == AMDSB_SMBUS_DEVID || devid == AMDKERNCZ_SMBUS_DEVID || - (devid == AMDHUDSON_SMBUS_DEVID && revid < 0x42)) + else if (devid == AMDSB_SMBUS_DEVID || + (devid == AMDFCH_SMBUS_DEVID && revid < AMDFCH41_SMBUS_REVID) || + (devid == AMDCZ_SMBUS_DEVID && revid < AMDCZ49_SMBUS_REVID)) amdsbwd_probe_sb8xx(dev, res, &addr); else - amdsbwd_probe_fch_16h_3xh(dev, res, &addr); + amdsbwd_probe_fch41(dev, res, &addr); bus_release_resource(dev, SYS_RES_IOPORT, rid, res); bus_delete_resource(dev, SYS_RES_IOPORT, rid); Modified: stable/10/sys/pci/intpm.c ============================================================================== --- stable/10/sys/pci/intpm.c Fri Oct 7 18:50:50 2016 (r306814) +++ stable/10/sys/pci/intpm.c Fri Oct 7 18:51:04 2016 (r306815) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "opt_intpm.h" @@ -103,12 +104,11 @@ intsmb_probe(device_t dev) case 0x43721002: device_set_desc(dev, "ATI IXP400 SMBus Controller"); break; - case 0x43851002: + case AMDSB_SMBUS_DEVID: device_set_desc(dev, "AMD SB600/7xx/8xx/9xx SMBus Controller"); break; - case 0x780b1022: /* AMD FCH */ - if (pci_get_revid(dev) < 0x40) - return (ENXIO); + case AMDFCH_SMBUS_DEVID: /* AMD FCH */ + case AMDCZ_SMBUS_DEVID: /* AMD Carizzo FCH */ device_set_desc(dev, "AMD FCH SMBus Controller"); break; default: @@ -119,7 +119,7 @@ intsmb_probe(device_t dev) } static uint8_t -sb8xx_pmio_read(struct resource *res, uint8_t reg) +amd_pmio_read(struct resource *res, uint8_t reg) { bus_write_1(res, 0, reg); /* Index */ return (bus_read_1(res, 1)); /* Data */ @@ -128,27 +128,18 @@ sb8xx_pmio_read(struct resource *res, ui static int sb8xx_attach(device_t dev) { - static const int AMDSB_PMIO_INDEX = 0xcd6; - static const int AMDSB_PMIO_WIDTH = 2; - static const int AMDSB8_SMBUS_ADDR = 0x2c; - static const int AMDSB8_SMBUS_EN = 0x01; - static const int AMDSB8_SMBUS_ADDR_MASK = ~0x1fu; static const int AMDSB_SMBIO_WIDTH = 0x14; - static const int AMDSB_SMBUS_CFG = 0x10; - static const int AMDSB_SMBUS_IRQ = 0x01; - static const int AMDSB_SMBUS_REV_MASK = ~0x0fu; - static const int AMDSB_SMBUS_REV_SHIFT = 4; - static const int AMDSB_IO_RID = 0; - struct intsmb_softc *sc; struct resource *res; + uint32_t devid; + uint8_t revid; uint16_t addr; - uint8_t cfg; int rid; int rc; + bool enabled; sc = device_get_softc(dev); - rid = AMDSB_IO_RID; + rid = 0; rc = bus_set_resource(dev, SYS_RES_IOPORT, rid, AMDSB_PMIO_INDEX, AMDSB_PMIO_WIDTH); if (rc != 0) { @@ -156,26 +147,38 @@ sb8xx_attach(device_t dev) return (ENXIO); } res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, - RF_ACTIVE | RF_SHAREABLE); + RF_ACTIVE); if (res == NULL) { device_printf(dev, "bus_alloc_resource for PM IO failed\n"); return (ENXIO); } - addr = sb8xx_pmio_read(res, AMDSB8_SMBUS_ADDR + 1); - addr <<= 8; - addr |= sb8xx_pmio_read(res, AMDSB8_SMBUS_ADDR); + devid = pci_get_devid(dev); + revid = pci_get_revid(dev); + if (devid == AMDSB_SMBUS_DEVID || + (devid == AMDFCH_SMBUS_DEVID && revid < AMDFCH41_SMBUS_REVID) || + (devid == AMDCZ_SMBUS_DEVID && revid < AMDCZ49_SMBUS_REVID)) { + addr = amd_pmio_read(res, AMDSB8_PM_SMBUS_EN + 1); + addr <<= 8; + addr |= amd_pmio_read(res, AMDSB8_PM_SMBUS_EN); + enabled = (addr & AMDSB8_SMBUS_EN) != 0; + addr &= AMDSB8_SMBUS_ADDR_MASK; + } else { + addr = amd_pmio_read(res, AMDFCH41_PM_DECODE_EN0); + enabled = (addr & AMDFCH41_SMBUS_EN) != 0; + addr = amd_pmio_read(res, AMDFCH41_PM_DECODE_EN1); + addr <<= 8; + } bus_release_resource(dev, SYS_RES_IOPORT, rid, res); bus_delete_resource(dev, SYS_RES_IOPORT, rid); - if ((addr & AMDSB8_SMBUS_EN) == 0) { - device_printf(dev, "SB8xx SMBus not enabled\n"); + if (!enabled) { + device_printf(dev, "SB8xx/SB9xx/FCH SMBus not enabled\n"); return (ENXIO); } - addr &= AMDSB8_SMBUS_ADDR_MASK; - sc->io_rid = AMDSB_IO_RID; + sc->io_rid = 0; rc = bus_set_resource(dev, SYS_RES_IOPORT, sc->io_rid, addr, AMDSB_SMBIO_WIDTH); if (rc != 0) { @@ -187,15 +190,8 @@ sb8xx_attach(device_t dev) return (ENXIO); } sc->io_res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &sc->io_rid, - RF_ACTIVE | RF_SHAREABLE); - cfg = bus_read_1(sc->io_res, AMDSB_SMBUS_CFG); - + RF_ACTIVE); sc->poll = 1; - device_printf(dev, "intr %s disabled ", - (cfg & AMDSB_SMBUS_IRQ) != 0 ? "IRQ" : "SMI"); - printf("revision %d\n", - (cfg & AMDSB_SMBUS_REV_MASK) >> AMDSB_SMBUS_REV_SHIFT); - return (0); } @@ -237,11 +233,12 @@ intsmb_attach(device_t dev) sc->cfg_irq9 = 1; break; #endif - case 0x43851002: - if (pci_get_revid(dev) >= 0x40) + case AMDSB_SMBUS_DEVID: + if (pci_get_revid(dev) >= AMDSB8_SMBUS_REVID) sc->sb8xx = 1; break; - case 0x780b1022: + case AMDFCH_SMBUS_DEVID: + case AMDCZ_SMBUS_DEVID: sc->sb8xx = 1; break; } From owner-svn-src-all@freebsd.org Fri Oct 7 18:53:19 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D69FC05912; Fri, 7 Oct 2016 18:53:19 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D1888DC; Fri, 7 Oct 2016 18:53:18 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u97IrICB066727; Fri, 7 Oct 2016 18:53:18 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u97IrIna066726; Fri, 7 Oct 2016 18:53:18 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201610071853.u97IrIna066726@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 7 Oct 2016 18:53:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306816 - stable/11/sys/dev/amdsbwd X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 18:53:19 -0000 Author: avg Date: Fri Oct 7 18:53:17 2016 New Revision: 306816 URL: https://svnweb.freebsd.org/changeset/base/306816 Log: MFC r306291: the rest of changes intended to be committed in r306290 Modified: stable/11/sys/dev/amdsbwd/amd_chipset.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/amdsbwd/amd_chipset.h ============================================================================== --- stable/11/sys/dev/amdsbwd/amd_chipset.h Fri Oct 7 18:51:04 2016 (r306815) +++ stable/11/sys/dev/amdsbwd/amd_chipset.h Fri Oct 7 18:53:17 2016 (r306816) @@ -40,10 +40,11 @@ * o SB8x0, SB9x0 southbridges where the SMBus controller device has a PCI * Device ID of 0x43851002 and a revision greater than or equal to 0x40 * o FCHs where the controller has an ID of 0x780b1022 and a revision less - * than 0x41 (various revisions of "Hudson" and "Bolton") + * than 0x41 (various variants of "Hudson" and "Bolton" as well as FCHs + * integrated into processors, e.g. "Kabini") * o FCHs where the controller has an ID of 0x790b1022 and a revision less * than 0x49 - * - several types of southbridges and FCHs: + * - several types of FCHs: * o FCHs where the SMBus controller device has a PCI Device ID of 0x780b1022 * and a revision greater than or equal to 0x41 (integrated into "Mullins" * processors, code named "ML") @@ -131,6 +132,8 @@ * SB600 RRG 2.3.1.1, * SB7xx RRG 2.3.1.1, * SB8xx RRG 2.3.1, + * BKDG for Family 15h Models 60h-6Fh 3.26.6.1, + * BKDG for Family 15h Models 70h-7Fh 3.26.6.1, * BKDG for Family 16h Models 00h-0Fh 3.26.7.1, * BKDG for Family 16h Models 30h-3Fh 3.26.7.1. * Also, see i2c-piix4 aka piix4_smbus Linux driver. From owner-svn-src-all@freebsd.org Fri Oct 7 18:53:30 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46C35C05963; Fri, 7 Oct 2016 18:53:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12FCB231; Fri, 7 Oct 2016 18:53:29 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u97IrTn1066777; Fri, 7 Oct 2016 18:53:29 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u97IrTfM066776; Fri, 7 Oct 2016 18:53:29 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201610071853.u97IrTfM066776@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 7 Oct 2016 18:53:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306817 - stable/10/sys/dev/amdsbwd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 18:53:30 -0000 Author: avg Date: Fri Oct 7 18:53:28 2016 New Revision: 306817 URL: https://svnweb.freebsd.org/changeset/base/306817 Log: MFC r306291: the rest of changes intended to be committed in r306290 Modified: stable/10/sys/dev/amdsbwd/amd_chipset.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/amdsbwd/amd_chipset.h ============================================================================== --- stable/10/sys/dev/amdsbwd/amd_chipset.h Fri Oct 7 18:53:17 2016 (r306816) +++ stable/10/sys/dev/amdsbwd/amd_chipset.h Fri Oct 7 18:53:28 2016 (r306817) @@ -40,10 +40,11 @@ * o SB8x0, SB9x0 southbridges where the SMBus controller device has a PCI * Device ID of 0x43851002 and a revision greater than or equal to 0x40 * o FCHs where the controller has an ID of 0x780b1022 and a revision less - * than 0x41 (various revisions of "Hudson" and "Bolton") + * than 0x41 (various variants of "Hudson" and "Bolton" as well as FCHs + * integrated into processors, e.g. "Kabini") * o FCHs where the controller has an ID of 0x790b1022 and a revision less * than 0x49 - * - several types of southbridges and FCHs: + * - several types of FCHs: * o FCHs where the SMBus controller device has a PCI Device ID of 0x780b1022 * and a revision greater than or equal to 0x41 (integrated into "Mullins" * processors, code named "ML") @@ -131,6 +132,8 @@ * SB600 RRG 2.3.1.1, * SB7xx RRG 2.3.1.1, * SB8xx RRG 2.3.1, + * BKDG for Family 15h Models 60h-6Fh 3.26.6.1, + * BKDG for Family 15h Models 70h-7Fh 3.26.6.1, * BKDG for Family 16h Models 00h-0Fh 3.26.7.1, * BKDG for Family 16h Models 30h-3Fh 3.26.7.1. * Also, see i2c-piix4 aka piix4_smbus Linux driver. From owner-svn-src-all@freebsd.org Fri Oct 7 18:56:21 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4ACADC059E7; Fri, 7 Oct 2016 18:56:21 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DBCC633; Fri, 7 Oct 2016 18:56:20 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u97IuK1p066981; Fri, 7 Oct 2016 18:56:20 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u97IuKpf066980; Fri, 7 Oct 2016 18:56:20 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201610071856.u97IuKpf066980@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 7 Oct 2016 18:56:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306818 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 18:56:21 -0000 Author: avg Date: Fri Oct 7 18:56:20 2016 New Revision: 306818 URL: https://svnweb.freebsd.org/changeset/base/306818 Log: MFC r306292: fix vnode lock assertion for extended attributes directory Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Oct 7 18:53:28 2016 (r306817) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Oct 7 18:56:20 2016 (r306818) @@ -3197,6 +3197,11 @@ zfs_setattr(vnode_t *vp, vattr_t *vap, i if (err == 0 && xattr_obj) { err = zfs_zget(zp->z_zfsvfs, xattr_obj, &attrzp); + if (err == 0) { + err = vn_lock(ZTOV(attrzp), LK_EXCLUSIVE); + if (err != 0) + vrele(ZTOV(attrzp)); + } if (err) goto out2; } @@ -3206,7 +3211,7 @@ zfs_setattr(vnode_t *vp, vattr_t *vap, i if (new_uid != zp->z_uid && zfs_fuid_overquota(zfsvfs, B_FALSE, new_uid)) { if (attrzp) - vrele(ZTOV(attrzp)); + vput(ZTOV(attrzp)); err = SET_ERROR(EDQUOT); goto out2; } @@ -3218,7 +3223,7 @@ zfs_setattr(vnode_t *vp, vattr_t *vap, i if (new_gid != zp->z_gid && zfs_fuid_overquota(zfsvfs, B_TRUE, new_gid)) { if (attrzp) - vrele(ZTOV(attrzp)); + vput(ZTOV(attrzp)); err = SET_ERROR(EDQUOT); goto out2; } @@ -3449,7 +3454,7 @@ out: } if (attrzp) - vrele(ZTOV(attrzp)); + vput(ZTOV(attrzp)); if (aclp) zfs_acl_free(aclp); From owner-svn-src-all@freebsd.org Fri Oct 7 18:56:25 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4320C05A2F; Fri, 7 Oct 2016 18:56:25 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E99F67D; Fri, 7 Oct 2016 18:56:25 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u97IuOf9067030; Fri, 7 Oct 2016 18:56:24 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u97IuOJ9067029; Fri, 7 Oct 2016 18:56:24 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201610071856.u97IuOJ9067029@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 7 Oct 2016 18:56:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306819 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 18:56:26 -0000 Author: avg Date: Fri Oct 7 18:56:24 2016 New Revision: 306819 URL: https://svnweb.freebsd.org/changeset/base/306819 Log: MFC r306292: fix vnode lock assertion for extended attributes directory Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Oct 7 18:56:20 2016 (r306818) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Oct 7 18:56:24 2016 (r306819) @@ -3197,6 +3197,11 @@ zfs_setattr(vnode_t *vp, vattr_t *vap, i if (err == 0 && xattr_obj) { err = zfs_zget(zp->z_zfsvfs, xattr_obj, &attrzp); + if (err == 0) { + err = vn_lock(ZTOV(attrzp), LK_EXCLUSIVE); + if (err != 0) + vrele(ZTOV(attrzp)); + } if (err) goto out2; } @@ -3206,7 +3211,7 @@ zfs_setattr(vnode_t *vp, vattr_t *vap, i if (new_uid != zp->z_uid && zfs_fuid_overquota(zfsvfs, B_FALSE, new_uid)) { if (attrzp) - vrele(ZTOV(attrzp)); + vput(ZTOV(attrzp)); err = SET_ERROR(EDQUOT); goto out2; } @@ -3218,7 +3223,7 @@ zfs_setattr(vnode_t *vp, vattr_t *vap, i if (new_gid != zp->z_gid && zfs_fuid_overquota(zfsvfs, B_TRUE, new_gid)) { if (attrzp) - vrele(ZTOV(attrzp)); + vput(ZTOV(attrzp)); err = SET_ERROR(EDQUOT); goto out2; } @@ -3449,7 +3454,7 @@ out: } if (attrzp) - vrele(ZTOV(attrzp)); + vput(ZTOV(attrzp)); if (aclp) zfs_acl_free(aclp); From owner-svn-src-all@freebsd.org Fri Oct 7 19:02:14 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A861C05C13; Fri, 7 Oct 2016 19:02:14 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C7C6C15; Fri, 7 Oct 2016 19:02:14 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u97J2DES070593; Fri, 7 Oct 2016 19:02:13 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u97J2DHJ070592; Fri, 7 Oct 2016 19:02:13 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201610071902.u97J2DHJ070592@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Fri, 7 Oct 2016 19:02:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306820 - head/usr.bin/cmp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 19:02:14 -0000 Author: oshogbo Date: Fri Oct 7 19:02:13 2016 New Revision: 306820 URL: https://svnweb.freebsd.org/changeset/base/306820 Log: Restrict stdin if it's not in use. Reviewed by: emaste, cem Differential Revision: https://reviews.freebsd.org/D8184 Modified: head/usr.bin/cmp/cmp.c Modified: head/usr.bin/cmp/cmp.c ============================================================================== --- head/usr.bin/cmp/cmp.c Fri Oct 7 18:56:24 2016 (r306819) +++ head/usr.bin/cmp/cmp.c Fri Oct 7 19:02:13 2016 (r306820) @@ -164,6 +164,14 @@ main(int argc, char *argv[]) if (cap_fcntls_limit(fd2, fcntls) < 0 && errno != ENOSYS) err(ERR_EXIT, "unable to limit fcntls for %s", file2); + if (!special) { + cap_rights_init(&rights); + if (cap_rights_limit(STDIN_FILENO, &rights) < 0 && + errno != ENOSYS) { + err(ERR_EXIT, "unable to limit stdio"); + } + } + if (caph_limit_stdout() == -1 || caph_limit_stderr() == -1) err(ERR_EXIT, "unable to limit stdio"); From owner-svn-src-all@freebsd.org Fri Oct 7 19:02:41 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24EA3C05D1B; Fri, 7 Oct 2016 19:02:41 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2497DC5; Fri, 7 Oct 2016 19:02:40 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u97J2eAR070655; Fri, 7 Oct 2016 19:02:40 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u97J2dqW070653; Fri, 7 Oct 2016 19:02:39 GMT (envelope-from np@FreeBSD.org) Message-Id: <201610071902.u97J2dqW070653@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 7 Oct 2016 19:02:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306821 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 19:02:41 -0000 Author: np Date: Fri Oct 7 19:02:39 2016 New Revision: 306821 URL: https://svnweb.freebsd.org/changeset/base/306821 Log: cxgbe(4): Add an ioctl to copy a firmware config file to the card's flash. Modified: head/sys/dev/cxgbe/t4_ioctl.h head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_ioctl.h ============================================================================== --- head/sys/dev/cxgbe/t4_ioctl.h Fri Oct 7 19:02:13 2016 (r306820) +++ head/sys/dev/cxgbe/t4_ioctl.h Fri Oct 7 19:02:39 2016 (r306821) @@ -56,6 +56,7 @@ enum { T4_SET_SCHED_QUEUE, /* set queue class */ T4_GET_TRACER, /* get information about a tracer */ T4_SET_TRACER, /* program a tracer */ + T4_LOAD_CFG, /* copy a config file to card's flash */ }; struct t4_reg { @@ -344,4 +345,5 @@ struct t4_tracer { struct t4_sched_queue) #define CHELSIO_T4_GET_TRACER _IOWR('f', T4_GET_TRACER, struct t4_tracer) #define CHELSIO_T4_SET_TRACER _IOW('f', T4_SET_TRACER, struct t4_tracer) +#define CHELSIO_T4_LOAD_CFG _IOW('f', T4_LOAD_CFG, struct t4_data) #endif Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Fri Oct 7 19:02:13 2016 (r306820) +++ head/sys/dev/cxgbe/t4_main.c Fri Oct 7 19:02:39 2016 (r306821) @@ -549,6 +549,7 @@ static int set_tcb_rpl(struct sge_iq *, struct mbuf *); static int get_sge_context(struct adapter *, struct t4_sge_context *); static int load_fw(struct adapter *, struct t4_data *); +static int load_cfg(struct adapter *, struct t4_data *); static int read_card_mem(struct adapter *, int, struct t4_mem_range *); static int read_i2c(struct adapter *, struct t4_i2c_data *); #ifdef TCP_OFFLOAD @@ -8620,6 +8621,38 @@ done: return (rc); } +static int +load_cfg(struct adapter *sc, struct t4_data *cfg) +{ + int rc; + uint8_t *cfg_data = NULL; + + rc = begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4ldcf"); + if (rc) + return (rc); + + if (cfg->len == 0) { + /* clear */ + rc = -t4_load_cfg(sc, NULL, 0); + goto done; + } + + cfg_data = malloc(cfg->len, M_CXGBE, M_WAITOK); + if (cfg_data == NULL) { + rc = ENOMEM; + goto done; + } + + rc = copyin(cfg->data, cfg_data, cfg->len); + if (rc == 0) + rc = -t4_load_cfg(sc, cfg_data, cfg->len); + + free(cfg_data, M_CXGBE); +done: + end_synchronized_op(sc, 0); + return (rc); +} + #define MAX_READ_BUF_SIZE (128 * 1024) static int read_card_mem(struct adapter *sc, int win, struct t4_mem_range *mr) @@ -9177,6 +9210,9 @@ t4_ioctl(struct cdev *dev, unsigned long case CHELSIO_T4_SET_TRACER: rc = t4_set_tracer(sc, (struct t4_tracer *)data); break; + case CHELSIO_T4_LOAD_CFG: + rc = load_cfg(sc, (struct t4_data *)data); + break; default: rc = ENOTTY; } From owner-svn-src-all@freebsd.org Fri Oct 7 19:12:17 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0481DC05086; Fri, 7 Oct 2016 19:12:17 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C56CA7CB; Fri, 7 Oct 2016 19:12:16 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u97JCFRZ074440; Fri, 7 Oct 2016 19:12:15 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u97JCFQH074439; Fri, 7 Oct 2016 19:12:15 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201610071912.u97JCFQH074439@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 7 Oct 2016 19:12:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306822 - head/usr.sbin/makefs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 19:12:17 -0000 Author: emaste Date: Fri Oct 7 19:12:15 2016 New Revision: 306822 URL: https://svnweb.freebsd.org/changeset/base/306822 Log: makefs: diff reduction with NetBSD Obtained from: NetBSD usr.sbin/makefs/cd9660.c 1.33 Modified: head/usr.sbin/makefs/cd9660.c Modified: head/usr.sbin/makefs/cd9660.c ============================================================================== --- head/usr.sbin/makefs/cd9660.c Fri Oct 7 19:02:39 2016 (r306821) +++ head/usr.sbin/makefs/cd9660.c Fri Oct 7 19:12:15 2016 (r306822) @@ -1622,6 +1622,7 @@ cd9660_level1_convert_filename(const cha if (diskStructure.archimedes_enabled && *oldname == ',' && strlen(oldname) == 4) break; + /* Enforce 12.3 / 8 */ if (namelen == 8 && !found_ext) break; @@ -1629,7 +1630,7 @@ cd9660_level1_convert_filename(const cha if (islower((unsigned char)*oldname)) *newname++ = toupper((unsigned char)*oldname); else if (isupper((unsigned char)*oldname) - || isdigit((unsigned char)*oldname)) + || isdigit((unsigned char)*oldname)) *newname++ = *oldname; else *newname++ = '_'; @@ -1639,7 +1640,7 @@ cd9660_level1_convert_filename(const cha else namelen++; } - oldname ++; + oldname++; } if (is_file) { if (!found_ext && !diskStructure.omit_trailing_period) From owner-svn-src-all@freebsd.org Fri Oct 7 19:13:30 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6818C05185; Fri, 7 Oct 2016 19:13:30 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83828A40; Fri, 7 Oct 2016 19:13:30 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u97JDTan074518; Fri, 7 Oct 2016 19:13:29 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u97JDTg5074516; Fri, 7 Oct 2016 19:13:29 GMT (envelope-from np@FreeBSD.org) Message-Id: <201610071913.u97JDTg5074516@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 7 Oct 2016 19:13:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306823 - head/tools/tools/cxgbetool X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 19:13:30 -0000 Author: np Date: Fri Oct 7 19:13:29 2016 New Revision: 306823 URL: https://svnweb.freebsd.org/changeset/base/306823 Log: cxgbetool: Add a loadcfg subcommand to allow a user to upload a firmware configuration file to the card. Modified: head/tools/tools/cxgbetool/cxgbetool.8 head/tools/tools/cxgbetool/cxgbetool.c Modified: head/tools/tools/cxgbetool/cxgbetool.8 ============================================================================== --- head/tools/tools/cxgbetool/cxgbetool.8 Fri Oct 7 19:12:15 2016 (r306822) +++ head/tools/tools/cxgbetool/cxgbetool.8 Fri Oct 7 19:13:29 2016 (r306823) @@ -56,6 +56,10 @@ .It .Nm Ar nexus Cm i2c Ar port_id devaddr addr Op Ar len .It +.Nm Ar nexus Cm loadcfg Ar fw-config.txt +.It +.Nm Ar nexus Cm loadcfg clear +.It .Nm Ar nexus Cm loadfw Ar fw-image.bin .It .Nm Ar nexus Cm memdump Ar addr len @@ -353,6 +357,15 @@ Delete filter that is at the given index .It Cm filter Cm list List all filters programmed into the hardware. .It Cm i2c Ar port_id devaddr addr Op Ar len +.It Cm loadcfg Ar fw-config.txt +Install the firmware configuration file contained in +.Ar fw-config.txt +to the card. +Set hw.cxgbe.config_file="flash" in loader.conf to get +.Xr cxgbe 4 +to use the on-flash configuration. +.It Cm loadcfg Cm clear +Erase configuration file from the card. .It Cm loadfw Ar fw-image.bin Install the firmware contained in .Ar fw-image.bin Modified: head/tools/tools/cxgbetool/cxgbetool.c ============================================================================== --- head/tools/tools/cxgbetool/cxgbetool.c Fri Oct 7 19:12:15 2016 (r306822) +++ head/tools/tools/cxgbetool/cxgbetool.c Fri Oct 7 19:13:29 2016 (r306823) @@ -95,6 +95,8 @@ usage(FILE *fp) "\tfilter list list all filters\n" "\tfilter mode [] ... get/set global filter mode\n" "\ti2c [] read from i2c device\n" + "\tloadcfg install configuration file\n" + "\tloadcfg clear remove configuration file\n" "\tloadfw install firmware\n" "\tmemdump dump a memory range\n" "\tmodinfo [raw] optics/cable information\n" @@ -1835,6 +1837,49 @@ loadfw(int argc, const char *argv[]) } static int +loadcfg(int argc, const char *argv[]) +{ + int rc, fd; + struct t4_data data = {0}; + const char *fname = argv[0]; + struct stat st = {0}; + + if (argc != 1) { + warnx("loadcfg: incorrect number of arguments."); + return (EINVAL); + } + + if (strcmp(fname, "clear") == 0) + return (doit(CHELSIO_T4_LOAD_CFG, &data)); + + fd = open(fname, O_RDONLY); + if (fd < 0) { + warn("open(%s)", fname); + return (errno); + } + + if (fstat(fd, &st) < 0) { + warn("fstat"); + close(fd); + return (errno); + } + + data.len = st.st_size; + data.len &= ~3; /* Clip off to make it a multiple of 4 */ + data.data = mmap(0, data.len, PROT_READ, MAP_PRIVATE, fd, 0); + if (data.data == MAP_FAILED) { + warn("mmap"); + close(fd); + return (errno); + } + + rc = doit(CHELSIO_T4_LOAD_CFG, &data); + munmap(data.data, data.len); + close(fd); + return (rc); +} + +static int read_mem(uint32_t addr, uint32_t len, void (*output)(uint32_t *, uint32_t)) { int rc; @@ -2732,6 +2777,8 @@ run_cmd(int argc, const char *argv[]) rc = sched_class(argc, argv); else if (!strcmp(cmd, "sched-queue")) rc = sched_queue(argc, argv); + else if (!strcmp(cmd, "loadcfg")) + rc = loadcfg(argc, argv); else { rc = EINVAL; warnx("invalid command \"%s\"", cmd); From owner-svn-src-all@freebsd.org Fri Oct 7 19:28:46 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3541C05425; Fri, 7 Oct 2016 19:28:46 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A48C6FE5; Fri, 7 Oct 2016 19:28:46 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u97JSjis078656; Fri, 7 Oct 2016 19:28:45 GMT (envelope-from julian@FreeBSD.org) Received: (from julian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u97JSjb9078653; Fri, 7 Oct 2016 19:28:45 GMT (envelope-from julian@FreeBSD.org) Message-Id: <201610071928.u97JSjb9078653@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: julian set sender to julian@FreeBSD.org using -f From: Julian Elischer Date: Fri, 7 Oct 2016 19:28:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306824 - stable/10/sys/dev/hwpmc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 19:28:47 -0000 Author: julian Date: Fri Oct 7 19:28:45 2016 New Revision: 306824 URL: https://svnweb.freebsd.org/changeset/base/306824 Log: MFH: r259647 o Remove assertions on ipa_version as sometimes the version detection using cpuid can be quirky (this is the case of VMWare without the vPMC support) but fail to probe hwpmc. o Apply the fix for XEON family of processors as established by 315338-020 document (bug AJ85). Sponsored by: EMC / Isilon storage division Reviewed by: fabient MFC courtesy of panzura. Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c stable/10/sys/dev/hwpmc/hwpmc_core.h stable/10/sys/dev/hwpmc/hwpmc_intel.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_core.c Fri Oct 7 19:13:29 2016 (r306823) +++ stable/10/sys/dev/hwpmc/hwpmc_core.c Fri Oct 7 19:28:45 2016 (r306824) @@ -2723,35 +2723,33 @@ core2_intr(int cpu, struct trapframe *tf } int -pmc_core_initialize(struct pmc_mdep *md, int maxcpu) +pmc_core_initialize(struct pmc_mdep *md, int maxcpu, int version_override) { int cpuid[CORE_CPUID_REQUEST_SIZE]; int ipa_version, flags, nflags; do_cpuid(CORE_CPUID_REQUEST, cpuid); - ipa_version = cpuid[CORE_CPUID_EAX] & 0xFF; + ipa_version = (version_override > 0) ? version_override : + cpuid[CORE_CPUID_EAX] & 0xFF; + core_cputype = md->pmd_cputype; PMCDBG3(MDP,INI,1,"core-init cputype=%d ncpu=%d ipa-version=%d", - md->pmd_cputype, maxcpu, ipa_version); + core_cputype, maxcpu, ipa_version); - if (ipa_version < 1 || ipa_version > 3) { + if (ipa_version < 1 || ipa_version > 3 || + (core_cputype != PMC_CPU_INTEL_CORE && ipa_version == 1)) { /* Unknown PMC architecture. */ printf("hwpc_core: unknown PMC architecture: %d\n", ipa_version); return (EPROGMISMATCH); } - core_cputype = md->pmd_cputype; - core_pmcmask = 0; /* * Initialize programmable counters. */ - KASSERT(ipa_version >= 1, - ("[core,%d] ipa_version %d too small", __LINE__, ipa_version)); - core_iap_npmc = (cpuid[CORE_CPUID_EAX] >> 8) & 0xFF; core_iap_width = (cpuid[CORE_CPUID_EAX] >> 16) & 0xFF; @@ -2766,10 +2764,6 @@ pmc_core_initialize(struct pmc_mdep *md, * Initialize fixed function counters, if present. */ if (core_cputype != PMC_CPU_INTEL_CORE) { - KASSERT(ipa_version >= 2, - ("[core,%d] ipa_version %d too small", __LINE__, - ipa_version)); - core_iaf_ri = core_iap_npmc; core_iaf_npmc = cpuid[CORE_CPUID_EDX] & 0x1F; core_iaf_width = (cpuid[CORE_CPUID_EDX] >> 5) & 0xFF; Modified: stable/10/sys/dev/hwpmc/hwpmc_core.h ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_core.h Fri Oct 7 19:13:29 2016 (r306823) +++ stable/10/sys/dev/hwpmc/hwpmc_core.h Fri Oct 7 19:28:45 2016 (r306824) @@ -175,7 +175,8 @@ struct pmc_md_iap_pmc { * Prototypes. */ -int pmc_core_initialize(struct pmc_mdep *_md, int _maxcpu); +int pmc_core_initialize(struct pmc_mdep *_md, int _maxcpu, + int _version_override); void pmc_core_finalize(struct pmc_mdep *_md); int pmc_iaf_initialize(struct pmc_mdep *_md, int _maxcpu, int _npmc, int _width); Modified: stable/10/sys/dev/hwpmc/hwpmc_intel.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_intel.c Fri Oct 7 19:13:29 2016 (r306823) +++ stable/10/sys/dev/hwpmc/hwpmc_intel.c Fri Oct 7 19:28:45 2016 (r306824) @@ -78,7 +78,7 @@ pmc_intel_initialize(void) { struct pmc_mdep *pmc_mdep; enum pmc_cputype cputype; - int error, model, nclasses, ncpus; + int error, model, nclasses, ncpus, stepping, verov; KASSERT(cpu_vendor_id == CPU_VENDOR_INTEL, ("[intel,%d] Initializing non-intel processor", __LINE__)); @@ -88,7 +88,9 @@ pmc_intel_initialize(void) cputype = -1; nclasses = 2; error = 0; + verov = 0; model = ((cpu_id & 0xF0000) >> 12) | ((cpu_id & 0xF0) >> 4); + stepping = cpu_id & 0xF; switch (cpu_id & 0xF00) { #if defined(__i386__) @@ -119,8 +121,14 @@ pmc_intel_initialize(void) cputype = PMC_CPU_INTEL_CORE; break; case 0xF: - cputype = PMC_CPU_INTEL_CORE2; - nclasses = 3; + /* Per Intel document 315338-020. */ + if (stepping == 0x7) { + cputype = PMC_CPU_INTEL_CORE; + verov = 1; + } else { + cputype = PMC_CPU_INTEL_CORE2; + nclasses = 3; + } break; case 0x17: cputype = PMC_CPU_INTEL_CORE2EXTREME; @@ -232,7 +240,7 @@ pmc_intel_initialize(void) case PMC_CPU_INTEL_IVYBRIDGE_XEON: case PMC_CPU_INTEL_HASWELL: case PMC_CPU_INTEL_HASWELL_XEON: - error = pmc_core_initialize(pmc_mdep, ncpus); + error = pmc_core_initialize(pmc_mdep, ncpus, verov); break; /* From owner-svn-src-all@freebsd.org Fri Oct 7 20:02:00 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67853C05C7F; Fri, 7 Oct 2016 20:02:00 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 37B7465F; Fri, 7 Oct 2016 20:02:00 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u97K1x8q093615; Fri, 7 Oct 2016 20:01:59 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u97K1xwF093614; Fri, 7 Oct 2016 20:01:59 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201610072001.u97K1xwF093614@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 7 Oct 2016 20:01:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306825 - head/usr.sbin/portsnap/portsnap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 20:02:00 -0000 Author: emaste Date: Fri Oct 7 20:01:59 2016 New Revision: 306825 URL: https://svnweb.freebsd.org/changeset/base/306825 Log: portsnap: use lam on the known good hash list This change is equivalent to the approach committed in r306417, but if sed has a bug it could be exploited by the untrusted tar file. Instead, generate the expected tar content and compare that with find's output. convert the expected hash list to the expected tar content filesystem layout, and compare that with find's output. Submitted by: cperciva (in review D8052) Reviewed by: oshogbo MFC after: 2 weeks Modified: head/usr.sbin/portsnap/portsnap/portsnap.sh Modified: head/usr.sbin/portsnap/portsnap/portsnap.sh ============================================================================== --- head/usr.sbin/portsnap/portsnap/portsnap.sh Fri Oct 7 19:28:45 2016 (r306824) +++ head/usr.sbin/portsnap/portsnap/portsnap.sh Fri Oct 7 20:01:59 2016 (r306825) @@ -691,8 +691,9 @@ fetch_snapshot() { fetch_index_sanity || return 1 # Verify the snapshot contents cut -f 2 -d '|' INDEX.new | fetch_snapshot_verify || return 1 - cut -f 2 -d '|' tINDEX.new INDEX.new | sort -u > files.expected - find snap -mindepth 1 | sed -E 's^snap/(.*)\.gz^\1^' | sort > files.snap + cut -f 2 -d '|' tINDEX.new INDEX.new | sort -u | + lam -s 'snap/' - -s '.gz' > files.expected + find snap -mindepth 1 | sort > files.snap if ! cmp -s files.expected files.snap; then echo "unexpected files in snapshot." return 1 From owner-svn-src-all@freebsd.org Fri Oct 7 20:17:12 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE8D1BED266; Fri, 7 Oct 2016 20:17:12 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [50.0.150.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8026DEBC; Fri, 7 Oct 2016 20:17:12 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from Marcels-MacBook-Pro.local.mail (cerberus.brkt.com [208.185.168.138]) (authenticated bits=0) by mail.xcllnt.net (8.15.2/8.15.2) with ESMTPSA id u97KH5w1098486 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Fri, 7 Oct 2016 13:17:06 -0700 (PDT) (envelope-from marcel@xcllnt.net) Date: Fri, 7 Oct 2016 13:16:59 -0700 From: Marcel Moolenaar To: Marcel Moolenaar , John Baldwin Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org, src-committers@freebsd.org Message-ID: In-Reply-To: <1910643.6VW4zuRaGg@ralph.baldwin.cx> References: <201610071542.u97FgLgU092008@repo.freebsd.org> <1910643.6VW4zuRaGg@ralph.baldwin.cx> Subject: Re: svn commit: r306811 - in head: etc/mtree include sys/sys sys/sys/disk X-Mailer: Airmail (382) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="404AA341-7C1B-43FD-83D8-60C6BEACF337"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.xcllnt.net [50.0.150.214]); Fri, 07 Oct 2016 13:17:06 -0700 (PDT) X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 20:17:12 -0000 --404AA341-7C1B-43FD-83D8-60C6BEACF337 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On October 7, 2016 at 11:02:44 AM, John Baldwin (jhb=40freebsd.org) wrote= : On =46riday, October 07, 2016 03:42:21 PM Marcel Moolenaar wrote:=C2=A0 *snip* > Author: marcel=C2=A0 > Date: =46ri Oct 7 15:42:20 2016=C2=A0 > New Revision: 306811=C2=A0 > URL: https://svnweb.freebsd.org/changeset/base/306811=C2=A0 >=C2=A0 > Added:=C2=A0 > head/sys/sys/disk/=C2=A0 > head/sys/sys/disk/apm.h=C2=A0 > - copied, changed from r306810, head/sys/sys/apm.h=C2=A0 > head/sys/sys/disk/bsd.h=C2=A0 > - copied, changed from r306810, head/sys/sys/disklabel.h=C2=A0 > head/sys/sys/disk/gpt.h=C2=A0 > - copied, changed from r306810, head/sys/sys/gpt.h=C2=A0 > head/sys/sys/disk/mbr.h=C2=A0 > - copied, changed from r306810, head/sys/sys/diskmbr.h=C2=A0 > head/sys/sys/disk/pc98.h=C2=A0 > - copied, changed from r306810, head/sys/sys/diskpc98.h=C2=A0 > head/sys/sys/disk/vtoc.h=C2=A0 > - copied, changed from r306810, head/sys/sys/vtoc.h=C2=A0 > Replaced:=C2=A0 > head/sys/sys/apm.h (contents, props changed)=C2=A0 > head/sys/sys/disklabel.h (contents, props changed)=C2=A0 > head/sys/sys/diskmbr.h (contents, props changed)=C2=A0 > head/sys/sys/diskpc98.h (contents, props changed)=C2=A0 > head/sys/sys/gpt.h (contents, props changed)=C2=A0 > head/sys/sys/vtoc.h (contents, props changed)=C2=A0 Somehow this destroyed the history on these files. They showed up as=C2=A0= deleted and then added instead of modified. If you 'svn log' on them=C2=A0= now you only get this commit and none of the previous history. I've=C2=A0= no idea if there's a way to recover this=3F Had you originally done an=C2= =A0 'svn mv' in your checkout and then copied the files back over or some=C2=A0= such=3F=C2=A0 I did a move from sys/X.h to sys/disk/X.h. The history moved to sys/disk/= X.h. New files were put where the old files used to be. Should I have done a svn copy=3F --404AA341-7C1B-43FD-83D8-60C6BEACF337 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using AMPGpg -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJX+AK8AAoJEIda8t8f0tjjHKIQAMgyrVJC95HxY31i3tU9A/Mk Jd/AY2cu14wIvvvDGV293OoMXNDo08sTiasfIf+tiwpqnsM7aAqTKRe3y4DogixU 4bKFu0NFmDDUSM3jVEGs4Jq7VME9zl7VRtKFucGvXpOA8YBdueMmoDitShU1xMdE hzBWjs5HNSjOdMCYTuKn92in5BLjteO42zL4cABxWLF0UPbWFouj98JevKcpu34w 7O6qaPxq//l/V4CBhnBzBxTqHyUm+wyPKu9m29a79iffYver1gI18pXu0hGL6/oY nvjkn2jmUIeHIwa3pE+hFPT/axkW7iF/9NUMPqKM3zm703I1U9qq+G8f8fEmm1yU 3nA5SwBwpWpn5QXFBbpn2EvPmRjiZF70b7cbNN+u3RptVPcu2yiBI5EvDXVS5ng+ lqAG7+jZXftFJLvy7gqQ0nI6Os/asCVNYN+i4+STk1PS3m6Zk4ssKt1OSK0Jt6cJ BMapCF9CKvTyjMQTtdWkyJB055vL1ZM5A1Ytgu6lb9khrZca7ai4osG+IgN0QkXs 1kyi8uklv1sCiCC045bx/CeRo/SfA9JfFmxPIcmfinf9q2GiMozGIaWrlrAb9jx2 7N+FacRFk+12laWGvXdLQjGt6Q0L2W63alSoXkqqRMcPodXXIxInJS5ni7FLxHzo 0mu2K+wysYOFnR8scwWv -----END PGP SIGNATURE----- --404AA341-7C1B-43FD-83D8-60C6BEACF337-- From owner-svn-src-all@freebsd.org Fri Oct 7 21:02:31 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 462D3BEDD91; Fri, 7 Oct 2016 21:02:31 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 169F6C45; Fri, 7 Oct 2016 21:02:31 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u97L2UdW016252; Fri, 7 Oct 2016 21:02:30 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u97L2Uqq016251; Fri, 7 Oct 2016 21:02:30 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201610072102.u97L2Uqq016251@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 7 Oct 2016 21:02:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306826 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 21:02:31 -0000 Author: markj Date: Fri Oct 7 21:02:30 2016 New Revision: 306826 URL: https://svnweb.freebsd.org/changeset/base/306826 Log: Combine several checks in nd6_prefix_offlink() into one. MFC after: 1 week Modified: head/sys/netinet6/nd6_rtr.c Modified: head/sys/netinet6/nd6_rtr.c ============================================================================== --- head/sys/netinet6/nd6_rtr.c Fri Oct 7 20:01:59 2016 (r306825) +++ head/sys/netinet6/nd6_rtr.c Fri Oct 7 21:02:30 2016 (r306826) @@ -1825,17 +1825,12 @@ nd6_prefix_offlink(struct nd_prefix *pr) * interface. */ LIST_FOREACH(opr, &V_nd_prefix, ndpr_entry) { - if (opr == pr) - continue; - - if ((opr->ndpr_stateflags & NDPRF_ONLINK) != 0) - continue; - /* * KAME specific: detached prefixes should not be * on-link. */ - if ((opr->ndpr_stateflags & NDPRF_DETACHED) != 0) + if (opr == pr || (opr->ndpr_stateflags & + (NDPRF_ONLINK | NDPRF_DETACHED)) != 0) continue; if (opr->ndpr_plen == pr->ndpr_plen && From owner-svn-src-all@freebsd.org Fri Oct 7 21:03:13 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC0F0BEDE0C; Fri, 7 Oct 2016 21:03:13 +0000 (UTC) (envelope-from stevek@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B8F6CDD3; Fri, 7 Oct 2016 21:03:13 +0000 (UTC) (envelope-from stevek@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u97L3Chc016335; Fri, 7 Oct 2016 21:03:12 GMT (envelope-from stevek@FreeBSD.org) Received: (from stevek@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u97L3CdQ016334; Fri, 7 Oct 2016 21:03:12 GMT (envelope-from stevek@FreeBSD.org) Message-Id: <201610072103.u97L3CdQ016334@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: stevek set sender to stevek@FreeBSD.org using -f From: "Stephen J. Kiernan" Date: Fri, 7 Oct 2016 21:03:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306827 - head/usr.sbin/pmcstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 21:03:14 -0000 Author: stevek Date: Fri Oct 7 21:03:12 2016 New Revision: 306827 URL: https://svnweb.freebsd.org/changeset/base/306827 Log: Just remove freeing memory in pmcstat_cleanup, since we only clean up when we are exiting anyway. Add NULL checks for all malloc and strdup returns. Reviewed by: gnn Approved by: sjg (mentor) Obtained from: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D8002 Modified: head/usr.sbin/pmcstat/pmcstat.c Modified: head/usr.sbin/pmcstat/pmcstat.c ============================================================================== --- head/usr.sbin/pmcstat/pmcstat.c Fri Oct 7 21:02:30 2016 (r306826) +++ head/usr.sbin/pmcstat/pmcstat.c Fri Oct 7 21:03:12 2016 (r306827) @@ -133,9 +133,13 @@ pmcstat_clone_event_descriptor(struct pm ev_clone->ev_flags = ev->ev_flags; ev_clone->ev_mode = ev->ev_mode; ev_clone->ev_name = strdup(ev->ev_name); + if (ev_clone->ev_name == NULL) + errx(EX_SOFTWARE, "ERROR: Out of memory"); ev_clone->ev_pmcid = ev->ev_pmcid; ev_clone->ev_saved = ev->ev_saved; ev_clone->ev_spec = strdup(ev->ev_spec); + if (ev_clone->ev_spec == NULL) + errx(EX_SOFTWARE, "ERROR: Out of memory"); STAILQ_INSERT_TAIL(&args.pa_events, ev_clone, ev_next); } @@ -192,22 +196,20 @@ pmcstat_attach_pmcs(void) void pmcstat_cleanup(void) { - struct pmcstat_ev *ev, *tmp; + struct pmcstat_ev *ev; /* release allocated PMCs. */ - STAILQ_FOREACH_SAFE(ev, &args.pa_events, ev_next, tmp) - if (ev->ev_pmcid != PMC_ID_INVALID) { - if (pmc_stop(ev->ev_pmcid) < 0) - err(EX_OSERR, "ERROR: cannot stop pmc 0x%x \"%s\"", - ev->ev_pmcid, ev->ev_name); - if (pmc_release(ev->ev_pmcid) < 0) - err(EX_OSERR, "ERROR: cannot release pmc 0x%x \"%s\"", - ev->ev_pmcid, ev->ev_name); - free(ev->ev_name); - free(ev->ev_spec); - STAILQ_REMOVE(&args.pa_events, ev, pmcstat_ev, ev_next); - free(ev); - } + STAILQ_FOREACH(ev, &args.pa_events, ev_next) + if (ev->ev_pmcid != PMC_ID_INVALID) { + if (pmc_stop(ev->ev_pmcid) < 0) + err(EX_OSERR, + "ERROR: cannot stop pmc 0x%x \"%s\"", + ev->ev_pmcid, ev->ev_name); + if (pmc_release(ev->ev_pmcid) < 0) + err(EX_OSERR, + "ERROR: cannot release pmc 0x%x \"%s\"", + ev->ev_pmcid, ev->ev_name); + } /* de-configure the log file if present. */ if (args.pa_flags & (FLAG_HAS_PIPE | FLAG_HAS_OUTPUT_LOGFILE)) @@ -614,7 +616,9 @@ main(int argc, char **argv) len = 0; if (sysctlbyname("kern.bootfile", NULL, &len, NULL, 0) == -1) err(EX_OSERR, "ERROR: Cannot determine path of running kernel"); - args.pa_kernel = malloc(len + 1); + args.pa_kernel = malloc(len); + if (args.pa_kernel == NULL) + errx(EX_SOFTWARE, "ERROR: Out of memory."); if (sysctlbyname("kern.bootfile", args.pa_kernel, &len, NULL, 0) == -1) err(EX_OSERR, "ERROR: Cannot determine path of running kernel"); @@ -700,6 +704,8 @@ main(int argc, char **argv) case 'k': /* pathname to the kernel */ free(args.pa_kernel); args.pa_kernel = strdup(optarg); + if (args.pa_kernel == NULL) + errx(EX_SOFTWARE, "ERROR: Out of memory"); args.pa_required |= FLAG_DO_ANALYSIS; args.pa_flags |= FLAG_HAS_KERNELPATH; break; @@ -767,6 +773,8 @@ main(int argc, char **argv) args.pa_flags |= FLAG_HAS_SYSTEM_PMCS; ev->ev_spec = strdup(optarg); + if (ev->ev_spec == NULL) + errx(EX_SOFTWARE, "ERROR: Out of memory."); if (option == 'S' || option == 'P') ev->ev_count = current_sampling_count; @@ -796,6 +804,8 @@ main(int argc, char **argv) /* extract event name */ c = strcspn(optarg, ", \t"); ev->ev_name = malloc(c + 1); + if (ev->ev_name == NULL) + errx(EX_SOFTWARE, "ERROR: Out of memory."); (void) strncpy(ev->ev_name, optarg, c); *(ev->ev_name + c) = '\0'; @@ -1086,6 +1096,8 @@ main(int argc, char **argv) if (!S_ISDIR(sb.st_mode)) { tmp = args.pa_kernel; args.pa_kernel = strdup(dirname(args.pa_kernel)); + if (args.pa_kernel == NULL) + errx(EX_SOFTWARE, "ERROR: Out of memory"); free(tmp); (void) snprintf(buffer, sizeof(buffer), "%s%s", args.pa_fsroot, args.pa_kernel); @@ -1503,8 +1515,6 @@ main(int argc, char **argv) pmcstat_cleanup(); - free(args.pa_kernel); - /* check if the driver lost any samples or events */ if (check_driver_stats) { if (pmc_get_driver_stats(&ds_end) < 0) From owner-svn-src-all@freebsd.org Fri Oct 7 21:03:20 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7711EBEDE31; Fri, 7 Oct 2016 21:03:20 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2138AE94; Fri, 7 Oct 2016 21:03:20 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u97L3Jmn016388; Fri, 7 Oct 2016 21:03:19 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u97L3JrS016387; Fri, 7 Oct 2016 21:03:19 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201610072103.u97L3JrS016387@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 7 Oct 2016 21:03:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306828 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 21:03:20 -0000 Author: markj Date: Fri Oct 7 21:03:18 2016 New Revision: 306828 URL: https://svnweb.freebsd.org/changeset/base/306828 Log: Reduce the number of conditional statements in nd6_prefix_onlink(). MFC after: 1 week Modified: head/sys/netinet6/nd6_rtr.c Modified: head/sys/netinet6/nd6_rtr.c ============================================================================== --- head/sys/netinet6/nd6_rtr.c Fri Oct 7 21:03:12 2016 (r306827) +++ head/sys/netinet6/nd6_rtr.c Fri Oct 7 21:03:18 2016 (r306828) @@ -1734,11 +1734,11 @@ nd6_prefix_onlink(struct nd_prefix *pr) /* XXX: freebsd does not have ifa_ifwithaf */ IF_ADDR_RLOCK(ifp); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { - if (ifa->ifa_addr->sa_family == AF_INET6) + if (ifa->ifa_addr->sa_family == AF_INET6) { + ifa_ref(ifa); break; + } } - if (ifa != NULL) - ifa_ref(ifa); IF_ADDR_RUNLOCK(ifp); /* should we care about ia6_flags? */ } From owner-svn-src-all@freebsd.org Fri Oct 7 21:10:55 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15CE8BEDF22; Fri, 7 Oct 2016 21:10:55 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFE70250; Fri, 7 Oct 2016 21:10:54 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u97LAsJN017496; Fri, 7 Oct 2016 21:10:54 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u97LAr6G017490; Fri, 7 Oct 2016 21:10:53 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201610072110.u97LAr6G017490@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 7 Oct 2016 21:10:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306829 - in head/sys: netinet netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 21:10:55 -0000 Author: markj Date: Fri Oct 7 21:10:53 2016 New Revision: 306829 URL: https://svnweb.freebsd.org/changeset/base/306829 Log: Lock the ND prefix list and add refcounting for prefixes. This change extends the nd6 lock to protect the ND prefix list as well as the list of advertising routers associated with each prefix. To handle cases where the nd6 lock must be dropped while iterating over either the prefix or default router lists, a generation counter is used to track modifications to the lists. Additionally, a new mutex is used to serialize prefix on-link/off-link transitions. This mutex must be acquired before the nd6 lock and is held while updating the routing table in nd6_prefix_onlink() and nd6_prefix_offlink(). Reviewed by: ae, tuexen (SCTP bits) Tested by: Jason Wolfe , Larry Rosenman MFC after: 2 months Differential Revision: https://reviews.freebsd.org/D8125 Modified: head/sys/netinet/sctp_output.c head/sys/netinet6/in6.c head/sys/netinet6/in6_ifattach.c head/sys/netinet6/nd6.c head/sys/netinet6/nd6.h head/sys/netinet6/nd6_rtr.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Fri Oct 7 21:03:18 2016 (r306828) +++ head/sys/netinet/sctp_output.c Fri Oct 7 21:10:53 2016 (r306829) @@ -13747,6 +13747,7 @@ sctp_v6src_match_nexthop(struct sockaddr return (0); /* get prefix entry of address */ + ND6_RLOCK(); LIST_FOREACH(pfx, &MODULE_GLOBAL(nd_prefix), ndpr_entry) { if (pfx->ndpr_stateflags & NDPRF_DETACHED) continue; @@ -13756,6 +13757,7 @@ sctp_v6src_match_nexthop(struct sockaddr } /* no prefix entry in the prefix list */ if (pfx == NULL) { + ND6_RUNLOCK(); SCTPDBG(SCTP_DEBUG_OUTPUT2, "No prefix entry for "); SCTPDBG_ADDR(SCTP_DEBUG_OUTPUT2, (struct sockaddr *)src6); return (0); @@ -13777,9 +13779,11 @@ sctp_v6src_match_nexthop(struct sockaddr if (sctp_cmpaddr((struct sockaddr *)&gw6, ro->ro_rt->rt_gateway)) { SCTPDBG(SCTP_DEBUG_OUTPUT2, "pfxrouter is installed\n"); + ND6_RUNLOCK(); return (1); } } + ND6_RUNLOCK(); SCTPDBG(SCTP_DEBUG_OUTPUT2, "pfxrouter is not installed\n"); return (0); } Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Fri Oct 7 21:03:18 2016 (r306828) +++ head/sys/netinet6/in6.c Fri Oct 7 21:10:53 2016 (r306829) @@ -647,6 +647,7 @@ in6_control(struct socket *so, u_long cm } } } + nd6_prefix_rele(pr); /* * this might affect the status of autoconfigured addresses, @@ -694,8 +695,12 @@ aifaddr_out: */ pr = ia->ia6_ndpr; in6_purgeaddr(&ia->ia_ifa); - if (pr && pr->ndpr_addrcnt == 0) - prelist_remove(pr); + if (pr != NULL && pr->ndpr_addrcnt == 0) { + ND6_WLOCK(); + nd6_prefix_unlink(pr, NULL); + ND6_WUNLOCK(); + nd6_prefix_del(pr); + } EVENTHANDLER_INVOKE(ifaddr_event, ifp); break; } Modified: head/sys/netinet6/in6_ifattach.c ============================================================================== --- head/sys/netinet6/in6_ifattach.c Fri Oct 7 21:03:18 2016 (r306828) +++ head/sys/netinet6/in6_ifattach.c Fri Oct 7 21:10:53 2016 (r306829) @@ -453,6 +453,7 @@ in6_ifattach_linklocal(struct ifnet *ifp struct in6_ifaddr *ia; struct in6_aliasreq ifra; struct nd_prefixctl pr0; + struct nd_prefix *pr; int error; /* @@ -535,10 +536,11 @@ in6_ifattach_linklocal(struct ifnet *ifp * address, and then reconfigure another one, the prefix is still * valid with referring to the old link-local address. */ - if (nd6_prefix_lookup(&pr0) == NULL) { + if ((pr = nd6_prefix_lookup(&pr0)) == NULL) { if ((error = nd6_prelist_add(&pr0, NULL, NULL)) != 0) return (error); - } + } else + nd6_prefix_rele(pr); return 0; } @@ -778,15 +780,6 @@ _in6_ifdetach(struct ifnet *ifp, int pur return; /* - * Remove neighbor management table. - * Enabling the nd6_purge will panic on vmove for interfaces on VNET - * teardown as the IPv6 layer is cleaned up already and the locks - * are destroyed. - */ - if (purgeulp) - nd6_purge(ifp); - - /* * nuke any of IPv6 addresses we have * XXX: all addresses should be already removed */ @@ -804,12 +797,10 @@ _in6_ifdetach(struct ifnet *ifp, int pur in6_purgemaddrs(ifp); /* - * remove neighbor management table. we call it twice just to make - * sure we nuke everything. maybe we need just one call. - * XXX: since the first call did not release addresses, some prefixes - * might remain. We should call nd6_purge() again to release the - * prefixes after removing all addresses above. - * (Or can we just delay calling nd6_purge until at this point?) + * Remove neighbor management table. + * Enabling the nd6_purge will panic on vmove for interfaces on VNET + * teardown as the IPv6 layer is cleaned up already and the locks + * are destroyed. */ if (purgeulp) nd6_purge(ifp); Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Fri Oct 7 21:03:18 2016 (r306828) +++ head/sys/netinet6/nd6.c Fri Oct 7 21:10:53 2016 (r306829) @@ -38,8 +38,10 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +#include #include #include #include @@ -47,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -118,6 +119,8 @@ static eventhandler_tag lle_event_eh, if VNET_DEFINE(struct nd_drhead, nd_defrouter); VNET_DEFINE(struct nd_prhead, nd_prefix); VNET_DEFINE(struct rwlock, nd6_lock); +VNET_DEFINE(uint64_t, nd6_list_genid); +VNET_DEFINE(struct mtx, nd6_onlink_mtx); VNET_DEFINE(int, nd6_recalc_reachtm_interval) = ND6_RECALC_REACHTM_INTERVAL; #define V_nd6_recalc_reachtm_interval VNET(nd6_recalc_reachtm_interval) @@ -209,11 +212,10 @@ void nd6_init(void) { - rw_init(&V_nd6_lock, "nd6"); + mtx_init(&V_nd6_onlink_mtx, "nd6 onlink", NULL, MTX_DEF); + rw_init(&V_nd6_lock, "nd6 list"); LIST_INIT(&V_nd_prefix); - - /* initialization of the default router list */ TAILQ_INIT(&V_nd_defrouter); /* Start timers. */ @@ -245,6 +247,7 @@ nd6_destroy() EVENTHANDLER_DEREGISTER(iflladdr_event, iflladdr_event_eh); } rw_destroy(&V_nd6_lock); + mtx_destroy(&V_nd6_onlink_mtx); } #endif @@ -903,13 +906,15 @@ nd6_timer(void *arg) { CURVNET_SET((struct vnet *) arg); struct nd_drhead drq; + struct nd_prhead prl; struct nd_defrouter *dr, *ndr; struct nd_prefix *pr, *npr; struct in6_ifaddr *ia6, *nia6; + bool onlink_locked; TAILQ_INIT(&drq); + LIST_INIT(&prl); - /* expire default router list */ ND6_WLOCK(); TAILQ_FOREACH_SAFE(dr, &V_nd_defrouter, dr_entry, ndr) if (dr->expire && dr->expire < time_uptime) @@ -1016,23 +1021,51 @@ nd6_timer(void *arg) } } - /* expire prefix list */ + ND6_WLOCK(); + onlink_locked = false; +restart: LIST_FOREACH_SAFE(pr, &V_nd_prefix, ndpr_entry, npr) { /* - * check prefix lifetime. - * since pltime is just for autoconf, pltime processing for - * prefix is not necessary. + * Expire prefixes. Since the pltime is only used for + * autoconfigured addresses, pltime processing for prefixes is + * not necessary. + * + * Only unlink after all derived addresses have expired. This + * may not occur until two hours after the prefix has expired + * per RFC 4862. If the prefix expires before its derived + * addresses, mark it off-link. This will be done automatically + * after unlinking if no address references remain. */ - if (pr->ndpr_vltime != ND6_INFINITE_LIFETIME && - time_uptime - pr->ndpr_lastupdate > pr->ndpr_vltime) { + if (pr->ndpr_vltime == ND6_INFINITE_LIFETIME || + time_uptime - pr->ndpr_lastupdate <= pr->ndpr_vltime) + continue; - /* - * address expiration and prefix expiration are - * separate. NEVER perform in6_purgeaddr here. - */ - prelist_remove(pr); + if (pr->ndpr_addrcnt == 0) { + nd6_prefix_unlink(pr, &prl); + continue; + } + if ((pr->ndpr_stateflags & NDPRF_ONLINK) != 0) { + if (!onlink_locked) { + onlink_locked = ND6_ONLINK_TRYLOCK(); + if (!onlink_locked) { + ND6_WUNLOCK(); + ND6_ONLINK_LOCK(); + onlink_locked = true; + ND6_WLOCK(); + goto restart; + } + } + (void)nd6_prefix_offlink(pr); } } + ND6_WUNLOCK(); + if (onlink_locked) + ND6_ONLINK_UNLOCK(); + + while ((pr = LIST_FIRST(&prl)) != NULL) { + LIST_REMOVE(pr, ndpr_entry); + nd6_prefix_del(pr); + } callout_reset(&V_nd6_timer_ch, V_nd6_prune * hz, nd6_timer, curvnet); @@ -1118,10 +1151,12 @@ void nd6_purge(struct ifnet *ifp) { struct nd_drhead drq; + struct nd_prhead prl; struct nd_defrouter *dr, *ndr; struct nd_prefix *pr, *npr; TAILQ_INIT(&drq); + LIST_INIT(&prl); /* * Nuke default router list entries toward ifp. @@ -1136,33 +1171,31 @@ nd6_purge(struct ifnet *ifp) if (dr->ifp == ifp) defrouter_unlink(dr, &drq); } - TAILQ_FOREACH_SAFE(dr, &V_nd_defrouter, dr_entry, ndr) { if (!dr->installed) continue; if (dr->ifp == ifp) defrouter_unlink(dr, &drq); } + + /* + * Remove prefixes on ifp. We should have already removed addresses on + * this interface, so no addresses should be referencing these prefixes. + */ + LIST_FOREACH_SAFE(pr, &V_nd_prefix, ndpr_entry, npr) { + if (pr->ndpr_ifp == ifp) + nd6_prefix_unlink(pr, &prl); + } ND6_WUNLOCK(); + /* Delete the unlinked router and prefix objects. */ while ((dr = TAILQ_FIRST(&drq)) != NULL) { TAILQ_REMOVE(&drq, dr, dr_entry); defrouter_del(dr); } - - /* Nuke prefix list entries toward ifp */ - LIST_FOREACH_SAFE(pr, &V_nd_prefix, ndpr_entry, npr) { - if (pr->ndpr_ifp == ifp) { - /* - * Because if_detach() does *not* release prefixes - * while purging addresses the reference count will - * still be above zero. We therefore reset it to - * make sure that the prefix really gets purged. - */ - pr->ndpr_addrcnt = 0; - - prelist_remove(pr); - } + while ((pr = LIST_FIRST(&prl)) != NULL) { + LIST_REMOVE(pr, ndpr_entry); + nd6_prefix_del(pr); } /* cancel default outgoing interface setting */ @@ -1228,7 +1261,8 @@ nd6_is_new_addr_neighbor(const struct so struct rt_addrinfo info; struct sockaddr_in6 rt_key; const struct sockaddr *dst6; - int fibnum; + uint64_t genid; + int error, fibnum; /* * A link-local address is always a neighbor. @@ -1266,19 +1300,29 @@ nd6_is_new_addr_neighbor(const struct so * If the address matches one of our on-link prefixes, it should be a * neighbor. */ + ND6_RLOCK(); +restart: LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) { if (pr->ndpr_ifp != ifp) continue; - if (!(pr->ndpr_stateflags & NDPRF_ONLINK)) { - + if ((pr->ndpr_stateflags & NDPRF_ONLINK) == 0) { /* Always use the default FIB here. */ dst6 = (const struct sockaddr *)&pr->ndpr_prefix; + genid = V_nd6_list_genid; + ND6_RUNLOCK(); + /* Restore length field before retrying lookup */ rt_key.sin6_len = sizeof(rt_key); - if (rib_lookup_info(fibnum, dst6, 0, 0, &info) != 0) + error = rib_lookup_info(fibnum, dst6, 0, 0, &info); + + ND6_RLOCK(); + if (genid != V_nd6_list_genid) + goto restart; + if (error != 0) continue; + /* * This is the case where multiple interfaces * have the same prefix, but only one is installed @@ -1290,14 +1334,17 @@ nd6_is_new_addr_neighbor(const struct so * differ. */ if (!IN6_ARE_ADDR_EQUAL(&pr->ndpr_prefix.sin6_addr, - &rt_key.sin6_addr)) + &rt_key.sin6_addr)) continue; } if (IN6_ARE_MASKED_ADDR_EQUAL(&pr->ndpr_prefix.sin6_addr, - &addr->sin6_addr, &pr->ndpr_mask)) + &addr->sin6_addr, &pr->ndpr_mask)) { + ND6_RUNLOCK(); return (1); + } } + ND6_RUNLOCK(); /* * If the address is assigned on the node of the other side of @@ -1728,15 +1775,22 @@ nd6_ioctl(u_long cmd, caddr_t data, stru case SIOCSPFXFLUSH_IN6: { /* flush all the prefix advertised by routers */ + struct in6_ifaddr *ia, *ia_next; struct nd_prefix *pr, *next; + struct nd_prhead prl; - LIST_FOREACH_SAFE(pr, &V_nd_prefix, ndpr_entry, next) { - struct in6_ifaddr *ia, *ia_next; + LIST_INIT(&prl); + ND6_WLOCK(); + LIST_FOREACH_SAFE(pr, &V_nd_prefix, ndpr_entry, next) { if (IN6_IS_ADDR_LINKLOCAL(&pr->ndpr_prefix.sin6_addr)) continue; /* XXX */ + nd6_prefix_unlink(pr, &prl); + } + ND6_WUNLOCK(); - /* do we really have to remove addresses as well? */ + while ((pr = LIST_FIRST(&prl)) != NULL) { + LIST_REMOVE(pr, ndpr_entry); /* XXXRW: in6_ifaddrhead locking. */ TAILQ_FOREACH_SAFE(ia, &V_in6_ifaddrhead, ia_link, ia_next) { @@ -1746,7 +1800,7 @@ nd6_ioctl(u_long cmd, caddr_t data, stru if (ia->ia6_ndpr == pr) in6_purgeaddr(&ia->ia_ifa); } - prelist_remove(pr); + nd6_prefix_del(pr); } break; } @@ -2690,9 +2744,10 @@ nd6_sysctl_prlist(SYSCTL_HANDLER_ARGS) ip6_sprintf(ip6buf, &pfr->router->rtaddr)); error = SYSCTL_OUT(req, &s6, sizeof(s6)); if (error != 0) - break; + goto out; } } +out: ND6_RUNLOCK(); return (error); } Modified: head/sys/netinet6/nd6.h ============================================================================== --- head/sys/netinet6/nd6.h Fri Oct 7 21:03:18 2016 (r306828) +++ head/sys/netinet6/nd6.h Fri Oct 7 21:10:53 2016 (r306829) @@ -256,7 +256,7 @@ struct nd_prefixctl { struct prf_ra ndpr_flags; }; - +LIST_HEAD(nd_prhead, nd_prefix); struct nd_prefix { struct ifnet *ndpr_ifp; LIST_ENTRY(nd_prefix) ndpr_entry; @@ -276,6 +276,7 @@ struct nd_prefix { LIST_HEAD(pr_rtrhead, nd_pfxrouter) ndpr_advrtrs; u_char ndpr_plen; int ndpr_addrcnt; /* count of derived addresses */ + volatile u_int ndpr_refcnt; }; #define ndpr_raf ndpr_flags @@ -314,8 +315,6 @@ struct nd_pfxrouter { struct nd_defrouter *router; }; -LIST_HEAD(nd_prhead, nd_prefix); - #ifdef MALLOC_DECLARE MALLOC_DECLARE(M_IP6NDP); #endif @@ -346,17 +345,30 @@ VNET_DECLARE(int, nd6_onlink_ns_rfc4861) /* Lock for the prefix and default router lists. */ VNET_DECLARE(struct rwlock, nd6_lock); +VNET_DECLARE(uint64_t, nd6_list_genid); #define V_nd6_lock VNET(nd6_lock) +#define V_nd6_list_genid VNET(nd6_list_genid) #define ND6_RLOCK() rw_rlock(&V_nd6_lock) #define ND6_RUNLOCK() rw_runlock(&V_nd6_lock) #define ND6_WLOCK() rw_wlock(&V_nd6_lock) #define ND6_WUNLOCK() rw_wunlock(&V_nd6_lock) +#define ND6_TRY_UPGRADE() rw_try_upgrade(&V_nd6_lock) #define ND6_WLOCK_ASSERT() rw_assert(&V_nd6_lock, RA_WLOCKED) #define ND6_RLOCK_ASSERT() rw_assert(&V_nd6_lock, RA_RLOCKED) #define ND6_LOCK_ASSERT() rw_assert(&V_nd6_lock, RA_LOCKED) #define ND6_UNLOCK_ASSERT() rw_assert(&V_nd6_lock, RA_UNLOCKED) +/* Mutex for prefix onlink/offlink transitions. */ +VNET_DECLARE(struct mtx, nd6_onlink_mtx); +#define V_nd6_onlink_mtx VNET(nd6_onlink_mtx) + +#define ND6_ONLINK_LOCK() mtx_lock(&V_nd6_onlink_mtx) +#define ND6_ONLINK_TRYLOCK() mtx_trylock(&V_nd6_onlink_mtx) +#define ND6_ONLINK_UNLOCK() mtx_unlock(&V_nd6_onlink_mtx) +#define ND6_ONLINK_LOCK_ASSERT() mtx_assert(&V_nd6_onlink_mtx, MA_OWNED) +#define ND6_ONLINK_UNLOCK_ASSERT() mtx_assert(&V_nd6_onlink_mtx, MA_NOTOWNED) + #define nd6log(x) do { if (V_nd6_debug) log x; } while (/*CONSTCOND*/ 0) /* nd6_rtr.c */ @@ -463,9 +475,14 @@ void defrouter_rele(struct nd_defrouter bool defrouter_remove(struct in6_addr *, struct ifnet *); void defrouter_unlink(struct nd_defrouter *, struct nd_drhead *); void defrouter_del(struct nd_defrouter *); -void prelist_remove(struct nd_prefix *); int nd6_prelist_add(struct nd_prefixctl *, struct nd_defrouter *, - struct nd_prefix **); + struct nd_prefix **); +void nd6_prefix_unlink(struct nd_prefix *, struct nd_prhead *); +void nd6_prefix_del(struct nd_prefix *); +void nd6_prefix_ref(struct nd_prefix *); +void nd6_prefix_rele(struct nd_prefix *); +int nd6_prefix_onlink(struct nd_prefix *); +int nd6_prefix_offlink(struct nd_prefix *); void pfxlist_onlink_check(void); struct nd_defrouter *defrouter_lookup(struct in6_addr *, struct ifnet *); struct nd_defrouter *defrouter_lookup_locked(struct in6_addr *, struct ifnet *); Modified: head/sys/netinet6/nd6_rtr.c ============================================================================== --- head/sys/netinet6/nd6_rtr.c Fri Oct 7 21:03:18 2016 (r306828) +++ head/sys/netinet6/nd6_rtr.c Fri Oct 7 21:10:53 2016 (r306829) @@ -87,9 +87,6 @@ static int in6_init_prefix_ltimes(struct static void in6_init_address_ltimes(struct nd_prefix *, struct in6_addrlifetime *); -static int nd6_prefix_onlink(struct nd_prefix *); -static int nd6_prefix_offlink(struct nd_prefix *); - static int rt6_deleteroute(const struct rtentry *, void *); VNET_DECLARE(int, nd6_recalc_reachtm_interval); @@ -661,6 +658,7 @@ defrouter_unlink(struct nd_defrouter *dr ND6_WLOCK_ASSERT(); TAILQ_REMOVE(&V_nd_defrouter, dr, dr_entry); + V_nd6_list_genid++; if (drq != NULL) TAILQ_INSERT_TAIL(drq, dr, dr_entry); } @@ -670,6 +668,7 @@ defrouter_del(struct nd_defrouter *dr) { struct nd_defrouter *deldr = NULL; struct nd_prefix *pr; + struct nd_pfxrouter *pfxrtr; ND6_UNLOCK_ASSERT(); @@ -688,11 +687,13 @@ defrouter_del(struct nd_defrouter *dr) /* * Also delete all the pointers to the router in each prefix lists. */ + ND6_WLOCK(); LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) { - struct nd_pfxrouter *pfxrtr; if ((pfxrtr = pfxrtr_lookup(pr, dr)) != NULL) pfxrtr_del(pfxrtr); } + ND6_WUNLOCK(); + pfxlist_onlink_check(); /* @@ -852,14 +853,18 @@ static struct nd_defrouter * defrtrlist_update(struct nd_defrouter *new) { struct nd_defrouter *dr, *n; + uint64_t genid; int oldpref; + bool writelocked; if (new->rtlifetime == 0) { defrouter_remove(&new->rtaddr, new->ifp); return (NULL); } - ND6_WLOCK(); + ND6_RLOCK(); + writelocked = false; +restart: dr = defrouter_lookup_locked(&new->rtaddr, new->ifp); if (dr != NULL) { oldpref = rtpref(dr); @@ -875,10 +880,32 @@ defrtrlist_update(struct nd_defrouter *n * router is still installed in the kernel. */ if (dr->installed && rtpref(new) == oldpref) { - ND6_WUNLOCK(); + if (writelocked) + ND6_WUNLOCK(); + else + ND6_RUNLOCK(); return (dr); } + } + /* + * The router needs to be reinserted into the default router + * list, so upgrade to a write lock. If that fails and the list + * has potentially changed while the lock was dropped, we'll + * redo the lookup with the write lock held. + */ + if (!writelocked) { + writelocked = true; + if (!ND6_TRY_UPGRADE()) { + genid = V_nd6_list_genid; + ND6_RUNLOCK(); + ND6_WLOCK(); + if (genid != V_nd6_list_genid) + goto restart; + } + } + + if (dr != NULL) { /* * The preferred router may have changed, so relocate this * router. @@ -912,6 +939,7 @@ defrtrlist_update(struct nd_defrouter *n TAILQ_INSERT_BEFORE(dr, n, dr_entry); else TAILQ_INSERT_TAIL(&V_nd_defrouter, n, dr_entry); + V_nd6_list_genid++; ND6_WUNLOCK(); defrouter_select(); @@ -924,11 +952,12 @@ pfxrtr_lookup(struct nd_prefix *pr, stru { struct nd_pfxrouter *search; + ND6_LOCK_ASSERT(); + LIST_FOREACH(search, &pr->ndpr_advrtrs, pfr_entry) { if (search->router == dr) break; } - return (search); } @@ -936,55 +965,110 @@ static void pfxrtr_add(struct nd_prefix *pr, struct nd_defrouter *dr) { struct nd_pfxrouter *new; + bool update; + + ND6_UNLOCK_ASSERT(); + + ND6_RLOCK(); + if (pfxrtr_lookup(pr, dr) != NULL) { + ND6_RUNLOCK(); + return; + } + ND6_RUNLOCK(); new = malloc(sizeof(*new), M_IP6NDP, M_NOWAIT | M_ZERO); if (new == NULL) return; - new->router = dr; defrouter_ref(dr); + new->router = dr; - LIST_INSERT_HEAD(&pr->ndpr_advrtrs, new, pfr_entry); + ND6_WLOCK(); + if (pfxrtr_lookup(pr, dr) == NULL) { + LIST_INSERT_HEAD(&pr->ndpr_advrtrs, new, pfr_entry); + update = true; + } else { + /* We lost a race to add the reference. */ + defrouter_rele(dr); + free(new, M_IP6NDP); + update = false; + } + ND6_WUNLOCK(); - pfxlist_onlink_check(); + if (update) + pfxlist_onlink_check(); } static void pfxrtr_del(struct nd_pfxrouter *pfr) { + ND6_WLOCK_ASSERT(); + LIST_REMOVE(pfr, pfr_entry); defrouter_rele(pfr->router); free(pfr, M_IP6NDP); } -struct nd_prefix * -nd6_prefix_lookup(struct nd_prefixctl *key) +static struct nd_prefix * +nd6_prefix_lookup_locked(struct nd_prefixctl *key) { struct nd_prefix *search; + ND6_LOCK_ASSERT(); + LIST_FOREACH(search, &V_nd_prefix, ndpr_entry) { if (key->ndpr_ifp == search->ndpr_ifp && key->ndpr_plen == search->ndpr_plen && in6_are_prefix_equal(&key->ndpr_prefix.sin6_addr, &search->ndpr_prefix.sin6_addr, key->ndpr_plen)) { + nd6_prefix_ref(search); break; } } + return (search); +} +struct nd_prefix * +nd6_prefix_lookup(struct nd_prefixctl *key) +{ + struct nd_prefix *search; + + ND6_RLOCK(); + search = nd6_prefix_lookup_locked(key); + ND6_RUNLOCK(); return (search); } +void +nd6_prefix_ref(struct nd_prefix *pr) +{ + + refcount_acquire(&pr->ndpr_refcnt); +} + +void +nd6_prefix_rele(struct nd_prefix *pr) +{ + + if (refcount_release(&pr->ndpr_refcnt)) { + KASSERT(LIST_EMPTY(&pr->ndpr_advrtrs), + ("prefix %p has advertising routers", pr)); + free(pr, M_IP6NDP); + } +} + int nd6_prelist_add(struct nd_prefixctl *pr, struct nd_defrouter *dr, struct nd_prefix **newp) { - struct nd_prefix *new = NULL; - int error = 0; + struct nd_prefix *new; char ip6buf[INET6_ADDRSTRLEN]; + int error; new = malloc(sizeof(*new), M_IP6NDP, M_NOWAIT | M_ZERO); if (new == NULL) return (ENOMEM); + refcount_init(&new->ndpr_refcnt, newp != NULL ? 2 : 1); new->ndpr_ifp = pr->ndpr_ifp; new->ndpr_prefix = pr->ndpr_prefix; new->ndpr_plen = pr->ndpr_plen; @@ -1003,20 +1087,22 @@ nd6_prelist_add(struct nd_prefixctl *pr, /* make prefix in the canonical form */ IN6_MASK_ADDR(&new->ndpr_prefix.sin6_addr, &new->ndpr_mask); - /* link ndpr_entry to nd_prefix list */ + ND6_WLOCK(); LIST_INSERT_HEAD(&V_nd_prefix, new, ndpr_entry); + V_nd6_list_genid++; + ND6_WUNLOCK(); /* ND_OPT_PI_FLAG_ONLINK processing */ if (new->ndpr_raf_onlink) { - int e; - - if ((e = nd6_prefix_onlink(new)) != 0) { + ND6_ONLINK_LOCK(); + if ((error = nd6_prefix_onlink(new)) != 0) { nd6log((LOG_ERR, "nd6_prelist_add: failed to make " "the prefix %s/%d on-link on %s (errno=%d)\n", ip6_sprintf(ip6buf, &pr->ndpr_prefix.sin6_addr), - pr->ndpr_plen, if_name(pr->ndpr_ifp), e)); + pr->ndpr_plen, if_name(pr->ndpr_ifp), error)); /* proceed anyway. XXX: is it correct? */ } + ND6_ONLINK_UNLOCK(); } if (dr != NULL) @@ -1026,51 +1112,69 @@ nd6_prelist_add(struct nd_prefixctl *pr, return (0); } +/* + * Remove a prefix from the prefix list and optionally stash it in a + * caller-provided list. + * + * The ND6 lock must be held. + */ void -prelist_remove(struct nd_prefix *pr) +nd6_prefix_unlink(struct nd_prefix *pr, struct nd_prhead *list) +{ + + KASSERT(pr->ndpr_addrcnt == 0, + ("prefix %p has referencing addresses", pr)); + ND6_WLOCK_ASSERT(); + + LIST_REMOVE(pr, ndpr_entry); + V_nd6_list_genid++; + if (list != NULL) + LIST_INSERT_HEAD(list, pr, ndpr_entry); +} + +/* + * Free an unlinked prefix, first marking it off-link if necessary. + */ +void +nd6_prefix_del(struct nd_prefix *pr) { struct nd_pfxrouter *pfr, *next; int e; char ip6buf[INET6_ADDRSTRLEN]; - /* make sure to invalidate the prefix until it is really freed. */ - pr->ndpr_vltime = 0; - pr->ndpr_pltime = 0; + KASSERT(pr->ndpr_addrcnt == 0, + ("prefix %p has referencing addresses", pr)); + ND6_UNLOCK_ASSERT(); /* * Though these flags are now meaningless, we'd rather keep the value * of pr->ndpr_raf_onlink and pr->ndpr_raf_auto not to confuse users * when executing "ndp -p". */ - - if ((pr->ndpr_stateflags & NDPRF_ONLINK) != 0 && - (e = nd6_prefix_offlink(pr)) != 0) { - nd6log((LOG_ERR, "prelist_remove: failed to make %s/%d offlink " - "on %s, errno=%d\n", - ip6_sprintf(ip6buf, &pr->ndpr_prefix.sin6_addr), - pr->ndpr_plen, if_name(pr->ndpr_ifp), e)); - /* what should we do? */ + if ((pr->ndpr_stateflags & NDPRF_ONLINK) != 0) { + ND6_ONLINK_LOCK(); + if ((e = nd6_prefix_offlink(pr)) != 0) { + nd6log((LOG_ERR, + "nd6_prefix_del: failed to make %s/%d offlink " + "on %s, errno=%d\n", + ip6_sprintf(ip6buf, &pr->ndpr_prefix.sin6_addr), + pr->ndpr_plen, if_name(pr->ndpr_ifp), e)); + /* what should we do? */ + } + ND6_ONLINK_UNLOCK(); } - if (pr->ndpr_addrcnt > 0) - return; /* notice here? */ - - /* unlink ndpr_entry from nd_prefix list */ - LIST_REMOVE(pr, ndpr_entry); - - /* free list of routers that advertised the prefix */ - LIST_FOREACH_SAFE(pfr, &pr->ndpr_advrtrs, pfr_entry, next) { + /* Release references to routers that have advertised this prefix. */ + ND6_WLOCK(); + LIST_FOREACH_SAFE(pfr, &pr->ndpr_advrtrs, pfr_entry, next) pfxrtr_del(pfr); - } - free(pr, M_IP6NDP); + ND6_WUNLOCK(); + + nd6_prefix_rele(pr); pfxlist_onlink_check(); } -/* - * dr - may be NULL - */ - static int prelist_update(struct nd_prefixctl *new, struct nd_defrouter *dr, struct mbuf *m, int mcast) @@ -1120,21 +1224,22 @@ prelist_update(struct nd_prefixctl *new, if (new->ndpr_raf_onlink && (pr->ndpr_stateflags & NDPRF_ONLINK) == 0) { - int e; - - if ((e = nd6_prefix_onlink(pr)) != 0) { + ND6_ONLINK_LOCK(); + if ((error = nd6_prefix_onlink(pr)) != 0) { nd6log((LOG_ERR, "prelist_update: failed to make " "the prefix %s/%d on-link on %s " "(errno=%d)\n", ip6_sprintf(ip6buf, - &pr->ndpr_prefix.sin6_addr), - pr->ndpr_plen, if_name(pr->ndpr_ifp), e)); + &pr->ndpr_prefix.sin6_addr), + pr->ndpr_plen, if_name(pr->ndpr_ifp), + error)); /* proceed anyway. XXX: is it correct? */ } + ND6_ONLINK_UNLOCK(); } - if (dr && pfxrtr_lookup(pr, dr) == NULL) + if (dr != NULL) pfxrtr_add(pr, dr); } else { if (new->ndpr_vltime == 0) @@ -1393,8 +1498,10 @@ prelist_update(struct nd_prefixctl *new, } } - end: - return error; +end: + if (pr != NULL) + nd6_prefix_rele(pr); + return (error); } /* @@ -1409,6 +1516,8 @@ find_pfxlist_reachable_router(struct nd_ struct llentry *ln; int canreach; + ND6_LOCK_ASSERT(); + LIST_FOREACH(pfxrtr, &pr->ndpr_advrtrs, pfr_entry) { IF_AFDATA_RLOCK(pfxrtr->router->ifp); ln = nd6_lookup(&pfxrtr->router->rtaddr, 0, pfxrtr->router->ifp); @@ -1444,6 +1553,11 @@ pfxlist_onlink_check(void) struct nd_defrouter *dr; struct nd_pfxrouter *pfxrtr = NULL; struct rm_priotracker in6_ifa_tracker; + uint64_t genid; + uint32_t flags; + + ND6_ONLINK_LOCK(); + ND6_RLOCK(); /* * Check if there is a prefix that has a reachable advertising @@ -1459,7 +1573,6 @@ pfxlist_onlink_check(void) * that does not advertise any prefixes. */ if (pr == NULL) { - ND6_RLOCK(); TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) { struct nd_prefix *pr0; @@ -1470,7 +1583,6 @@ pfxlist_onlink_check(void) if (pfxrtr != NULL) break; } - ND6_RUNLOCK(); } if (pr != NULL || (!TAILQ_EMPTY(&V_nd_defrouter) && pfxrtr == NULL)) { /* @@ -1515,6 +1627,7 @@ pfxlist_onlink_check(void) * interfaces. Such cases will be handled in nd6_prefix_onlink, * so we don't have to care about them. */ +restart: LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) { char ip6buf[INET6_ADDRSTRLEN]; int e; @@ -1524,21 +1637,20 @@ pfxlist_onlink_check(void) pr->ndpr_raf_auto == 0) continue; - if ((pr->ndpr_stateflags & NDPRF_DETACHED) != 0 && - (pr->ndpr_stateflags & NDPRF_ONLINK) != 0) { - if ((e = nd6_prefix_offlink(pr)) != 0) { + flags = pr->ndpr_stateflags & (NDPRF_DETACHED | NDPRF_ONLINK); + if (flags == 0 || flags == (NDPRF_DETACHED | NDPRF_ONLINK)) { + genid = V_nd6_list_genid; + ND6_RUNLOCK(); + if ((flags & NDPRF_ONLINK) != 0 && + (e = nd6_prefix_offlink(pr)) != 0) { nd6log((LOG_ERR, "pfxlist_onlink_check: failed to " "make %s/%d offlink, errno=%d\n", ip6_sprintf(ip6buf, &pr->ndpr_prefix.sin6_addr), pr->ndpr_plen, e)); - } - } - if ((pr->ndpr_stateflags & NDPRF_DETACHED) == 0 && - (pr->ndpr_stateflags & NDPRF_ONLINK) == 0 && - pr->ndpr_raf_onlink) { - if ((e = nd6_prefix_onlink(pr)) != 0) { + } else if ((flags & NDPRF_ONLINK) == 0 && + (e = nd6_prefix_onlink(pr)) != 0) { nd6log((LOG_ERR, "pfxlist_onlink_check: failed to " "make %s/%d onlink, errno=%d\n", @@ -1546,6 +1658,9 @@ pfxlist_onlink_check(void) &pr->ndpr_prefix.sin6_addr), pr->ndpr_plen, e)); } + ND6_RLOCK(); + if (genid != V_nd6_list_genid) + goto restart; } } @@ -1606,6 +1721,8 @@ pfxlist_onlink_check(void) } } IN6_IFADDR_RUNLOCK(&in6_ifa_tracker); + ND6_RUNLOCK(); + ND6_ONLINK_UNLOCK(); } static int @@ -1686,23 +1803,20 @@ nd6_prefix_onlink_rtrequest(struct nd_pr return (a_failure); } -static int +int nd6_prefix_onlink(struct nd_prefix *pr) { struct ifaddr *ifa; struct ifnet *ifp = pr->ndpr_ifp; struct nd_prefix *opr; - int error = 0; char ip6buf[INET6_ADDRSTRLEN]; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Oct 7 22:17:26 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3E03C05090; Fri, 7 Oct 2016 22:17:26 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A1C3F2ED; Fri, 7 Oct 2016 22:17:26 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u97MHPux042527; Fri, 7 Oct 2016 22:17:25 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u97MHPoZ042526; Fri, 7 Oct 2016 22:17:25 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201610072217.u97MHPoZ042526@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Fri, 7 Oct 2016 22:17:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306830 - head/usr.sbin/arp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 22:17:27 -0000 Author: vangyzen Date: Fri Oct 7 22:17:25 2016 New Revision: 306830 URL: https://svnweb.freebsd.org/changeset/base/306830 Log: Additional cleanup of the arp(4) man page after r306652 Submitted by: David A. Bright Requested by: wblock Reviewed by: wblock MFC after: 23 days Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D8183 Modified: head/usr.sbin/arp/arp.4 Modified: head/usr.sbin/arp/arp.4 ============================================================================== --- head/usr.sbin/arp/arp.4 Fri Oct 7 21:10:53 2016 (r306829) +++ head/usr.sbin/arp/arp.4 Fri Oct 7 22:17:25 2016 (r306830) @@ -28,7 +28,7 @@ .\" @(#)arp4.4 6.5 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd October 3, 2016 +.Dd October 7, 2016 .Dt ARP 4 .Os .Sh NAME @@ -121,67 +121,65 @@ of the MIB. .Bl -tag -width "log_arp_permanent_modify" .It Va allow_multicast -Should the kernel install ARP entries with multicast bit set in -the hardware address. -Installing such entries is RFC 1812 violation, but some prorietary -load balancing techniques require routers on network to do so. +Install ARP entries with the multicast bit set in the hardware address. +Installing such entries is an RFC 1812 violation, but some proprietary load +balancing techniques require routers to do so. Turned off by default. .It Va garp_rexmit_count -Should the kernel retransmit gratuitous ARP (GARP) packets when an IPv4 address -is added to an interface. +Retransmit gratuitous ARP (GARP) packets when an IPv4 address is added to an +interface. A GARP is always transmitted when an IPv4 address is added to an interface. -A non-zero value of this sysctl will cause the GARP packet to be retransmitted -the stated number of times. +A non-zero value causes the GARP packet to be retransmitted the stated number +of times. The interval between retransmissions is doubled each time, so the retransmission intervals are: {1, 2, 4, 8, 16, ...} (seconds). The default value of zero means only the initial GARP is sent; no additional GARP packets are retransmitted. The maximum value is sixteen. .Pp -Although a single GARP packet (the default behavior) is usually sufficient, in -some circumstances, such as when a shared address is passed between cluster -nodes, this single GARP may be dropped or lost. -This can lead to neighbors on the network link working with a stale ARP cache -and sending packets destined for that address to the node that previously owned -the address, which may not respond. +The default behavior of a single GARP packet is usually sufficient. +However, a single GARP might be dropped or lost in some circumstances. +This is particularly harmful when a shared address is passed between cluster +nodes. +Neighbors on the network link might then work with a stale ARP cache and send +packets destined for that address to the node that previously owned the +address, which might not respond. .It Va log_arp_movements -Should the kernel log movements of IP addresses from one hardware -address to an other. +Log movements of IP addresses from one hardware address to another. See .Sx DIAGNOSTICS below. Turned on by default. .It Va log_arp_permanent_modify -Should the kernel log attempts of remote host on network to modify a -permanent ARP entry. +Log attempts by a remote host to modify a permanent ARP entry. See .Sx DIAGNOSTICS below. Turned on by default. .It Va log_arp_wrong_iface -Should the kernel log attempts to insert an ARP entry on an interface -when the IP network the address belongs to is connected to an other -interface. +Log attempts to insert an ARP entry on an interface when the IP network to +which the address belongs is connected to another interface. See .Sx DIAGNOSTICS below. Turned on by default. .It Va max_log_per_second -Limit number of remotely triggered logging events to a configured value -per second. +Limit the number of remotely triggered logging events to a configured value per +second. Default is 1 log message per second. .It Va max_age How long an ARP entry is held in the cache until it needs to be refreshed. Default is 1200 seconds. .It Va maxhold -How many packets hold in the per-entry output queue while the entry +How many packets to hold in the per-entry output queue while the entry is being resolved. Default is one packet. .It Va maxtries -Number of retransmits before host is considered down and error is returned. +Number of retransmits before a host is considered down and an error is +returned. Default is 5 tries. .It Va proxyall -Enables ARP proxying for all hosts on net. +Enables ARP proxying. Turned off by default. .It Va wait Lifetime of an incomplete ARP entry. From owner-svn-src-all@freebsd.org Fri Oct 7 22:18:09 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D483C05121; Fri, 7 Oct 2016 22:18:09 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B60C7F9; Fri, 7 Oct 2016 22:18:08 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id BB0A710AF92; Fri, 7 Oct 2016 18:18:00 -0400 (EDT) From: John Baldwin To: Marcel Moolenaar Cc: Marcel Moolenaar , svn-src-all@freebsd.org, svn-src-head@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r306811 - in head: etc/mtree include sys/sys sys/sys/disk Date: Fri, 07 Oct 2016 15:06:35 -0700 Message-ID: <9665440.L9f0uMEDrK@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-PRERELEASE; KDE/4.14.10; amd64; ; ) In-Reply-To: References: <201610071542.u97FgLgU092008@repo.freebsd.org> <1910643.6VW4zuRaGg@ralph.baldwin.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Fri, 07 Oct 2016 18:18:00 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 22:18:09 -0000 On Friday, October 07, 2016 01:16:59 PM Marcel Moolenaar wrote: > On October 7, 2016 at 11:02:44 AM, John Baldwin (jhb@freebsd.org) wrote: > On Friday, October 07, 2016 03:42:21 PM Marcel Moolenaar wrote: > *snip* > > > Author: marcel > > Date: Fri Oct 7 15:42:20 2016 > > New Revision: 306811 > > URL: https://svnweb.freebsd.org/changeset/base/306811 > > > > Added: > > head/sys/sys/disk/ > > head/sys/sys/disk/apm.h > > - copied, changed from r306810, head/sys/sys/apm.h > > head/sys/sys/disk/bsd.h > > - copied, changed from r306810, head/sys/sys/disklabel.h > > head/sys/sys/disk/gpt.h > > - copied, changed from r306810, head/sys/sys/gpt.h > > head/sys/sys/disk/mbr.h > > - copied, changed from r306810, head/sys/sys/diskmbr.h > > head/sys/sys/disk/pc98.h > > - copied, changed from r306810, head/sys/sys/diskpc98.h > > head/sys/sys/disk/vtoc.h > > - copied, changed from r306810, head/sys/sys/vtoc.h > > Replaced: > > head/sys/sys/apm.h (contents, props changed) > > head/sys/sys/disklabel.h (contents, props changed) > > head/sys/sys/diskmbr.h (contents, props changed) > > head/sys/sys/diskpc98.h (contents, props changed) > > head/sys/sys/gpt.h (contents, props changed) > > head/sys/sys/vtoc.h (contents, props changed) > > Somehow this destroyed the history on these files. They showed up as > deleted and then added instead of modified. If you 'svn log' on them > now you only get this commit and none of the previous history. I've > no idea if there's a way to recover this? Had you originally done an > 'svn mv' in your checkout and then copied the files back over or some > such? > I did a move from sys/X.h to sys/disk/X.h. The history moved to sys/disk/X.h. New files were put where the old files used to be. > > Should I have done a svn copy? I think a copy would have been best. There is content in the sys/foo.h files still that has valid history (not all the lines were moved). Even if you had moved it all, I think a copy would still be best. I would only use a move if you are completely removing the original file. I'm not sure if there's a non-unfun way to recover from this. You might be able to copy the files from the previous revision, reapply your changes and then commit that. -- John Baldwin From owner-svn-src-all@freebsd.org Fri Oct 7 23:12:16 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B43FBC05CD2; Fri, 7 Oct 2016 23:12:16 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [50.0.150.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D705191; Fri, 7 Oct 2016 23:12:16 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from Marcels-MacBook-Pro.local.mail (cerberus.brkt.com [208.185.168.138]) (authenticated bits=0) by mail.xcllnt.net (8.15.2/8.15.2) with ESMTPSA id u97NCD3P099192 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Fri, 7 Oct 2016 16:12:14 -0700 (PDT) (envelope-from marcel@xcllnt.net) Date: Fri, 7 Oct 2016 16:12:08 -0700 From: Marcel Moolenaar To: John Baldwin Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org, src-committers@freebsd.org, Marcel Moolenaar Message-ID: In-Reply-To: <9665440.L9f0uMEDrK@ralph.baldwin.cx> References: <201610071542.u97FgLgU092008@repo.freebsd.org> <1910643.6VW4zuRaGg@ralph.baldwin.cx> <9665440.L9f0uMEDrK@ralph.baldwin.cx> Subject: Re: svn commit: r306811 - in head: etc/mtree include sys/sys sys/sys/disk X-Mailer: Airmail (382) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="D2471428-66F4-41CB-925F-76277623FB07"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.xcllnt.net [50.0.150.214]); Fri, 07 Oct 2016 16:12:15 -0700 (PDT) X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 23:12:16 -0000 --D2471428-66F4-41CB-925F-76277623FB07 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On October 7, 2016 at 3:18:10 PM, John Baldwin (jhb=40freebsd.org) wrote:= On =46riday, October 07, 2016 01:16:59 PM Marcel Moolenaar wrote:=C2=A0 > On October 7, 2016 at 11:02:44 AM, John Baldwin (jhb=40freebsd.org) wro= te:=C2=A0 > On =46riday, October 07, 2016 03:42:21 PM Marcel Moolenaar wrote:=C2=A0= > *snip*=C2=A0 >=C2=A0 > > Author: marcel=C2=A0 > > Date: =46ri Oct 7 15:42:20 2016=C2=A0 > > New Revision: 306811=C2=A0 > > URL: https://svnweb.freebsd.org/changeset/base/306811=C2=A0 > >=C2=A0 > > Added:=C2=A0 > > head/sys/sys/disk/=C2=A0 > > head/sys/sys/disk/apm.h=C2=A0 > > - copied, changed from r306810, head/sys/sys/apm.h=C2=A0 > > head/sys/sys/disk/bsd.h=C2=A0 > > - copied, changed from r306810, head/sys/sys/disklabel.h=C2=A0 > > head/sys/sys/disk/gpt.h=C2=A0 > > - copied, changed from r306810, head/sys/sys/gpt.h=C2=A0 > > head/sys/sys/disk/mbr.h=C2=A0 > > - copied, changed from r306810, head/sys/sys/diskmbr.h=C2=A0 > > head/sys/sys/disk/pc98.h=C2=A0 > > - copied, changed from r306810, head/sys/sys/diskpc98.h=C2=A0 > > head/sys/sys/disk/vtoc.h=C2=A0 > > - copied, changed from r306810, head/sys/sys/vtoc.h=C2=A0 > > Replaced:=C2=A0 > > head/sys/sys/apm.h (contents, props changed)=C2=A0 > > head/sys/sys/disklabel.h (contents, props changed)=C2=A0 > > head/sys/sys/diskmbr.h (contents, props changed)=C2=A0 > > head/sys/sys/diskpc98.h (contents, props changed)=C2=A0 > > head/sys/sys/gpt.h (contents, props changed)=C2=A0 > > head/sys/sys/vtoc.h (contents, props changed)=C2=A0 >=C2=A0 > Somehow this destroyed the history on these files. They showed up as=C2= =A0 > deleted and then added instead of modified. If you 'svn log' on them=C2= =A0 > now you only get this commit and none of the previous history. I've=C2=A0= > no idea if there's a way to recover this=3F Had you originally done an=C2= =A0 > 'svn mv' in your checkout and then copied the files back over or some=C2= =A0 > such=3F=C2=A0 > I did a move from sys/X.h to sys/disk/X.h. The history moved to sys/dis= k/X.h. New files were put where the old files used to be.=C2=A0 >=C2=A0 > Should I have done a svn copy=3F=C2=A0 I think a copy would have been best. There is content in the sys/foo.h fi= les=C2=A0 still that has valid history (not all the lines were moved). Even if you = had=C2=A0 moved it all, I think a copy would still be best. I would only use a move= =C2=A0 if you are completely removing the original file. I'm not sure if there's= a=C2=A0 non-unfun way to recover from this. You might be able to copy the files f= rom=C2=A0 the previous revision, reapply your changes and then commit that.=C2=A0 Ok. I=E2=80=99ll work on recovering the history of the original files. Maybe the repo masters can undo/delete the commit easily and I=E2=80=99ll= just recommit. Avoids polluting the history=E2=80=A6 --D2471428-66F4-41CB-925F-76277623FB07 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using AMPGpg -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJX+CvIAAoJEIda8t8f0tjjNbwP/2wN1UX305qgpLRT/X6eMU1k +lujMuXmywY5ExFFt38o80vQQ43WKquI9rYfTsvuQW97hLgQetbyg9FMEGmd+Yjy qpXHdyMTeDgy5QYsMz7mFiDKdAvXTp0NDJ0eBSAnwMVTgmoXn6rhQlNjN7lfhsEa p/qvJFcxfc8Pnp9VcjuK6pimZTM1fTbzR3FYUF2CBSprJBfeoKy/sHKFm9pRydcS a0SfN2c8tOg9jYRxhT3YQ/+gc1dFtuPpG/AtGSDLhmfNc//tS6H4YNYHMyTEDskd 16DYeZln5D3LBekszsqwDf6pVYS+hsJFuX9JsTBex5UVay6EnAS0lw/QgCVAt8Iu D93Kq7umpmdhQQEQ8CNvgWpOnAlNqjE0zdvmqvV2hxt5SqBFP6NKpMoTRKWvQs3b xGO6FCGMrUegngcYJt2UbNSy/JJq3dbUcwi1SwHDI2y+NDTMz1JwKfBwSPfkjYdx o0msfAjBN++6opiuGIX0vQTWZiFqhnOjbtxqxL2B9kQf3+d6LsYla2GT8qMKgDo3 gpSpxKVvVApcXkhcRMjUldJ+bKRJJ+VTrtC3g99fDjuhG1Kcj2ho3IVvNN9zikZV VTLPWNeODy4SW9uKeDDUoFbrYionWaG77TVgz16vY64y2q/zr0Nbd2Fxq6dvFTLO nICuiKMGs+aussrXlN7T -----END PGP SIGNATURE----- --D2471428-66F4-41CB-925F-76277623FB07-- From owner-svn-src-all@freebsd.org Fri Oct 7 23:18:30 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB710C05D78; Fri, 7 Oct 2016 23:18:30 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 9E350396; Fri, 7 Oct 2016 23:18:30 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from julian-mbp3.pixel8networks.com (50-196-156-133-static.hfc.comcastbusiness.net [50.196.156.133]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id u97NIRsa061817 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 7 Oct 2016 16:18:28 -0700 (PDT) (envelope-from julian@freebsd.org) Subject: Re: svn commit: r306811 - in head: etc/mtree include sys/sys sys/sys/disk To: Marcel Moolenaar , John Baldwin References: <201610071542.u97FgLgU092008@repo.freebsd.org> <1910643.6VW4zuRaGg@ralph.baldwin.cx> <9665440.L9f0uMEDrK@ralph.baldwin.cx> Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org, src-committers@freebsd.org, Marcel Moolenaar From: Julian Elischer Message-ID: Date: Fri, 7 Oct 2016 16:18:21 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 23:18:30 -0000 On 7/10/2016 4:12 PM, Marcel Moolenaar wrote: > On October 7, 2016 at 3:18:10 PM, John Baldwin (jhb@freebsd.org > ) wrote: >> On Friday, October 07, 2016 01:16:59 PM Marcel Moolenaar wrote: >> > On October 7, 2016 at 11:02:44 AM, John Baldwin (jhb@freebsd.org) >> wrote: >> > On Friday, October 07, 2016 03:42:21 PM Marcel Moolenaar wrote: >> > *snip* >> > >> > > Author: marcel >> > > Date: Fri Oct 7 15:42:20 2016 >> > > New Revision: 306811 >> > > URL: https://svnweb.freebsd.org/changeset/base/306811 >> > > >> > > Added: >> > > head/sys/sys/disk/ >> > > head/sys/sys/disk/apm.h >> > > - copied, changed from r306810, head/sys/sys/apm.h >> > > head/sys/sys/disk/bsd.h >> > > - copied, changed from r306810, head/sys/sys/disklabel.h >> > > head/sys/sys/disk/gpt.h >> > > - copied, changed from r306810, head/sys/sys/gpt.h >> > > head/sys/sys/disk/mbr.h >> > > - copied, changed from r306810, head/sys/sys/diskmbr.h >> > > head/sys/sys/disk/pc98.h >> > > - copied, changed from r306810, head/sys/sys/diskpc98.h >> > > head/sys/sys/disk/vtoc.h >> > > - copied, changed from r306810, head/sys/sys/vtoc.h >> > > Replaced: >> > > head/sys/sys/apm.h (contents, props changed) >> > > head/sys/sys/disklabel.h (contents, props changed) >> > > head/sys/sys/diskmbr.h (contents, props changed) >> > > head/sys/sys/diskpc98.h (contents, props changed) >> > > head/sys/sys/gpt.h (contents, props changed) >> > > head/sys/sys/vtoc.h (contents, props changed) >> > >> > Somehow this destroyed the history on these files. They showed up as >> > deleted and then added instead of modified. If you 'svn log' on them >> > now you only get this commit and none of the previous history. I've >> > no idea if there's a way to recover this? Had you originally done an >> > 'svn mv' in your checkout and then copied the files back over or some >> > such? >> > I did a move from sys/X.h to sys/disk/X.h. The history moved to >> sys/disk/X.h. New files were put where the old files used to be. >> > >> > Should I have done a svn copy? >> >> I think a copy would have been best. There is content in the >> sys/foo.h files >> still that has valid history (not all the lines were moved). Even >> if you had >> moved it all, I think a copy would still be best. I would only use >> a move >> if you are completely removing the original file. I'm not sure if >> there's a >> non-unfun way to recover from this. You might be able to copy the >> files from >> the previous revision, reapply your changes and then commit that. > > Ok. I’ll work on recovering the history of the original files. > > Maybe the repo masters can undo/delete the commit easily and I’ll > just recommit. Avoids polluting the history… > > I'll keep an eye out for my svn -> p4 mirror importer exploding in that area in the near future. this sort of thing makes it very ill, especially files going away and coming back. From owner-svn-src-all@freebsd.org Fri Oct 7 23:29:42 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB672C0517A; Fri, 7 Oct 2016 23:29:42 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [50.0.150.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7653ECC0; Fri, 7 Oct 2016 23:29:42 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from Marcels-MacBook-Pro.local.mail (cerberus.brkt.com [208.185.168.138]) (authenticated bits=0) by mail.xcllnt.net (8.15.2/8.15.2) with ESMTPSA id u97NTeTc099323 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Fri, 7 Oct 2016 16:29:41 -0700 (PDT) (envelope-from marcel@xcllnt.net) Date: Fri, 7 Oct 2016 16:29:34 -0700 From: Marcel Moolenaar To: Julian Elischer , John Baldwin Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org, src-committers@freebsd.org, Marcel Moolenaar Message-ID: In-Reply-To: References: <201610071542.u97FgLgU092008@repo.freebsd.org> <1910643.6VW4zuRaGg@ralph.baldwin.cx> <9665440.L9f0uMEDrK@ralph.baldwin.cx> Subject: Re: svn commit: r306811 - in head: etc/mtree include sys/sys sys/sys/disk X-Mailer: Airmail (382) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="47F75208-0DED-4F06-8C3A-3A138ECAFF0D"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.xcllnt.net [50.0.150.214]); Fri, 07 Oct 2016 16:29:41 -0700 (PDT) X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 23:29:42 -0000 --47F75208-0DED-4F06-8C3A-3A138ECAFF0D Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On October 7, 2016 at 4:18:31 PM, Julian Elischer (julian=40freebsd.org) = wrote: On 7/10/2016 4:12 PM, Marcel Moolenaar wrote: On October 7, 2016 at 3:18:10 PM, John Baldwin (jhb=40freebsd.org) wrote:= On =46riday, October 07, 2016 01:16:59 PM Marcel Moolenaar wrote:=C2=A0 > On October 7, 2016 at 11:02:44 AM, John Baldwin (jhb=40freebsd.org) wro= te:=C2=A0 > On =46riday, October 07, 2016 03:42:21 PM Marcel Moolenaar wrote:=C2=A0= > *snip*=C2=A0 >=C2=A0 > > Author: marcel=C2=A0 > > Date: =46ri Oct 7 15:42:20 2016=C2=A0 > > New Revision: 306811=C2=A0 > > URL:=C2=A0https://svnweb.freebsd.org/changeset/base/306811=C2=A0 > >=C2=A0 > > Added:=C2=A0 > > head/sys/sys/disk/=C2=A0 > > head/sys/sys/disk/apm.h=C2=A0 > > - copied, changed from r306810, head/sys/sys/apm.h=C2=A0 > > head/sys/sys/disk/bsd.h=C2=A0 > > - copied, changed from r306810, head/sys/sys/disklabel.h=C2=A0 > > head/sys/sys/disk/gpt.h=C2=A0 > > - copied, changed from r306810, head/sys/sys/gpt.h=C2=A0 > > head/sys/sys/disk/mbr.h=C2=A0 > > - copied, changed from r306810, head/sys/sys/diskmbr.h=C2=A0 > > head/sys/sys/disk/pc98.h=C2=A0 > > - copied, changed from r306810, head/sys/sys/diskpc98.h=C2=A0 > > head/sys/sys/disk/vtoc.h=C2=A0 > > - copied, changed from r306810, head/sys/sys/vtoc.h=C2=A0 > > Replaced:=C2=A0 > > head/sys/sys/apm.h (contents, props changed)=C2=A0 > > head/sys/sys/disklabel.h (contents, props changed)=C2=A0 > > head/sys/sys/diskmbr.h (contents, props changed)=C2=A0 > > head/sys/sys/diskpc98.h (contents, props changed)=C2=A0 > > head/sys/sys/gpt.h (contents, props changed)=C2=A0 > > head/sys/sys/vtoc.h (contents, props changed)=C2=A0 >=C2=A0 > Somehow this destroyed the history on these files. They showed up as=C2= =A0 > deleted and then added instead of modified. If you 'svn log' on them=C2= =A0 > now you only get this commit and none of the previous history. I've=C2=A0= > no idea if there's a way to recover this=3F Had you originally done an=C2= =A0 > 'svn mv' in your checkout and then copied the files back over or some=C2= =A0 > such=3F=C2=A0 > I did a move from sys/X.h to sys/disk/X.h. The history moved to sys/dis= k/X.h. New files were put where the old files used to be.=C2=A0 >=C2=A0 > Should I have done a svn copy=3F=C2=A0 I think a copy would have been best. There is content in the sys/foo.h fi= les=C2=A0 still that has valid history (not all the lines were moved). Even if you = had=C2=A0 moved it all, I think a copy would still be best. I would only use a move= =C2=A0 if you are completely removing the original file. I'm not sure if there's= a=C2=A0 non-unfun way to recover from this. You might be able to copy the files f= rom=C2=A0 the previous revision, reapply your changes and then commit that.=C2=A0 Ok. I=E2=80=99ll work on recovering the history of the original files. Maybe the repo masters can undo/delete the commit easily and I=E2=80=99ll= just recommit. Avoids polluting the history=E2=80=A6 I'll keep an eye out for my svn -> p4 mirror importer exploding in that a= rea in the near future. this sort of thing makes it very ill, especially files going away and com= ing back. I just asked svnadm=40 for advice. I=E2=80=99m sure they can suggest a wa= y that doesn=E2=80=99t blow things up downstream consumers. I=E2=80=99m f= ine with the manual labor if that=E2=80=99s preferred... --47F75208-0DED-4F06-8C3A-3A138ECAFF0D Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using AMPGpg -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJX+C/fAAoJEIda8t8f0tjjvw4QAL1tKPArbq63GrgmH6QFJMtN TEx/qteAhTDOB9gDl4qeUQm8wx0mMuPTbzpYBKVF6c1HSb84V0kveKuo+QsuYqN1 bzkLjWPr7FSwA6gGva/eA9oP1WCgoW7iSyMSTCwfBFBG0gOaXOacEG719P/KQ1TG kZecI7skMOpTCYWFhUJM+5BJV86LYllbjDI91HxxmBSi+P7wJ/WWAmVFxExMq8U3 CHs2QQ3i0uGcGJSjJaBJfcJ1txNJ2hSHs3Gj6/rbBwsV+AYRcsa22j7C7iMKcZPG oTZewBwA6fW1hCBOqM8YHVgzi2B59rWfsBrOd2GlwF9/SyL55Q8HHdQe4Kja6dez 0zu2hPZaI4Qwo+DPRintary8tNf8k31KTfIW2skpgb1D05XNR3UzNsCpj87dX7sr nJd6kOio8Z7q16glzqQoQKEUgyQLZotb0TBxu7r5iF0EdJOqZbN09NXeXJDYkF6X RhFkrVRITarXBoPC9609BD+wXk4bvCw6yvbMOL/p9q5Pahn+h7Kkvl5rJfZBGpvi sGzGyDHTlSVgRiYykPU4JNQqoDmqk6zGkn6F4PlqvODOEjvFOE5AncAEg8pi+ODo GoCfv9rXLxW95UdiI3nOLA55vGTzpChrYQUSgUpXsSO9fv8cngQM9cvsePxRKcc2 xafjgx5gYOu8TQbKtnJU -----END PGP SIGNATURE----- --47F75208-0DED-4F06-8C3A-3A138ECAFF0D-- From owner-svn-src-all@freebsd.org Sat Oct 8 00:01:08 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C505C05C7F; Sat, 8 Oct 2016 00:01:08 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DDEFFE1; Sat, 8 Oct 2016 00:01:08 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9801767081227; Sat, 8 Oct 2016 00:01:07 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u98017kx081226; Sat, 8 Oct 2016 00:01:07 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201610080001.u98017kx081226@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sat, 8 Oct 2016 00:01:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306834 - stable/11/sys/boot/geli X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 00:01:08 -0000 Author: allanjude Date: Sat Oct 8 00:01:07 2016 New Revision: 306834 URL: https://svnweb.freebsd.org/changeset/base/306834 Log: MFC: r306677 GELIBoot may attempt to read past the end of the disk PR: 213196 Relnotes: yes Sponsored by: ScaleEngine Inc. Modified: stable/11/sys/boot/geli/geliboot.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/boot/geli/geliboot.c ============================================================================== --- stable/11/sys/boot/geli/geliboot.c Fri Oct 7 23:52:30 2016 (r306833) +++ stable/11/sys/boot/geli/geliboot.c Sat Oct 8 00:01:07 2016 (r306834) @@ -77,17 +77,25 @@ geli_taste(int read_func(void *vdev, voi int error; off_t alignsector; - alignsector = (lastsector * DEV_BSIZE) & - ~(off_t)(DEV_GELIBOOT_BSIZE - 1); + alignsector = rounddown2(lastsector * DEV_BSIZE, DEV_GELIBOOT_BSIZE); + if (alignsector + DEV_GELIBOOT_BSIZE > ((lastsector + 1) * DEV_BSIZE)) { + /* Don't read past the end of the disk */ + alignsector = (lastsector * DEV_BSIZE) + DEV_BSIZE + - DEV_GELIBOOT_BSIZE; + } error = read_func(NULL, dskp, alignsector, &buf, DEV_GELIBOOT_BSIZE); if (error != 0) { return (error); } - /* Extract the last DEV_BSIZE bytes from the block. */ - error = eli_metadata_decode(buf + (DEV_GELIBOOT_BSIZE - DEV_BSIZE), - &md); + /* Extract the last 4k sector of the disk. */ + error = eli_metadata_decode(buf, &md); if (error != 0) { - return (error); + /* Try the last 512 byte sector instead. */ + error = eli_metadata_decode(buf + + (DEV_GELIBOOT_BSIZE - DEV_BSIZE), &md); + if (error != 0) { + return (error); + } } if (!(md.md_flags & G_ELI_FLAG_GELIBOOT)) { From owner-svn-src-all@freebsd.org Sat Oct 8 00:13:09 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2B36C05F84; Sat, 8 Oct 2016 00:13:09 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 834A3AB7; Sat, 8 Oct 2016 00:13:09 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from julian-mbp3.pixel8networks.com (50-196-156-133-static.hfc.comcastbusiness.net [50.196.156.133]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id u980D7pu062021 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 7 Oct 2016 17:13:08 -0700 (PDT) (envelope-from julian@freebsd.org) Subject: Re: svn commit: r306811 - in head: etc/mtree include sys/sys sys/sys/disk To: Marcel Moolenaar , John Baldwin References: <201610071542.u97FgLgU092008@repo.freebsd.org> <1910643.6VW4zuRaGg@ralph.baldwin.cx> <9665440.L9f0uMEDrK@ralph.baldwin.cx> Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org, src-committers@freebsd.org, Marcel Moolenaar From: Julian Elischer Message-ID: Date: Fri, 7 Oct 2016 17:13:01 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 00:13:09 -0000 On 7/10/2016 4:29 PM, Marcel Moolenaar wrote: > On October 7, 2016 at 4:18:31 PM, Julian Elischer > (julian@freebsd.org ) wrote: >> On 7/10/2016 4:12 PM, Marcel Moolenaar wrote: >>> On October 7, 2016 at 3:18:10 PM, John Baldwin (jhb@freebsd.org >>> ) wrote: >>>> On Friday, October 07, 2016 01:16:59 PM Marcel Moolenaar wrote: >>>> > On October 7, 2016 at 11:02:44 AM, John Baldwin >>>> (jhb@freebsd.org) wrote: >>>> > On Friday, October 07, 2016 03:42:21 PM Marcel Moolenaar wrote: >>>> > *snip* >>>> > >>>> > > Author: marcel >>>> > > Date: Fri Oct 7 15:42:20 2016 >>>> > > New Revision: 306811 >>>> > > URL:https://svnweb.freebsd.org/changeset/base/306811 >>>> > > >>>> > > Added: >>>> > > head/sys/sys/disk/ >>>> > > head/sys/sys/disk/apm.h >>>> > > - copied, changed from r306810, head/sys/sys/apm.h >>>> > > head/sys/sys/disk/bsd.h >>>> > > - copied, changed from r306810, head/sys/sys/disklabel.h >>>> > > head/sys/sys/disk/gpt.h >>>> > > - copied, changed from r306810, head/sys/sys/gpt.h >>>> > > head/sys/sys/disk/mbr.h >>>> > > - copied, changed from r306810, head/sys/sys/diskmbr.h >>>> > > head/sys/sys/disk/pc98.h >>>> > > - copied, changed from r306810, head/sys/sys/diskpc98.h >>>> > > head/sys/sys/disk/vtoc.h >>>> > > - copied, changed from r306810, head/sys/sys/vtoc.h >>>> > > Replaced: >>>> > > head/sys/sys/apm.h (contents, props changed) >>>> > > head/sys/sys/disklabel.h (contents, props changed) >>>> > > head/sys/sys/diskmbr.h (contents, props changed) >>>> > > head/sys/sys/diskpc98.h (contents, props changed) >>>> > > head/sys/sys/gpt.h (contents, props changed) >>>> > > head/sys/sys/vtoc.h (contents, props changed) >>>> > >>>> > Somehow this destroyed the history on these files. They showed >>>> up as >>>> > deleted and then added instead of modified. If you 'svn log' on >>>> them >>>> > now you only get this commit and none of the previous history. I've >>>> > no idea if there's a way to recover this? Had you originally >>>> done an >>>> > 'svn mv' in your checkout and then copied the files back over >>>> or some >>>> > such? >>>> > I did a move from sys/X.h to sys/disk/X.h. The history moved to >>>> sys/disk/X.h. New files were put where the old files used to be. >>>> > >>>> > Should I have done a svn copy? >>>> >>>> I think a copy would have been best. There is content in the >>>> sys/foo.h files >>>> still that has valid history (not all the lines were moved). Even >>>> if you had >>>> moved it all, I think a copy would still be best. I would only >>>> use a move >>>> if you are completely removing the original file. I'm not sure if >>>> there's a >>>> non-unfun way to recover from this. You might be able to copy the >>>> files from >>>> the previous revision, reapply your changes and then commit that. >>> >>> Ok. I’ll work on recovering the history of the original files. >>> >>> Maybe the repo masters can undo/delete the commit easily and I’ll >>> just recommit. Avoids polluting the history… >>> >>> >> I'll keep an eye out for my svn -> p4 mirror importer exploding in >> that area in the near future. >> this sort of thing makes it very ill, especially files going away >> and coming back. > > I just asked svnadm@ for advice. I’m sure they can suggest a way > that doesn’t blow things up downstream consumers. I’m fine with the > manual labor if that’s preferred... > > I run a svn-> P4 imoprter that is importign at 1:1.. so change 300000 in SVN is 300000 in p4. If we end up making extra or missing revisions, I'll lose that 1:1 feature ..e.g. if 350000 in svn maps to 350001 or 349999 in p4 that's a lot less useful to me.. From owner-svn-src-all@freebsd.org Sat Oct 8 00:25:05 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7EF58AF71CE; Sat, 8 Oct 2016 00:25:05 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [50.0.150.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54648FA6; Sat, 8 Oct 2016 00:25:04 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from Marcels-MacBook-Pro.local.mail (cerberus.brkt.com [208.185.168.138]) (authenticated bits=0) by mail.xcllnt.net (8.15.2/8.15.2) with ESMTPSA id u980P2PL099742 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Fri, 7 Oct 2016 17:25:03 -0700 (PDT) (envelope-from marcel@xcllnt.net) Date: Fri, 7 Oct 2016 17:24:56 -0700 From: Marcel Moolenaar To: Julian Elischer , John Baldwin Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org, src-committers@freebsd.org, Marcel Moolenaar Message-ID: In-Reply-To: References: <201610071542.u97FgLgU092008@repo.freebsd.org> <1910643.6VW4zuRaGg@ralph.baldwin.cx> <9665440.L9f0uMEDrK@ralph.baldwin.cx> Subject: Re: svn commit: r306811 - in head: etc/mtree include sys/sys sys/sys/disk X-Mailer: Airmail (382) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="B635C3D0-26CE-492C-98D2-2865C476E695"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.xcllnt.net [50.0.150.214]); Fri, 07 Oct 2016 17:25:03 -0700 (PDT) X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 00:25:05 -0000 --B635C3D0-26CE-492C-98D2-2865C476E695 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On October 7, 2016 at 5:13:10 PM, Julian Elischer (julian=40freebsd.org) = wrote: On 7/10/2016 4:29 PM, Marcel Moolenaar wrote: On October 7, 2016 at 4:18:31 PM, Julian Elischer (julian=40freebsd.org) = wrote: On 7/10/2016 4:12 PM, Marcel Moolenaar wrote: On October 7, 2016 at 3:18:10 PM, John Baldwin (jhb=40freebsd.org) wrote:= On =46riday, October 07, 2016 01:16:59 PM Marcel Moolenaar wrote:=C2=A0 > On October 7, 2016 at 11:02:44 AM, John Baldwin (jhb=40freebsd.org) wro= te:=C2=A0 > On =46riday, October 07, 2016 03:42:21 PM Marcel Moolenaar wrote:=C2=A0= > *snip*=C2=A0 >=C2=A0 > > Author: marcel=C2=A0 > > Date: =46ri Oct 7 15:42:20 2016=C2=A0 > > New Revision: 306811=C2=A0 > > URL:=C2=A0https://svnweb.freebsd.org/changeset/base/306811=C2=A0 > >=C2=A0 > > Added:=C2=A0 > > head/sys/sys/disk/=C2=A0 > > head/sys/sys/disk/apm.h=C2=A0 > > - copied, changed from r306810, head/sys/sys/apm.h=C2=A0 > > head/sys/sys/disk/bsd.h=C2=A0 > > - copied, changed from r306810, head/sys/sys/disklabel.h=C2=A0 > > head/sys/sys/disk/gpt.h=C2=A0 > > - copied, changed from r306810, head/sys/sys/gpt.h=C2=A0 > > head/sys/sys/disk/mbr.h=C2=A0 > > - copied, changed from r306810, head/sys/sys/diskmbr.h=C2=A0 > > head/sys/sys/disk/pc98.h=C2=A0 > > - copied, changed from r306810, head/sys/sys/diskpc98.h=C2=A0 > > head/sys/sys/disk/vtoc.h=C2=A0 > > - copied, changed from r306810, head/sys/sys/vtoc.h=C2=A0 > > Replaced:=C2=A0 > > head/sys/sys/apm.h (contents, props changed)=C2=A0 > > head/sys/sys/disklabel.h (contents, props changed)=C2=A0 > > head/sys/sys/diskmbr.h (contents, props changed)=C2=A0 > > head/sys/sys/diskpc98.h (contents, props changed)=C2=A0 > > head/sys/sys/gpt.h (contents, props changed)=C2=A0 > > head/sys/sys/vtoc.h (contents, props changed)=C2=A0 >=C2=A0 > Somehow this destroyed the history on these files. They showed up as=C2= =A0 > deleted and then added instead of modified. If you 'svn log' on them=C2= =A0 > now you only get this commit and none of the previous history. I've=C2=A0= > no idea if there's a way to recover this=3F Had you originally done an=C2= =A0 > 'svn mv' in your checkout and then copied the files back over or some=C2= =A0 > such=3F=C2=A0 > I did a move from sys/X.h to sys/disk/X.h. The history moved to sys/dis= k/X.h. New files were put where the old files used to be.=C2=A0 >=C2=A0 > Should I have done a svn copy=3F=C2=A0 I think a copy would have been best. There is content in the sys/foo.h fi= les=C2=A0 still that has valid history (not all the lines were moved). Even if you = had=C2=A0 moved it all, I think a copy would still be best. I would only use a move= =C2=A0 if you are completely removing the original file. I'm not sure if there's= a=C2=A0 non-unfun way to recover from this. You might be able to copy the files f= rom=C2=A0 the previous revision, reapply your changes and then commit that.=C2=A0 Ok. I=E2=80=99ll work on recovering the history of the original files. Maybe the repo masters can undo/delete the commit easily and I=E2=80=99ll= just recommit. Avoids polluting the history=E2=80=A6 I'll keep an eye out for my svn -> p4 mirror importer exploding in that a= rea in the near future. this sort of thing makes it very ill, especially files going away and com= ing back. I just asked svnadm=40 for advice. I=E2=80=99m sure they can suggest a wa= y that doesn=E2=80=99t blow things up downstream consumers. I=E2=80=99m f= ine with the manual labor if that=E2=80=99s preferred... I run a svn-> P4 imoprter that is importign at 1:1..=C2=A0 so change 3000= 00 in SVN is 300000 in p4. If we end up making extra or missing revisions, I'll lose that 1:1 featur= e ..e.g.=C2=A0 if 350000 in svn maps to 350001=C2=A0 or 349999 in p4 that= 's=C2=A0 a lot less useful to me.. I=E2=80=99ll keep that in mind. If svnadm=40 has no strong opinions, I=E2= =80=99ll manually fix it up using commits. Thanks for the info, --B635C3D0-26CE-492C-98D2-2865C476E695 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using AMPGpg -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJX+DzZAAoJEIda8t8f0tjjnW0P/ReZeDP8uwzE5vis00ek/qu+ p/4/WFKQDLbyU7puUT1QBn51rz3yrPfcmd7RA1PfnDa7WNZ1sqZkoABuqGIFm/kV XXqfOEpFbF31DD/BDEL0HgjxRQjnDxDmDOsIcqXpdmcURSl2jlNwb2mI9JUr5tHc j16LCB7jWLH8EoK6rQuxv3qNkshOqmJbpxdROWp1yXkyMpXqE1HWvardOrSmvRUC Gtj90aN6SiThfcKtbqaxgA0VFatEsQL7N7xIyO+n/xZ/r7zT/+2S/Azm6b6p8w8v 7dmlB6eCJwvdfw4oYjXUfPzB+PHSdaUU27mnWFouvZo+ggngSJKpqypScA9vDza1 1JYJao8BJG6Mq4u8Q8Y3xCggbex2owu0Zn0B06J24PVz6Ns+ds30DzvOLdZMVFA+ JWkuNicfdZ4jrXjfCbrBxPvpepPq+SlTa3cFMosbGasWosHmuexdGdZWUzc4upnR FJpsS5annx8MLTiYQWWKTsXXJ31T2C4zHFtvzGIBHKS7lHwY5pRg4UBV9HnPfdBT 8ejle9s9T8xAJ10VoRRSDSI8R36wGaKEyhizmPDwD7rFzrXfwutq2plM+9ZWVAff kmFgUYeaAvQ312krZV0ijOdjU5TvVeSM9vPrCP0dupiddnuqK1WqF1kV6fKOhrqb C0/8iSWjQ/VbSEg4AKSc -----END PGP SIGNATURE----- --B635C3D0-26CE-492C-98D2-2865C476E695-- From owner-svn-src-all@freebsd.org Sat Oct 8 01:00:32 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5FFA6AF7834; Sat, 8 Oct 2016 01:00:32 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2CAB2E9E; Sat, 8 Oct 2016 01:00:32 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9810Vvi002460; Sat, 8 Oct 2016 01:00:31 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9810VPB002459; Sat, 8 Oct 2016 01:00:31 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201610080100.u9810VPB002459@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 8 Oct 2016 01:00:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306836 - head/sbin/ifconfig X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 01:00:32 -0000 Author: adrian Date: Sat Oct 8 01:00:31 2016 New Revision: 306836 URL: https://svnweb.freebsd.org/changeset/base/306836 Log: [ifconfig] correctly display RSSI. Modified: head/sbin/ifconfig/ifieee80211.c Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Sat Oct 8 00:07:20 2016 (r306835) +++ head/sbin/ifconfig/ifieee80211.c Sat Oct 8 01:00:31 2016 (r306836) @@ -3290,8 +3290,8 @@ printmimo(const struct ieee80211_mimo_in /* NB: don't muddy display unless there's something to show */ if (mi->rssi[0] != 0 || mi->rssi[1] != 0 || mi->rssi[2] != 0) { /* XXX ignore EVM for now */ - printf(" (rssi %d:%d:%d nf %d:%d:%d)", - mi->rssi[0], mi->rssi[1], mi->rssi[2], + printf(" (rssi %.1f:%.1f:%.1f nf %d:%d:%d)", + mi->rssi[0] / 2.0, mi->rssi[1] / 2.0, mi->rssi[2] / 2.0, mi->noise[0], mi->noise[1], mi->noise[2]); } } From owner-svn-src-all@freebsd.org Sat Oct 8 01:12:31 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39CA4AF7A78; Sat, 8 Oct 2016 01:12:31 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08A0C81B; Sat, 8 Oct 2016 01:12:30 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u981CUI2009688; Sat, 8 Oct 2016 01:12:30 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u981CT7s009682; Sat, 8 Oct 2016 01:12:29 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201610080112.u981CT7s009682@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 8 Oct 2016 01:12:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306837 - in head/sys: dev/iwm dev/otus dev/usb/wlan net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 01:12:31 -0000 Author: adrian Date: Sat Oct 8 01:12:29 2016 New Revision: 306837 URL: https://svnweb.freebsd.org/changeset/base/306837 Log: [net80211] extend the ieee80211_rx_stats struct to include more information. There are a variety of more interesting RX statistics that we should keep track of but we don't. This is a starting point for adding more information. Specifically: * now the RX rate information and some of the packet status is passed up; * The 32 bit or 64 bit TSF is passed up; * the PHY mode is passed up; * the "I'm decap'ed AMSDU!" state is passed up; * number of RX chains is bumped to 4. This is all mostly a placeholder for getting the data into the RX status before we pass it up to net80211 - unfortunately we don't yet enforce that drivers provide it, nor do we pass the provided info back up the stack so anyone can use the data. We're going to need to use some of this data moving forward. Notably, now that some hardware can do AMSDU decap for us (the intel iwm driver can do it when we flip it on; the ath10k port I'm doing does it for us) then we need to pass it up through the stack so the duplicate RX sequence numbers and crypto/IV details don't cause the packet to be dropped and/or counted against a replay counter. It's also the beginning of being able to do more interesting node accounting in net80211. Specifically, once drivers start populating per-packet rate information, AMPDU information, timestamps, etc, we can start providing histograms of rate-versus-RSSI, account for receive time spent per node and other such interesting things. (Note: I'm also hoping to include ranging and RTT information for future chipset support; and it's likely going to include it in this kind of fashion.) Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/otus/if_otus.c head/sys/dev/usb/wlan/if_rsu.c head/sys/net80211/ieee80211_freebsd.h head/sys/net80211/ieee80211_input.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Sat Oct 8 01:00:31 2016 (r306836) +++ head/sys/dev/iwm/if_iwm.c Sat Oct 8 01:12:29 2016 (r306837) @@ -2975,8 +2975,8 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc, } /* rssi is in 1/2db units */ - rxs.rssi = rssi * 2; - rxs.nf = sc->sc_noise; + rxs.c_rssi = rssi * 2; + rxs.c_nf = sc->sc_noise; if (ieee80211_radiotap_active_vap(vap)) { struct iwm_rx_radiotap_header *tap = &sc->sc_rxtap; Modified: head/sys/dev/otus/if_otus.c ============================================================================== --- head/sys/dev/otus/if_otus.c Sat Oct 8 01:00:31 2016 (r306836) +++ head/sys/dev/otus/if_otus.c Sat Oct 8 01:12:29 2016 (r306837) @@ -1710,8 +1710,8 @@ otus_sub_rxeof(struct otus_softc *sc, ui /* Add RSSI/NF to this mbuf */ bzero(&rxs, sizeof(rxs)); rxs.r_flags = IEEE80211_R_NF | IEEE80211_R_RSSI; - rxs.nf = sc->sc_nf[0]; /* XXX chain 0 != combined rssi/nf */ - rxs.rssi = tail->rssi; + rxs.c_nf = sc->sc_nf[0]; /* XXX chain 0 != combined rssi/nf */ + rxs.c_rssi = tail->rssi; /* XXX TODO: add MIMO RSSI/NF as well */ ieee80211_add_rx_params(m, &rxs); Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Sat Oct 8 01:00:31 2016 (r306836) +++ head/sys/dev/usb/wlan/if_rsu.c Sat Oct 8 01:12:29 2016 (r306837) @@ -1534,8 +1534,8 @@ rsu_event_survey(struct rsu_softc *sc, u rxs.c_ieee = le32toh(bss->config.dsconfig); rxs.c_freq = ieee80211_ieee2mhz(rxs.c_ieee, IEEE80211_CHAN_2GHZ); /* This is a number from 0..100; so let's just divide it down a bit */ - rxs.rssi = le32toh(bss->rssi) / 2; - rxs.nf = -96; + rxs.c_rssi = le32toh(bss->rssi) / 2; + rxs.c_nf = -96; /* XXX avoid a LOR */ RSU_UNLOCK(sc); Modified: head/sys/net80211/ieee80211_freebsd.h ============================================================================== --- head/sys/net80211/ieee80211_freebsd.h Sat Oct 8 01:00:31 2016 (r306836) +++ head/sys/net80211/ieee80211_freebsd.h Sat Oct 8 01:12:29 2016 (r306837) @@ -622,33 +622,82 @@ int ieee80211_add_xmit_params(struct mbu int ieee80211_get_xmit_params(struct mbuf *m, struct ieee80211_bpf_params *); -#define IEEE80211_MAX_CHAINS 3 +/* + * Note: this is fine for 3x3 (and 4x4) 11n HT40; + * but getting EVM information for VHT80, VHT160 + * will involve more than 6 EVM pilots. + */ +#define IEEE80211_MAX_CHAINS 4 #define IEEE80211_MAX_EVM_PILOTS 6 -#define IEEE80211_R_NF 0x0000001 /* global NF value valid */ -#define IEEE80211_R_RSSI 0x0000002 /* global RSSI value valid */ -#define IEEE80211_R_C_CHAIN 0x0000004 /* RX chain count valid */ -#define IEEE80211_R_C_NF 0x0000008 /* per-chain NF value valid */ -#define IEEE80211_R_C_RSSI 0x0000010 /* per-chain RSSI value valid */ -#define IEEE80211_R_C_EVM 0x0000020 /* per-chain EVM valid */ -#define IEEE80211_R_C_HT40 0x0000040 /* RX'ed packet is 40mhz, pilots 4,5 valid */ -#define IEEE80211_R_FREQ 0x0000080 /* Freq value populated, MHz */ -#define IEEE80211_R_IEEE 0x0000100 /* IEEE value populated */ -#define IEEE80211_R_BAND 0x0000200 /* Frequency band populated */ +#define IEEE80211_R_NF 0x00000001 /* global NF value valid */ +#define IEEE80211_R_RSSI 0x00000002 /* global RSSI value valid */ +#define IEEE80211_R_C_CHAIN 0x00000004 /* RX chain count valid */ +#define IEEE80211_R_C_NF 0x00000008 /* per-chain NF value valid */ +#define IEEE80211_R_C_RSSI 0x00000010 /* per-chain RSSI value valid */ +#define IEEE80211_R_C_EVM 0x00000020 /* per-chain EVM valid */ +#define IEEE80211_R_C_HT40 0x00000040 /* RX'ed packet is 40mhz, pilots 4,5 valid */ +#define IEEE80211_R_FREQ 0x00000080 /* Freq value populated, MHz */ +#define IEEE80211_R_IEEE 0x00000100 /* IEEE value populated */ +#define IEEE80211_R_BAND 0x00000200 /* Frequency band populated */ +#define IEEE80211_R_TSF32 0x00004000 /* 32 bit TSF */ +#define IEEE80211_R_TSF64 0x00008000 /* 64 bit TSF */ +#define IEEE80211_R_TSF_START 0x00010000 /* TSF is sampled at start of frame */ +#define IEEE80211_R_TSF_END 0x00020000 /* TSF is sampled at end of frame */ + +/* RX packet flags - describe the kind of frame */ +#define IEEE80211_RX_F_STBC 0x00000001 +#define IEEE80211_RX_F_LDPC 0x00000002 +#define IEEE80211_RX_F_AMSDU 0x00000004 /* This is the start of an decap AMSDU list */ +#define IEEE80211_RX_F_AMSDU_MORE 0x00000008 /* This is another decap AMSDU frame in the batch */ +#define IEEE80211_RX_F_AMPDU 0x00000010 /* This is the start of an decap AMPDU list */ +#define IEEE80211_RX_F_AMPDU_MORE 0x00000020 /* This is another decap AMPDU frame in the batch */ + +/* Channel width */ +#define IEEE80211_RX_FW_20MHZ 1 +#define IEEE80211_RX_FW_40MHZ 2 +#define IEEE80211_RX_FW_80MHZ 3 + +/* PHY type */ +#define IEEE80211_RX_FP_11B 1 +#define IEEE80211_RX_FP_11G 2 +#define IEEE80211_RX_FP_11A 3 +#define IEEE80211_RX_FP_11NA 4 +#define IEEE80211_RX_FP_11NG 5 struct ieee80211_rx_stats { uint32_t r_flags; /* IEEE80211_R_* flags */ + uint32_t c_pktflags; /* IEEE80211_RX_F_* flags */ + + uint64_t c_rx_tsf; /* 32 or 64 bit TSF */ + + /* All DWORD aligned */ + int16_t c_nf_ctl[IEEE80211_MAX_CHAINS]; /* per-chain NF */ + int16_t c_nf_ext[IEEE80211_MAX_CHAINS]; /* per-chain NF */ + int16_t c_rssi_ctl[IEEE80211_MAX_CHAINS]; /* per-chain RSSI */ + int16_t c_rssi_ext[IEEE80211_MAX_CHAINS]; /* per-chain RSSI */ + + /* 32 bits */ + uint8_t c_nf; /* global NF */ + uint8_t c_rssi; /* global RSSI */ uint8_t c_chain; /* number of RX chains involved */ - int16_t c_nf_ctl[IEEE80211_MAX_CHAINS]; /* per-chain NF */ - int16_t c_nf_ext[IEEE80211_MAX_CHAINS]; /* per-chain NF */ - int16_t c_rssi_ctl[IEEE80211_MAX_CHAINS]; /* per-chain RSSI */ - int16_t c_rssi_ext[IEEE80211_MAX_CHAINS]; /* per-chain RSSI */ - uint8_t nf; /* global NF */ - uint8_t rssi; /* global RSSI */ - uint8_t evm[IEEE80211_MAX_CHAINS][IEEE80211_MAX_EVM_PILOTS]; - /* per-chain, per-pilot EVM values */ - uint16_t c_freq; - uint8_t c_ieee; + uint8_t c_rate; /* legacy + 11n rate code */ + + /* 32 bits */ + uint16_t c_freq; /* Frequency, MHz */ + uint8_t c_ieee; /* Channel */ + uint8_t c_width; /* channel width, FW flags above */ + + /* Force alignment to DWORD */ + union { + uint8_t evm[IEEE80211_MAX_CHAINS][IEEE80211_MAX_EVM_PILOTS]; + /* per-chain, per-pilot EVM values */ + uint32_t __aln[8]; + } evm; + + /* 32 bits */ + uint8_t c_phytype; /* PHY type, FW flags above */ + uint8_t c_pad2[3]; }; struct ieee80211_rx_params { Modified: head/sys/net80211/ieee80211_input.c ============================================================================== --- head/sys/net80211/ieee80211_input.c Sat Oct 8 01:00:31 2016 (r306836) +++ head/sys/net80211/ieee80211_input.c Sat Oct 8 01:12:29 2016 (r306837) @@ -100,7 +100,7 @@ ieee80211_input_mimo(struct ieee80211_no ieee80211_process_mimo(ni, &rxs); //return ieee80211_input(ni, m, rx->rssi, rx->nf); - return ni->ni_vap->iv_input(ni, m, &rxs, rxs.rssi, rxs.nf); + return ni->ni_vap->iv_input(ni, m, &rxs, rxs.c_rssi, rxs.c_nf); } int @@ -109,8 +109,8 @@ ieee80211_input_all(struct ieee80211com struct ieee80211_rx_stats rx; rx.r_flags = IEEE80211_R_NF | IEEE80211_R_RSSI; - rx.nf = nf; - rx.rssi = rssi; + rx.c_nf = nf; + rx.c_rssi = rssi; return ieee80211_input_mimo_all(ic, m, &rx); } From owner-svn-src-all@freebsd.org Sat Oct 8 01:18:02 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BEE8BAF7B59; Sat, 8 Oct 2016 01:18:02 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B56EA18; Sat, 8 Oct 2016 01:18:02 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u981I13u009907; Sat, 8 Oct 2016 01:18:01 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u981I1QE009906; Sat, 8 Oct 2016 01:18:01 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201610080118.u981I1QE009906@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 8 Oct 2016 01:18:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306838 - head/sys/powerpc/mpc85xx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 01:18:02 -0000 Author: jhibbits Date: Sat Oct 8 01:18:01 2016 New Revision: 306838 URL: https://svnweb.freebsd.org/changeset/base/306838 Log: Adjust copyright date. No real work was done on it until 2016. Modified: head/sys/powerpc/mpc85xx/fsl_diu.c Modified: head/sys/powerpc/mpc85xx/fsl_diu.c ============================================================================== --- head/sys/powerpc/mpc85xx/fsl_diu.c Sat Oct 8 01:12:29 2016 (r306837) +++ head/sys/powerpc/mpc85xx/fsl_diu.c Sat Oct 8 01:18:01 2016 (r306838) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2015 Justin Hibbits + * Copyright (c) 2016 Justin Hibbits * All rights reserved. * * Redistribution and use in source and binary forms, with or without From owner-svn-src-all@freebsd.org Sat Oct 8 05:26:46 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7C22C05613; Sat, 8 Oct 2016 05:26:46 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 784DB390; Sat, 8 Oct 2016 05:26:46 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u985QjhI003572; Sat, 8 Oct 2016 05:26:45 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u985Qjqo003570; Sat, 8 Oct 2016 05:26:45 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201610080526.u985Qjqo003570@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 8 Oct 2016 05:26:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306839 - in head/sys/contrib/ncsw: inc user/env X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 05:26:46 -0000 Author: jhibbits Date: Sat Oct 8 05:26:45 2016 New Revision: 306839 URL: https://svnweb.freebsd.org/changeset/base/306839 Log: Minor optimizations to dTSEC glue code Don't call pmap_kextract() multiple times, it wastes CPU cycles, which in a high performance environment can be very expensive. Inline XX_FindTracker() to allow more optimizations as well. Modified: head/sys/contrib/ncsw/inc/xx_ext.h head/sys/contrib/ncsw/user/env/xx.c Modified: head/sys/contrib/ncsw/inc/xx_ext.h ============================================================================== --- head/sys/contrib/ncsw/inc/xx_ext.h Sat Oct 8 01:18:01 2016 (r306838) +++ head/sys/contrib/ncsw/inc/xx_ext.h Sat Oct 8 05:26:45 2016 (r306839) @@ -932,7 +932,7 @@ t_Error XX_IpcSendMessage(t_Handle /** FreeBSD Specific additions. */ void XX_TrackInit(void); -void XX_TrackAddress(void *addr); +physAddress_t XX_TrackAddress(void *addr); void XX_UntrackAddress(void *addr); #endif /* __XX_EXT_H */ Modified: head/sys/contrib/ncsw/user/env/xx.c ============================================================================== --- head/sys/contrib/ncsw/user/env/xx.c Sat Oct 8 01:18:01 2016 (r306838) +++ head/sys/contrib/ncsw/user/env/xx.c Sat Oct 8 05:26:45 2016 (r306839) @@ -746,7 +746,6 @@ XX_IpcFreeSession(t_Handle h_Session) return (E_OK); } -extern void db_trace_self(void); physAddress_t XX_VirtToPhys(void *addr) { @@ -785,12 +784,10 @@ XX_VirtToPhys(void *addr) return (XX_PInfo.portal_ci_pa[QM_PORTAL][cpu] + (vm_offset_t)addr - XX_PInfo.portal_ci_va[QM_PORTAL]); - paddr = pmap_kextract((vm_offset_t)addr); - if (!paddr) + paddr = XX_TrackAddress(addr); + if (paddr == -1) printf("NetCommSW: " "Unable to translate virtual address 0x%08X!\n", addr); - else - XX_TrackAddress(addr); return (paddr); } @@ -881,7 +878,7 @@ end: free(dev_name, M_TEMP); } -static XX_MallocTrackStruct * +static inline XX_MallocTrackStruct * XX_FindTracker(physAddress_t pa) { struct XX_MallocTrackerList *l; @@ -906,7 +903,7 @@ XX_TrackInit(void) } } -void +physAddress_t XX_TrackAddress(void *addr) { physAddress_t pa; @@ -915,18 +912,20 @@ XX_TrackAddress(void *addr) pa = pmap_kextract((vm_offset_t)addr); - ts = malloc(sizeof(*ts), M_NETCOMMSW_MT, M_NOWAIT); - ts->va = addr; - ts->pa = pa; - l = &XX_MallocTracker[(pa >> XX_MALLOC_TRACK_SHIFT) & XX_MallocHashMask]; mtx_lock(&XX_MallocTrackLock); - if (XX_FindTracker(pa) != NULL) - free(ts, M_NETCOMMSW_MT); - else + if (XX_FindTracker(pa) == NULL) { + ts = malloc(sizeof(*ts), M_NETCOMMSW_MT, M_NOWAIT); + if (ts == NULL) + return (-1); + ts->va = addr; + ts->pa = pa; LIST_INSERT_HEAD(l, ts, entries); + } mtx_unlock(&XX_MallocTrackLock); + + return (pa); } void From owner-svn-src-all@freebsd.org Sat Oct 8 12:53:24 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D22D3AF7B6A; Sat, 8 Oct 2016 12:53:24 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A416D369; Sat, 8 Oct 2016 12:53:24 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u98CrNVA072340; Sat, 8 Oct 2016 12:53:23 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u98CrNQE072339; Sat, 8 Oct 2016 12:53:23 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610081253.u98CrNQE072339@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sat, 8 Oct 2016 12:53:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306840 - head/sbin/devd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 12:53:24 -0000 Author: sevan (doc committer) Date: Sat Oct 8 12:53:23 2016 New Revision: 306840 URL: https://svnweb.freebsd.org/changeset/base/306840 Log: Sort SEE ALSO section sequentially. Highlighted by mandoc -Tlint PR: 212440 Approved by: imp MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D8192 Modified: head/sbin/devd/devd.conf.5 Modified: head/sbin/devd/devd.conf.5 ============================================================================== --- head/sbin/devd/devd.conf.5 Sat Oct 8 05:26:45 2016 (r306839) +++ head/sbin/devd/devd.conf.5 Sat Oct 8 12:53:23 2016 (r306840) @@ -41,7 +41,7 @@ .\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS .\" SOFTWARE. .\" -.Dd April 14, 2016 +.Dd October 8, 2016 .Dt DEVD.CONF 5 .Os .Sh NAME @@ -646,8 +646,8 @@ The installed .Pa /etc/devd.conf has many additional examples. .Sh SEE ALSO +.Xr cam 4 , .Xr coretemp 4 , .Xr devfs 5 , .Xr re_format 7 , -.Xr devd 8 , -.Xr cam 4 +.Xr devd 8 From owner-svn-src-all@freebsd.org Sat Oct 8 13:37:01 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B1FEC0580C; Sat, 8 Oct 2016 13:37:01 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19CA2B52; Sat, 8 Oct 2016 13:37:01 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u98Db0ft087852; Sat, 8 Oct 2016 13:37:00 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u98Db0LY087851; Sat, 8 Oct 2016 13:37:00 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201610081337.u98Db0LY087851@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 8 Oct 2016 13:37:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306841 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 13:37:01 -0000 Author: mjg Date: Sat Oct 8 13:36:59 2016 New Revision: 306841 URL: https://svnweb.freebsd.org/changeset/base/306841 Log: vfs: clear the tmp free list flag before taking the free vnode list lock Safe access is already guaranteed because of the mnt_listmx lock. Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sat Oct 8 12:53:23 2016 (r306840) +++ head/sys/kern/vfs_subr.c Sat Oct 8 13:36:59 2016 (r306841) @@ -1066,16 +1066,16 @@ vnlru_return_batch_locked(struct mount * if (mp->mnt_tmpfreevnodelistsize == 0) return; - mtx_lock(&vnode_free_list_mtx); TAILQ_FOREACH(vp, &mp->mnt_tmpfreevnodelist, v_actfreelist) { VNASSERT((vp->v_mflag & VMP_TMPMNTFREELIST) != 0, vp, ("vnode without VMP_TMPMNTFREELIST on mnt_tmpfreevnodelist")); vp->v_mflag &= ~VMP_TMPMNTFREELIST; } + mtx_lock(&vnode_free_list_mtx); TAILQ_CONCAT(&vnode_free_list, &mp->mnt_tmpfreevnodelist, v_actfreelist); freevnodes += mp->mnt_tmpfreevnodelistsize; - mp->mnt_tmpfreevnodelistsize = 0; mtx_unlock(&vnode_free_list_mtx); + mp->mnt_tmpfreevnodelistsize = 0; } static void From owner-svn-src-all@freebsd.org Sat Oct 8 13:38:06 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E1D2C05875; Sat, 8 Oct 2016 13:38:06 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1EA64CCC; Sat, 8 Oct 2016 13:38:06 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u98Dc5Uh087930; Sat, 8 Oct 2016 13:38:05 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u98Dc5XD087929; Sat, 8 Oct 2016 13:38:05 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201610081338.u98Dc5XD087929@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 8 Oct 2016 13:38:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306842 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 13:38:06 -0000 Author: mjg Date: Sat Oct 8 13:38:05 2016 New Revision: 306842 URL: https://svnweb.freebsd.org/changeset/base/306842 Log: vfs: assert empty tmp free list on unmount Modified: head/sys/kern/vfs_mount.c Modified: head/sys/kern/vfs_mount.c ============================================================================== --- head/sys/kern/vfs_mount.c Sat Oct 8 13:36:59 2016 (r306841) +++ head/sys/kern/vfs_mount.c Sat Oct 8 13:38:05 2016 (r306842) @@ -522,6 +522,8 @@ vfs_mount_destroy(struct mount *mp) panic("vfs_mount_destroy: nonzero nvnodelistsize"); if (mp->mnt_activevnodelistsize != 0) panic("vfs_mount_destroy: nonzero activevnodelistsize"); + if (mp->mnt_tmpfreevnodelistsize != 0) + panic("vfs_mount_destroy: nonzero tmpfreevnodelistsize"); if (mp->mnt_lockref != 0) panic("vfs_mount_destroy: nonzero lock refcount"); MNT_IUNLOCK(mp); From owner-svn-src-all@freebsd.org Sat Oct 8 13:40:14 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 776E3C05943; Sat, 8 Oct 2016 13:40:14 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3AAE3E5F; Sat, 8 Oct 2016 13:40:14 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u98DeD5U088065; Sat, 8 Oct 2016 13:40:13 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u98DeDxj088061; Sat, 8 Oct 2016 13:40:13 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201610081340.u98DeDxj088061@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sat, 8 Oct 2016 13:40:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306843 - in head/bin/sh: . tests/parameters X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 13:40:14 -0000 Author: jilles Date: Sat Oct 8 13:40:12 2016 New Revision: 306843 URL: https://svnweb.freebsd.org/changeset/base/306843 Log: sh: Do not import IFS's value from the environment. Per Austin group issue #884, always set IFS to $' \t\n'. As before, IFS will be exported iff it was in the environment. Most shells (e.g. bash, ksh93 and mksh) already did this. This change improves predictability, in that scripts can simply rely on the default value. However, the effect on security is little, since applications should not be calling the shell with attacker-controlled environment variable names in the first place and other security-sensitive variables such as PATH should be and are imported by the shell. When using a new sh with an old (before 10.2) libc wordexp(), IFS is no longer passed on. Otherwise, wordexp() continues to pass along IFS from the environment per its documentation. Discussed with: pfg Relnotes: yes Added: head/bin/sh/tests/parameters/ifs1.0 (contents, props changed) Modified: head/bin/sh/sh.1 head/bin/sh/tests/parameters/Makefile head/bin/sh/var.c Modified: head/bin/sh/sh.1 ============================================================================== --- head/bin/sh/sh.1 Sat Oct 8 13:38:05 2016 (r306842) +++ head/bin/sh/sh.1 Sat Oct 8 13:40:12 2016 (r306843) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd May 30, 2016 +.Dd October 8, 2016 .Dt SH 1 .Os .Sh NAME @@ -1349,13 +1349,13 @@ used in tilde expansion and as a default built-in. .It Va IFS Input Field Separators. -The default value is +This is initialized at startup to .Aq space , .Aq tab , and .Aq newline in that order. -This default also applies if +This value also applies if .Va IFS is unset, but not if it is set to the empty string. See the Modified: head/bin/sh/tests/parameters/Makefile ============================================================================== --- head/bin/sh/tests/parameters/Makefile Sat Oct 8 13:38:05 2016 (r306842) +++ head/bin/sh/tests/parameters/Makefile Sat Oct 8 13:40:12 2016 (r306843) @@ -9,6 +9,7 @@ ATF_TESTS_SH= functional_test ${PACKAGE}FILES+= env1.0 ${PACKAGE}FILES+= exitstatus1.0 +${PACKAGE}FILES+= ifs1.0 ${PACKAGE}FILES+= mail1.0 ${PACKAGE}FILES+= mail2.0 ${PACKAGE}FILES+= optind1.0 Added: head/bin/sh/tests/parameters/ifs1.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/parameters/ifs1.0 Sat Oct 8 13:40:12 2016 (r306843) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +env IFS=_ ${SH} -c ' +rc=2 +nosuchtool_function() { + rc=0 +} +v=nosuchtool_function +$v && exit "$rc" +' Modified: head/bin/sh/var.c ============================================================================== --- head/bin/sh/var.c Sat Oct 8 13:38:05 2016 (r306842) +++ head/bin/sh/var.c Sat Oct 8 13:40:12 2016 (r306843) @@ -186,6 +186,7 @@ initvar(void) } } setvareq_const("OPTIND=1", 0); + setvareq_const("IFS= \t\n", 0); } /* From owner-svn-src-all@freebsd.org Sat Oct 8 13:49:41 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD33AC05C7C; Sat, 8 Oct 2016 13:49:41 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9BF218AD; Sat, 8 Oct 2016 13:49:41 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u98DnekS092215; Sat, 8 Oct 2016 13:49:40 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u98Dnea5092214; Sat, 8 Oct 2016 13:49:40 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201610081349.u98Dnea5092214@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Sat, 8 Oct 2016 13:49:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306844 - stable/11/sys/dev/lmc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 13:49:41 -0000 Author: vangyzen Date: Sat Oct 8 13:49:40 2016 New Revision: 306844 URL: https://svnweb.freebsd.org/changeset/base/306844 Log: lmc(4): fix the build without the bpf device Reported by: Dave Mischler Sponsored by: Dell EMC Modified: stable/11/sys/dev/lmc/if_lmc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/lmc/if_lmc.c ============================================================================== --- stable/11/sys/dev/lmc/if_lmc.c Sat Oct 8 13:40:12 2016 (r306843) +++ stable/11/sys/dev/lmc/if_lmc.c Sat Oct 8 13:49:40 2016 (r306844) @@ -91,7 +91,11 @@ # define P2P 0 /* not in FreeBSD */ # define NSPPP 1 /* No count devices in FreeBSD 5 */ # include "opt_bpf.h" /* DEV_BPF */ -# define NBPFILTER DEV_BPF +# ifdef DEV_BPF +# define NBPFILTER 1 +# else +# define NBPFILTER 0 +# endif # define GEN_HDLC 0 /* not in FreeBSD */ # # include From owner-svn-src-all@freebsd.org Sat Oct 8 14:07:35 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E978C0502F; Sat, 8 Oct 2016 14:07:35 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D610F6F; Sat, 8 Oct 2016 14:07:35 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u98E7Y1o099716; Sat, 8 Oct 2016 14:07:34 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u98E7YsN099715; Sat, 8 Oct 2016 14:07:34 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201610081407.u98E7YsN099715@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Sat, 8 Oct 2016 14:07:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306845 - stable/11/include X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 14:07:35 -0000 Author: vangyzen Date: Sat Oct 8 14:07:34 2016 New Revision: 306845 URL: https://svnweb.freebsd.org/changeset/base/306845 Log: MFC r306568, r306569 Add the __printflike attribute to the declarations of dprintf(3) and vdprintf(3). Sponsored by: Dell EMC Modified: stable/11/include/stdio.h Directory Properties: stable/11/ (props changed) Modified: stable/11/include/stdio.h ============================================================================== --- stable/11/include/stdio.h Sat Oct 8 13:49:40 2016 (r306844) +++ stable/11/include/stdio.h Sat Oct 8 14:07:34 2016 (r306845) @@ -356,7 +356,7 @@ ssize_t getdelim(char ** __restrict, si FILE * __restrict); FILE *open_memstream(char **, size_t *); int renameat(int, const char *, int, const char *); -int vdprintf(int, const char * __restrict, __va_list); +int vdprintf(int, const char * __restrict, __va_list) __printflike(2, 0); /* * Every programmer and his dog wrote functions called getline() and dprintf() @@ -392,7 +392,7 @@ ssize_t getline(char ** __restrict, siz #endif #ifdef _WITH_DPRINTF -int (dprintf)(int, const char * __restrict, ...); +int (dprintf)(int, const char * __restrict, ...) __printflike(2, 3); #endif #endif /* __POSIX_VISIBLE >= 200809 */ From owner-svn-src-all@freebsd.org Sat Oct 8 14:10:46 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0945C05307; Sat, 8 Oct 2016 14:10:46 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81633210; Sat, 8 Oct 2016 14:10:46 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u98EAjmN001262; Sat, 8 Oct 2016 14:10:45 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u98EAjEu001261; Sat, 8 Oct 2016 14:10:45 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201610081410.u98EAjEu001261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Sat, 8 Oct 2016 14:10:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306846 - stable/10/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 14:10:46 -0000 Author: vangyzen Date: Sat Oct 8 14:10:45 2016 New Revision: 306846 URL: https://svnweb.freebsd.org/changeset/base/306846 Log: MFC r306568, r306569 Add the __printflike attribute to the declarations of dprintf(3) and vdprintf(3). Sponsored by: Dell EMC Modified: stable/10/include/stdio.h Directory Properties: stable/10/ (props changed) Modified: stable/10/include/stdio.h ============================================================================== --- stable/10/include/stdio.h Sat Oct 8 14:07:34 2016 (r306845) +++ stable/10/include/stdio.h Sat Oct 8 14:10:45 2016 (r306846) @@ -351,7 +351,7 @@ ssize_t getdelim(char ** __restrict, si FILE * __restrict); FILE *open_memstream(char **, size_t *); int renameat(int, const char *, int, const char *); -int vdprintf(int, const char * __restrict, __va_list); +int vdprintf(int, const char * __restrict, __va_list) __printflike(2, 0); /* * Every programmer and his dog wrote functions called getline() and dprintf() @@ -387,7 +387,7 @@ ssize_t getline(char ** __restrict, siz #endif #ifdef _WITH_DPRINTF -int (dprintf)(int, const char * __restrict, ...); +int (dprintf)(int, const char * __restrict, ...) __printflike(2, 3); #endif #endif /* __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 */ From owner-svn-src-all@freebsd.org Sat Oct 8 14:31:57 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8823CC05647; Sat, 8 Oct 2016 14:31:57 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38C98CF4; Sat, 8 Oct 2016 14:31:57 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u98EVu7e010920; Sat, 8 Oct 2016 14:31:56 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u98EVuJW010915; Sat, 8 Oct 2016 14:31:56 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201610081431.u98EVuJW010915@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 8 Oct 2016 14:31:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r306847 - vendor/tzdata/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 14:31:57 -0000 Author: bapt Date: Sat Oct 8 14:31:55 2016 New Revision: 306847 URL: https://svnweb.freebsd.org/changeset/base/306847 Log: Import tzdata 2016g Modified: vendor/tzdata/dist/africa vendor/tzdata/dist/antarctica vendor/tzdata/dist/asia vendor/tzdata/dist/australasia vendor/tzdata/dist/backward vendor/tzdata/dist/etcetera vendor/tzdata/dist/europe vendor/tzdata/dist/factory vendor/tzdata/dist/iso3166.tab vendor/tzdata/dist/leap-seconds.list vendor/tzdata/dist/leapseconds vendor/tzdata/dist/northamerica vendor/tzdata/dist/southamerica vendor/tzdata/dist/zone.tab vendor/tzdata/dist/zone1970.tab Modified: vendor/tzdata/dist/africa ============================================================================== --- vendor/tzdata/dist/africa Sat Oct 8 14:10:45 2016 (r306846) +++ vendor/tzdata/dist/africa Sat Oct 8 14:31:55 2016 (r306847) @@ -343,6 +343,12 @@ Rule Egypt 2007 only - Sep Thu>=1 24:00 # decision to abandon DST permanently. See Ahram Online 2015-04-24. # http://english.ahram.org.eg/NewsContent/1/64/128509/Egypt/Politics-/Sisi-cancels-daylight-saving-time-in-Egypt.aspx +# From Steffen Thorsen (2016-04-29): +# Egypt will have DST from July 7 until the end of October.... +# http://english.ahram.org.eg/NewsContentP/1/204655/Egypt/Daylight-savings-time-returning-to-Egypt-on--July.aspx +# From Mina Samuel (2016-07-04): +# Egyptian government took the decision to cancel the DST, + Rule Egypt 2008 only - Aug lastThu 24:00 0 - Rule Egypt 2009 only - Aug 20 24:00 0 - Rule Egypt 2010 only - Aug 10 24:00 0 - @@ -458,7 +464,7 @@ Zone Africa/Monrovia -0:43:08 - LMT 1882 # http://www.libyaherald.com/2013/10/24/correction-no-time-change-tomorrow/ # # From Paul Eggert (2013-10-25): -# For now, assume they're reverting to the pre-2012 rules of permanent UTC+2. +# For now, assume they're reverting to the pre-2012 rules of permanent UT +02. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Libya 1951 only - Oct 14 2:00 1:00 S @@ -858,11 +864,11 @@ Rule Morocco 2009 only - Aug 21 0:00 0 Rule Morocco 2010 only - May 2 0:00 1:00 S Rule Morocco 2010 only - Aug 8 0:00 0 - Rule Morocco 2011 only - Apr 3 0:00 1:00 S -Rule Morocco 2011 only - Jul 31 0 0 - +Rule Morocco 2011 only - Jul 31 0:00 0 - Rule Morocco 2012 2013 - Apr lastSun 2:00 1:00 S -Rule Morocco 2012 only - Sep 30 3:00 0 - Rule Morocco 2012 only - Jul 20 3:00 0 - Rule Morocco 2012 only - Aug 20 2:00 1:00 S +Rule Morocco 2012 only - Sep 30 3:00 0 - Rule Morocco 2013 only - Jul 7 3:00 0 - Rule Morocco 2013 only - Aug 10 2:00 1:00 S Rule Morocco 2013 max - Oct lastSun 3:00 0 - Modified: vendor/tzdata/dist/antarctica ============================================================================== --- vendor/tzdata/dist/antarctica Sat Oct 8 14:10:45 2016 (r306846) +++ vendor/tzdata/dist/antarctica Sat Oct 8 14:31:55 2016 (r306847) @@ -10,10 +10,8 @@ # http://www.spri.cam.ac.uk/bob/periant.htm # for information. # Unless otherwise specified, we have no time zone information. -# -# Except for the French entries, -# I made up all time zone abbreviations mentioned here; corrections welcome! -# FORMAT is 'zzz' and GMTOFF is 0 for locations while uninhabited. + +# FORMAT is '-00' and GMTOFF is 0 for locations while uninhabited. # Argentina - year-round bases # Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05 @@ -29,7 +27,7 @@ # previously sealers and scientific personnel wintered # Margaret Turner reports # http://web.archive.org/web/20021204222245/http://www.dstc.qut.edu.au/DST/marg/daylight.html -# (1999-09-30) that they're UTC+5, with no DST; +# (1999-09-30) that they're UT +05, with no DST; # presumably this is when they have visitors. # # year-round bases @@ -67,24 +65,23 @@ # http://www.timeanddate.com/news/time/antartica-time-changes-2010.html # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Antarctica/Casey 0 - zzz 1969 - 8:00 - AWST 2009 Oct 18 2:00 - # Australian Western Std Time - 11:00 - CAST 2010 Mar 5 2:00 # Casey Time - 8:00 - AWST 2011 Oct 28 2:00 - 11:00 - CAST 2012 Feb 21 17:00u - 8:00 - AWST -Zone Antarctica/Davis 0 - zzz 1957 Jan 13 - 7:00 - DAVT 1964 Nov # Davis Time - 0 - zzz 1969 Feb - 7:00 - DAVT 2009 Oct 18 2:00 - 5:00 - DAVT 2010 Mar 10 20:00u - 7:00 - DAVT 2011 Oct 28 2:00 - 5:00 - DAVT 2012 Feb 21 20:00u - 7:00 - DAVT -Zone Antarctica/Mawson 0 - zzz 1954 Feb 13 - 6:00 - MAWT 2009 Oct 18 2:00 # Mawson Time - 5:00 - MAWT +Zone Antarctica/Casey 0 - -00 1969 + 8:00 - +08 2009 Oct 18 2:00 + 11:00 - +11 2010 Mar 5 2:00 + 8:00 - +08 2011 Oct 28 2:00 + 11:00 - +11 2012 Feb 21 17:00u + 8:00 - +08 +Zone Antarctica/Davis 0 - -00 1957 Jan 13 + 7:00 - +07 1964 Nov + 0 - -00 1969 Feb + 7:00 - +07 2009 Oct 18 2:00 + 5:00 - +05 2010 Mar 10 20:00u + 7:00 - +07 2011 Oct 28 2:00 + 5:00 - +05 2012 Feb 21 20:00u + 7:00 - +07 +Zone Antarctica/Mawson 0 - -00 1954 Feb 13 + 6:00 - +06 2009 Oct 18 2:00 + 5:00 - +05 # References: # Casey Weather (1998-02-26) # http://www.antdiv.gov.au/aad/exop/sfo/casey/casey_aws.html @@ -137,8 +134,8 @@ Zone Antarctica/Mawson 0 - zzz 1954 Feb # fishing stations operated variously 1819/1931 # # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Indian/Kerguelen 0 - zzz 1950 # Port-aux-Français - 5:00 - TFT # ISO code TF Time +Zone Indian/Kerguelen 0 - -00 1950 # Port-aux-Français + 5:00 - +05 # # year-round base in the main continent # Dumont d'Urville, Île des Pétrels, -6640+14001, since 1956-11 @@ -148,10 +145,10 @@ Zone Indian/Kerguelen 0 - zzz 1950 # Por # It was destroyed by fire on 1952-01-14. # # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Antarctica/DumontDUrville 0 - zzz 1947 - 10:00 - PMT 1952 Jan 14 # Port-Martin Time - 0 - zzz 1956 Nov - 10:00 - DDUT # Dumont-d'Urville Time +Zone Antarctica/DumontDUrville 0 - -00 1947 + 10:00 - +10 1952 Jan 14 + 0 - -00 1956 Nov + 10:00 - +10 # France & Italy - year-round base # Concordia, -750600+1232000, since 2005 @@ -176,8 +173,8 @@ Zone Antarctica/DumontDUrville 0 - zzz 1 # was established on 1957-01-29. Since Syowa station is still the main # station of Japan, it's appropriate for the principal location. # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Antarctica/Syowa 0 - zzz 1957 Jan 29 - 3:00 - SYOT # Syowa Time +Zone Antarctica/Syowa 0 - -00 1957 Jan 29 + 3:00 - +03 # See: # NIPR Antarctic Research Activities (1999-08-17) # http://www.nipr.ac.jp/english/ara01.html @@ -214,19 +211,19 @@ Zone Antarctica/Syowa 0 - zzz 1957 Jan 2 # correct, but they should be quite close to the actual dates. # # From Paul Eggert (2014-03-21): -# The CET-switching Troll rules require zic from tzcode 2014b or later, so as +# The CET-switching Troll rules require zic from tz 2014b or later, so as # suggested by Bengt-Inge Larsson comment them out for now, and approximate # with only UTC and CEST. Uncomment them when 2014b is more prevalent. # # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -#Rule Troll 2005 max - Mar 1 1:00u 1:00 CET -Rule Troll 2005 max - Mar lastSun 1:00u 2:00 CEST -#Rule Troll 2005 max - Oct lastSun 1:00u 1:00 CET -#Rule Troll 2004 max - Nov 7 1:00u 0:00 UTC +#Rule Troll 2005 max - Mar 1 1:00u 1:00 +01 +Rule Troll 2005 max - Mar lastSun 1:00u 2:00 +02 +#Rule Troll 2005 max - Oct lastSun 1:00u 1:00 +01 +#Rule Troll 2004 max - Nov 7 1:00u 0:00 +00 # Remove the following line when uncommenting the above '#Rule' lines. -Rule Troll 2004 max - Oct lastSun 1:00u 0:00 UTC +Rule Troll 2004 max - Oct lastSun 1:00u 0:00 +00 # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Antarctica/Troll 0 - zzz 2005 Feb 12 +Zone Antarctica/Troll 0 - -00 2005 Feb 12 0:00 Troll %s # Poland - year-round base @@ -265,10 +262,10 @@ Zone Antarctica/Troll 0 - zzz 2005 Feb 1 # changes during the year and does not necessarily correspond to mean # solar noon. So the Vostok time might have been whatever the clocks # happened to be during their visit. So we still don't really know what time -# it is at Vostok. But we'll guess UTC+6. +# it is at Vostok. But we'll guess +06. # -Zone Antarctica/Vostok 0 - zzz 1957 Dec 16 - 6:00 - VOST # Vostok time +Zone Antarctica/Vostok 0 - -00 1957 Dec 16 + 6:00 - +06 # S Africa - year-round bases # Marion Island, -4653+03752 @@ -300,8 +297,8 @@ Zone Antarctica/Vostok 0 - zzz 1957 Dec # says Rothera is -03 all year. # # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Antarctica/Rothera 0 - zzz 1976 Dec 1 - -3:00 - ROTT # Rothera time +Zone Antarctica/Rothera 0 - -00 1976 Dec 1 + -3:00 - -03 # Uruguay - year round base # Artigas, King George Island, -621104-0585107 Modified: vendor/tzdata/dist/asia ============================================================================== --- vendor/tzdata/dist/asia Sat Oct 8 14:10:45 2016 (r306846) +++ vendor/tzdata/dist/asia Sat Oct 8 14:31:55 2016 (r306847) @@ -79,13 +79,9 @@ Rule E-EurAsia 1979 1995 - Sep lastSun Rule E-EurAsia 1996 max - Oct lastSun 0:00 0 - Rule RussiaAsia 1981 1984 - Apr 1 0:00 1:00 S Rule RussiaAsia 1981 1983 - Oct 1 0:00 0 - -Rule RussiaAsia 1984 1991 - Sep lastSun 2:00s 0 - -Rule RussiaAsia 1985 1991 - Mar lastSun 2:00s 1:00 S -Rule RussiaAsia 1992 only - Mar lastSat 23:00 1:00 S -Rule RussiaAsia 1992 only - Sep lastSat 23:00 0 - -Rule RussiaAsia 1993 max - Mar lastSun 2:00s 1:00 S -Rule RussiaAsia 1993 1995 - Sep lastSun 2:00s 0 - -Rule RussiaAsia 1996 max - Oct lastSun 2:00s 0 - +Rule RussiaAsia 1984 1995 - Sep lastSun 2:00s 0 - +Rule RussiaAsia 1985 2011 - Mar lastSun 2:00s 1:00 S +Rule RussiaAsia 1996 2011 - Oct lastSun 2:00s 0 - # Afghanistan # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -120,31 +116,37 @@ Zone Asia/Kabul 4:36:48 - LMT 1890 # http://www.worldtimezone.com/dst_news/dst_news_armenia03.html # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Yerevan 2:58:00 - LMT 1924 May 2 - 3:00 - YERT 1957 Mar # Yerevan Time - 4:00 RussiaAsia YER%sT 1991 Mar 31 2:00s - 3:00 1:00 YERST 1991 Sep 23 # independence - 3:00 RussiaAsia AM%sT 1995 Sep 24 2:00s - 4:00 - AMT 1997 - 4:00 RussiaAsia AM%sT 2012 Mar 25 2:00s - 4:00 - AMT + 3:00 - +03 1957 Mar + 4:00 RussiaAsia +04/+05 1991 Mar 31 2:00s + 3:00 RussiaAsia +03/+04 1995 Sep 24 2:00s + 4:00 - +04 1997 + 4:00 RussiaAsia +04/+05 # Azerbaijan + # From Rustam Aliyev of the Azerbaijan Internet Forum (2005-10-23): # According to the resolution of Cabinet of Ministers, 1997 # From Paul Eggert (2015-09-17): It was Resolution No. 21 (1997-03-17). # http://code.az/files/daylight_res.pdf + +# From Steffen Thorsen (2016-03-17): +# ... the Azerbaijani Cabinet of Ministers has cancelled switching to +# daylight saving time.... +# http://www.azernews.az/azerbaijan/94137.html +# http://vestnikkavkaza.net/news/Azerbaijani-Cabinet-of-Ministers-cancels-daylight-saving-time.html +# http://en.apa.az/xeber_azerbaijan_abolishes_daylight_savings_ti_240862.html + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Azer 1997 max - Mar lastSun 4:00 1:00 S -Rule Azer 1997 max - Oct lastSun 5:00 0 - +Rule Azer 1997 2015 - Mar lastSun 4:00 1:00 S +Rule Azer 1997 2015 - Oct lastSun 5:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Baku 3:19:24 - LMT 1924 May 2 - 3:00 - BAKT 1957 Mar # Baku Time - 4:00 RussiaAsia BAK%sT 1991 Mar 31 2:00s - 3:00 1:00 BAKST 1991 Aug 30 # independence - 3:00 RussiaAsia AZ%sT 1992 Sep lastSat 23:00 - 4:00 - AZT 1996 # Azerbaijan Time - 4:00 EUAsia AZ%sT 1997 - 4:00 Azer AZ%sT + 3:00 - +03 1957 Mar + 4:00 RussiaAsia +04/+05 1991 Mar 31 2:00s + 3:00 RussiaAsia +03/+04 1992 Sep lastSun 2:00s + 4:00 - +04 1996 + 4:00 EUAsia +04/+05 1997 + 4:00 Azer +04/+05 # Bahrain # See Asia/Qatar. @@ -263,7 +265,7 @@ Zone Asia/Brunei 7:39:40 - LMT 1926 Mar # Milne says 6:24:40 was the meridian of the time ball observatory at Rangoon. # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Rangoon 6:24:40 - LMT 1880 # or Yangon +Zone Asia/Yangon 6:24:40 - LMT 1880 # or Rangoon 6:24:40 - RMT 1920 # Rangoon Mean Time? 6:30 - BURT 1942 May # Burma Time 9:00 - JST 1945 May 3 @@ -378,7 +380,7 @@ Rule PRC 1987 1991 - Apr Sun>=10 0:00 1: # Lewiston (ME) Daily Sun (1939-05-29), p 17, said "Even the time is # different - the occupied districts going by Tokyo time, an hour # ahead of that prevailing in the rest of Shanghai." Guess that the -# Xujiahui Observatory was under French control and stuck with UT+8. +# Xujiahui Observatory was under French control and stuck with UT +08. # # In earlier versions of this file, China had many separate Zone entries, but # this was based on what were apparently incorrect data in Shanks & Pottenger. @@ -387,26 +389,26 @@ Rule PRC 1987 1991 - Apr Sun>=10 0:00 1: # Proposed in 1918 and theoretically in effect until 1949 (although in practice # mainly observed in coastal areas), the five zones were: # -# Changbai Time ("Long-white Time", Long-white = Heilongjiang area) UT+8.5 +# Changbai Time ("Long-white Time", Long-white = Heilongjiang area) UT +08:30 # Asia/Harbin (currently a link to Asia/Shanghai) # Heilongjiang (except Mohe county), Jilin # -# Zhongyuan Time ("Central plain Time") UT+8 +# Zhongyuan Time ("Central plain Time") UT +08 # Asia/Shanghai # most of China # This currently represents most other zones as well, # as apparently these regions have been the same since 1970. # Milne gives 8:05:43.2 for Xujiahui Observatory time; round to nearest. -# Guo says Shanghai switched to UT+8 "from the end of the 19th century". +# Guo says Shanghai switched to UT +08 "from the end of the 19th century". # -# Long-shu Time (probably due to Long and Shu being two names of that area) UT+7 +# Long-shu Time (probably due to Long and Shu being two names of the area) UT +07 # Asia/Chongqing (currently a link to Asia/Shanghai) # Guangxi, Guizhou, Hainan, Ningxia, Sichuan, Shaanxi, and Yunnan; # most of Gansu; west Inner Mongolia; west Qinghai; and the Guangdong # counties Deqing, Enping, Kaiping, Luoding, Taishan, Xinxing, # Yangchun, Yangjiang, Yu'nan, and Yunfu. # -# Xin-zang Time ("Xinjiang-Tibet Time") UT+6 +# Xin-zang Time ("Xinjiang-Tibet Time") UT +06 # Asia/Urumqi # This currently represents Kunlun Time as well, # as apparently the two regions have been the same since 1970. @@ -419,7 +421,7 @@ Rule PRC 1987 1991 - Apr Sun>=10 0:00 1: # Shihezi, Changji, Yanqi, Heshuo, Tuokexun, Tulufan, Shanshan, Hami, # Fukang, Kuitun, Kumukuli, Miquan, Qitai, and Turfan. # -# Kunlun Time UT+5.5 +# Kunlun Time UT +05:30 # Asia/Kashgar (currently a link to Asia/Urumqi) # West Tibet, including Pulan, Aheqi, Shufu, Shule; # West Xinjiang, including Aksu, Atushi, Yining, Hetian, Cele, Luopu, Nileke, @@ -435,7 +437,7 @@ Rule PRC 1987 1991 - Apr Sun>=10 0:00 1: # # On the other hand, ethnic Uyghurs, who make up about half the # population of Xinjiang, typically use "Xinjiang time" which is two -# hours behind Beijing time, or UTC +0600. The government of the Xinjiang +# hours behind Beijing time, or UT +06. The government of the Xinjiang # Uyghur Autonomous Region, (XAUR, or just Xinjiang for short) as well as # local governments such as the Ürümqi city government use both times in # publications, referring to what is popularly called Xinjiang time as @@ -491,8 +493,8 @@ Rule PRC 1987 1991 - Apr Sun>=10 0:00 1: # having the same time as Beijing. # From Paul Eggert (2014-06-30): -# In the early days of the PRC, Tibet was given its own time zone (UT+6) but -# this was withdrawn in 1959 and never reinstated; see Tubten Khétsun, +# In the early days of the PRC, Tibet was given its own time zone (UT +06) +# but this was withdrawn in 1959 and never reinstated; see Tubten Khétsun, # Memories of life in Lhasa under Chinese Rule, Columbia U Press, ISBN # 978-0231142861 (2008), translator's introduction by Matthew Akester, p x. # As this is before our 1970 cutoff, Tibet doesn't need a separate zone. @@ -506,12 +508,12 @@ Rule PRC 1987 1991 - Apr Sun>=10 0:00 1: # Republics, the Soviet Union, the Kuomintang, and the People's Republic of # China, and tracking down all these organizations' timekeeping rules would be # quite a trick. Approximate this lost history by a transition from LMT to -# XJT at the start of 1928, the year of accession of the warlord Jin Shuren, +# UT +06 at the start of 1928, the year of accession of the warlord Jin Shuren, # which happens to be the date given by Shanks & Pottenger (no doubt as a -# guess) as the transition from LMT. Ignore the usage of UT+8 before -# 1986-02-01 under the theory that the transition date to UT+8 is unknown and +# guess) as the transition from LMT. Ignore the usage of +08 before +# 1986-02-01 under the theory that the transition date to +08 is unknown and # that the sort of users who prefer Asia/Urumqi now typically ignored the -# UT+8 mandate back then. +# +08 mandate back then. # Zone NAME GMTOFF RULES FORMAT [UNTIL] # Beijing time, used throughout China; represented by Shanghai. @@ -716,7 +718,7 @@ Zone Asia/Hong_Kong 7:36:42 - LMT 1904 O # be found from historical government announcement database. # From Paul Eggert (2014-07-03): -# As per Yu-Cheng Chuang, say that Taiwan was at UT+9 from 1937-10-01 +# As per Yu-Cheng Chuang, say that Taiwan was at UT +09 from 1937-10-01 # until 1945-09-21 at 01:00, overriding Shanks & Pottenger. # Likewise, use Yu-Cheng Chuang's data for DST in Taiwan. @@ -830,16 +832,15 @@ Link Asia/Nicosia Europe/Nicosia # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Tbilisi 2:59:11 - LMT 1880 2:59:11 - TBMT 1924 May 2 # Tbilisi Mean Time - 3:00 - TBIT 1957 Mar # Tbilisi Time - 4:00 RussiaAsia TBI%sT 1991 Mar 31 2:00s - 3:00 1:00 TBIST 1991 Apr 9 # independence - 3:00 RussiaAsia GE%sT 1992 # Georgia Time - 3:00 E-EurAsia GE%sT 1994 Sep lastSun - 4:00 E-EurAsia GE%sT 1996 Oct lastSun - 4:00 1:00 GEST 1997 Mar lastSun - 4:00 E-EurAsia GE%sT 2004 Jun 27 - 3:00 RussiaAsia GE%sT 2005 Mar lastSun 2:00 - 4:00 - GET + 3:00 - +03 1957 Mar + 4:00 RussiaAsia +04/+05 1991 Mar 31 2:00s + 3:00 RussiaAsia +03/+04 1992 + 3:00 E-EurAsia +03/+04 1994 Sep lastSun + 4:00 E-EurAsia +04/+05 1996 Oct lastSun + 4:00 1:00 +05 1997 Mar lastSun + 4:00 E-EurAsia +04/+05 2004 Jun 27 + 3:00 RussiaAsia +03/+04 2005 Mar lastSun 2:00 + 4:00 - +04 # East Timor @@ -874,6 +875,15 @@ Zone Asia/Dili 8:22:20 - LMT 1912 Jan 1 9:00 - TLT # India + +# From Ian P. Beacock, in "A brief history of (modern) time", The Atlantic +# http://www.theatlantic.com/technology/archive/2015/12/the-creation-of-modern-time/421419/ +# (2015-12-22): +# In January 1906, several thousand cotton-mill workers rioted on the +# outskirts of Bombay.... They were protesting the proposed abolition of +# local time in favor of Indian Standard Time.... Journalists called this +# dispute the "Battle of the Clocks." It lasted nearly half a century. + # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Kolkata 5:53:28 - LMT 1880 # Kolkata 5:53:20 - HMT 1941 Oct # Howrah Mean Time? @@ -907,7 +917,7 @@ Zone Asia/Kolkata 5:53:28 - LMT 1880 # These would be the earliest possible times for a change. # Régimes horaires pour le monde entier, by Henri Le Corre, (Éditions # Traditionnelles, 1987, Paris) says that Java and Madura switched -# from JST to UTC+07:30 on 1945-09-23, and gives 1944-09-01 for Jayapura +# from UT +09 to +07:30 on 1945-09-23, and gives 1944-09-01 for Jayapura # (Hollandia). For now, assume all Indonesian locations other than Jayapura # switched on 1945-09-23. # @@ -918,11 +928,11 @@ Zone Asia/Kolkata 5:53:28 - LMT 1880 # summary published by the Time and Frequency Laboratory of the # Research Center for Calibration, Instrumentation and Metrology, # Indonesia, (2006-09-29). -# The abbreviations are: +# The time zone abbreviations and UT offsets are: # -# WIB - UTC+7 - Waktu Indonesia Barat (Indonesia western time) -# WITA - UTC+8 - Waktu Indonesia Tengah (Indonesia central time) -# WIT - UTC+9 - Waktu Indonesia Timur (Indonesia eastern time) +# WIB - +07 - Waktu Indonesia Barat (Indonesia western time) +# WITA - +08 - Waktu Indonesia Tengah (Indonesia central time) +# WIT - +09 - Waktu Indonesia Timur (Indonesia eastern time) # # Zone NAME GMTOFF RULES FORMAT [UNTIL] # Java, Sumatra @@ -1084,8 +1094,15 @@ Rule Iran 2032 2033 - Mar 21 0:00 1:00 D Rule Iran 2032 2033 - Sep 21 0:00 0 S Rule Iran 2034 2035 - Mar 22 0:00 1:00 D Rule Iran 2034 2035 - Sep 22 0:00 0 S -Rule Iran 2036 2037 - Mar 21 0:00 1:00 D -Rule Iran 2036 2037 - Sep 21 0:00 0 S +# +# The following rules are approximations starting in the year 2038. +# These are the best post-2037 approximations available, given the +# restrictions of a single rule using a Gregorian-based data format. +# At some point this table will need to be extended, though quite +# possibly Iran will change the rules first. +Rule Iran 2036 max - Mar 21 0:00 1:00 D +Rule Iran 2036 max - Sep 21 0:00 0 S + # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Tehran 3:25:44 - LMT 1916 3:25:44 - TMT 1946 # Tehran Mean Time @@ -1542,23 +1559,6 @@ Zone Asia/Amman 2:23:44 - LMT 1931 # Kazakhstan -# From Paul Eggert (1996-11-22): -# Andrew Evtichov (1996-04-13) writes that Kazakhstan -# stayed in sync with Moscow after 1990, and that Aqtobe (formerly Aktyubinsk) -# and Aqtau (formerly Shevchenko) are the largest cities in their zones. -# Guess that Aqtau and Aqtobe diverged in 1995, since that's the first time -# IATA SSIM mentions a third time zone in Kazakhstan. - -# From Paul Eggert (2006-03-22): -# German Iofis, ELSI, Almaty (2001-10-09) reports that Kazakhstan uses -# RussiaAsia rules, instead of switching at 00:00 as the IATA has it. -# Go with Shanks & Pottenger, who have them always using RussiaAsia rules. -# Also go with the following claims of Shanks & Pottenger: -# -# - Kazakhstan did not observe DST in 1991. -# - Qyzylorda switched from +5:00 to +6:00 on 1992-01-19 02:00. -# - Oral switched from +5:00 to +4:00 in spring 1989. - # From Kazakhstan Embassy's News Bulletin No. 11 # (2005-03-21): # The Government of Kazakhstan passed a resolution March 15 abolishing @@ -1575,61 +1575,232 @@ Zone Asia/Amman 2:23:44 - LMT 1931 # everything else.... I guess that would make Kazakhstan time zones # de jure UTC+5 and UTC+6 respectively. +# From Stepan Golosunov (2016-03-27) ([*] means see later comments below): +# Review of the linked documents from http://adilet.zan.kz/ +# produced the following data for post-1991 Kazakhstan: +# +# 0. Act of the Cabinet of Ministers of the USSR +# from 1991-02-04 No. 20 +# http://pravo.gov.ru/proxy/ips/?docbody=&nd=102010545 +# removed the extra hour ("decree time") on the territory of the USSR +# starting with the last Sunday of March 1991. +# It also allowed (but not mandated) Kazakh SSR, Kirghiz SSR, Tajik SSR, +# Turkmen SSR and Uzbek SSR to not have "summer" time. +# +# The 1992-01-13 act also refers to the act of the Cabinet of Ministers +# of the Kazakh SSR from 1991-03-20 No. 170 "About the act of the Cabinet +# of Ministers of the USSR from 1991-02-04 No. 20" but I didn't found its +# text. +# +# According to Izvestia newspaper No. 68 (23334) from 1991-03-20 +# (page 6; available at http://libinfo.org/newsr/newsr2574.djvu via +# http://libinfo.org/index.php?id=58564) on 1991-03-31 at 2:00 during +# transition to "summer" time: +# Republic of Georgia, Latvian SSR, Lithuanian SSR, SSR Moldova, +# Estonian SSR; Komi ASSR; Kaliningrad oblast; Nenets autonomous okrug +# were to move clocks 1 hour forward. +# Kazakh SSR (excluding Uralsk oblast); Republic of Kyrgyzstan, Tajik +# SSR; Andijan, Jizzakh, Namangan, Sirdarya, Tashkent, Fergana oblasts +# of the Uzbek SSR were to move clocks 1 hour backwards. +# Other territories were to not move clocks. +# When the "summer" time would end on 1991-09-29, clocks were to be +# moved 1 hour backwards on the territory of the USSR excluding +# Kazakhstan, Kirghizia, Uzbekistan, Turkmenia, Tajikistan. +# +# Apparently there were last minute changes. Apparently Kazakh act No. 170 +# was one of such changes. +# +# https://ru.wikipedia.org/wiki/Декретное время +# claims that Sovetskaya Rossiya newspaper on 1991-03-29 published that +# Nenets autonomous okrug, Komi and Kazakhstan (excluding Uralsk oblast) +# were to not move clocks and Uralsk oblast was to move clocks +# forward; on 1991-09-29 Kazakhstan was to move clocks backwards. +# (Probably there were changes even after that publication. There is an +# article claiming that Kaliningrad oblast decided on 1991-03-29 to not +# move clocks.) +# +# This implies that on 1991-03-31 Asia/Oral remained on +04/+05 while +# the rest of Kazakhstan switched from +06/+07 to +05/06 or from +05/06 +# to +04/+05. It's unclear how Kzyl-Orda oblast moved into the fifth +# time belt. (By switching from +04/+05 to +05/+06 on 1991-09-29?) ... +# +# 1. Act of the Cabinet of Ministers of the Republic of Kazakhstan +# from 1992-01-13 No. 28 +# http://adilet.zan.kz/rus/docs/P920000028_ +# (text includes modification from the 1996 act) +# introduced new rules for calculation of time, mirroring Russian +# 1992-01-08 act. It specified that time would be calculated +# according to time belts plus extra hour ("decree time"), moved clocks +# on the whole territory of Kazakhstan 1 hour forward on 1992-01-19 at +# 2:00, specified DST rules. It acknowledged that Kazakhstan was +# located in the fourth and the fifth time belts and specified the +# border between them to be located east of Kustanay and Aktyubinsk +# oblasts (notably including Turgai and Kzyl-Orda oblasts into the fifth +# time belt). +# +# This means switch on 1992-01-19 at 2:00 from +04/+05 to +05/+06 for +# Asia/Aqtau, Asia/Aqtobe, Asia/Oral, Atyrau and Kustanay oblasts; from +# +05/+06 to +06/+07 for Asia/Almaty and Asia/Qyzylorda (and Arkalyk) [*].... +# +# 2. Act of the Cabinet of Ministers of the Republic of Kazakhstan +# from 1992-03-27 No. 284 +# http://adilet.zan.kz/rus/docs/P920000284_ +# cancels extra hour ("decree time") for Uralsk and Kzyl-Orda oblasts +# since the last Sunday of March 1992, while keeping them in the fourth +# and the fifth time belts respectively. +# +# 3. Order of the Prime Minister of the Republic of Kazakhstan +# from 1994-09-23 No. 384 +# http://adilet.zan.kz/rus/docs/R940000384_ +# cancels the extra hour ("decree time") on the territory of Mangystau +# oblast since the last Sunday of September 1994 (saying that time on +# the territory would correspond to the third time belt as a +# result).... +# +# 4. Act of the Government of the Republic of Kazakhstan +# from 1996-05-08 No. 575 +# http://adilet.zan.kz/rus/docs/P960000575_ +# amends the 1992-01-13 act to end summer time in October instead +# of September, mirroring identical Russian change from 1996-04-23 act. +# +# 5. Act of the Government of the Republic of Kazakhstan +# from 1999-03-26 No. 305 +# http://adilet.zan.kz/rus/docs/P990000305_ +# cancels the extra hour ("decree time") for Atyrau oblast since the +# last Sunday of March 1999 while retaining the oblast in the fourth +# time belt. +# +# This means change from +05/+06 to +04/+05. +# +# There is no zone for Atyrau currently (listed under Asia/Aqtau in +# zone1970.tab).[*] +# +# 6. Act of the Government of the Republic of Kazakhstan +# from 2000-11-23 No. 1749 +# http://adilet.zan.kz/rus/archive/docs/P000001749_/23.11.2000 +# replaces the previous five documents. +# +# The only changes I noticed are in definition of the border between the +# fourth and the fifth time belts. They account for changes in spelling +# and administrative division (splitting of Turgai oblast in 1997 +# probably changed time in territories incorporated into Kostanay oblast +# (including Arkalyk) from +06/+07 to +05/+06) and move Kyzylorda oblast +# from being in the fifth time belt and not using decree time into the +# fourth time belt (no change in practice).[*] +# +# 7. Act of the Government of the Republic of Kazakhstan +# from 2003-12-29 No. 1342 +# http://adilet.zan.kz/rus/docs/P030001342_ +# modified the 2000-11-23 act. No relevant changes, apparently. +# +# 8. Act of the Government of the Republic of Kazakhstan +# from 2004-07-20 No. 775 +# http://adilet.zan.kz/rus/archive/docs/P040000775_/20.07.2004 +# modified the 2000-11-23 act to move Kostanay and Kyzylorda oblasts into +# the fifth time belt and add Aktobe oblast to the list of regions not +# using extra hour ("decree time"), leaving Kazakhstan with only 2 time +# zones (+04/+05 and +06/+07). The changes were to be implemented +# during DST transitions in 2004 and 2005 but the acts got radically +# amended before implementation happened. +# +# 9. Act of the Government of the Republic of Kazakhstan +# from 2004-09-15 No. 1059 +# http://adilet.zan.kz/rus/docs/P040001059_ +# modified the 2000-11-23 act to remove exceptions from the "decree time" +# (leaving Kazakhstan in +05/+06 and +06/+07 zones), amended the +# 2004-07-20 act to implement changes for Atyrau, West Kazakhstan, +# Kostanay, Kyzylorda and Mangystau oblasts by not moving clocks +# during the 2014 transition to "winter" time. +# +# This means transition from +04/+05 to +05/+06 for Atyrau oblast (no +# zone currently), Asia/Oral, Asia/Aqtau and transition from +05/+06 to +# +06/+07 for Kostanay oblast (Kostanay and Arkalyk, no zones currently) +# and Asia/Qyzylorda on 2004-10-31 at 3:00....[*] +# +# 10. Act of the Government of the Republic of Kazakhstan +# from 2005-03-15 No. 231 +# http://adilet.zan.kz/rus/docs/P050000231_ +# removes DST provisions from the 2000-11-23 act, removes most of the +# (already implemented) provisions from the 2004-07-20 and 2004-09-15 +# acts, comes into effect 10 days after official publication. +# The only practical effect seems to be the abolition of the summer +# time. +# +# Unamended version of the act of the Government of the Russian Federation +# No. 23 from 1992-01-08 [See 'europe' file for details]. +# Kazakh 1992-01-13 act appears to provide the same rules and 1992-03-27 +# act was to be enacted on the last Sunday of March 1992. + +# From Paul Eggert (2016-04-15): +# The tables below should reflect Stepan Golosunov's remarks above, +# except for the items marked "[*]" which I haven't gotten to yet. +# It looks like we will need new zones Asia/Atyrau and Asia/Qostanay +# to handle changes from 1992 through 2004 that we did not previously +# know about. + # # Zone NAME GMTOFF RULES FORMAT [UNTIL] # # Almaty (formerly Alma-Ata), representing most locations in Kazakhstan +# This includes KZ-AKM, KZ-ALA, KZ-ALM, KZ-AST, KZ-BAY, KZ-VOS, KZ-ZHA, +# KZ-KAR, KZ-SEV, KZ-PAV, and KZ-YUZ. Zone Asia/Almaty 5:07:48 - LMT 1924 May 2 # or Alma-Ata - 5:00 - ALMT 1930 Jun 21 # Alma-Ata Time - 6:00 RussiaAsia ALM%sT 1991 - 6:00 - ALMT 1992 - 6:00 RussiaAsia ALM%sT 2005 Mar 15 - 6:00 - ALMT -# Qyzylorda (aka Kyzylorda, Kizilorda, Kzyl-Orda, etc.) + 5:00 - +05 1930 Jun 21 + 6:00 RussiaAsia +06/+07 1991 Mar 31 2:00s + 5:00 RussiaAsia +05/+06 1992 Jan 19 2:00s + 6:00 RussiaAsia +06/+07 2004 Oct 31 2:00s + 6:00 - +06 +# Qyzylorda (aka Kyzylorda, Kizilorda, Kzyl-Orda, etc.) (KZ-KZY) Zone Asia/Qyzylorda 4:21:52 - LMT 1924 May 2 - 4:00 - KIZT 1930 Jun 21 # Kizilorda Time - 5:00 - KIZT 1981 Apr 1 - 5:00 1:00 KIZST 1981 Oct 1 - 6:00 - KIZT 1982 Apr 1 - 5:00 RussiaAsia KIZ%sT 1991 - 5:00 - KIZT 1991 Dec 16 # independence - 5:00 - QYZT 1992 Jan 19 2:00 - 6:00 RussiaAsia QYZ%sT 2005 Mar 15 - 6:00 - QYZT -# Aqtobe (aka Aktobe, formerly Aktyubinsk) + 4:00 - +04 1930 Jun 21 + 5:00 - +05 1981 Apr 1 + 5:00 1:00 +06 1981 Oct 1 + 6:00 - +06 1982 Apr 1 + 5:00 RussiaAsia +05/+06 1991 Mar 31 2:00s + 4:00 RussiaAsia +04/+05 1991 Sep 29 2:00s + 5:00 RussiaAsia +05/+06 1992 Jan 19 2:00s + 6:00 RussiaAsia +06/+07 1992 Mar 29 2:00s + 5:00 RussiaAsia +05/+06 2004 Oct 31 2:00s + 6:00 - +06 +# Aqtobe (aka Aktobe, formerly Aktyubinsk) (KZ-AKT) Zone Asia/Aqtobe 3:48:40 - LMT 1924 May 2 - 4:00 - AKTT 1930 Jun 21 # Aktyubinsk Time - 5:00 - AKTT 1981 Apr 1 - 5:00 1:00 AKTST 1981 Oct 1 - 6:00 - AKTT 1982 Apr 1 - 5:00 RussiaAsia AKT%sT 1991 - 5:00 - AKTT 1991 Dec 16 # independence - 5:00 RussiaAsia AQT%sT 2005 Mar 15 # Aqtobe Time - 5:00 - AQTT -# Mangghystau + 4:00 - +04 1930 Jun 21 + 5:00 - +05 1981 Apr 1 + 5:00 1:00 +06 1981 Oct 1 + 6:00 - +06 1982 Apr 1 + 5:00 RussiaAsia +05/+06 1991 Mar 31 2:00s + 4:00 RussiaAsia +04/+05 1992 Jan 19 2:00s + 5:00 RussiaAsia +05/+06 2004 Oct 31 2:00s + 5:00 - +05 +# Qostanay (KZ-KUS) + +# Mangghystau (KZ-MAN) # Aqtau was not founded until 1963, but it represents an inhabited region, # so include time stamps before 1963. Zone Asia/Aqtau 3:21:04 - LMT 1924 May 2 - 4:00 - FORT 1930 Jun 21 # Fort Shevchenko T - 5:00 - FORT 1963 - 5:00 - SHET 1981 Oct 1 # Shevchenko Time - 6:00 - SHET 1982 Apr 1 - 5:00 RussiaAsia SHE%sT 1991 - 5:00 - SHET 1991 Dec 16 # independence - 5:00 RussiaAsia AQT%sT 1995 Mar lastSun 2:00 # Aqtau Time - 4:00 RussiaAsia AQT%sT 2005 Mar 15 - 5:00 - AQTT -# West Kazakhstan + 4:00 - +04 1930 Jun 21 + 5:00 - +05 1963 + 5:00 - +05 1981 Oct 1 + 6:00 - +06 1982 Apr 1 + 5:00 RussiaAsia +05/+06 1991 Mar 31 2:00s + 4:00 RussiaAsia +04/+05 1992 Jan 19 2:00s + 5:00 RussiaAsia +05/+06 1994 Sep 25 2:00s + 4:00 RussiaAsia +04/+05 2004 Oct 31 2:00s + 5:00 - +05 + +# West Kazakhstan (KZ-ZAP) +# From Paul Eggert (2016-03-18): +# The 1989 transition is from USSR act No. 227 (1989-03-14). Zone Asia/Oral 3:25:24 - LMT 1924 May 2 # or Ural'sk - 4:00 - URAT 1930 Jun 21 # Ural'sk time - 5:00 - URAT 1981 Apr 1 - 5:00 1:00 URAST 1981 Oct 1 - 6:00 - URAT 1982 Apr 1 - 5:00 RussiaAsia URA%sT 1989 Mar 26 2:00 - 4:00 RussiaAsia URA%sT 1991 - 4:00 - URAT 1991 Dec 16 # independence - 4:00 RussiaAsia ORA%sT 2005 Mar 15 # Oral Time - 5:00 - ORAT + 4:00 - +04 1930 Jun 21 + 5:00 - +05 1981 Apr 1 + 5:00 1:00 +06 1981 Oct 1 + 6:00 - +06 1982 Apr 1 + 5:00 RussiaAsia +05/+06 1989 Mar 26 2:00s + 4:00 RussiaAsia +04/+05 1992 Jan 19 2:00s + 5:00 RussiaAsia +05/+06 1992 Mar 29 2:00s + 4:00 RussiaAsia +04/+05 2004 Oct 31 2:00s + 5:00 - +05 # Kyrgyzstan (Kirgizstan) # Transitions through 1991 are from Shanks & Pottenger. @@ -1650,11 +1821,11 @@ Rule Kyrgyz 1997 2005 - Mar lastSun 2:30 Rule Kyrgyz 1997 2004 - Oct lastSun 2:30 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Bishkek 4:58:24 - LMT 1924 May 2 - 5:00 - FRUT 1930 Jun 21 # Frunze Time - 6:00 RussiaAsia FRU%sT 1991 Mar 31 2:00s - 5:00 1:00 FRUST 1991 Aug 31 2:00 # independence - 5:00 Kyrgyz KG%sT 2005 Aug 12 # Kyrgyzstan Time - 6:00 - KGT + 5:00 - +05 1930 Jun 21 + 6:00 RussiaAsia +06/+07 1991 Mar 31 2:00s + 5:00 RussiaAsia +05/+06 1991 Aug 31 2:00 + 5:00 Kyrgyz +05/+06 2005 Aug 12 + 6:00 - +06 ############################################################################### @@ -1693,25 +1864,24 @@ Rule ROK 1957 1960 - Sep Sun>=18 0:00 0 Rule ROK 1987 1988 - May Sun>=8 2:00 1:00 D Rule ROK 1987 1988 - Oct Sun>=8 3:00 0 S -# From Paul Eggert (2014-10-30): +# From Paul Eggert (2016-08-23): # The Korean Wikipedia entry gives the following sources for UT offsets: # -# 1908: Official Journal Article No. 3994 (Edict No. 5) +# 1908: Official Journal Article No. 3994 (decree No. 5) # 1912: Governor-General of Korea Official Gazette Issue No. 367 # (Announcement No. 338) # 1954: Presidential Decree No. 876 (1954-03-17) # 1961: Law No. 676 (1961-08-07) -# 1987: Law No. 3919 (1986-12-31) # -# The Wikipedia entry also has confusing information about a change -# to UT+9 in April 1910, but then what would be the point of the later change -# to UT+9 on 1912-01-01? Omit the 1910 change for now. +# (Another source "1987: Law No. 3919 (1986-12-31)" was in the 2014-10-30 +# edition of the Korean Wikipedia entry.) # # I guessed that time zone abbreviations through 1945 followed the same # rules as discussed under Taiwan, with nominal switches from JST to KST # when the respective cities were taken over by the Allies after WWII. # -# For Pyongyang we have no information; guess no changes since World War II. +# For Pyongyang, guess no changes from World War II until 2015, as we +# have no information otherwise. # From Steffen Thorsen (2015-08-07): # According to many news sources, North Korea is going to change to @@ -1871,7 +2041,7 @@ Zone Indian/Maldives 4:54:00 - LMT 1880 # Bill Bonnet (2005-05-19) reports that the US Embassy in Ulaanbaatar says # there is only one time zone and that DST is observed, citing Microsoft # Windows XP as the source. Risto Nykänen (2005-05-16) reports that -# travelmongolia.org says there are two time zones (UTC+7, UTC+8) with no DST. +# travelmongolia.org says there are two time zones (UT +07, +08) with no DST. # Oscar van Vlijmen (2005-05-20) reports that the Mongolian Embassy in # Washington, DC says there are two time zones, with DST observed. # He also found @@ -2111,8 +2281,8 @@ Zone Asia/Kathmandu 5:41:16 - LMT 1920 # http://www.app.com.pk/en_/index.php?option=com_content&task=view&id=99374&Itemid=2 # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Pakistan 2002 only - Apr Sun>=2 0:01 1:00 S -Rule Pakistan 2002 only - Oct Sun>=2 0:01 0 - +Rule Pakistan 2002 only - Apr Sun>=2 0:00 1:00 S +Rule Pakistan 2002 only - Oct Sun>=2 0:00 0 - Rule Pakistan 2008 only - Jun 1 0:00 1:00 S Rule Pakistan 2008 2009 - Nov 1 0:00 0 - Rule Pakistan 2009 only - Apr 15 0:00 1:00 S @@ -2380,6 +2550,16 @@ Zone Asia/Karachi 4:28:12 - LMT 1907 # http://www.timeanddate.com/time/change/gaza-strip/gaza # http://www.timeanddate.com/time/change/west-bank/hebron +# From Hannah Kreitem (2016-03-09): +# http://www.palestinecabinet.gov.ps/WebSite/ar/ViewDetails?ID=31728 +# [Google translation]: "The Council also decided to start daylight +# saving in Palestine as of one o'clock on Saturday morning, +# 2016-03-26, to provide the clock 60 minutes ahead." +# +# From Paul Eggert (2016-03-12): +# Predict spring transitions on March's last Saturday at 01:00 from now on. +# Leave fall predictions alone for now. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule EgyptAsia 1957 only - May 10 0:00 1:00 S Rule EgyptAsia 1957 1958 - Oct 1 0:00 0 - @@ -2408,7 +2588,8 @@ Rule Palestine 2012 2014 - Mar lastThu 2 Rule Palestine 2012 only - Sep 21 1:00 0 - Rule Palestine 2013 only - Sep Fri>=21 0:00 0 - Rule Palestine 2014 max - Oct Fri>=21 0:00 0 - -Rule Palestine 2015 max - Mar lastFri 24:00 1:00 S +Rule Palestine 2015 only - Mar lastFri 24:00 1:00 S +Rule Palestine 2016 max - Mar lastSat 1:00 1:00 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Gaza 2:17:52 - LMT 1900 Oct @@ -2496,7 +2677,7 @@ Link Asia/Qatar Asia/Bahrain # earlier date. # # Shanks & Pottenger also state that until 1968-05-01 Saudi Arabia had two -# time zones; the other zone, at UTC+4, was in the far eastern part of +# time zones; the other zone, at UT +04, was in the far eastern part of # the country. Ignore this, as it's before our 1970 cutoff. # # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -2765,10 +2946,10 @@ Zone Asia/Damascus 2:25:12 - LMT 1920 # # From Shanks & Pottenger. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Dushanbe 4:35:12 - LMT 1924 May 2 - 5:00 - DUST 1930 Jun 21 # Dushanbe Time - 6:00 RussiaAsia DUS%sT 1991 Mar 31 2:00s - 5:00 1:00 DUSST 1991 Sep 9 2:00s - 5:00 - TJT # Tajikistan Time + 5:00 - +05 1930 Jun 21 + 6:00 RussiaAsia +06/+07 1991 Mar 31 2:00s + 5:00 1:00 +05/+06 1991 Sep 9 2:00s + 5:00 - +05 # Thailand # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -2782,11 +2963,10 @@ Link Asia/Bangkok Asia/Vientiane # Laos # From Shanks & Pottenger. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Ashgabat 3:53:32 - LMT 1924 May 2 # or Ashkhabad - 4:00 - ASHT 1930 Jun 21 # Ashkhabad Time - 5:00 RussiaAsia ASH%sT 1991 Mar 31 2:00 - 4:00 RussiaAsia ASH%sT 1991 Oct 27 # independence - 4:00 RussiaAsia TM%sT 1992 Jan 19 2:00 - 5:00 - TMT + 4:00 - +04 1930 Jun 21 + 5:00 RussiaAsia +05/+06 1991 Mar 31 2:00 + 4:00 RussiaAsia +04/+05 1992 Jan 19 2:00 + 5:00 - +05 # United Arab Emirates # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -2798,20 +2978,18 @@ Link Asia/Dubai Asia/Muscat # Oman # Byalokoz 1919 says Uzbekistan was 4:27:53. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Samarkand 4:27:53 - LMT 1924 May 2 - 4:00 - SAMT 1930 Jun 21 # Samarkand Time - 5:00 - SAMT 1981 Apr 1 - 5:00 1:00 SAMST 1981 Oct 1 - 6:00 - TAST 1982 Apr 1 # Tashkent Time - 5:00 RussiaAsia SAM%sT 1991 Sep 1 # independence - 5:00 RussiaAsia UZ%sT 1992 - 5:00 - UZT + 4:00 - +04 1930 Jun 21 + 5:00 - +05 1981 Apr 1 + 5:00 1:00 +06 1981 Oct 1 + 6:00 - +06 1982 Apr 1 + 5:00 RussiaAsia +05/+06 1992 + 5:00 - +05 # Milne says Tashkent was 4:37:10.8; round to nearest. Zone Asia/Tashkent 4:37:11 - LMT 1924 May 2 - 5:00 - TAST 1930 Jun 21 # Tashkent Time - 6:00 RussiaAsia TAS%sT 1991 Mar 31 2:00 - 5:00 RussiaAsia TAS%sT 1991 Sep 1 # independence - 5:00 RussiaAsia UZ%sT 1992 - 5:00 - UZT + 5:00 - +05 1930 Jun 21 + 6:00 RussiaAsia +06/+07 1991 Mar 31 2:00 + 5:00 RussiaAsia +05/+06 1992 + 5:00 - +05 # Vietnam Modified: vendor/tzdata/dist/australasia ============================================================================== --- vendor/tzdata/dist/australasia Sat Oct 8 14:10:45 2016 (r306846) +++ vendor/tzdata/dist/australasia Sat Oct 8 14:31:55 2016 (r306847) @@ -60,6 +60,14 @@ Zone Australia/Eucla 8:35:28 - LMT 1895 # Hamilton is the largest, but there is also a Hamilton in Victoria, # so use Lindeman. # +# From J William Piggott (2016-02-20): +# There is no location named Holiday Islands in Queensland Australia; holiday +# islands is a colloquial term used globally. Hayman and Lindeman are at the +# north and south extremes of the Whitsunday Islands archipelago, and +# Hamilton is in between; it is reasonable to believe that this time zone +# applies to all of the Whitsundays. +# http://www.australia.gov.au/about-australia/australian-story/austn-islands +# # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule AQ 1971 only - Oct lastSun 2:00s 1:00 D Rule AQ 1972 only - Feb lastSun 2:00s 0 S @@ -235,11 +243,11 @@ Zone Australia/Lord_Howe 10:36:20 - LMT # will produce a binary file with an [A]EST-type as the first 32-bit type; # this is required for correct handling of times before 1916 by # pre-2013 versions of localtime. -Zone Antarctica/Macquarie 0 - zzz 1899 Nov +Zone Antarctica/Macquarie 0 - -00 1899 Nov 10:00 - AEST 1916 Oct 1 2:00 10:00 1:00 AEDT 1917 Feb 10:00 Aus AE%sT 1919 Apr 1 0:00s - 0 - zzz 1948 Mar 25 + 0 - -00 1948 Mar 25 10:00 Aus AE%sT 1967 10:00 AT AE%sT 2010 Apr 4 3:00 11:00 - MIST # Macquarie I Standard Time @@ -537,7 +545,7 @@ Zone Pacific/Port_Moresby 9:48:40 - LMT # Base the Bougainville entry on the Arawa-Kieta region, which appears to have # the most people even though it was devastated in the Bougainville Civil War. # -# Although Shanks gives 1942-03-15 / 1943-11-01 for JST, these dates +# Although Shanks gives 1942-03-15 / 1943-11-01 for UT +09, these dates # are apparently rough guesswork from the starts of military campaigns. # The World War II entries below are instead based on Arawa-Kieta. # The Japanese occupied Kieta in July 1942, @@ -545,8 +553,8 @@ Zone Pacific/Port_Moresby 9:48:40 - LMT # http://pwencycl.kgbudge.com/B/o/Bougainville.htm # and seem to have controlled it until their 1945-08-21 surrender. # -# The Autonomous Region of Bougainville plans to switch from UTC+10 to UTC+11 -# on 2014-12-28 at 02:00. They call UTC+11 "Bougainville Standard Time"; +# The Autonomous Region of Bougainville switched from UT +10 to +11 +# on 2014-12-28 at 02:00. They call +11 "Bougainville Standard Time"; # abbreviate this as BST. See: # http://www.bougainville24.com/bougainville-issues/bougainville-gets-own-timezone/ # @@ -612,7 +620,7 @@ Link Pacific/Pago_Pago Pacific/Midway # # From Paul Eggert (2014-06-27): # The International Date Line Act 2011 # http://www.parliament.gov.ws/images/ACTS/International_Date_Line_Act__2011_-_Eng.pdf -# changed Samoa from UTC-11 to UTC+13, effective "12 o'clock midnight, on +# changed Samoa from UT -11 to +13, effective "12 o'clock midnight, on # Thursday 29th December 2011". The International Date Line was adjusted # accordingly. @@ -707,7 +715,7 @@ Zone Pacific/Funafuti 11:56:52 - LMT 190 # 1886-1891; Baker was similar but exact dates are not known. # Inhabited by civilians 1935-1942; U.S. military bases 1943-1944; # uninhabited thereafter. -# Howland observed Hawaii Standard Time (UT-10:30) in 1937; +# Howland observed Hawaii Standard Time (UT -10:30) in 1937; # see page 206 of Elgen M. Long and Marie K. Long, # Amelia Earhart: the Mystery Solved, Simon & Schuster (2000). # So most likely Howland and Baker observed Hawaii Time from 1935 @@ -1465,7 +1473,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901 # Zealand time. I understand that is the time they keep locally, anyhow." # For now, assume this practice goes back to the introduction of standard time # in New Zealand, as this would make Chatham Islands time almost exactly match -# LMT back when New Zealand was at UTC+11:30; also, assume Chatham Islands did +# LMT back when New Zealand was at UT +11:30; also, assume Chatham Islands did # not observe New Zealand's prewar DST. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Oct 8 14:32:44 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75F26C05774; Sat, 8 Oct 2016 14:32:44 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 315E4E9C; Sat, 8 Oct 2016 14:32:44 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u98EWhkb010997; Sat, 8 Oct 2016 14:32:43 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u98EWhx0010995; Sat, 8 Oct 2016 14:32:43 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201610081432.u98EWhx0010995@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 8 Oct 2016 14:32:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r306848 - vendor/tzdata/tzdata2016g X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 14:32:44 -0000 Author: bapt Date: Sat Oct 8 14:32:43 2016 New Revision: 306848 URL: https://svnweb.freebsd.org/changeset/base/306848 Log: Tag import of tzdata 2016g Added: vendor/tzdata/tzdata2016g/ - copied from r294088, vendor/tzdata/dist/ Replaced: vendor/tzdata/tzdata2016g/africa - copied unchanged from r306847, vendor/tzdata/dist/africa vendor/tzdata/tzdata2016g/antarctica - copied unchanged from r306847, vendor/tzdata/dist/antarctica vendor/tzdata/tzdata2016g/asia - copied unchanged from r306847, vendor/tzdata/dist/asia vendor/tzdata/tzdata2016g/australasia - copied unchanged from r306847, vendor/tzdata/dist/australasia vendor/tzdata/tzdata2016g/backward - copied unchanged from r306847, vendor/tzdata/dist/backward vendor/tzdata/tzdata2016g/etcetera - copied unchanged from r306847, vendor/tzdata/dist/etcetera vendor/tzdata/tzdata2016g/europe - copied unchanged from r306847, vendor/tzdata/dist/europe vendor/tzdata/tzdata2016g/factory - copied unchanged from r306847, vendor/tzdata/dist/factory vendor/tzdata/tzdata2016g/iso3166.tab - copied unchanged from r306847, vendor/tzdata/dist/iso3166.tab vendor/tzdata/tzdata2016g/leap-seconds.list - copied unchanged from r306847, vendor/tzdata/dist/leap-seconds.list vendor/tzdata/tzdata2016g/leapseconds - copied unchanged from r306847, vendor/tzdata/dist/leapseconds vendor/tzdata/tzdata2016g/northamerica - copied unchanged from r306847, vendor/tzdata/dist/northamerica vendor/tzdata/tzdata2016g/southamerica - copied unchanged from r306847, vendor/tzdata/dist/southamerica vendor/tzdata/tzdata2016g/zone.tab - copied unchanged from r306847, vendor/tzdata/dist/zone.tab vendor/tzdata/tzdata2016g/zone1970.tab - copied unchanged from r306847, vendor/tzdata/dist/zone1970.tab Copied: vendor/tzdata/tzdata2016g/africa (from r306847, vendor/tzdata/dist/africa) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/tzdata/tzdata2016g/africa Sat Oct 8 14:32:43 2016 (r306848, copy of r306847, vendor/tzdata/dist/africa) @@ -0,0 +1,1188 @@ +# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. + +# This file is by no means authoritative; if you think you know better, +# go ahead and edit the file (and please send any changes to +# tz@iana.org for general use in the future). For more, please see +# the file CONTRIBUTING in the tz distribution. + +# From Paul Eggert (2014-10-31): +# +# Unless otherwise specified, the source for data through 1990 is: +# Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), +# San Diego: ACS Publications, Inc. (2003). +# Unfortunately this book contains many errors and cites no sources. +# +# Gwillim Law writes that a good source +# for recent time zone data is the International Air Transport +# Association's Standard Schedules Information Manual (IATA SSIM), +# published semiannually. Law sent in several helpful summaries +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. +# +# Another source occasionally used is Edward W. Whitman, World Time Differences, +# Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), which +# I found in the UCLA library. +# +# For data circa 1899, a common source is: +# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94. +# http://www.jstor.org/stable/1774359 +# +# A reliable and entertaining source about time zones is +# Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). +# +# Previous editions of this database used WAT, CAT, SAT, and EAT +# for +0:00 through +3:00, respectively, +# but Mark R V Murray reports that +# 'SAST' is the official abbreviation for +2:00 in the country of South Africa, +# 'CAT' is commonly used for +2:00 in countries north of South Africa, and +# 'WAT' is probably the best name for +1:00, as the common phrase for +# the area that includes Nigeria is "West Africa". +# He has heard of "Western Sahara Time" for +0:00 but can find no reference. +# +# To make things confusing, 'WAT' seems to have been used for -1:00 long ago; +# I'd guess that this was because people needed _some_ name for -1:00, +# and at the time, far west Africa was the only major land area in -1:00. +# This usage is now obsolete, as the last use of -1:00 on the African +# mainland seems to have been 1976 in Western Sahara. +# +# To summarize, the following abbreviations seem to have some currency: +# -1:00 WAT West Africa Time (no longer used) +# 0:00 GMT Greenwich Mean Time +# 2:00 CAT Central Africa Time +# 2:00 SAST South Africa Standard Time +# and Murray suggests the following abbreviation: +# 1:00 WAT West Africa Time +# I realize that this leads to 'WAT' being used for both -1:00 and 1:00 +# for times before 1976, but this is the best I can think of +# until we get more information. +# +# I invented the following abbreviations; corrections are welcome! +# 2:00 WAST West Africa Summer Time +# 2:30 BEAT British East Africa Time (no longer used) +# 2:45 BEAUT British East Africa Unified Time (no longer used) +# 3:00 CAST Central Africa Summer Time (no longer used) +# 3:00 SAST South Africa Summer Time (no longer used) +# 3:00 EAT East Africa Time + +# Algeria +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Algeria 1916 only - Jun 14 23:00s 1:00 S +Rule Algeria 1916 1919 - Oct Sun>=1 23:00s 0 - +Rule Algeria 1917 only - Mar 24 23:00s 1:00 S +Rule Algeria 1918 only - Mar 9 23:00s 1:00 S +Rule Algeria 1919 only - Mar 1 23:00s 1:00 S +Rule Algeria 1920 only - Feb 14 23:00s 1:00 S +Rule Algeria 1920 only - Oct 23 23:00s 0 - +Rule Algeria 1921 only - Mar 14 23:00s 1:00 S +Rule Algeria 1921 only - Jun 21 23:00s 0 - +Rule Algeria 1939 only - Sep 11 23:00s 1:00 S +Rule Algeria 1939 only - Nov 19 1:00 0 - +Rule Algeria 1944 1945 - Apr Mon>=1 2:00 1:00 S +Rule Algeria 1944 only - Oct 8 2:00 0 - +Rule Algeria 1945 only - Sep 16 1:00 0 - +Rule Algeria 1971 only - Apr 25 23:00s 1:00 S +Rule Algeria 1971 only - Sep 26 23:00s 0 - +Rule Algeria 1977 only - May 6 0:00 1:00 S +Rule Algeria 1977 only - Oct 21 0:00 0 - +Rule Algeria 1978 only - Mar 24 1:00 1:00 S +Rule Algeria 1978 only - Sep 22 3:00 0 - +Rule Algeria 1980 only - Apr 25 0:00 1:00 S +Rule Algeria 1980 only - Oct 31 2:00 0 - +# Shanks & Pottenger give 0:09:20 for Paris Mean Time; go with Howse's +# more precise 0:09:21. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Algiers 0:12:12 - LMT 1891 Mar 15 0:01 + 0:09:21 - PMT 1911 Mar 11 # Paris Mean Time + 0:00 Algeria WE%sT 1940 Feb 25 2:00 + 1:00 Algeria CE%sT 1946 Oct 7 + 0:00 - WET 1956 Jan 29 + 1:00 - CET 1963 Apr 14 + 0:00 Algeria WE%sT 1977 Oct 21 + 1:00 Algeria CE%sT 1979 Oct 26 + 0:00 Algeria WE%sT 1981 May + 1:00 - CET + +# Angola +# Benin +# See Africa/Lagos. + +# Botswana +# See Africa/Maputo. + +# Burkina Faso +# See Africa/Abidjan. + +# Burundi +# See Africa/Maputo. + +# Cameroon +# See Africa/Lagos. + +# Cape Verde +# +# Shanks gives 1907 for the transition to CVT. +# Perhaps the 1911-05-26 Portuguese decree +# http://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf +# merely made it official? +# +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Atlantic/Cape_Verde -1:34:04 - LMT 1907 # Praia + -2:00 - CVT 1942 Sep + -2:00 1:00 CVST 1945 Oct 15 + -2:00 - CVT 1975 Nov 25 2:00 + -1:00 - CVT + +# Central African Republic +# See Africa/Lagos. + +# Chad +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Ndjamena 1:00:12 - LMT 1912 # N'Djamena + 1:00 - WAT 1979 Oct 14 + 1:00 1:00 WAST 1980 Mar 8 + 1:00 - WAT + +# Comoros +# See Africa/Nairobi. + +# Democratic Republic of the Congo +# See Africa/Lagos for the western part and Africa/Maputo for the eastern. + +# Republic of the Congo +# See Africa/Lagos. + +# Côte d'Ivoire / Ivory Coast +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Abidjan -0:16:08 - LMT 1912 + 0:00 - GMT +Link Africa/Abidjan Africa/Bamako # Mali +Link Africa/Abidjan Africa/Banjul # Gambia +Link Africa/Abidjan Africa/Conakry # Guinea +Link Africa/Abidjan Africa/Dakar # Senegal +Link Africa/Abidjan Africa/Freetown # Sierra Leone +Link Africa/Abidjan Africa/Lome # Togo +Link Africa/Abidjan Africa/Nouakchott # Mauritania +Link Africa/Abidjan Africa/Ouagadougou # Burkina Faso +Link Africa/Abidjan Africa/Sao_Tome # São Tomé and Príncipe +Link Africa/Abidjan Atlantic/St_Helena # St Helena + +# Djibouti +# See Africa/Nairobi. + +############################################################################### + +# Egypt + +# Milne says Cairo used 2:05:08.9, the local mean time of the Abbasizeh +# observatory; round to nearest. Milne also says that the official time for +# Egypt was mean noon at the Great Pyramid, 2:04:30.5, but apparently this +# did not apply to Cairo, Alexandria, or Port Said. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Egypt 1940 only - Jul 15 0:00 1:00 S +Rule Egypt 1940 only - Oct 1 0:00 0 - +Rule Egypt 1941 only - Apr 15 0:00 1:00 S +Rule Egypt 1941 only - Sep 16 0:00 0 - +Rule Egypt 1942 1944 - Apr 1 0:00 1:00 S +Rule Egypt 1942 only - Oct 27 0:00 0 - +Rule Egypt 1943 1945 - Nov 1 0:00 0 - +Rule Egypt 1945 only - Apr 16 0:00 1:00 S +Rule Egypt 1957 only - May 10 0:00 1:00 S +Rule Egypt 1957 1958 - Oct 1 0:00 0 - +Rule Egypt 1958 only - May 1 0:00 1:00 S +Rule Egypt 1959 1981 - May 1 1:00 1:00 S +Rule Egypt 1959 1965 - Sep 30 3:00 0 - +Rule Egypt 1966 1994 - Oct 1 3:00 0 - +Rule Egypt 1982 only - Jul 25 1:00 1:00 S +Rule Egypt 1983 only - Jul 12 1:00 1:00 S +Rule Egypt 1984 1988 - May 1 1:00 1:00 S +Rule Egypt 1989 only - May 6 1:00 1:00 S +Rule Egypt 1990 1994 - May 1 1:00 1:00 S +# IATA (after 1990) says transitions are at 0:00. +# Go with IATA starting in 1995, except correct 1995 entry from 09-30 to 09-29. + +# From Alexander Krivenyshev (2011-04-20): +# "...Egypt's interim cabinet decided on Wednesday to cancel daylight +# saving time after a poll posted on its website showed the majority of +# Egyptians would approve the cancellation." +# +# Egypt to cancel daylight saving time +# http://www.almasryalyoum.com/en/node/407168 +# or +# http://www.worldtimezone.com/dst_news/dst_news_egypt04.html +Rule Egypt 1995 2010 - Apr lastFri 0:00s 1:00 S +Rule Egypt 1995 2005 - Sep lastThu 24:00 0 - +# From Steffen Thorsen (2006-09-19): +# The Egyptian Gazette, issue 41,090 (2006-09-18), page 1, reports: +# Egypt will turn back clocks by one hour at the midnight of Thursday +# after observing the daylight saving time since May. +# http://news.gom.com.eg/gazette/pdf/2006/09/18/01.pdf +Rule Egypt 2006 only - Sep 21 24:00 0 - +# From Dirk Losch (2007-08-14): +# I received a mail from an airline which says that the daylight +# saving time in Egypt will end in the night of 2007-09-06 to 2007-09-07. +# From Jesper Nørgaard Welen (2007-08-15): [The following agree:] +# http://www.nentjes.info/Bill/bill5.htm +# http://www.timeanddate.com/worldclock/city.html?n=53 +# From Steffen Thorsen (2007-09-04): The official information...: +# http://www.sis.gov.eg/En/EgyptOnline/Miscellaneous/000002/0207000000000000001580.htm +Rule Egypt 2007 only - Sep Thu>=1 24:00 0 - +# From Abdelrahman Hassan (2007-09-06): +# Due to the Hijri (lunar Islamic calendar) year being 11 days shorter +# than the year of the Gregorian calendar, Ramadan shifts earlier each +# year. This year it will be observed September 13 (September is quite +# hot in Egypt), and the idea is to make fasting easier for workers by +# shifting business hours one hour out of daytime heat. Consequently, +# unless discontinued, next DST may end Thursday 28 August 2008. +# From Paul Eggert (2007-08-17): +# For lack of better info, assume the new rule is last Thursday in August. + +# From Petr Machata (2009-04-06): +# The following appeared in Red Hat bugzilla[1] (edited): +# +# > $ zdump -v /usr/share/zoneinfo/Africa/Cairo | grep 2009 +# > /usr/share/zoneinfo/Africa/Cairo Thu Apr 23 21:59:59 2009 UTC = Thu = +# Apr 23 +# > 23:59:59 2009 EET isdst=0 gmtoff=7200 +# > /usr/share/zoneinfo/Africa/Cairo Thu Apr 23 22:00:00 2009 UTC = Fri = +# Apr 24 +# > 01:00:00 2009 EEST isdst=1 gmtoff=10800 +# > /usr/share/zoneinfo/Africa/Cairo Thu Aug 27 20:59:59 2009 UTC = Thu = +# Aug 27 +# > 23:59:59 2009 EEST isdst=1 gmtoff=10800 +# > /usr/share/zoneinfo/Africa/Cairo Thu Aug 27 21:00:00 2009 UTC = Thu = +# Aug 27 +# > 23:00:00 2009 EET isdst=0 gmtoff=7200 +# +# > end date should be Thu Sep 24 2009 (Last Thursday in September at 23:59= +# :59) +# > http://support.microsoft.com/kb/958729/ +# +# timeanddate[2] and another site I've found[3] also support that. +# +# [1] https://bugzilla.redhat.com/show_bug.cgi?id=492263 +# [2] http://www.timeanddate.com/worldclock/clockchange.html?n=53 +# [3] http://wwp.greenwichmeantime.com/time-zone/africa/egypt/ + +# From Arthur David Olson (2009-04-20): +# In 2009 (and for the next several years), Ramadan ends before the fourth +# Thursday in September; Egypt is expected to revert to the last Thursday +# in September. + +# From Steffen Thorsen (2009-08-11): +# We have been able to confirm the August change with the Egyptian Cabinet +# Information and Decision Support Center: +# http://www.timeanddate.com/news/time/egypt-dst-ends-2009.html +# +# The Middle East News Agency +# http://www.mena.org.eg/index.aspx +# also reports "Egypt starts winter time on August 21" +# today in article numbered "71, 11/08/2009 12:25 GMT." +# Only the title above is available without a subscription to their service, +# and can be found by searching for "winter" in their search engine +# (at least today). + +# From Alexander Krivenyshev (2010-07-20): +# According to News from Egypt - Al-Masry Al-Youm Egypt's cabinet has +# decided that Daylight Saving Time will not be used in Egypt during +# Ramadan. +# +# Arabic translation: +# "Clocks to go back during Ramadan - and then forward again" +# http://www.almasryalyoum.com/en/news/clocks-go-back-during-ramadan-and-then-forward-again +# http://www.worldtimezone.com/dst_news/dst_news_egypt02.html + +# From Ahmad El-Dardiry (2014-05-07): +# Egypt is to change back to Daylight system on May 15 +# http://english.ahram.org.eg/NewsContent/1/64/100735/Egypt/Politics-/Egypts-government-to-reapply-daylight-saving-time-.aspx + +# From Gunther Vermier (2014-05-13): +# our Egypt office confirms that the change will be at 15 May "midnight" (24:00) + +# From Imed Chihi (2014-06-04): +# We have finally "located" a precise official reference about the DST changes +# in Egypt. The Ministers Cabinet decision is explained at +# http://www.cabinet.gov.eg/Media/CabinetMeetingsDetails.aspx?id=347 ... +# [T]his (Arabic) site is not accessible outside Egypt, but the page ... +# translates into: "With regard to daylight saving time, it is scheduled to +# take effect at exactly twelve o'clock this evening, Thursday, 15 MAY 2014, +# to be suspended by twelve o'clock on the evening of Thursday, 26 JUN 2014, +# and re-established again at the end of the month of Ramadan, at twelve +# o'clock on the evening of Thursday, 31 JUL 2014." This statement has been +# reproduced by other (more accessible) sites[, e.g.,]... +# http://elgornal.net/news/news.aspx?id=4699258 + +# From Paul Eggert (2014-06-04): +# Sarah El Deeb and Lee Keath of AP report that the Egyptian government says +# the change is because of blackouts in Cairo, even though Ahram Online (cited +# above) says DST had no affect on electricity consumption. There is +# no information about when DST will end this fall. See: +# http://abcnews.go.com/International/wireStory/el-sissi-pushes-egyptians-line-23614833 + +# From Steffen Thorsen (2015-04-08): +# Egypt will start DST on midnight after Thursday, April 30, 2015. +# This is based on a law (no 35) from May 15, 2014 saying it starts the last +# Thursday of April.... Clocks will still be turned back for Ramadan, but +# dates not yet announced.... +# http://almogaz.com/news/weird-news/2015/04/05/1947105 ... +# http://www.timeanddate.com/news/time/egypt-starts-dst-2015.html + +# From Ahmed Nazmy (2015-04-20): +# Egypt's ministers cabinet just announced ... that it will cancel DST at +# least for 2015. +# +# From Tim Parenti (2015-04-20): +# http://english.ahram.org.eg/WriterArticles/NewsContentP/1/128195/Egypt/No-daylight-saving-this-summer-Egypts-prime-minist.aspx +# "Egypt's cabinet agreed on Monday not to switch clocks for daylight saving +# time this summer, and carry out studies on the possibility of canceling the +# practice altogether in future years." +# +# From Paul Eggert (2015-04-24): +# Yesterday the office of Egyptian President El-Sisi announced his +# decision to abandon DST permanently. See Ahram Online 2015-04-24. +# http://english.ahram.org.eg/NewsContent/1/64/128509/Egypt/Politics-/Sisi-cancels-daylight-saving-time-in-Egypt.aspx + +# From Steffen Thorsen (2016-04-29): +# Egypt will have DST from July 7 until the end of October.... +# http://english.ahram.org.eg/NewsContentP/1/204655/Egypt/Daylight-savings-time-returning-to-Egypt-on--July.aspx +# From Mina Samuel (2016-07-04): +# Egyptian government took the decision to cancel the DST, + +Rule Egypt 2008 only - Aug lastThu 24:00 0 - +Rule Egypt 2009 only - Aug 20 24:00 0 - +Rule Egypt 2010 only - Aug 10 24:00 0 - +Rule Egypt 2010 only - Sep 9 24:00 1:00 S +Rule Egypt 2010 only - Sep lastThu 24:00 0 - +Rule Egypt 2014 only - May 15 24:00 1:00 S +Rule Egypt 2014 only - Jun 26 24:00 0 - +Rule Egypt 2014 only - Jul 31 24:00 1:00 S +Rule Egypt 2014 only - Sep lastThu 24:00 0 - + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Cairo 2:05:09 - LMT 1900 Oct + 2:00 Egypt EE%sT + +# Equatorial Guinea +# See Africa/Lagos. + +# Eritrea +# Ethiopia +# See Africa/Nairobi. + +# Gabon +# See Africa/Lagos. + +# Gambia +# See Africa/Abidjan. + +# Ghana +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +# Whitman says DST was observed from 1931 to "the present"; +# Shanks & Pottenger say 1936 to 1942; +# and September 1 to January 1 is given by: +# Scott Keltie J, Epstein M (eds), The Statesman's Year-Book, +# 57th ed. Macmillan, London (1920), OCLC 609408015, pp xxviii. +# For lack of better info, assume DST was observed from 1920 to 1942. +Rule Ghana 1920 1942 - Sep 1 0:00 0:20 GHST +Rule Ghana 1920 1942 - Dec 31 0:00 0 GMT +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Accra -0:00:52 - LMT 1918 + 0:00 Ghana %s + +# Guinea +# See Africa/Abidjan. + +# Guinea-Bissau +# +# Shanks gives 1911-05-26 for the transition to WAT, +# evidently confusing the date of the Portuguese decree +# http://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf +# with the date that it took effect, namely 1912-01-01. +# +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Bissau -1:02:20 - LMT 1912 Jan 1 + -1:00 - WAT 1975 + 0:00 - GMT + +# Kenya +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Nairobi 2:27:16 - LMT 1928 Jul + 3:00 - EAT 1930 + 2:30 - BEAT 1940 + 2:45 - BEAUT 1960 + 3:00 - EAT +Link Africa/Nairobi Africa/Addis_Ababa # Ethiopia +Link Africa/Nairobi Africa/Asmara # Eritrea +Link Africa/Nairobi Africa/Dar_es_Salaam # Tanzania +Link Africa/Nairobi Africa/Djibouti +Link Africa/Nairobi Africa/Kampala # Uganda +Link Africa/Nairobi Africa/Mogadishu # Somalia +Link Africa/Nairobi Indian/Antananarivo # Madagascar +Link Africa/Nairobi Indian/Comoro +Link Africa/Nairobi Indian/Mayotte + +# Lesotho +# See Africa/Johannesburg. + +# Liberia +# From Paul Eggert (2006-03-22): +# In 1972 Liberia was the last country to switch +# from a UTC offset that was not a multiple of 15 or 20 minutes. +# Howse reports that it was in honor of their president's birthday. +# Shank & Pottenger report the date as May 1, whereas Howse reports Jan; +# go with Shanks & Pottenger. +# For Liberia before 1972, Shanks & Pottenger report -0:44, whereas Howse and +# Whitman each report -0:44:30; go with the more precise figure. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Monrovia -0:43:08 - LMT 1882 + -0:43:08 - MMT 1919 Mar # Monrovia Mean Time + -0:44:30 - LRT 1972 May # Liberia Time + 0:00 - GMT + +############################################################################### + +# Libya + +# From Even Scharning (2012-11-10): +# Libya set their time one hour back at 02:00 on Saturday November 10. +# http://www.libyaherald.com/2012/11/04/clocks-to-go-back-an-hour-on-saturday/ +# Here is an official source [in Arabic]: http://ls.ly/fb6Yc +# +# Steffen Thorsen forwarded a translation (2012-11-10) in +# http://mm.icann.org/pipermail/tz/2012-November/018451.html +# +# From Tim Parenti (2012-11-11): +# Treat the 2012-11-10 change as a zone change from UTC+2 to UTC+1. +# The DST rules planned for 2013 and onward roughly mirror those of Europe +# (either two days before them or five days after them, so as to fall on +# lastFri instead of lastSun). + +# From Even Scharning (2013-10-25): +# The scheduled end of DST in Libya on Friday, October 25, 2013 was +# cancelled yesterday.... +# http://www.libyaherald.com/2013/10/24/correction-no-time-change-tomorrow/ +# +# From Paul Eggert (2013-10-25): +# For now, assume they're reverting to the pre-2012 rules of permanent UT +02. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Libya 1951 only - Oct 14 2:00 1:00 S +Rule Libya 1952 only - Jan 1 0:00 0 - +Rule Libya 1953 only - Oct 9 2:00 1:00 S +Rule Libya 1954 only - Jan 1 0:00 0 - +Rule Libya 1955 only - Sep 30 0:00 1:00 S +Rule Libya 1956 only - Jan 1 0:00 0 - +Rule Libya 1982 1984 - Apr 1 0:00 1:00 S +Rule Libya 1982 1985 - Oct 1 0:00 0 - +Rule Libya 1985 only - Apr 6 0:00 1:00 S +Rule Libya 1986 only - Apr 4 0:00 1:00 S +Rule Libya 1986 only - Oct 3 0:00 0 - +Rule Libya 1987 1989 - Apr 1 0:00 1:00 S +Rule Libya 1987 1989 - Oct 1 0:00 0 - +Rule Libya 1997 only - Apr 4 0:00 1:00 S +Rule Libya 1997 only - Oct 4 0:00 0 - +Rule Libya 2013 only - Mar lastFri 1:00 1:00 S +Rule Libya 2013 only - Oct lastFri 2:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Tripoli 0:52:44 - LMT 1920 + 1:00 Libya CE%sT 1959 + 2:00 - EET 1982 + 1:00 Libya CE%sT 1990 May 4 +# The 1996 and 1997 entries are from Shanks & Pottenger; +# the IATA SSIM data entries contain some obvious errors. + 2:00 - EET 1996 Sep 30 + 1:00 Libya CE%sT 1997 Oct 4 + 2:00 - EET 2012 Nov 10 2:00 + 1:00 Libya CE%sT 2013 Oct 25 2:00 + 2:00 - EET + +# Madagascar +# See Africa/Nairobi. + +# Malawi +# See Africa/Maputo. + +# Mali +# Mauritania +# See Africa/Abidjan. + +# Mauritius + +# From Steffen Thorsen (2008-06-25): +# Mauritius plans to observe DST from 2008-11-01 to 2009-03-31 on a trial +# basis.... +# It seems that Mauritius observed daylight saving time from 1982-10-10 to +# 1983-03-20 as well, but that was not successful.... +# http://www.timeanddate.com/news/time/mauritius-daylight-saving-time.html + +# From Alex Krivenyshev (2008-06-25): +# http://economicdevelopment.gov.mu/portal/site/Mainhomepage/menuitem.a42b24128104d9845dabddd154508a0c/?content_id=0a7cee8b5d69a110VgnVCM1000000a04a8c0RCRD + +# From Arthur David Olson (2008-06-30): +# The www.timeanddate.com article cited by Steffen Thorsen notes that "A +# final decision has yet to be made on the times that daylight saving +# would begin and end on these dates." As a place holder, use midnight. + +# From Paul Eggert (2008-06-30): +# Follow Thorsen on DST in 1982/1983, instead of Shanks & Pottenger. + +# From Steffen Thorsen (2008-07-10): +# According to +# http://www.lexpress.mu/display_article.php?news_id=111216 +# (in French), Mauritius will start and end their DST a few days earlier +# than previously announced (2008-11-01 to 2009-03-31). The new start +# date is 2008-10-26 at 02:00 and the new end date is 2009-03-27 (no time +# given, but it is probably at either 2 or 3 wall clock time). +# +# A little strange though, since the article says that they moved the date +# to align itself with Europe and USA which also change time on that date, +# but that means they have not paid attention to what happened in +# USA/Canada last year (DST ends first Sunday in November). I also wonder +# why that they end on a Friday, instead of aligning with Europe which +# changes two days later. + +# From Alex Krivenyshev (2008-07-11): +# Seems that English language article "The revival of daylight saving +# time: Energy conservation?"- No. 16578 (07/11/2008) was originally +# published on Monday, June 30, 2008... +# +# I guess that article in French "Le gouvernement avance l'introduction +# de l'heure d'été" stating that DST in Mauritius starting on October 26 +# and ending on March 27, 2009 is the most recent one.... +# http://www.worldtimezone.com/dst_news/dst_news_mauritius02.html + +# From Riad M. Hossen Ally (2008-08-03): +# The Government of Mauritius weblink +# http://www.gov.mu/portal/site/pmosite/menuitem.4ca0efdee47462e7440a600248a521ca/?content_id=4728ca68b2a5b110VgnVCM1000000a04a8c0RCRD +# Cabinet Decision of July 18th, 2008 states as follows: +# +# 4. ...Cabinet has agreed to the introduction into the National Assembly +# of the Time Bill which provides for the introduction of summer time in +# Mauritius. The summer time period which will be of one hour ahead of +# the standard time, will be aligned with that in Europe and the United +# States of America. It will start at two o'clock in the morning on the +# last Sunday of October and will end at two o'clock in the morning on +# the last Sunday of March the following year. The summer time for the +# year 2008-2009 will, therefore, be effective as from 26 October 2008 +# and end on 29 March 2009. + +# From Ed Maste (2008-10-07): +# THE TIME BILL (No. XXVII of 2008) Explanatory Memorandum states the +# beginning / ending of summer time is 2 o'clock standard time in the +# morning of the last Sunday of October / last Sunday of March. +# http://www.gov.mu/portal/goc/assemblysite/file/bill2708.pdf + +# From Steffen Thorsen (2009-06-05): +# According to several sources, Mauritius will not continue to observe +# DST the coming summer... +# +# Some sources, in French: +# http://www.defimedia.info/news/946/Rashid-Beebeejaun-:-%C2%AB-L%E2%80%99heure-d%E2%80%99%C3%A9t%C3%A9-ne-sera-pas-appliqu%C3%A9e-cette-ann%C3%A9e-%C2%BB +# http://lexpress.mu/Story/3398~Beebeejaun---Les-objectifs-d-%C3%A9conomie-d-%C3%A9nergie-de-l-heure-d-%C3%A9t%C3%A9-ont-%C3%A9t%C3%A9-atteints- +# +# Our wrap-up: +# http://www.timeanddate.com/news/time/mauritius-dst-will-not-repeat.html + +# From Arthur David Olson (2009-07-11): +# The "mauritius-dst-will-not-repeat" wrapup includes this: +# "The trial ended on March 29, 2009, when the clocks moved back by one hour +# at 2am (or 02:00) local time..." + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Mauritius 1982 only - Oct 10 0:00 1:00 S +Rule Mauritius 1983 only - Mar 21 0:00 0 - +Rule Mauritius 2008 only - Oct lastSun 2:00 1:00 S +Rule Mauritius 2009 only - Mar lastSun 2:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis + 4:00 Mauritius MU%sT # Mauritius Time +# Agalega Is, Rodriguez +# no information; probably like Indian/Mauritius + +# Mayotte +# See Africa/Nairobi. + +# Morocco +# See the 'europe' file for Spanish Morocco (Africa/Ceuta). + +# From Alex Krivenyshev (2008-05-09): +# Here is an article that Morocco plan to introduce Daylight Saving Time between +# 1 June, 2008 and 27 September, 2008. +# +# "... Morocco is to save energy by adjusting its clock during summer so it will +# be one hour ahead of GMT between 1 June and 27 September, according to +# Communication Minister and Government Spokesman, Khalid Naciri...." +# +# http://www.worldtimezone.net/dst_news/dst_news_morocco01.html +# http://en.afrik.com/news11892.html + +# From Alex Krivenyshev (2008-05-09): +# The Morocco time change can be confirmed on Morocco web site Maghreb Arabe +# Presse: +# http://www.map.ma/eng/sections/box3/morocco_shifts_to_da/view +# +# Morocco shifts to daylight time on June 1st through September 27, Govt. +# spokesman. + +# From Patrice Scattolin (2008-05-09): +# According to this article: +# http://www.avmaroc.com/actualite/heure-dete-comment-a127896.html +# (and republished here: ) +# the changes occur at midnight: +# +# Saturday night May 31st at midnight (which in French is to be +# interpreted as the night between Saturday and Sunday) +# Sunday night the 28th at midnight +# +# Seeing that the 28th is Monday, I am guessing that she intends to say +# the midnight of the 28th which is the midnight between Sunday and +# Monday, which jives with other sources that say that it's inclusive +# June 1st to Sept 27th. +# +# The decision was taken by decree *2-08-224 *but I can't find the decree +# published on the web. +# +# It's also confirmed here: +# http://www.maroc.ma/NR/exeres/FACF141F-D910-44B0-B7FA-6E03733425D1.htm +# on a government portal as being between June 1st and Sept 27th (not yet +# posted in English). +# +# The following Google query will generate many relevant hits: +# http://www.google.com/search?hl=en&q=Conseil+de+gouvernement+maroc+heure+avance&btnG=Search + +# From Steffen Thorsen (2008-08-27): +# Morocco will change the clocks back on the midnight between August 31 +# and September 1. They originally planned to observe DST to near the end +# of September: +# +# One article about it (in French): +# http://www.menara.ma/fr/Actualites/Maroc/Societe/ci.retour_a_l_heure_gmt_a_partir_du_dimanche_31_aout_a_minuit_officiel_.default +# +# We have some further details posted here: +# http://www.timeanddate.com/news/time/morocco-ends-dst-early-2008.html + +# From Steffen Thorsen (2009-03-17): +# Morocco will observe DST from 2009-06-01 00:00 to 2009-08-21 00:00 according +# to many sources, such as +# http://news.marweb.com/morocco/entertainment/morocco-daylight-saving.html +# http://www.medi1sat.ma/fr/depeche.aspx?idp=2312 +# (French) +# +# Our summary: +# http://www.timeanddate.com/news/time/morocco-starts-dst-2009.html + +# From Alexander Krivenyshev (2009-03-17): +# Here is a link to official document from Royaume du Maroc Premier Ministre, +# Ministère de la Modernisation des Secteurs Publics +# +# Under Article 1 of Royal Decree No. 455-67 of Act 23 safar 1387 (2 June 1967) +# concerning the amendment of the legal time, the Ministry of Modernization of +# Public Sectors announced that the official time in the Kingdom will be +# advanced 60 minutes from Sunday 31 May 2009 at midnight. +# +# http://www.mmsp.gov.ma/francais/Actualites_fr/PDF_Actualites_Fr/HeureEte_FR.pdf +# http://www.worldtimezone.com/dst_news/dst_news_morocco03.html + +# From Steffen Thorsen (2010-04-13): +# Several news media in Morocco report that the Ministry of Modernization +# of Public Sectors has announced that Morocco will have DST from +# 2010-05-02 to 2010-08-08. +# +# Example: +# http://www.lavieeco.com/actualites/4099-le-maroc-passera-a-l-heure-d-ete-gmt1-le-2-mai.html +# (French) +# Our page: +# http://www.timeanddate.com/news/time/morocco-starts-dst-2010.html + +# From Dan Abitol (2011-03-30): +# ...Rules for Africa/Casablanca are the following (24h format) +# The 3rd April 2011 at 00:00:00, [it] will be 3rd April 01:00:00 +# The 31st July 2011 at 00:59:59, [it] will be 31st July 00:00:00 +# ...Official links of change in morocco +# The change was broadcast on the FM Radio +# I ve called ANRT (telecom regulations in Morocco) at +# +212.537.71.84.00 +# http://www.anrt.net.ma/fr/ +# They said that +# http://www.map.ma/fr/sections/accueil/l_heure_legale_au_ma/view +# is the official publication to look at. +# They said that the decision was already taken. +# +# More articles in the press +# http://www.yabiladi.com/articles/details/5058/secret-l-heure-d-ete-maroc-leve.html +# http://www.lematin.ma/Actualite/Express/Article.asp?id=148923 +# http://www.lavieeco.com/actualite/Le-Maroc-passe-sur-GMT%2B1-a-partir-de-dim + +# From Petr Machata (2011-03-30): +# They have it written in English here: +# http://www.map.ma/eng/sections/home/morocco_to_spring_fo/view +# +# It says there that "Morocco will resume its standard time on July 31, +# 2011 at midnight." Now they don't say whether they mean midnight of +# wall clock time (i.e. 11pm UTC), but that's what I would assume. It has +# also been like that in the past. + +# From Alexander Krivenyshev (2012-03-09): +# According to Infomédiaire web site from Morocco (infomediaire.ma), +# on March 9, 2012, (in French) Heure légale: +# Le Maroc adopte officiellement l'heure d'été +# http://www.infomediaire.ma/news/maroc/heure-l%C3%A9gale-le-maroc-adopte-officiellement-lheure-d%C3%A9t%C3%A9 +# Governing Council adopted draft decree, that Morocco DST starts on +# the last Sunday of March (March 25, 2012) and ends on +# last Sunday of September (September 30, 2012) +# except the month of Ramadan. +# or (brief) +# http://www.worldtimezone.com/dst_news/dst_news_morocco06.html + +# From Arthur David Olson (2012-03-10): +# The infomediaire.ma source indicates that the system is to be in +# effect every year. It gives 03H00 as the "fall back" time of day; +# it lacks a "spring forward" time of day; assume 2:00 XXX. +# Wait on specifying the Ramadan exception for details about +# start date, start time of day, end date, and end time of day XXX. + +# From Christophe Tropamer (2012-03-16): +# Seen Morocco change again: +# http://www.le2uminutes.com/actualite.php +# "...à partir du dernier dimanche d'avril et non fins mars, +# comme annoncé précédemment." + +# From Milamber Space Network (2012-07-17): +# The official return to GMT is announced by the Moroccan government: +# http://www.mmsp.gov.ma/fr/actualites.aspx?id=288 [in French] +# +# Google translation, lightly edited: +# Back to the standard time of the Kingdom (GMT) +# Pursuant to Decree No. 2-12-126 issued on 26 Jumada (I) 1433 (April 18, +# 2012) and in accordance with the order of Mr. President of the +# Government No. 3-47-12 issued on 24 Sha'ban (11 July 2012), the Ministry +# of Public Service and Administration Modernization announces the return +# of the legal time of the Kingdom (GMT) from Friday, July 20, 2012 until +# Monday, August 20, 2012. So the time will be delayed by 60 minutes from +# 3:00 am Friday, July 20, 2012 and will again be advanced by 60 minutes +# August 20, 2012 from 2:00 am. + +# From Paul Eggert (2013-03-06): +# Morocco's daylight-saving transitions due to Ramadan seem to be +# announced a bit in advance. On 2012-07-11 the Moroccan government +# announced that year's Ramadan daylight-saving transitions would be +# 2012-07-20 and 2012-08-20; see +# http://www.mmsp.gov.ma/fr/actualites.aspx?id=288 + +# From Andrew Paprocki (2013-07-02): +# Morocco announced that the year's Ramadan daylight-savings +# transitions would be 2013-07-07 and 2013-08-10; see: +# http://www.maroc.ma/en/news/morocco-suspends-daylight-saving-time-july-7-aug10 + +# From Steffen Thorsen (2013-09-28): +# Morocco extends DST by one month, on very short notice, just 1 day +# before it was going to end. There is a new decree (2.13.781) for +# this, where DST from now on goes from last Sunday of March at 02:00 +# to last Sunday of October at 03:00, similar to EU rules. Official +# source (French): +# http://www.maroc.gov.ma/fr/actualites/lhoraire-dete-gmt1-maintenu-jusquau-27-octobre-2013 +# Another source (specifying the time for start and end in the decree): +# http://www.lemag.ma/Heure-d-ete-au-Maroc-jusqu-au-27-octobre_a75620.html + +# From Sebastien Willemijns (2014-03-18): +# http://www.afriquinfos.com/articles/2014/3/18/maroc-heure-dete-avancez-tous-horloges-247891.asp + +# From Milamber Space Network (2014-06-05): +# The Moroccan government has recently announced that the country will return +# to standard time at 03:00 on Saturday, June 28, 2014 local time.... DST +# will resume again at 02:00 on Saturday, August 2, 2014.... +# http://www.mmsp.gov.ma/fr/actualites.aspx?id=586 + +# From Milamber (2015-06-08): +# (Google Translation) The hour will thus be delayed 60 minutes +# Sunday, June 14 at 3:00, the ministry said in a statement, adding +# that the time will be advanced again 60 minutes Sunday, July 19, +# 2015 at 2:00. The move comes under 2.12.126 Decree of 26 Jumada I +# 1433 (18 April 2012) and the decision of the Head of Government of +# 16 N. 3-29-15 Chaaban 1435 (4 June 2015). +# Source (french): +# http://lnt.ma/le-maroc-reculera-dune-heure-le-dimanche-14-juin/ +# +# From Milamber (2015-06-09): +# http://www.mmsp.gov.ma/fr/actualites.aspx?id=863 +# +# From Michael Deckers (2015-06-09): +# [The gov.ma announcement] would (probably) make the switch on 2015-07-19 go +# from 03:00 to 04:00 rather than from 02:00 to 03:00, as in the patch.... +# I think the patch is correct and the quoted text is wrong; the text in +# agrees +# with the patch. + +# From Paul Eggert (2015-06-08): +# For now, guess that later spring and fall transitions will use 2015's rules, +# and guess that Morocco will switch to standard time at 03:00 the last +# Sunday before Ramadan, and back to DST at 02:00 the first Sunday after +# Ramadan. To implement this, transition dates for 2016 through 2037 were +# determined by running the following program under GNU Emacs 24.3, with the +# results integrated by hand into the table below. +# (let ((islamic-year 1437)) +# (require 'cal-islam) +# (while (< islamic-year 1460) +# (let ((a (calendar-islamic-to-absolute (list 9 1 islamic-year))) +# (b (calendar-islamic-to-absolute (list 10 1 islamic-year))) +# (sunday 0)) +# (while (/= sunday (mod (setq a (1- a)) 7))) +# (while (/= sunday (mod b 7)) +# (setq b (1+ b))) +# (setq a (calendar-gregorian-from-absolute a)) +# (setq b (calendar-gregorian-from-absolute b)) +# (insert +# (format +# (concat "Rule\tMorocco\t%d\tonly\t-\t%s\t%2d\t 3:00\t0\t-\n" +# "Rule\tMorocco\t%d\tonly\t-\t%s\t%2d\t 2:00\t1:00\tS\n") +# (car (cdr (cdr a))) (calendar-month-name (car a) t) (car (cdr a)) +# (car (cdr (cdr b))) (calendar-month-name (car b) t) (car (cdr b))))) +# (setq islamic-year (+ 1 islamic-year)))) + +# RULE NAME FROM TO TYPE IN ON AT SAVE LETTER/S + +Rule Morocco 1939 only - Sep 12 0:00 1:00 S +Rule Morocco 1939 only - Nov 19 0:00 0 - +Rule Morocco 1940 only - Feb 25 0:00 1:00 S +Rule Morocco 1945 only - Nov 18 0:00 0 - +Rule Morocco 1950 only - Jun 11 0:00 1:00 S +Rule Morocco 1950 only - Oct 29 0:00 0 - +Rule Morocco 1967 only - Jun 3 12:00 1:00 S +Rule Morocco 1967 only - Oct 1 0:00 0 - +Rule Morocco 1974 only - Jun 24 0:00 1:00 S +Rule Morocco 1974 only - Sep 1 0:00 0 - +Rule Morocco 1976 1977 - May 1 0:00 1:00 S +Rule Morocco 1976 only - Aug 1 0:00 0 - +Rule Morocco 1977 only - Sep 28 0:00 0 - +Rule Morocco 1978 only - Jun 1 0:00 1:00 S +Rule Morocco 1978 only - Aug 4 0:00 0 - +Rule Morocco 2008 only - Jun 1 0:00 1:00 S +Rule Morocco 2008 only - Sep 1 0:00 0 - +Rule Morocco 2009 only - Jun 1 0:00 1:00 S +Rule Morocco 2009 only - Aug 21 0:00 0 - +Rule Morocco 2010 only - May 2 0:00 1:00 S +Rule Morocco 2010 only - Aug 8 0:00 0 - +Rule Morocco 2011 only - Apr 3 0:00 1:00 S +Rule Morocco 2011 only - Jul 31 0:00 0 - +Rule Morocco 2012 2013 - Apr lastSun 2:00 1:00 S +Rule Morocco 2012 only - Jul 20 3:00 0 - +Rule Morocco 2012 only - Aug 20 2:00 1:00 S +Rule Morocco 2012 only - Sep 30 3:00 0 - +Rule Morocco 2013 only - Jul 7 3:00 0 - +Rule Morocco 2013 only - Aug 10 2:00 1:00 S +Rule Morocco 2013 max - Oct lastSun 3:00 0 - +Rule Morocco 2014 2021 - Mar lastSun 2:00 1:00 S +Rule Morocco 2014 only - Jun 28 3:00 0 - +Rule Morocco 2014 only - Aug 2 2:00 1:00 S +Rule Morocco 2015 only - Jun 14 3:00 0 - +Rule Morocco 2015 only - Jul 19 2:00 1:00 S +Rule Morocco 2016 only - Jun 5 3:00 0 - +Rule Morocco 2016 only - Jul 10 2:00 1:00 S +Rule Morocco 2017 only - May 21 3:00 0 - +Rule Morocco 2017 only - Jul 2 2:00 1:00 S +Rule Morocco 2018 only - May 13 3:00 0 - +Rule Morocco 2018 only - Jun 17 2:00 1:00 S +Rule Morocco 2019 only - May 5 3:00 0 - +Rule Morocco 2019 only - Jun 9 2:00 1:00 S +Rule Morocco 2020 only - Apr 19 3:00 0 - +Rule Morocco 2020 only - May 24 2:00 1:00 S +Rule Morocco 2021 only - Apr 11 3:00 0 - +Rule Morocco 2021 only - May 16 2:00 1:00 S +Rule Morocco 2022 only - May 8 2:00 1:00 S +Rule Morocco 2023 only - Apr 23 2:00 1:00 S +Rule Morocco 2024 only - Apr 14 2:00 1:00 S +Rule Morocco 2025 only - Apr 6 2:00 1:00 S +Rule Morocco 2026 max - Mar lastSun 2:00 1:00 S +Rule Morocco 2036 only - Oct 19 3:00 0 - +Rule Morocco 2037 only - Oct 4 3:00 0 - + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Casablanca -0:30:20 - LMT 1913 Oct 26 + 0:00 Morocco WE%sT 1984 Mar 16 + 1:00 - CET 1986 + 0:00 Morocco WE%sT + +# Western Sahara +# +# From Gwillim Law (2013-10-22): +# A correspondent who is usually well informed about time zone matters +# ... says that Western Sahara observes daylight saving time, just as +# Morocco does. +# +# From Paul Eggert (2013-10-23): +# Assume that this has been true since Western Sahara switched to GMT, +# since most of it was then controlled by Morocco. + +Zone Africa/El_Aaiun -0:52:48 - LMT 1934 Jan # El Aaiún + -1:00 - WAT 1976 Apr 14 + 0:00 Morocco WE%sT + +# Mozambique +# +# Shanks gives 1903-03-01 for the transition to CAT. +# Perhaps the 1911-05-26 Portuguese decree +# http://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf +# merely made it official? +# +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Maputo 2:10:20 - LMT 1903 Mar + 2:00 - CAT +Link Africa/Maputo Africa/Blantyre # Malawi +Link Africa/Maputo Africa/Bujumbura # Burundi +Link Africa/Maputo Africa/Gaborone # Botswana +Link Africa/Maputo Africa/Harare # Zimbabwe +Link Africa/Maputo Africa/Kigali # Rwanda +Link Africa/Maputo Africa/Lubumbashi # E Dem. Rep. of Congo +Link Africa/Maputo Africa/Lusaka # Zambia + +# Namibia +# The 1994-04-03 transition is from Shanks & Pottenger. +# Shanks & Pottenger report no DST after 1998-04; go with IATA. + +# From Petronella Sibeene (2007-03-30): +# http://allafrica.com/stories/200703300178.html +# While the entire country changes its time, Katima Mulilo and other +# settlements in Caprivi unofficially will not because the sun there +# rises and sets earlier compared to other regions. Chief of +# Forecasting Riaan van Zyl explained that the far eastern parts of +# the country are close to 40 minutes earlier in sunrise than the rest +# of the country. +# +# From Paul Eggert (2007-03-31): +# Apparently the Caprivi Strip informally observes Botswana time, but +# we have no details. In the meantime people there can use Africa/Gaborone. + +# RULE NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Namibia 1994 max - Sep Sun>=1 2:00 1:00 S +Rule Namibia 1995 max - Apr Sun>=1 2:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Windhoek 1:08:24 - LMT 1892 Feb 8 + 1:30 - SWAT 1903 Mar # SW Africa Time + 2:00 - SAST 1942 Sep 20 2:00 + 2:00 1:00 SAST 1943 Mar 21 2:00 + 2:00 - SAST 1990 Mar 21 # independence + 2:00 - CAT 1994 Apr 3 + 1:00 Namibia WA%sT + +# Niger +# See Africa/Lagos. + +# Nigeria +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Lagos 0:13:36 - LMT 1919 Sep + 1:00 - WAT +Link Africa/Lagos Africa/Bangui # Central African Republic +Link Africa/Lagos Africa/Brazzaville # Rep. of the Congo +Link Africa/Lagos Africa/Douala # Cameroon +Link Africa/Lagos Africa/Kinshasa # Dem. Rep. of the Congo (west) +Link Africa/Lagos Africa/Libreville # Gabon +Link Africa/Lagos Africa/Luanda # Angola +Link Africa/Lagos Africa/Malabo # Equatorial Guinea +Link Africa/Lagos Africa/Niamey # Niger +Link Africa/Lagos Africa/Porto-Novo # Benin + +# Réunion +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Indian/Reunion 3:41:52 - LMT 1911 Jun # Saint-Denis + 4:00 - RET # Réunion Time +# +# Crozet Islands also observes Réunion time; see the 'antarctica' file. +# +# Scattered Islands (Îles Éparses) administered from Réunion are as follows. +# The following information about them is taken from +# Îles Éparses (, 1997-07-22, +# in French; no longer available as of 1999-08-17). +# We have no info about their time zone histories. +# *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Oct 8 14:48:29 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80D26C05A6D for ; Sat, 8 Oct 2016 14:48:29 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm25-vm0.bullet.mail.ne1.yahoo.com (nm25-vm0.bullet.mail.ne1.yahoo.com [98.138.91.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C94537F for ; Sat, 8 Oct 2016 14:48:29 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1475938102; bh=rDWH4rs0Bp8Yo6IEwIUh2VSQQewIE1oAlTTyw2iBJtA=; h=Subject:To:References:From:Date:In-Reply-To:From:Subject; b=crtejQuWLCYsldnGwPHRU5wUfNxsxU6ww1a0/xwJk8uFemRKEhEvjcqEdanDrvYINDfNX/6oVcvpVT9ZdSQdWkTGbOET0LUQOXjhwU+nm0ltVHnMB2cFo58GCKnJtyBY/4xg1LpfiEaL66m/u9aq5UVfaGwTfQ+Bb94de1anHNowvGTxEg7/OpvWgL63n/UWH1ts34c0QoleQzLCHiGkZ93lZWRRCkPZjbnIMmum2NVSHKJ+lW4vs8CBK8OiNd8SMGjVc0pv0TpJhR3Qn01om6LcUFeyaSPes4tQeyhAG6mg1RVtvusFNLBd648zmV4LikGwlyCYIP+77Qv8lwncyA== Received: from [98.138.101.130] by nm25.bullet.mail.ne1.yahoo.com with NNFMP; 08 Oct 2016 14:48:22 -0000 Received: from [98.138.84.42] by tm18.bullet.mail.ne1.yahoo.com with NNFMP; 08 Oct 2016 14:48:22 -0000 Received: from [127.0.0.1] by smtp110.mail.ne1.yahoo.com with NNFMP; 08 Oct 2016 14:48:22 -0000 X-Yahoo-Newman-Id: 745025.18361.bm@smtp110.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: CHNzR58VM1nrNL4zDVLhzb93.WcLkWFRRTHgyR7EPOGKwdm tznglxEKV2S7e7.EqvfpCcAjZSUWzjChIoge.f.0Mqu0JAoi5zS1AIU695HF ku.HBBxGOhMjQ1pFrDd1BvM0NiQzQmqLK8v1SEXvgJ336PgFl35WWycoXbmn 6VEfZMVy3TroHscC6nocEJPlapZX2AlJ_pNCXbfZLJChJmAJaBjHWPVhMLLq 1LcizCRnW4tqbtSjSwCAgfXYuQ0ttpTUW5J626Sf4a.0LpowfG6BXDoQGATS 2Q4egtNDuKle72PebazLBx02_UE1aWkaGh9n3lWrswwpBrFxtPaePXgRl9Sw H0Txk1KfgP83VfnBj0WFNhDxifRR.6l5XpB0ntJguX7Fz5lrAYCZXyQtynqN IqoVszENqPaBMXGhl99858dMxgbXxwt1btbLL7uFlh0v9YvWMmhttVdwVUlo rrv4Au2_3mH91WIm64KE8F3Y280uphXDEhXjvNMegOumx3NdZhMRNnRd4dwB TM0yzxdVuM3Vdn2CFo8WnYIj6XMNiehUtZOi6.77GYIKfiJg- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r306843 - in head/bin/sh: . tests/parameters To: Jilles Tjoelker , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Joerg Schilling References: <201610081340.u98DeDxj088061@repo.freebsd.org> From: Pedro Giffuni Message-ID: <19bde483-d3d1-4e81-b56d-7692bb2e984f@FreeBSD.org> Date: Sat, 8 Oct 2016 09:48:23 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <201610081340.u98DeDxj088061@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 14:48:29 -0000 On 10/08/16 08:40, Jilles Tjoelker wrote: > Author: jilles > Date: Sat Oct 8 13:40:12 2016 > New Revision: 306843 > URL: https://svnweb.freebsd.org/changeset/base/306843 > > Log: > sh: Do not import IFS's value from the environment. > > Per Austin group issue #884, always set IFS to $' \t\n'. As before, IFS will > be exported iff it was in the environment. > > Most shells (e.g. bash, ksh93 and mksh) already did this. This change > improves predictability, in that scripts can simply rely on the default > value. > > However, the effect on security is little, since applications should not be > calling the shell with attacker-controlled environment variable names in the > first place and other security-sensitive variables such as PATH should be > and are imported by the shell. > > When using a new sh with an old (before 10.2) libc wordexp(), IFS is no > longer passed on. Otherwise, wordexp() continues to pass along IFS from the > environment per its documentation. > > Discussed with: pfg > Relnotes: yes > For the record, the idea was suggested originally by Joerg Schilling. Thanks! Pedro. From owner-svn-src-all@freebsd.org Sat Oct 8 14:57:22 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB378C05D36; Sat, 8 Oct 2016 14:57:22 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E310C04; Sat, 8 Oct 2016 14:57:22 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u98EvLI8019102; Sat, 8 Oct 2016 14:57:21 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u98EvLfA019100; Sat, 8 Oct 2016 14:57:21 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201610081457.u98EvLfA019100@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Sat, 8 Oct 2016 14:57:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306849 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 14:57:22 -0000 Author: kevlo Date: Sat Oct 8 14:57:21 2016 New Revision: 306849 URL: https://svnweb.freebsd.org/changeset/base/306849 Log: In case of removal of m_copy() the macro should remain named M_COPY() in ip_compat.h after r305824. Leaving as vanilla as possible aids in future maintenance and upgrades. Suggested by: glebius, cy Modified: head/sys/contrib/ipfilter/netinet/fil.c head/sys/contrib/ipfilter/netinet/ip_compat.h Modified: head/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/fil.c Sat Oct 8 14:32:43 2016 (r306848) +++ head/sys/contrib/ipfilter/netinet/fil.c Sat Oct 8 14:57:21 2016 (r306849) @@ -3226,7 +3226,7 @@ filterdone: fdp = fin->fin_dif; if ((fdp != NULL) && (fdp->fd_ptr != NULL) && (fdp->fd_ptr != (void *)-1)) { - mc = M_COPYM(fin->fin_m); + mc = M_COPY(fin->fin_m); if (mc != NULL) ipf_fastroute(mc, &mc, fin, fdp); } Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_compat.h Sat Oct 8 14:32:43 2016 (r306848) +++ head/sys/contrib/ipfilter/netinet/ip_compat.h Sat Oct 8 14:57:21 2016 (r306849) @@ -212,7 +212,7 @@ struct ether_addr { # define MSGDSIZE(m) mbufchainlen(m) # define M_LEN(m) (m)->m_len # define M_ADJ(m,x) m_adj(m, x) -# define M_COPYM(x) m_copym((x), 0, M_COPYALL, M_NOWAIT) +# define M_COPY(x) m_copym((x), 0, M_COPYALL, M_NOWAIT) # define M_DUP(m) m_dup(m, M_NOWAIT) # define IPF_PANIC(x,y) if (x) { printf y; panic("ipf_panic"); } typedef struct mbuf mb_t; @@ -367,7 +367,7 @@ typedef struct mb_s { # define MSGDSIZE(m) msgdsize(m) # define M_LEN(m) (m)->mb_len # define M_ADJ(m,x) (m)->mb_len += x -# define M_COPYM(m) dupmbt(m) +# define M_COPY(m) dupmbt(m) # define M_DUP(m) dupmbt(m) # define GETKTIME(x) gettimeofday((struct timeval *)(x), NULL) # define MTOD(m, t) ((t)(m)->mb_data) From owner-svn-src-all@freebsd.org Sat Oct 8 14:58:27 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF23CC05DA7; Sat, 8 Oct 2016 14:58:27 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7BBFFD81; Sat, 8 Oct 2016 14:58:27 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u98EwQU5019185; Sat, 8 Oct 2016 14:58:26 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u98EwQ65019184; Sat, 8 Oct 2016 14:58:26 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201610081458.u98EwQ65019184@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Sat, 8 Oct 2016 14:58:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306850 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 14:58:27 -0000 Author: kevlo Date: Sat Oct 8 14:58:26 2016 New Revision: 306850 URL: https://svnweb.freebsd.org/changeset/base/306850 Log: Add description for ifi_oqdrops. Modified: head/share/man/man9/ifnet.9 Modified: head/share/man/man9/ifnet.9 ============================================================================== --- head/share/man/man9/ifnet.9 Sat Oct 8 14:57:21 2016 (r306849) +++ head/share/man/man9/ifnet.9 Sat Oct 8 14:58:26 2016 (r306850) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 27, 2016 +.Dd October 8, 2016 .Dt IFNET 9 .Os .Sh NAME @@ -951,6 +951,8 @@ Number of packets sent by link-layer mul .It Va ifi_iqdrops Number of packets dropped on input. Rarely implemented. +.It Va ifi_oqdrops +Number of packets dropped on output. .It Va ifi_noproto Number of packets received for unknown network-layer protocol. .It Va ifi_lastchange From owner-svn-src-all@freebsd.org Sat Oct 8 15:00:16 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD97DC05EAC; Sat, 8 Oct 2016 15:00:16 +0000 (UTC) (envelope-from kevlo@ns.kevlo.org) Received: from ns.kevlo.org (220-135-115-6.HINET-IP.hinet.net [220.135.115.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ns.kevlo.org", Issuer "ns.kevlo.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8053CF56; Sat, 8 Oct 2016 15:00:15 +0000 (UTC) (envelope-from kevlo@ns.kevlo.org) Received: from ns.kevlo.org (localhost [127.0.0.1]) by ns.kevlo.org (8.15.2/8.15.2) with ESMTPS id u98Ex9PX005257 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 8 Oct 2016 22:59:10 +0800 (CST) (envelope-from kevlo@ns.kevlo.org) Received: (from kevlo@localhost) by ns.kevlo.org (8.15.2/8.15.2/Submit) id u98Ex90o005256; Sat, 8 Oct 2016 22:59:09 +0800 (CST) (envelope-from kevlo) Date: Sat, 8 Oct 2016 22:59:09 +0800 From: Kevin Lo To: Gleb Smirnoff Cc: rwatson@FreeBSD.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r305824 - in head/sys: contrib/ipfilter/netinet kern net netinet netinet6 netipsec sys Message-ID: <20161008145909.GA5225@ns.kevlo.org> References: <201609150741.u8F7fmcM059138@repo.freebsd.org> <20161004190920.GL23123@FreeBSD.org> <20161005032057.GA74690@ns.kevlo.org> <20161005231442.GS23123@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161005231442.GS23123@FreeBSD.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 15:00:16 -0000 On Wed, Oct 05, 2016 at 04:14:42PM -0700, Gleb Smirnoff wrote: > > On Wed, Oct 05, 2016 at 11:20:58AM +0800, Kevin Lo wrote: > K> > On Thu, Sep 15, 2016 at 07:41:48AM +0000, Kevin Lo wrote: > K> > K> Log: > K> > K> Remove the 4.3BSD compatible macro m_copy(), use m_copym() instead. > K> > ... > K> > K> Modified: head/sys/contrib/ipfilter/netinet/fil.c > K> > K> ============================================================================== > K> > K> --- head/sys/contrib/ipfilter/netinet/fil.c Thu Sep 15 02:48:56 2016 (r305823) > K> > K> +++ head/sys/contrib/ipfilter/netinet/fil.c Thu Sep 15 07:41:48 2016 (r305824) > K> > K> @@ -3226,7 +3226,7 @@ filterdone: > K> > K> fdp = fin->fin_dif; > K> > K> if ((fdp != NULL) && (fdp->fd_ptr != NULL) && > K> > K> (fdp->fd_ptr != (void *)-1)) { > K> > K> - mc = M_COPY(fin->fin_m); > K> > K> + mc = M_COPYM(fin->fin_m); > K> > K> if (mc != NULL) > K> > K> ipf_fastroute(mc, &mc, fin, fdp); > K> > K> } > K> > K> > K> > K> Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h > K> > K> ============================================================================== > K> > K> --- head/sys/contrib/ipfilter/netinet/ip_compat.h Thu Sep 15 02:48:56 2016 (r305823) > K> > K> +++ head/sys/contrib/ipfilter/netinet/ip_compat.h Thu Sep 15 07:41:48 2016 (r305824) > K> > K> @@ -211,7 +211,7 @@ struct ether_addr { > K> > K> # define MSGDSIZE(m) mbufchainlen(m) > K> > K> # define M_LEN(m) (m)->m_len > K> > K> # define M_ADJ(m,x) m_adj(m, x) > K> > K> -# define M_COPY(x) m_copy((x), 0, M_COPYALL) > K> > K> +# define M_COPYM(x) m_copym((x), 0, M_COPYALL, M_NOWAIT) > K> > K> # define M_DUP(m) m_dup(m, M_NOWAIT) > K> > K> # define IPF_PANIC(x,y) if (x) { printf y; panic("ipf_panic"); } > K> > K> typedef struct mbuf mb_t; > K> > K> @@ -366,7 +366,7 @@ typedef struct mb_s { > K> > K> # define MSGDSIZE(m) msgdsize(m) > K> > K> # define M_LEN(m) (m)->mb_len > K> > K> # define M_ADJ(m,x) (m)->mb_len += x > K> > K> -# define M_COPY(m) dupmbt(m) > K> > K> +# define M_COPYM(m) dupmbt(m) > K> > K> # define M_DUP(m) dupmbt(m) > K> > K> # define GETKTIME(x) gettimeofday((struct timeval *)(x), NULL) > K> > K> # define MTOD(m, t) ((t)(m)->mb_data) > K> > > K> > IMHO, for contributed ipfilter we should only modify ip_compat.h and ip_fil_freebsd.c. > K> > In case of removal of m_copy() the macro should remain named M_COPY(), but it should be > K> > defined to call to function of m_copym(). So fil.c can be left unmodified, and ip_compat.h > K> > will have only 1 line change. The userland part of ip_compat.h which defines M_COPY() to > K> > dupmbt() doesn't need to be renamed as well. > K> > K> Actually your comments were addressed in my original patch, but rwatson@ > K> pointed out that switching M_COPY() to M_COPYM() for consistency: > K> https://reviews.freebsd.org/D7878#163304 > > This looks more like a general comment, not comment to ipfilter part. Robert, > can you confirm please? > > The ipfilter part should have modifications only in ip_compat.h and ip_fil_freebsd.c. Fixed in r306849, thanks. > -- > Totus tuus, Glebius. Kevin From owner-svn-src-all@freebsd.org Sat Oct 8 16:39:23 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D5F9C06977; Sat, 8 Oct 2016 16:39:23 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C76ECF5; Sat, 8 Oct 2016 16:39:22 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u98GdMlP057836; Sat, 8 Oct 2016 16:39:22 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u98GdM6h057835; Sat, 8 Oct 2016 16:39:22 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201610081639.u98GdM6h057835@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sat, 8 Oct 2016 16:39:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306851 - stable/11/sys/dev/ral X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 16:39:23 -0000 Author: avos Date: Sat Oct 8 16:39:21 2016 New Revision: 306851 URL: https://svnweb.freebsd.org/changeset/base/306851 Log: MFC r306498: ral (rt2860): eliminate duplicate ieee80211_process_callback() call (left after r287197) While here, add missing mergeinfo for r306320 (committed in r306549) Modified: stable/11/sys/dev/ral/rt2860.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ral/rt2860.c ============================================================================== --- stable/11/sys/dev/ral/rt2860.c Sat Oct 8 14:58:26 2016 (r306850) +++ stable/11/sys/dev/ral/rt2860.c Sat Oct 8 16:39:21 2016 (r306851) @@ -1140,10 +1140,6 @@ rt2860_tx_intr(struct rt2860_softc *sc, bus_dmamap_sync(sc->txwi_dmat, data->map, BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->txwi_dmat, data->map); - if (data->m->m_flags & M_TXCB) { - ieee80211_process_callback(data->ni, data->m, - 0); - } ieee80211_tx_complete(data->ni, data->m, 0); data->ni = NULL; data->m = NULL; From owner-svn-src-all@freebsd.org Sat Oct 8 17:46:31 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2111EC061FC; Sat, 8 Oct 2016 17:46:31 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED307DFC; Sat, 8 Oct 2016 17:46:30 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u98HkUV1085407; Sat, 8 Oct 2016 17:46:30 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u98HkTlW085405; Sat, 8 Oct 2016 17:46:29 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201610081746.u98HkTlW085405@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 8 Oct 2016 17:46:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306852 - head/contrib/tzcode/zic X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 17:46:31 -0000 Author: bapt Date: Sat Oct 8 17:46:29 2016 New Revision: 306852 URL: https://svnweb.freebsd.org/changeset/base/306852 Log: Incorporate a change from OpenBSD by millert@OpenBSD.org Don't warn about valid time zone abbreviations. POSIX through 2000 says that an abbreviation cannot start with ':', and cannot contain ',', '-', '+', NUL, or a digit. POSIX from 2001 on changes this rule to say that an abbreviation can contain only '-', '+', and alphanumeric characters from the portable character set in the current locale. To be portable to both sets of rules, an abbreviation must therefore use only ASCII letters." Adapted from tzcode2015f. This is needed to be able to update tzdata to a newer version MFC after: 3 days Modified: head/contrib/tzcode/zic/zdump.c head/contrib/tzcode/zic/zic.c Modified: head/contrib/tzcode/zic/zdump.c ============================================================================== --- head/contrib/tzcode/zic/zdump.c Sat Oct 8 16:39:21 2016 (r306851) +++ head/contrib/tzcode/zic/zdump.c Sat Oct 8 17:46:29 2016 (r306852) @@ -212,24 +212,16 @@ const char * const zone; return; cp = abbrp; wp = NULL; - while (isascii((unsigned char) *cp) && isalpha((unsigned char) *cp)) + while (isascii((unsigned char) *cp) && + (isalnum((unsigned char)*cp) || *cp == '-' || *cp == '+')) ++cp; - if (cp - abbrp == 0) - wp = _("lacks alphabetic at start"); - else if (cp - abbrp < 3) - wp = _("has fewer than 3 alphabetics"); + if (cp - abbrp < 3) + wp = _("has fewer than 3 characters"); else if (cp - abbrp > 6) - wp = _("has more than 6 alphabetics"); - if (wp == NULL && (*cp == '+' || *cp == '-')) { - ++cp; - if (isascii((unsigned char) *cp) && - isdigit((unsigned char) *cp)) - if (*cp++ == '1' && *cp >= '0' && *cp <= '4') - ++cp; - if (*cp != '\0') - wp = _("differs from POSIX standard"); - } - if (wp == NULL) + wp = _("has more than 6 characters"); + else if (*cp) + wp = "has characters other than ASCII alphanumerics, '-' or '+'"; + else return; (void) fflush(stdout); (void) fprintf(stderr, Modified: head/contrib/tzcode/zic/zic.c ============================================================================== --- head/contrib/tzcode/zic/zic.c Sat Oct 8 16:39:21 2016 (r306851) +++ head/contrib/tzcode/zic/zic.c Sat Oct 8 17:46:29 2016 (r306852) @@ -2615,29 +2615,15 @@ const char * const string; register const char * cp; register char * wp; - /* - ** Want one to ZIC_MAX_ABBR_LEN_WO_WARN alphabetics - ** optionally followed by a + or - and a number from 1 to 14. - */ cp = string; wp = NULL; while (isascii((unsigned char) *cp) && - isalpha((unsigned char) *cp)) + (isalnum((unsigned char)*cp) || *cp == '-' || *cp == '+')) ++cp; - if (cp - string == 0) -wp = _("time zone abbreviation lacks alphabetic at start"); if (noise && cp - string > 3) -wp = _("time zone abbreviation has more than 3 alphabetics"); +wp = _("time zone abbreviation has more than 3 characters"); if (cp - string > ZIC_MAX_ABBR_LEN_WO_WARN) -wp = _("time zone abbreviation has too many alphabetics"); - if (wp == NULL && (*cp == '+' || *cp == '-')) { - ++cp; - if (isascii((unsigned char) *cp) && - isdigit((unsigned char) *cp)) - if (*cp++ == '1' && - *cp >= '0' && *cp <= '4') - ++cp; - } +wp = _("time zone abbreviation has too many characters"); if (*cp != '\0') wp = _("time zone abbreviation differs from POSIX standard"); if (wp != NULL) { From owner-svn-src-all@freebsd.org Sat Oct 8 17:47:01 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FF45C06295; Sat, 8 Oct 2016 17:47:01 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 352F1EBA; Sat, 8 Oct 2016 17:47:01 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u98Hl0wG085486; Sat, 8 Oct 2016 17:47:00 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u98Hl0eC085481; Sat, 8 Oct 2016 17:47:00 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201610081747.u98Hl0eC085481@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 8 Oct 2016 17:47:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306853 - head/contrib/tzdata X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 17:47:01 -0000 Author: bapt Date: Sat Oct 8 17:46:59 2016 New Revision: 306853 URL: https://svnweb.freebsd.org/changeset/base/306853 Log: Import tzdata 2016g MFC after: 3 days Modified: head/contrib/tzdata/africa head/contrib/tzdata/antarctica head/contrib/tzdata/asia head/contrib/tzdata/australasia head/contrib/tzdata/backward head/contrib/tzdata/etcetera head/contrib/tzdata/europe head/contrib/tzdata/factory head/contrib/tzdata/leap-seconds.list head/contrib/tzdata/leapseconds head/contrib/tzdata/northamerica head/contrib/tzdata/southamerica head/contrib/tzdata/zone.tab head/contrib/tzdata/zone1970.tab Directory Properties: head/contrib/tzdata/ (props changed) Modified: head/contrib/tzdata/africa ============================================================================== --- head/contrib/tzdata/africa Sat Oct 8 17:46:29 2016 (r306852) +++ head/contrib/tzdata/africa Sat Oct 8 17:46:59 2016 (r306853) @@ -343,6 +343,12 @@ Rule Egypt 2007 only - Sep Thu>=1 24:00 # decision to abandon DST permanently. See Ahram Online 2015-04-24. # http://english.ahram.org.eg/NewsContent/1/64/128509/Egypt/Politics-/Sisi-cancels-daylight-saving-time-in-Egypt.aspx +# From Steffen Thorsen (2016-04-29): +# Egypt will have DST from July 7 until the end of October.... +# http://english.ahram.org.eg/NewsContentP/1/204655/Egypt/Daylight-savings-time-returning-to-Egypt-on--July.aspx +# From Mina Samuel (2016-07-04): +# Egyptian government took the decision to cancel the DST, + Rule Egypt 2008 only - Aug lastThu 24:00 0 - Rule Egypt 2009 only - Aug 20 24:00 0 - Rule Egypt 2010 only - Aug 10 24:00 0 - @@ -458,7 +464,7 @@ Zone Africa/Monrovia -0:43:08 - LMT 1882 # http://www.libyaherald.com/2013/10/24/correction-no-time-change-tomorrow/ # # From Paul Eggert (2013-10-25): -# For now, assume they're reverting to the pre-2012 rules of permanent UTC+2. +# For now, assume they're reverting to the pre-2012 rules of permanent UT +02. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Libya 1951 only - Oct 14 2:00 1:00 S @@ -858,11 +864,11 @@ Rule Morocco 2009 only - Aug 21 0:00 0 Rule Morocco 2010 only - May 2 0:00 1:00 S Rule Morocco 2010 only - Aug 8 0:00 0 - Rule Morocco 2011 only - Apr 3 0:00 1:00 S -Rule Morocco 2011 only - Jul 31 0 0 - +Rule Morocco 2011 only - Jul 31 0:00 0 - Rule Morocco 2012 2013 - Apr lastSun 2:00 1:00 S -Rule Morocco 2012 only - Sep 30 3:00 0 - Rule Morocco 2012 only - Jul 20 3:00 0 - Rule Morocco 2012 only - Aug 20 2:00 1:00 S +Rule Morocco 2012 only - Sep 30 3:00 0 - Rule Morocco 2013 only - Jul 7 3:00 0 - Rule Morocco 2013 only - Aug 10 2:00 1:00 S Rule Morocco 2013 max - Oct lastSun 3:00 0 - Modified: head/contrib/tzdata/antarctica ============================================================================== --- head/contrib/tzdata/antarctica Sat Oct 8 17:46:29 2016 (r306852) +++ head/contrib/tzdata/antarctica Sat Oct 8 17:46:59 2016 (r306853) @@ -10,10 +10,8 @@ # http://www.spri.cam.ac.uk/bob/periant.htm # for information. # Unless otherwise specified, we have no time zone information. -# -# Except for the French entries, -# I made up all time zone abbreviations mentioned here; corrections welcome! -# FORMAT is 'zzz' and GMTOFF is 0 for locations while uninhabited. + +# FORMAT is '-00' and GMTOFF is 0 for locations while uninhabited. # Argentina - year-round bases # Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05 @@ -29,7 +27,7 @@ # previously sealers and scientific personnel wintered # Margaret Turner reports # http://web.archive.org/web/20021204222245/http://www.dstc.qut.edu.au/DST/marg/daylight.html -# (1999-09-30) that they're UTC+5, with no DST; +# (1999-09-30) that they're UT +05, with no DST; # presumably this is when they have visitors. # # year-round bases @@ -67,24 +65,23 @@ # http://www.timeanddate.com/news/time/antartica-time-changes-2010.html # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Antarctica/Casey 0 - zzz 1969 - 8:00 - AWST 2009 Oct 18 2:00 - # Australian Western Std Time - 11:00 - CAST 2010 Mar 5 2:00 # Casey Time - 8:00 - AWST 2011 Oct 28 2:00 - 11:00 - CAST 2012 Feb 21 17:00u - 8:00 - AWST -Zone Antarctica/Davis 0 - zzz 1957 Jan 13 - 7:00 - DAVT 1964 Nov # Davis Time - 0 - zzz 1969 Feb - 7:00 - DAVT 2009 Oct 18 2:00 - 5:00 - DAVT 2010 Mar 10 20:00u - 7:00 - DAVT 2011 Oct 28 2:00 - 5:00 - DAVT 2012 Feb 21 20:00u - 7:00 - DAVT -Zone Antarctica/Mawson 0 - zzz 1954 Feb 13 - 6:00 - MAWT 2009 Oct 18 2:00 # Mawson Time - 5:00 - MAWT +Zone Antarctica/Casey 0 - -00 1969 + 8:00 - +08 2009 Oct 18 2:00 + 11:00 - +11 2010 Mar 5 2:00 + 8:00 - +08 2011 Oct 28 2:00 + 11:00 - +11 2012 Feb 21 17:00u + 8:00 - +08 +Zone Antarctica/Davis 0 - -00 1957 Jan 13 + 7:00 - +07 1964 Nov + 0 - -00 1969 Feb + 7:00 - +07 2009 Oct 18 2:00 + 5:00 - +05 2010 Mar 10 20:00u + 7:00 - +07 2011 Oct 28 2:00 + 5:00 - +05 2012 Feb 21 20:00u + 7:00 - +07 +Zone Antarctica/Mawson 0 - -00 1954 Feb 13 + 6:00 - +06 2009 Oct 18 2:00 + 5:00 - +05 # References: # Casey Weather (1998-02-26) # http://www.antdiv.gov.au/aad/exop/sfo/casey/casey_aws.html @@ -137,8 +134,8 @@ Zone Antarctica/Mawson 0 - zzz 1954 Feb # fishing stations operated variously 1819/1931 # # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Indian/Kerguelen 0 - zzz 1950 # Port-aux-Français - 5:00 - TFT # ISO code TF Time +Zone Indian/Kerguelen 0 - -00 1950 # Port-aux-Français + 5:00 - +05 # # year-round base in the main continent # Dumont d'Urville, Île des Pétrels, -6640+14001, since 1956-11 @@ -148,10 +145,10 @@ Zone Indian/Kerguelen 0 - zzz 1950 # Por # It was destroyed by fire on 1952-01-14. # # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Antarctica/DumontDUrville 0 - zzz 1947 - 10:00 - PMT 1952 Jan 14 # Port-Martin Time - 0 - zzz 1956 Nov - 10:00 - DDUT # Dumont-d'Urville Time +Zone Antarctica/DumontDUrville 0 - -00 1947 + 10:00 - +10 1952 Jan 14 + 0 - -00 1956 Nov + 10:00 - +10 # France & Italy - year-round base # Concordia, -750600+1232000, since 2005 @@ -176,8 +173,8 @@ Zone Antarctica/DumontDUrville 0 - zzz 1 # was established on 1957-01-29. Since Syowa station is still the main # station of Japan, it's appropriate for the principal location. # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Antarctica/Syowa 0 - zzz 1957 Jan 29 - 3:00 - SYOT # Syowa Time +Zone Antarctica/Syowa 0 - -00 1957 Jan 29 + 3:00 - +03 # See: # NIPR Antarctic Research Activities (1999-08-17) # http://www.nipr.ac.jp/english/ara01.html @@ -214,19 +211,19 @@ Zone Antarctica/Syowa 0 - zzz 1957 Jan 2 # correct, but they should be quite close to the actual dates. # # From Paul Eggert (2014-03-21): -# The CET-switching Troll rules require zic from tzcode 2014b or later, so as +# The CET-switching Troll rules require zic from tz 2014b or later, so as # suggested by Bengt-Inge Larsson comment them out for now, and approximate # with only UTC and CEST. Uncomment them when 2014b is more prevalent. # # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -#Rule Troll 2005 max - Mar 1 1:00u 1:00 CET -Rule Troll 2005 max - Mar lastSun 1:00u 2:00 CEST -#Rule Troll 2005 max - Oct lastSun 1:00u 1:00 CET -#Rule Troll 2004 max - Nov 7 1:00u 0:00 UTC +#Rule Troll 2005 max - Mar 1 1:00u 1:00 +01 +Rule Troll 2005 max - Mar lastSun 1:00u 2:00 +02 +#Rule Troll 2005 max - Oct lastSun 1:00u 1:00 +01 +#Rule Troll 2004 max - Nov 7 1:00u 0:00 +00 # Remove the following line when uncommenting the above '#Rule' lines. -Rule Troll 2004 max - Oct lastSun 1:00u 0:00 UTC +Rule Troll 2004 max - Oct lastSun 1:00u 0:00 +00 # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Antarctica/Troll 0 - zzz 2005 Feb 12 +Zone Antarctica/Troll 0 - -00 2005 Feb 12 0:00 Troll %s # Poland - year-round base @@ -265,10 +262,10 @@ Zone Antarctica/Troll 0 - zzz 2005 Feb 1 # changes during the year and does not necessarily correspond to mean # solar noon. So the Vostok time might have been whatever the clocks # happened to be during their visit. So we still don't really know what time -# it is at Vostok. But we'll guess UTC+6. +# it is at Vostok. But we'll guess +06. # -Zone Antarctica/Vostok 0 - zzz 1957 Dec 16 - 6:00 - VOST # Vostok time +Zone Antarctica/Vostok 0 - -00 1957 Dec 16 + 6:00 - +06 # S Africa - year-round bases # Marion Island, -4653+03752 @@ -300,8 +297,8 @@ Zone Antarctica/Vostok 0 - zzz 1957 Dec # says Rothera is -03 all year. # # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Antarctica/Rothera 0 - zzz 1976 Dec 1 - -3:00 - ROTT # Rothera time +Zone Antarctica/Rothera 0 - -00 1976 Dec 1 + -3:00 - -03 # Uruguay - year round base # Artigas, King George Island, -621104-0585107 Modified: head/contrib/tzdata/asia ============================================================================== --- head/contrib/tzdata/asia Sat Oct 8 17:46:29 2016 (r306852) +++ head/contrib/tzdata/asia Sat Oct 8 17:46:59 2016 (r306853) @@ -79,13 +79,9 @@ Rule E-EurAsia 1979 1995 - Sep lastSun Rule E-EurAsia 1996 max - Oct lastSun 0:00 0 - Rule RussiaAsia 1981 1984 - Apr 1 0:00 1:00 S Rule RussiaAsia 1981 1983 - Oct 1 0:00 0 - -Rule RussiaAsia 1984 1991 - Sep lastSun 2:00s 0 - -Rule RussiaAsia 1985 1991 - Mar lastSun 2:00s 1:00 S -Rule RussiaAsia 1992 only - Mar lastSat 23:00 1:00 S -Rule RussiaAsia 1992 only - Sep lastSat 23:00 0 - -Rule RussiaAsia 1993 max - Mar lastSun 2:00s 1:00 S -Rule RussiaAsia 1993 1995 - Sep lastSun 2:00s 0 - -Rule RussiaAsia 1996 max - Oct lastSun 2:00s 0 - +Rule RussiaAsia 1984 1995 - Sep lastSun 2:00s 0 - +Rule RussiaAsia 1985 2011 - Mar lastSun 2:00s 1:00 S +Rule RussiaAsia 1996 2011 - Oct lastSun 2:00s 0 - # Afghanistan # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -120,31 +116,37 @@ Zone Asia/Kabul 4:36:48 - LMT 1890 # http://www.worldtimezone.com/dst_news/dst_news_armenia03.html # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Yerevan 2:58:00 - LMT 1924 May 2 - 3:00 - YERT 1957 Mar # Yerevan Time - 4:00 RussiaAsia YER%sT 1991 Mar 31 2:00s - 3:00 1:00 YERST 1991 Sep 23 # independence - 3:00 RussiaAsia AM%sT 1995 Sep 24 2:00s - 4:00 - AMT 1997 - 4:00 RussiaAsia AM%sT 2012 Mar 25 2:00s - 4:00 - AMT + 3:00 - +03 1957 Mar + 4:00 RussiaAsia +04/+05 1991 Mar 31 2:00s + 3:00 RussiaAsia +03/+04 1995 Sep 24 2:00s + 4:00 - +04 1997 + 4:00 RussiaAsia +04/+05 # Azerbaijan + # From Rustam Aliyev of the Azerbaijan Internet Forum (2005-10-23): # According to the resolution of Cabinet of Ministers, 1997 # From Paul Eggert (2015-09-17): It was Resolution No. 21 (1997-03-17). # http://code.az/files/daylight_res.pdf + +# From Steffen Thorsen (2016-03-17): +# ... the Azerbaijani Cabinet of Ministers has cancelled switching to +# daylight saving time.... +# http://www.azernews.az/azerbaijan/94137.html +# http://vestnikkavkaza.net/news/Azerbaijani-Cabinet-of-Ministers-cancels-daylight-saving-time.html +# http://en.apa.az/xeber_azerbaijan_abolishes_daylight_savings_ti_240862.html + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Azer 1997 max - Mar lastSun 4:00 1:00 S -Rule Azer 1997 max - Oct lastSun 5:00 0 - +Rule Azer 1997 2015 - Mar lastSun 4:00 1:00 S +Rule Azer 1997 2015 - Oct lastSun 5:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Baku 3:19:24 - LMT 1924 May 2 - 3:00 - BAKT 1957 Mar # Baku Time - 4:00 RussiaAsia BAK%sT 1991 Mar 31 2:00s - 3:00 1:00 BAKST 1991 Aug 30 # independence - 3:00 RussiaAsia AZ%sT 1992 Sep lastSat 23:00 - 4:00 - AZT 1996 # Azerbaijan Time - 4:00 EUAsia AZ%sT 1997 - 4:00 Azer AZ%sT + 3:00 - +03 1957 Mar + 4:00 RussiaAsia +04/+05 1991 Mar 31 2:00s + 3:00 RussiaAsia +03/+04 1992 Sep lastSun 2:00s + 4:00 - +04 1996 + 4:00 EUAsia +04/+05 1997 + 4:00 Azer +04/+05 # Bahrain # See Asia/Qatar. @@ -263,7 +265,7 @@ Zone Asia/Brunei 7:39:40 - LMT 1926 Mar # Milne says 6:24:40 was the meridian of the time ball observatory at Rangoon. # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Rangoon 6:24:40 - LMT 1880 # or Yangon +Zone Asia/Yangon 6:24:40 - LMT 1880 # or Rangoon 6:24:40 - RMT 1920 # Rangoon Mean Time? 6:30 - BURT 1942 May # Burma Time 9:00 - JST 1945 May 3 @@ -378,7 +380,7 @@ Rule PRC 1987 1991 - Apr Sun>=10 0:00 1: # Lewiston (ME) Daily Sun (1939-05-29), p 17, said "Even the time is # different - the occupied districts going by Tokyo time, an hour # ahead of that prevailing in the rest of Shanghai." Guess that the -# Xujiahui Observatory was under French control and stuck with UT+8. +# Xujiahui Observatory was under French control and stuck with UT +08. # # In earlier versions of this file, China had many separate Zone entries, but # this was based on what were apparently incorrect data in Shanks & Pottenger. @@ -387,26 +389,26 @@ Rule PRC 1987 1991 - Apr Sun>=10 0:00 1: # Proposed in 1918 and theoretically in effect until 1949 (although in practice # mainly observed in coastal areas), the five zones were: # -# Changbai Time ("Long-white Time", Long-white = Heilongjiang area) UT+8.5 +# Changbai Time ("Long-white Time", Long-white = Heilongjiang area) UT +08:30 # Asia/Harbin (currently a link to Asia/Shanghai) # Heilongjiang (except Mohe county), Jilin # -# Zhongyuan Time ("Central plain Time") UT+8 +# Zhongyuan Time ("Central plain Time") UT +08 # Asia/Shanghai # most of China # This currently represents most other zones as well, # as apparently these regions have been the same since 1970. # Milne gives 8:05:43.2 for Xujiahui Observatory time; round to nearest. -# Guo says Shanghai switched to UT+8 "from the end of the 19th century". +# Guo says Shanghai switched to UT +08 "from the end of the 19th century". # -# Long-shu Time (probably due to Long and Shu being two names of that area) UT+7 +# Long-shu Time (probably due to Long and Shu being two names of the area) UT +07 # Asia/Chongqing (currently a link to Asia/Shanghai) # Guangxi, Guizhou, Hainan, Ningxia, Sichuan, Shaanxi, and Yunnan; # most of Gansu; west Inner Mongolia; west Qinghai; and the Guangdong # counties Deqing, Enping, Kaiping, Luoding, Taishan, Xinxing, # Yangchun, Yangjiang, Yu'nan, and Yunfu. # -# Xin-zang Time ("Xinjiang-Tibet Time") UT+6 +# Xin-zang Time ("Xinjiang-Tibet Time") UT +06 # Asia/Urumqi # This currently represents Kunlun Time as well, # as apparently the two regions have been the same since 1970. @@ -419,7 +421,7 @@ Rule PRC 1987 1991 - Apr Sun>=10 0:00 1: # Shihezi, Changji, Yanqi, Heshuo, Tuokexun, Tulufan, Shanshan, Hami, # Fukang, Kuitun, Kumukuli, Miquan, Qitai, and Turfan. # -# Kunlun Time UT+5.5 +# Kunlun Time UT +05:30 # Asia/Kashgar (currently a link to Asia/Urumqi) # West Tibet, including Pulan, Aheqi, Shufu, Shule; # West Xinjiang, including Aksu, Atushi, Yining, Hetian, Cele, Luopu, Nileke, @@ -435,7 +437,7 @@ Rule PRC 1987 1991 - Apr Sun>=10 0:00 1: # # On the other hand, ethnic Uyghurs, who make up about half the # population of Xinjiang, typically use "Xinjiang time" which is two -# hours behind Beijing time, or UTC +0600. The government of the Xinjiang +# hours behind Beijing time, or UT +06. The government of the Xinjiang # Uyghur Autonomous Region, (XAUR, or just Xinjiang for short) as well as # local governments such as the Ürümqi city government use both times in # publications, referring to what is popularly called Xinjiang time as @@ -491,8 +493,8 @@ Rule PRC 1987 1991 - Apr Sun>=10 0:00 1: # having the same time as Beijing. # From Paul Eggert (2014-06-30): -# In the early days of the PRC, Tibet was given its own time zone (UT+6) but -# this was withdrawn in 1959 and never reinstated; see Tubten Khétsun, +# In the early days of the PRC, Tibet was given its own time zone (UT +06) +# but this was withdrawn in 1959 and never reinstated; see Tubten Khétsun, # Memories of life in Lhasa under Chinese Rule, Columbia U Press, ISBN # 978-0231142861 (2008), translator's introduction by Matthew Akester, p x. # As this is before our 1970 cutoff, Tibet doesn't need a separate zone. @@ -506,12 +508,12 @@ Rule PRC 1987 1991 - Apr Sun>=10 0:00 1: # Republics, the Soviet Union, the Kuomintang, and the People's Republic of # China, and tracking down all these organizations' timekeeping rules would be # quite a trick. Approximate this lost history by a transition from LMT to -# XJT at the start of 1928, the year of accession of the warlord Jin Shuren, +# UT +06 at the start of 1928, the year of accession of the warlord Jin Shuren, # which happens to be the date given by Shanks & Pottenger (no doubt as a -# guess) as the transition from LMT. Ignore the usage of UT+8 before -# 1986-02-01 under the theory that the transition date to UT+8 is unknown and +# guess) as the transition from LMT. Ignore the usage of +08 before +# 1986-02-01 under the theory that the transition date to +08 is unknown and # that the sort of users who prefer Asia/Urumqi now typically ignored the -# UT+8 mandate back then. +# +08 mandate back then. # Zone NAME GMTOFF RULES FORMAT [UNTIL] # Beijing time, used throughout China; represented by Shanghai. @@ -716,7 +718,7 @@ Zone Asia/Hong_Kong 7:36:42 - LMT 1904 O # be found from historical government announcement database. # From Paul Eggert (2014-07-03): -# As per Yu-Cheng Chuang, say that Taiwan was at UT+9 from 1937-10-01 +# As per Yu-Cheng Chuang, say that Taiwan was at UT +09 from 1937-10-01 # until 1945-09-21 at 01:00, overriding Shanks & Pottenger. # Likewise, use Yu-Cheng Chuang's data for DST in Taiwan. @@ -830,16 +832,15 @@ Link Asia/Nicosia Europe/Nicosia # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Tbilisi 2:59:11 - LMT 1880 2:59:11 - TBMT 1924 May 2 # Tbilisi Mean Time - 3:00 - TBIT 1957 Mar # Tbilisi Time - 4:00 RussiaAsia TBI%sT 1991 Mar 31 2:00s - 3:00 1:00 TBIST 1991 Apr 9 # independence - 3:00 RussiaAsia GE%sT 1992 # Georgia Time - 3:00 E-EurAsia GE%sT 1994 Sep lastSun - 4:00 E-EurAsia GE%sT 1996 Oct lastSun - 4:00 1:00 GEST 1997 Mar lastSun - 4:00 E-EurAsia GE%sT 2004 Jun 27 - 3:00 RussiaAsia GE%sT 2005 Mar lastSun 2:00 - 4:00 - GET + 3:00 - +03 1957 Mar + 4:00 RussiaAsia +04/+05 1991 Mar 31 2:00s + 3:00 RussiaAsia +03/+04 1992 + 3:00 E-EurAsia +03/+04 1994 Sep lastSun + 4:00 E-EurAsia +04/+05 1996 Oct lastSun + 4:00 1:00 +05 1997 Mar lastSun + 4:00 E-EurAsia +04/+05 2004 Jun 27 + 3:00 RussiaAsia +03/+04 2005 Mar lastSun 2:00 + 4:00 - +04 # East Timor @@ -874,6 +875,15 @@ Zone Asia/Dili 8:22:20 - LMT 1912 Jan 1 9:00 - TLT # India + +# From Ian P. Beacock, in "A brief history of (modern) time", The Atlantic +# http://www.theatlantic.com/technology/archive/2015/12/the-creation-of-modern-time/421419/ +# (2015-12-22): +# In January 1906, several thousand cotton-mill workers rioted on the +# outskirts of Bombay.... They were protesting the proposed abolition of +# local time in favor of Indian Standard Time.... Journalists called this +# dispute the "Battle of the Clocks." It lasted nearly half a century. + # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Kolkata 5:53:28 - LMT 1880 # Kolkata 5:53:20 - HMT 1941 Oct # Howrah Mean Time? @@ -907,7 +917,7 @@ Zone Asia/Kolkata 5:53:28 - LMT 1880 # These would be the earliest possible times for a change. # Régimes horaires pour le monde entier, by Henri Le Corre, (Éditions # Traditionnelles, 1987, Paris) says that Java and Madura switched -# from JST to UTC+07:30 on 1945-09-23, and gives 1944-09-01 for Jayapura +# from UT +09 to +07:30 on 1945-09-23, and gives 1944-09-01 for Jayapura # (Hollandia). For now, assume all Indonesian locations other than Jayapura # switched on 1945-09-23. # @@ -918,11 +928,11 @@ Zone Asia/Kolkata 5:53:28 - LMT 1880 # summary published by the Time and Frequency Laboratory of the # Research Center for Calibration, Instrumentation and Metrology, # Indonesia, (2006-09-29). -# The abbreviations are: +# The time zone abbreviations and UT offsets are: # -# WIB - UTC+7 - Waktu Indonesia Barat (Indonesia western time) -# WITA - UTC+8 - Waktu Indonesia Tengah (Indonesia central time) -# WIT - UTC+9 - Waktu Indonesia Timur (Indonesia eastern time) +# WIB - +07 - Waktu Indonesia Barat (Indonesia western time) +# WITA - +08 - Waktu Indonesia Tengah (Indonesia central time) +# WIT - +09 - Waktu Indonesia Timur (Indonesia eastern time) # # Zone NAME GMTOFF RULES FORMAT [UNTIL] # Java, Sumatra @@ -1084,8 +1094,15 @@ Rule Iran 2032 2033 - Mar 21 0:00 1:00 D Rule Iran 2032 2033 - Sep 21 0:00 0 S Rule Iran 2034 2035 - Mar 22 0:00 1:00 D Rule Iran 2034 2035 - Sep 22 0:00 0 S -Rule Iran 2036 2037 - Mar 21 0:00 1:00 D -Rule Iran 2036 2037 - Sep 21 0:00 0 S +# +# The following rules are approximations starting in the year 2038. +# These are the best post-2037 approximations available, given the +# restrictions of a single rule using a Gregorian-based data format. +# At some point this table will need to be extended, though quite +# possibly Iran will change the rules first. +Rule Iran 2036 max - Mar 21 0:00 1:00 D +Rule Iran 2036 max - Sep 21 0:00 0 S + # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Tehran 3:25:44 - LMT 1916 3:25:44 - TMT 1946 # Tehran Mean Time @@ -1542,23 +1559,6 @@ Zone Asia/Amman 2:23:44 - LMT 1931 # Kazakhstan -# From Paul Eggert (1996-11-22): -# Andrew Evtichov (1996-04-13) writes that Kazakhstan -# stayed in sync with Moscow after 1990, and that Aqtobe (formerly Aktyubinsk) -# and Aqtau (formerly Shevchenko) are the largest cities in their zones. -# Guess that Aqtau and Aqtobe diverged in 1995, since that's the first time -# IATA SSIM mentions a third time zone in Kazakhstan. - -# From Paul Eggert (2006-03-22): -# German Iofis, ELSI, Almaty (2001-10-09) reports that Kazakhstan uses -# RussiaAsia rules, instead of switching at 00:00 as the IATA has it. -# Go with Shanks & Pottenger, who have them always using RussiaAsia rules. -# Also go with the following claims of Shanks & Pottenger: -# -# - Kazakhstan did not observe DST in 1991. -# - Qyzylorda switched from +5:00 to +6:00 on 1992-01-19 02:00. -# - Oral switched from +5:00 to +4:00 in spring 1989. - # From Kazakhstan Embassy's News Bulletin No. 11 # (2005-03-21): # The Government of Kazakhstan passed a resolution March 15 abolishing @@ -1575,61 +1575,232 @@ Zone Asia/Amman 2:23:44 - LMT 1931 # everything else.... I guess that would make Kazakhstan time zones # de jure UTC+5 and UTC+6 respectively. +# From Stepan Golosunov (2016-03-27) ([*] means see later comments below): +# Review of the linked documents from http://adilet.zan.kz/ +# produced the following data for post-1991 Kazakhstan: +# +# 0. Act of the Cabinet of Ministers of the USSR +# from 1991-02-04 No. 20 +# http://pravo.gov.ru/proxy/ips/?docbody=&nd=102010545 +# removed the extra hour ("decree time") on the territory of the USSR +# starting with the last Sunday of March 1991. +# It also allowed (but not mandated) Kazakh SSR, Kirghiz SSR, Tajik SSR, +# Turkmen SSR and Uzbek SSR to not have "summer" time. +# +# The 1992-01-13 act also refers to the act of the Cabinet of Ministers +# of the Kazakh SSR from 1991-03-20 No. 170 "About the act of the Cabinet +# of Ministers of the USSR from 1991-02-04 No. 20" but I didn't found its +# text. +# +# According to Izvestia newspaper No. 68 (23334) from 1991-03-20 +# (page 6; available at http://libinfo.org/newsr/newsr2574.djvu via +# http://libinfo.org/index.php?id=58564) on 1991-03-31 at 2:00 during +# transition to "summer" time: +# Republic of Georgia, Latvian SSR, Lithuanian SSR, SSR Moldova, +# Estonian SSR; Komi ASSR; Kaliningrad oblast; Nenets autonomous okrug +# were to move clocks 1 hour forward. +# Kazakh SSR (excluding Uralsk oblast); Republic of Kyrgyzstan, Tajik +# SSR; Andijan, Jizzakh, Namangan, Sirdarya, Tashkent, Fergana oblasts +# of the Uzbek SSR were to move clocks 1 hour backwards. +# Other territories were to not move clocks. +# When the "summer" time would end on 1991-09-29, clocks were to be +# moved 1 hour backwards on the territory of the USSR excluding +# Kazakhstan, Kirghizia, Uzbekistan, Turkmenia, Tajikistan. +# +# Apparently there were last minute changes. Apparently Kazakh act No. 170 +# was one of such changes. +# +# https://ru.wikipedia.org/wiki/Декретное время +# claims that Sovetskaya Rossiya newspaper on 1991-03-29 published that +# Nenets autonomous okrug, Komi and Kazakhstan (excluding Uralsk oblast) +# were to not move clocks and Uralsk oblast was to move clocks +# forward; on 1991-09-29 Kazakhstan was to move clocks backwards. +# (Probably there were changes even after that publication. There is an +# article claiming that Kaliningrad oblast decided on 1991-03-29 to not +# move clocks.) +# +# This implies that on 1991-03-31 Asia/Oral remained on +04/+05 while +# the rest of Kazakhstan switched from +06/+07 to +05/06 or from +05/06 +# to +04/+05. It's unclear how Kzyl-Orda oblast moved into the fifth +# time belt. (By switching from +04/+05 to +05/+06 on 1991-09-29?) ... +# +# 1. Act of the Cabinet of Ministers of the Republic of Kazakhstan +# from 1992-01-13 No. 28 +# http://adilet.zan.kz/rus/docs/P920000028_ +# (text includes modification from the 1996 act) +# introduced new rules for calculation of time, mirroring Russian +# 1992-01-08 act. It specified that time would be calculated +# according to time belts plus extra hour ("decree time"), moved clocks +# on the whole territory of Kazakhstan 1 hour forward on 1992-01-19 at +# 2:00, specified DST rules. It acknowledged that Kazakhstan was +# located in the fourth and the fifth time belts and specified the +# border between them to be located east of Kustanay and Aktyubinsk +# oblasts (notably including Turgai and Kzyl-Orda oblasts into the fifth +# time belt). +# +# This means switch on 1992-01-19 at 2:00 from +04/+05 to +05/+06 for +# Asia/Aqtau, Asia/Aqtobe, Asia/Oral, Atyrau and Kustanay oblasts; from +# +05/+06 to +06/+07 for Asia/Almaty and Asia/Qyzylorda (and Arkalyk) [*].... +# +# 2. Act of the Cabinet of Ministers of the Republic of Kazakhstan +# from 1992-03-27 No. 284 +# http://adilet.zan.kz/rus/docs/P920000284_ +# cancels extra hour ("decree time") for Uralsk and Kzyl-Orda oblasts +# since the last Sunday of March 1992, while keeping them in the fourth +# and the fifth time belts respectively. +# +# 3. Order of the Prime Minister of the Republic of Kazakhstan +# from 1994-09-23 No. 384 +# http://adilet.zan.kz/rus/docs/R940000384_ +# cancels the extra hour ("decree time") on the territory of Mangystau +# oblast since the last Sunday of September 1994 (saying that time on +# the territory would correspond to the third time belt as a +# result).... +# +# 4. Act of the Government of the Republic of Kazakhstan +# from 1996-05-08 No. 575 +# http://adilet.zan.kz/rus/docs/P960000575_ +# amends the 1992-01-13 act to end summer time in October instead +# of September, mirroring identical Russian change from 1996-04-23 act. +# +# 5. Act of the Government of the Republic of Kazakhstan +# from 1999-03-26 No. 305 +# http://adilet.zan.kz/rus/docs/P990000305_ +# cancels the extra hour ("decree time") for Atyrau oblast since the +# last Sunday of March 1999 while retaining the oblast in the fourth +# time belt. +# +# This means change from +05/+06 to +04/+05. +# +# There is no zone for Atyrau currently (listed under Asia/Aqtau in +# zone1970.tab).[*] +# +# 6. Act of the Government of the Republic of Kazakhstan +# from 2000-11-23 No. 1749 +# http://adilet.zan.kz/rus/archive/docs/P000001749_/23.11.2000 +# replaces the previous five documents. +# +# The only changes I noticed are in definition of the border between the +# fourth and the fifth time belts. They account for changes in spelling +# and administrative division (splitting of Turgai oblast in 1997 +# probably changed time in territories incorporated into Kostanay oblast +# (including Arkalyk) from +06/+07 to +05/+06) and move Kyzylorda oblast +# from being in the fifth time belt and not using decree time into the +# fourth time belt (no change in practice).[*] +# +# 7. Act of the Government of the Republic of Kazakhstan +# from 2003-12-29 No. 1342 +# http://adilet.zan.kz/rus/docs/P030001342_ +# modified the 2000-11-23 act. No relevant changes, apparently. +# +# 8. Act of the Government of the Republic of Kazakhstan +# from 2004-07-20 No. 775 +# http://adilet.zan.kz/rus/archive/docs/P040000775_/20.07.2004 +# modified the 2000-11-23 act to move Kostanay and Kyzylorda oblasts into +# the fifth time belt and add Aktobe oblast to the list of regions not +# using extra hour ("decree time"), leaving Kazakhstan with only 2 time +# zones (+04/+05 and +06/+07). The changes were to be implemented +# during DST transitions in 2004 and 2005 but the acts got radically +# amended before implementation happened. +# +# 9. Act of the Government of the Republic of Kazakhstan +# from 2004-09-15 No. 1059 +# http://adilet.zan.kz/rus/docs/P040001059_ +# modified the 2000-11-23 act to remove exceptions from the "decree time" +# (leaving Kazakhstan in +05/+06 and +06/+07 zones), amended the +# 2004-07-20 act to implement changes for Atyrau, West Kazakhstan, +# Kostanay, Kyzylorda and Mangystau oblasts by not moving clocks +# during the 2014 transition to "winter" time. +# +# This means transition from +04/+05 to +05/+06 for Atyrau oblast (no +# zone currently), Asia/Oral, Asia/Aqtau and transition from +05/+06 to +# +06/+07 for Kostanay oblast (Kostanay and Arkalyk, no zones currently) +# and Asia/Qyzylorda on 2004-10-31 at 3:00....[*] +# +# 10. Act of the Government of the Republic of Kazakhstan +# from 2005-03-15 No. 231 +# http://adilet.zan.kz/rus/docs/P050000231_ +# removes DST provisions from the 2000-11-23 act, removes most of the +# (already implemented) provisions from the 2004-07-20 and 2004-09-15 +# acts, comes into effect 10 days after official publication. +# The only practical effect seems to be the abolition of the summer +# time. +# +# Unamended version of the act of the Government of the Russian Federation +# No. 23 from 1992-01-08 [See 'europe' file for details]. +# Kazakh 1992-01-13 act appears to provide the same rules and 1992-03-27 +# act was to be enacted on the last Sunday of March 1992. + +# From Paul Eggert (2016-04-15): +# The tables below should reflect Stepan Golosunov's remarks above, +# except for the items marked "[*]" which I haven't gotten to yet. +# It looks like we will need new zones Asia/Atyrau and Asia/Qostanay +# to handle changes from 1992 through 2004 that we did not previously +# know about. + # # Zone NAME GMTOFF RULES FORMAT [UNTIL] # # Almaty (formerly Alma-Ata), representing most locations in Kazakhstan +# This includes KZ-AKM, KZ-ALA, KZ-ALM, KZ-AST, KZ-BAY, KZ-VOS, KZ-ZHA, +# KZ-KAR, KZ-SEV, KZ-PAV, and KZ-YUZ. Zone Asia/Almaty 5:07:48 - LMT 1924 May 2 # or Alma-Ata - 5:00 - ALMT 1930 Jun 21 # Alma-Ata Time - 6:00 RussiaAsia ALM%sT 1991 - 6:00 - ALMT 1992 - 6:00 RussiaAsia ALM%sT 2005 Mar 15 - 6:00 - ALMT -# Qyzylorda (aka Kyzylorda, Kizilorda, Kzyl-Orda, etc.) + 5:00 - +05 1930 Jun 21 + 6:00 RussiaAsia +06/+07 1991 Mar 31 2:00s + 5:00 RussiaAsia +05/+06 1992 Jan 19 2:00s + 6:00 RussiaAsia +06/+07 2004 Oct 31 2:00s + 6:00 - +06 +# Qyzylorda (aka Kyzylorda, Kizilorda, Kzyl-Orda, etc.) (KZ-KZY) Zone Asia/Qyzylorda 4:21:52 - LMT 1924 May 2 - 4:00 - KIZT 1930 Jun 21 # Kizilorda Time - 5:00 - KIZT 1981 Apr 1 - 5:00 1:00 KIZST 1981 Oct 1 - 6:00 - KIZT 1982 Apr 1 - 5:00 RussiaAsia KIZ%sT 1991 - 5:00 - KIZT 1991 Dec 16 # independence - 5:00 - QYZT 1992 Jan 19 2:00 - 6:00 RussiaAsia QYZ%sT 2005 Mar 15 - 6:00 - QYZT -# Aqtobe (aka Aktobe, formerly Aktyubinsk) + 4:00 - +04 1930 Jun 21 + 5:00 - +05 1981 Apr 1 + 5:00 1:00 +06 1981 Oct 1 + 6:00 - +06 1982 Apr 1 + 5:00 RussiaAsia +05/+06 1991 Mar 31 2:00s + 4:00 RussiaAsia +04/+05 1991 Sep 29 2:00s + 5:00 RussiaAsia +05/+06 1992 Jan 19 2:00s + 6:00 RussiaAsia +06/+07 1992 Mar 29 2:00s + 5:00 RussiaAsia +05/+06 2004 Oct 31 2:00s + 6:00 - +06 +# Aqtobe (aka Aktobe, formerly Aktyubinsk) (KZ-AKT) Zone Asia/Aqtobe 3:48:40 - LMT 1924 May 2 - 4:00 - AKTT 1930 Jun 21 # Aktyubinsk Time - 5:00 - AKTT 1981 Apr 1 - 5:00 1:00 AKTST 1981 Oct 1 - 6:00 - AKTT 1982 Apr 1 - 5:00 RussiaAsia AKT%sT 1991 - 5:00 - AKTT 1991 Dec 16 # independence - 5:00 RussiaAsia AQT%sT 2005 Mar 15 # Aqtobe Time - 5:00 - AQTT -# Mangghystau + 4:00 - +04 1930 Jun 21 + 5:00 - +05 1981 Apr 1 + 5:00 1:00 +06 1981 Oct 1 + 6:00 - +06 1982 Apr 1 + 5:00 RussiaAsia +05/+06 1991 Mar 31 2:00s + 4:00 RussiaAsia +04/+05 1992 Jan 19 2:00s + 5:00 RussiaAsia +05/+06 2004 Oct 31 2:00s + 5:00 - +05 +# Qostanay (KZ-KUS) + +# Mangghystau (KZ-MAN) # Aqtau was not founded until 1963, but it represents an inhabited region, # so include time stamps before 1963. Zone Asia/Aqtau 3:21:04 - LMT 1924 May 2 - 4:00 - FORT 1930 Jun 21 # Fort Shevchenko T - 5:00 - FORT 1963 - 5:00 - SHET 1981 Oct 1 # Shevchenko Time - 6:00 - SHET 1982 Apr 1 - 5:00 RussiaAsia SHE%sT 1991 - 5:00 - SHET 1991 Dec 16 # independence - 5:00 RussiaAsia AQT%sT 1995 Mar lastSun 2:00 # Aqtau Time - 4:00 RussiaAsia AQT%sT 2005 Mar 15 - 5:00 - AQTT -# West Kazakhstan + 4:00 - +04 1930 Jun 21 + 5:00 - +05 1963 + 5:00 - +05 1981 Oct 1 + 6:00 - +06 1982 Apr 1 + 5:00 RussiaAsia +05/+06 1991 Mar 31 2:00s + 4:00 RussiaAsia +04/+05 1992 Jan 19 2:00s + 5:00 RussiaAsia +05/+06 1994 Sep 25 2:00s + 4:00 RussiaAsia +04/+05 2004 Oct 31 2:00s + 5:00 - +05 + +# West Kazakhstan (KZ-ZAP) +# From Paul Eggert (2016-03-18): +# The 1989 transition is from USSR act No. 227 (1989-03-14). Zone Asia/Oral 3:25:24 - LMT 1924 May 2 # or Ural'sk - 4:00 - URAT 1930 Jun 21 # Ural'sk time - 5:00 - URAT 1981 Apr 1 - 5:00 1:00 URAST 1981 Oct 1 - 6:00 - URAT 1982 Apr 1 - 5:00 RussiaAsia URA%sT 1989 Mar 26 2:00 - 4:00 RussiaAsia URA%sT 1991 - 4:00 - URAT 1991 Dec 16 # independence - 4:00 RussiaAsia ORA%sT 2005 Mar 15 # Oral Time - 5:00 - ORAT + 4:00 - +04 1930 Jun 21 + 5:00 - +05 1981 Apr 1 + 5:00 1:00 +06 1981 Oct 1 + 6:00 - +06 1982 Apr 1 + 5:00 RussiaAsia +05/+06 1989 Mar 26 2:00s + 4:00 RussiaAsia +04/+05 1992 Jan 19 2:00s + 5:00 RussiaAsia +05/+06 1992 Mar 29 2:00s + 4:00 RussiaAsia +04/+05 2004 Oct 31 2:00s + 5:00 - +05 # Kyrgyzstan (Kirgizstan) # Transitions through 1991 are from Shanks & Pottenger. @@ -1650,11 +1821,11 @@ Rule Kyrgyz 1997 2005 - Mar lastSun 2:30 Rule Kyrgyz 1997 2004 - Oct lastSun 2:30 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Bishkek 4:58:24 - LMT 1924 May 2 - 5:00 - FRUT 1930 Jun 21 # Frunze Time - 6:00 RussiaAsia FRU%sT 1991 Mar 31 2:00s - 5:00 1:00 FRUST 1991 Aug 31 2:00 # independence - 5:00 Kyrgyz KG%sT 2005 Aug 12 # Kyrgyzstan Time - 6:00 - KGT + 5:00 - +05 1930 Jun 21 + 6:00 RussiaAsia +06/+07 1991 Mar 31 2:00s + 5:00 RussiaAsia +05/+06 1991 Aug 31 2:00 + 5:00 Kyrgyz +05/+06 2005 Aug 12 + 6:00 - +06 ############################################################################### @@ -1693,25 +1864,24 @@ Rule ROK 1957 1960 - Sep Sun>=18 0:00 0 Rule ROK 1987 1988 - May Sun>=8 2:00 1:00 D Rule ROK 1987 1988 - Oct Sun>=8 3:00 0 S -# From Paul Eggert (2014-10-30): +# From Paul Eggert (2016-08-23): # The Korean Wikipedia entry gives the following sources for UT offsets: # -# 1908: Official Journal Article No. 3994 (Edict No. 5) +# 1908: Official Journal Article No. 3994 (decree No. 5) # 1912: Governor-General of Korea Official Gazette Issue No. 367 # (Announcement No. 338) # 1954: Presidential Decree No. 876 (1954-03-17) # 1961: Law No. 676 (1961-08-07) -# 1987: Law No. 3919 (1986-12-31) # -# The Wikipedia entry also has confusing information about a change -# to UT+9 in April 1910, but then what would be the point of the later change -# to UT+9 on 1912-01-01? Omit the 1910 change for now. +# (Another source "1987: Law No. 3919 (1986-12-31)" was in the 2014-10-30 +# edition of the Korean Wikipedia entry.) # # I guessed that time zone abbreviations through 1945 followed the same # rules as discussed under Taiwan, with nominal switches from JST to KST # when the respective cities were taken over by the Allies after WWII. # -# For Pyongyang we have no information; guess no changes since World War II. +# For Pyongyang, guess no changes from World War II until 2015, as we +# have no information otherwise. # From Steffen Thorsen (2015-08-07): # According to many news sources, North Korea is going to change to @@ -1871,7 +2041,7 @@ Zone Indian/Maldives 4:54:00 - LMT 1880 # Bill Bonnet (2005-05-19) reports that the US Embassy in Ulaanbaatar says # there is only one time zone and that DST is observed, citing Microsoft # Windows XP as the source. Risto Nykänen (2005-05-16) reports that -# travelmongolia.org says there are two time zones (UTC+7, UTC+8) with no DST. +# travelmongolia.org says there are two time zones (UT +07, +08) with no DST. # Oscar van Vlijmen (2005-05-20) reports that the Mongolian Embassy in # Washington, DC says there are two time zones, with DST observed. # He also found @@ -2111,8 +2281,8 @@ Zone Asia/Kathmandu 5:41:16 - LMT 1920 # http://www.app.com.pk/en_/index.php?option=com_content&task=view&id=99374&Itemid=2 # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Pakistan 2002 only - Apr Sun>=2 0:01 1:00 S -Rule Pakistan 2002 only - Oct Sun>=2 0:01 0 - +Rule Pakistan 2002 only - Apr Sun>=2 0:00 1:00 S +Rule Pakistan 2002 only - Oct Sun>=2 0:00 0 - Rule Pakistan 2008 only - Jun 1 0:00 1:00 S Rule Pakistan 2008 2009 - Nov 1 0:00 0 - Rule Pakistan 2009 only - Apr 15 0:00 1:00 S @@ -2380,6 +2550,16 @@ Zone Asia/Karachi 4:28:12 - LMT 1907 # http://www.timeanddate.com/time/change/gaza-strip/gaza # http://www.timeanddate.com/time/change/west-bank/hebron +# From Hannah Kreitem (2016-03-09): +# http://www.palestinecabinet.gov.ps/WebSite/ar/ViewDetails?ID=31728 +# [Google translation]: "The Council also decided to start daylight +# saving in Palestine as of one o'clock on Saturday morning, +# 2016-03-26, to provide the clock 60 minutes ahead." +# +# From Paul Eggert (2016-03-12): +# Predict spring transitions on March's last Saturday at 01:00 from now on. +# Leave fall predictions alone for now. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule EgyptAsia 1957 only - May 10 0:00 1:00 S Rule EgyptAsia 1957 1958 - Oct 1 0:00 0 - @@ -2408,7 +2588,8 @@ Rule Palestine 2012 2014 - Mar lastThu 2 Rule Palestine 2012 only - Sep 21 1:00 0 - Rule Palestine 2013 only - Sep Fri>=21 0:00 0 - Rule Palestine 2014 max - Oct Fri>=21 0:00 0 - -Rule Palestine 2015 max - Mar lastFri 24:00 1:00 S +Rule Palestine 2015 only - Mar lastFri 24:00 1:00 S +Rule Palestine 2016 max - Mar lastSat 1:00 1:00 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Gaza 2:17:52 - LMT 1900 Oct @@ -2496,7 +2677,7 @@ Link Asia/Qatar Asia/Bahrain # earlier date. # # Shanks & Pottenger also state that until 1968-05-01 Saudi Arabia had two -# time zones; the other zone, at UTC+4, was in the far eastern part of +# time zones; the other zone, at UT +04, was in the far eastern part of # the country. Ignore this, as it's before our 1970 cutoff. # # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -2765,10 +2946,10 @@ Zone Asia/Damascus 2:25:12 - LMT 1920 # # From Shanks & Pottenger. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Dushanbe 4:35:12 - LMT 1924 May 2 - 5:00 - DUST 1930 Jun 21 # Dushanbe Time - 6:00 RussiaAsia DUS%sT 1991 Mar 31 2:00s - 5:00 1:00 DUSST 1991 Sep 9 2:00s - 5:00 - TJT # Tajikistan Time + 5:00 - +05 1930 Jun 21 + 6:00 RussiaAsia +06/+07 1991 Mar 31 2:00s + 5:00 1:00 +05/+06 1991 Sep 9 2:00s + 5:00 - +05 # Thailand # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -2782,11 +2963,10 @@ Link Asia/Bangkok Asia/Vientiane # Laos # From Shanks & Pottenger. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Ashgabat 3:53:32 - LMT 1924 May 2 # or Ashkhabad - 4:00 - ASHT 1930 Jun 21 # Ashkhabad Time - 5:00 RussiaAsia ASH%sT 1991 Mar 31 2:00 - 4:00 RussiaAsia ASH%sT 1991 Oct 27 # independence - 4:00 RussiaAsia TM%sT 1992 Jan 19 2:00 - 5:00 - TMT + 4:00 - +04 1930 Jun 21 + 5:00 RussiaAsia +05/+06 1991 Mar 31 2:00 + 4:00 RussiaAsia +04/+05 1992 Jan 19 2:00 + 5:00 - +05 # United Arab Emirates # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -2798,20 +2978,18 @@ Link Asia/Dubai Asia/Muscat # Oman # Byalokoz 1919 says Uzbekistan was 4:27:53. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Samarkand 4:27:53 - LMT 1924 May 2 - 4:00 - SAMT 1930 Jun 21 # Samarkand Time - 5:00 - SAMT 1981 Apr 1 - 5:00 1:00 SAMST 1981 Oct 1 - 6:00 - TAST 1982 Apr 1 # Tashkent Time - 5:00 RussiaAsia SAM%sT 1991 Sep 1 # independence - 5:00 RussiaAsia UZ%sT 1992 - 5:00 - UZT + 4:00 - +04 1930 Jun 21 + 5:00 - +05 1981 Apr 1 + 5:00 1:00 +06 1981 Oct 1 + 6:00 - +06 1982 Apr 1 + 5:00 RussiaAsia +05/+06 1992 + 5:00 - +05 # Milne says Tashkent was 4:37:10.8; round to nearest. Zone Asia/Tashkent 4:37:11 - LMT 1924 May 2 - 5:00 - TAST 1930 Jun 21 # Tashkent Time - 6:00 RussiaAsia TAS%sT 1991 Mar 31 2:00 - 5:00 RussiaAsia TAS%sT 1991 Sep 1 # independence - 5:00 RussiaAsia UZ%sT 1992 - 5:00 - UZT + 5:00 - +05 1930 Jun 21 + 6:00 RussiaAsia +06/+07 1991 Mar 31 2:00 + 5:00 RussiaAsia +05/+06 1992 + 5:00 - +05 # Vietnam Modified: head/contrib/tzdata/australasia ============================================================================== --- head/contrib/tzdata/australasia Sat Oct 8 17:46:29 2016 (r306852) +++ head/contrib/tzdata/australasia Sat Oct 8 17:46:59 2016 (r306853) @@ -60,6 +60,14 @@ Zone Australia/Eucla 8:35:28 - LMT 1895 # Hamilton is the largest, but there is also a Hamilton in Victoria, # so use Lindeman. # +# From J William Piggott (2016-02-20): +# There is no location named Holiday Islands in Queensland Australia; holiday +# islands is a colloquial term used globally. Hayman and Lindeman are at the +# north and south extremes of the Whitsunday Islands archipelago, and +# Hamilton is in between; it is reasonable to believe that this time zone +# applies to all of the Whitsundays. +# http://www.australia.gov.au/about-australia/australian-story/austn-islands +# # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule AQ 1971 only - Oct lastSun 2:00s 1:00 D Rule AQ 1972 only - Feb lastSun 2:00s 0 S @@ -235,11 +243,11 @@ Zone Australia/Lord_Howe 10:36:20 - LMT # will produce a binary file with an [A]EST-type as the first 32-bit type; # this is required for correct handling of times before 1916 by # pre-2013 versions of localtime. -Zone Antarctica/Macquarie 0 - zzz 1899 Nov +Zone Antarctica/Macquarie 0 - -00 1899 Nov 10:00 - AEST 1916 Oct 1 2:00 10:00 1:00 AEDT 1917 Feb 10:00 Aus AE%sT 1919 Apr 1 0:00s - 0 - zzz 1948 Mar 25 + 0 - -00 1948 Mar 25 10:00 Aus AE%sT 1967 10:00 AT AE%sT 2010 Apr 4 3:00 11:00 - MIST # Macquarie I Standard Time @@ -537,7 +545,7 @@ Zone Pacific/Port_Moresby 9:48:40 - LMT # Base the Bougainville entry on the Arawa-Kieta region, which appears to have # the most people even though it was devastated in the Bougainville Civil War. # -# Although Shanks gives 1942-03-15 / 1943-11-01 for JST, these dates +# Although Shanks gives 1942-03-15 / 1943-11-01 for UT +09, these dates # are apparently rough guesswork from the starts of military campaigns. # The World War II entries below are instead based on Arawa-Kieta. # The Japanese occupied Kieta in July 1942, @@ -545,8 +553,8 @@ Zone Pacific/Port_Moresby 9:48:40 - LMT # http://pwencycl.kgbudge.com/B/o/Bougainville.htm # and seem to have controlled it until their 1945-08-21 surrender. # -# The Autonomous Region of Bougainville plans to switch from UTC+10 to UTC+11 -# on 2014-12-28 at 02:00. They call UTC+11 "Bougainville Standard Time"; +# The Autonomous Region of Bougainville switched from UT +10 to +11 +# on 2014-12-28 at 02:00. They call +11 "Bougainville Standard Time"; # abbreviate this as BST. See: # http://www.bougainville24.com/bougainville-issues/bougainville-gets-own-timezone/ # @@ -612,7 +620,7 @@ Link Pacific/Pago_Pago Pacific/Midway # # From Paul Eggert (2014-06-27): # The International Date Line Act 2011 # http://www.parliament.gov.ws/images/ACTS/International_Date_Line_Act__2011_-_Eng.pdf -# changed Samoa from UTC-11 to UTC+13, effective "12 o'clock midnight, on +# changed Samoa from UT -11 to +13, effective "12 o'clock midnight, on # Thursday 29th December 2011". The International Date Line was adjusted # accordingly. @@ -707,7 +715,7 @@ Zone Pacific/Funafuti 11:56:52 - LMT 190 # 1886-1891; Baker was similar but exact dates are not known. # Inhabited by civilians 1935-1942; U.S. military bases 1943-1944; # uninhabited thereafter. -# Howland observed Hawaii Standard Time (UT-10:30) in 1937; +# Howland observed Hawaii Standard Time (UT -10:30) in 1937; # see page 206 of Elgen M. Long and Marie K. Long, # Amelia Earhart: the Mystery Solved, Simon & Schuster (2000). # So most likely Howland and Baker observed Hawaii Time from 1935 @@ -1465,7 +1473,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901 # Zealand time. I understand that is the time they keep locally, anyhow." # For now, assume this practice goes back to the introduction of standard time # in New Zealand, as this would make Chatham Islands time almost exactly match -# LMT back when New Zealand was at UTC+11:30; also, assume Chatham Islands did +# LMT back when New Zealand was at UT +11:30; also, assume Chatham Islands did # not observe New Zealand's prewar DST. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Oct 8 17:47:22 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B393DC062DC; Sat, 8 Oct 2016 17:47:22 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 583E1123; Sat, 8 Oct 2016 17:47:21 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id sviJbAdZoFfiXsviKbxD2M; Sat, 08 Oct 2016 11:47:14 -0600 X-Authority-Analysis: v=2.2 cv=Qb8khYTv c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=CH0kA5CcgfcA:10 a=SAfkavq5AAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=FXDZoWYHE00IIdgZMLQA:9 a=CjuIK1q_8ugA:10 a=QZZ0i9YZlR7GoCpEi5UP:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 8FB80C19; Sat, 8 Oct 2016 10:47:11 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id u98HlBtG006509; Sat, 8 Oct 2016 10:47:11 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201610081747.u98HlBtG006509@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Kevin Lo cc: Gleb Smirnoff , rwatson@FreeBSD.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r305824 - in head/sys: contrib/ipfilter/netinet kern net netinet netinet6 netipsec sys In-Reply-To: Message from Kevin Lo of "Sat, 08 Oct 2016 22:59:09 +0800." <20161008145909.GA5225@ns.kevlo.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 08 Oct 2016 10:47:11 -0700 X-CMAE-Envelope: MS4wfAtWlEhFwGrfRf/atIVLQnjAR+Pvs7gEZTIblNvuNgzRZCi0rigy8uoXQV5jldx6YIT8DfsTjtRP20Q+YA/Lke8TtxXyU/hP8aB9Z9GoD7c9+DzbcVuF +7qRixRovcXsEjRdFd4eHDAkXTxNsB7i4aJvk78wrFE7WtyvqFGJKX1tEMmKfm2rkgNRtn7BZHtJ7Y/Heqf2FqthvXAFfhQ8fOQ6BvNIUIsI7sLT5Mu7yL3T 3RdQN98CL1iEnz4AOB9sXZaOTTcEjeMLQOVfWVvQ52+8kgCQvrrklYMWFQURSigiCX/u2GBWy/EMGEnn/+Qbl0odsJiG79g9RSWhyQ77k6N5E5oSBDC7OyIf OoWMyUkA X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 17:47:22 -0000 In message <20161008145909.GA5225@ns.kevlo.org>, Kevin Lo writes: > On Wed, Oct 05, 2016 at 04:14:42PM -0700, Gleb Smirnoff wrote: > > > > On Wed, Oct 05, 2016 at 11:20:58AM +0800, Kevin Lo wrote: > > K> > On Thu, Sep 15, 2016 at 07:41:48AM +0000, Kevin Lo wrote: > > K> > K> Log: > > K> > K> Remove the 4.3BSD compatible macro m_copy(), use m_copym() instea > d. > > K> > ... > > K> > K> Modified: head/sys/contrib/ipfilter/netinet/fil.c > > K> > K> =================================================================== > =========== > > K> > K> --- head/sys/contrib/ipfilter/netinet/fil.c Thu Sep 15 02:48:56 201 > 6 (r305823) > > K> > K> +++ head/sys/contrib/ipfilter/netinet/fil.c Thu Sep 15 07:41:48 201 > 6 (r305824) > > K> > K> @@ -3226,7 +3226,7 @@ filterdone: > > K> > K> fdp = fin->fin_dif; > > K> > K> if ((fdp != NULL) && (fdp->fd_ptr != NULL) && > > K> > K> (fdp->fd_ptr != (void *)-1)) { > > K> > K> - mc = M_COPY(fin->fin_m); > > K> > K> + mc = M_COPYM(fin->fin_m); > > K> > K> if (mc != NULL) > > K> > K> ipf_fastroute(mc, &mc, fin, fdp); > > K> > K> } > > K> > K> > > K> > K> Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h > > K> > K> =================================================================== > =========== > > K> > K> --- head/sys/contrib/ipfilter/netinet/ip_compat.h Thu Sep 15 02:4 > 8:56 2016 (r305823) > > K> > K> +++ head/sys/contrib/ipfilter/netinet/ip_compat.h Thu Sep 15 07:4 > 1:48 2016 (r305824) > > K> > K> @@ -211,7 +211,7 @@ struct ether_addr { > > K> > K> # define MSGDSIZE(m) mbufchainlen(m) > > K> > K> # define M_LEN(m) (m)->m_len > > K> > K> # define M_ADJ(m,x) m_adj(m, x) > > K> > K> -# define M_COPY(x) m_copy((x), 0, M_COPYALL) > > K> > K> +# define M_COPYM(x) m_copym((x), 0, M_COPYALL, M_NOWAIT) > > K> > K> # define M_DUP(m) m_dup(m, M_NOWAIT) > > K> > K> # define IPF_PANIC(x,y) if (x) { printf y; panic("ipf_panic"); > } > > K> > K> typedef struct mbuf mb_t; > > K> > K> @@ -366,7 +366,7 @@ typedef struct mb_s { > > K> > K> # define MSGDSIZE(m) msgdsize(m) > > K> > K> # define M_LEN(m) (m)->mb_len > > K> > K> # define M_ADJ(m,x) (m)->mb_len += x > > K> > K> -# define M_COPY(m) dupmbt(m) > > K> > K> +# define M_COPYM(m) dupmbt(m) > > K> > K> # define M_DUP(m) dupmbt(m) > > K> > K> # define GETKTIME(x) gettimeofday((struct timeval *)(x), NUL > L) > > K> > K> # define MTOD(m, t) ((t)(m)->mb_data) > > K> > > > K> > IMHO, for contributed ipfilter we should only modify ip_compat.h and i > p_fil_freebsd.c. > > K> > In case of removal of m_copy() the macro should remain named M_COPY(), > but it should be > > K> > defined to call to function of m_copym(). So fil.c can be left unmodif > ied, and ip_compat.h > > K> > will have only 1 line change. The userland part of ip_compat.h which d > efines M_COPY() to > > K> > dupmbt() doesn't need to be renamed as well. > > K> > > K> Actually your comments were addressed in my original patch, but rwatson@ > > K> pointed out that switching M_COPY() to M_COPYM() for consistency: > > K> https://reviews.freebsd.org/D7878#163304 > > > > This looks more like a general comment, not comment to ipfilter part. Rober > t, > > can you confirm please? > > > > The ipfilter part should have modifications only in ip_compat.h and ip_fil_ > freebsd.c. > > Fixed in r306849, thanks. Thank you Kevin. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Sat Oct 8 17:47:45 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE3A5C06330; Sat, 8 Oct 2016 17:47:45 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 683C22D9; Sat, 8 Oct 2016 17:47:45 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id sviqbAdi4FfiXsvirbxD7E; Sat, 08 Oct 2016 11:47:45 -0600 X-Authority-Analysis: v=2.2 cv=Qb8khYTv c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=CH0kA5CcgfcA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=gucpz7pfEu6Z0tN-OdUA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id E9F28C28; Sat, 8 Oct 2016 10:47:43 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id u98HlhML006540; Sat, 8 Oct 2016 10:47:43 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201610081747.u98HlhML006540@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Kevin Lo cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306849 - head/sys/contrib/ipfilter/netinet In-Reply-To: Message from Kevin Lo of "Sat, 08 Oct 2016 14:57:21 -0000." <201610081457.u98EvLfA019100@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 08 Oct 2016 10:47:43 -0700 X-CMAE-Envelope: MS4wfDrV3hB3W2w9OFVir6ixBQYXvArtVcNl+2gZ5l/obeYDQR3/modZUCU6jLGshKWCtYYZr9nsDAgqZ8jdVujp5JVWe1ms3CHJmYBTGY4zxP4DU9MvIBYl /wdP5zMYye+QwtEWivZljpEpfCNnPpXUha9KzUALrLLWsPrvBxfR7kCR98LKJwbLJ6xRvU8E51k0UuFaMFUTI/7/pDHN127lw1f6zgO3HQDYLvUKx0t/gISu TuiL6al2ktXDF1FtOFqR2Caq3y6FUx8W/ow1K1ZemJKkpDP4RUYGzGy1sH/u8Lrc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 17:47:45 -0000 In message <201610081457.u98EvLfA019100@repo.freebsd.org>, Kevin Lo writes: > Author: kevlo > Date: Sat Oct 8 14:57:21 2016 > New Revision: 306849 > URL: https://svnweb.freebsd.org/changeset/base/306849 > > Log: > In case of removal of m_copy() the macro should remain named M_COPY() > in ip_compat.h after r305824. Leaving as vanilla as possible aids in > future maintenance and upgrades. > > Suggested by: glebius, cy > > Modified: > head/sys/contrib/ipfilter/netinet/fil.c > head/sys/contrib/ipfilter/netinet/ip_compat.h > > Modified: head/sys/contrib/ipfilter/netinet/fil.c > ============================================================================= > = > --- head/sys/contrib/ipfilter/netinet/fil.c Sat Oct 8 14:32:43 2016 > (r306848) > +++ head/sys/contrib/ipfilter/netinet/fil.c Sat Oct 8 14:57:21 2016 > (r306849) > @@ -3226,7 +3226,7 @@ filterdone: > fdp = fin->fin_dif; > if ((fdp != NULL) && (fdp->fd_ptr != NULL) && > (fdp->fd_ptr != (void *)-1)) { > - mc = M_COPYM(fin->fin_m); > + mc = M_COPY(fin->fin_m); > if (mc != NULL) > ipf_fastroute(mc, &mc, fin, fdp); > } > > Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h > ============================================================================= > = > --- head/sys/contrib/ipfilter/netinet/ip_compat.h Sat Oct 8 14:32:43 201 > 6 (r306848) > +++ head/sys/contrib/ipfilter/netinet/ip_compat.h Sat Oct 8 14:57:21 201 > 6 (r306849) > @@ -212,7 +212,7 @@ struct ether_addr { > # define MSGDSIZE(m) mbufchainlen(m) > # define M_LEN(m) (m)->m_len > # define M_ADJ(m,x) m_adj(m, x) > -# define M_COPYM(x) m_copym((x), 0, M_COPYALL, M_NOWAIT) > +# define M_COPY(x) m_copym((x), 0, M_COPYALL, M_NOWAIT) > # define M_DUP(m) m_dup(m, M_NOWAIT) > # define IPF_PANIC(x,y) if (x) { printf y; panic("ipf_panic"); } > typedef struct mbuf mb_t; > @@ -367,7 +367,7 @@ typedef struct mb_s { > # define MSGDSIZE(m) msgdsize(m) > # define M_LEN(m) (m)->mb_len > # define M_ADJ(m,x) (m)->mb_len += x > -# define M_COPYM(m) dupmbt(m) > +# define M_COPY(m) dupmbt(m) > # define M_DUP(m) dupmbt(m) > # define GETKTIME(x) gettimeofday((struct timeval *)(x), NULL) > # define MTOD(m, t) ((t)(m)->mb_data) > > Thank you Kevin. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Sat Oct 8 17:51:16 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5A51C063CE; Sat, 8 Oct 2016 17:51:16 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66CD6798; Sat, 8 Oct 2016 17:51:16 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u98HpFmk086355; Sat, 8 Oct 2016 17:51:15 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u98HpFNn086354; Sat, 8 Oct 2016 17:51:15 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201610081751.u98HpFNn086354@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 8 Oct 2016 17:51:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306854 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 17:51:16 -0000 Author: bapt Date: Sat Oct 8 17:51:15 2016 New Revision: 306854 URL: https://svnweb.freebsd.org/changeset/base/306854 Log: Update pci_vendors to 2016-10-03 MFC after: 3 days Modified: head/share/misc/pci_vendors Modified: head/share/misc/pci_vendors ============================================================================== --- head/share/misc/pci_vendors Sat Oct 8 17:46:59 2016 (r306853) +++ head/share/misc/pci_vendors Sat Oct 8 17:51:15 2016 (r306854) @@ -3,8 +3,8 @@ # # List of PCI ID's # -# Version: 2016.05.23 -# Date: 2016-05-23 03:15:02 +# Version: 2016.10.03 +# Date: 2016-10-03 03:15:01 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at http://pci-ids.ucw.cz/. @@ -244,6 +244,19 @@ 1000 1000 LSI53C895A PCI to Ultra2 SCSI Controller 0013 53c875a 1000 1000 LSI53C875A PCI to Ultra SCSI Controller + 0014 MegaRAID Tri-Mode SAS3516 + 1d49 0602 ThinkSystem RAID 930-16i 4GB Flash PCIe 12Gb Adapter + 0016 MegaRAID Tri-Mode SAS3508 + 1d49 0601 ThinkSystem RAID 930-8i 2GB Flash PCIe 12Gb Adapter + 1d49 0603 ThinkSystem RAID 930-24i 4GB Flash PCIe 12Gb Adapter + 1d49 0604 ThinkSystem RAID 930-8e 4GB Flash PCIe 12Gb Adapter + 0017 MegaRAID Tri-Mode SAS3408 + 1d49 0500 ThinkSystem RAID 530-8i PCIe 12Gb Adapter + 1d49 0502 ThinkSystem RAID 530-8i Dense Adapter + 001b MegaRAID Tri-Mode SAS3504 + 1d49 0605 ThinkSystem RAID 930-4i 2GB Flash Flex Adapter + 001c MegaRAID Tri-Mode SAS3404 + 1d49 0501 ThinkSystem RAID 530-4i Flex Adapter 0020 53c1010 Ultra3 SCSI Adapter 1000 1000 LSI53C1010-33 PCI to Dual Channel Ultra160 SCSI Controller 107b 1040 Server Onboard 53C1010-33 @@ -351,6 +364,8 @@ 005c SAS1064A PCI-X Fusion-MPT SAS 005d MegaRAID SAS-3 3108 [Invader] 1000 9361 MegaRAID SAS 9361-8i + 1000 9364 MegaRAID SAS 9364-8i + 1000 936a MegaRAID SAS 9364-8i 1028 1f41 PERC H830 Adapter 1028 1f42 PERC H730P Adapter 1028 1f43 PERC H730 Adapter @@ -363,6 +378,7 @@ 1028 1f54 PERC FD33xD 17aa 1052 ThinkServer RAID 720i 17aa 1053 ThinkServer RAID 720ix + 1d49 0600 ThinkSystem RAID 730-8i 1GB Cache PCIe 12Gb Adapter 005e SAS1066 PCI-X Fusion-MPT SAS 005f MegaRAID SAS-3 3008 [Fury] 1028 1f44 PERC H330 Adapter @@ -506,6 +522,7 @@ 0087 SAS2308 PCI-Express Fusion-MPT SAS-2 1000 3020 9207-8i SAS2.1 HBA 1000 3040 9207-8e SAS2.1 HBA + 1000 3050 SAS9217-8i 1590 0044 H220i 008f 53c875J 1092 8000 FirePort 40 SCSI Controller @@ -516,8 +533,20 @@ 0095 SAS3108 PCI-Express Fusion-MPT SAS-3 0096 SAS3004 PCI-Express Fusion-MPT SAS-3 0097 SAS3008 PCI-Express Fusion-MPT SAS-3 + 1000 3090 SAS9311-8i + 1000 30e0 SAS9300-8i 1028 1f45 12GB/s HBA internal 1028 1f46 12Gbps HBA + 00ab SAS3516 Fusion-MPT Tri-Mode RAID On Chip (ROC) + 00ac SAS3416 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) + 1d49 0201 ThinkSystem 9400-16i PCIe 12Gb HBA + 1d49 0203 ThinkSystem 9400-16e PCIe 12Gb HBA + 00ae SAS3508 Fusion-MPT Tri-Mode RAID On Chip (ROC) + 00af SAS3408 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) + 1d49 0200 ThinkSystem 9400-8i PCIe 12Gb HBA + 1d49 0202 ThinkSystem 9400-8e PCIe 12Gb HBA + 00be SAS3504 Fusion-MPT Tri-Mode RAID On Chip (ROC) + 00bf SAS3404 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) 00c0 SAS3324 PCI-Express Fusion-MPT SAS-3 00c1 SAS3324 PCI-Express Fusion-MPT SAS-3 00c2 SAS3324 PCI-Express Fusion-MPT SAS-3 @@ -533,6 +562,9 @@ 1000 9390 MegaRAID SAS 9380-8i8e 00cf MegaRAID SAS-3 3324 [Intruder] 1000 9370 MegaRAID SAS 9361-24i + 00d0 SAS3716 Fusion-MPT Tri-Mode RAID Controller Chip (ROC) + 00d1 SAS3616 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) + 00d3 MegaRAID Tri-Mode SAS3716W 0407 MegaRAID 1000 0530 MegaRAID 530 SCSI 320-0X RAID Controller 1000 0531 MegaRAID 531 SCSI 320-4X RAID Controller @@ -1389,23 +1421,23 @@ 5a11 RD890 Northbridge only single slot PCI-e GFX Hydra part 5a12 RD890 Northbridge only dual slot (2x8) PCI-e GFX Hydra part 15d9 a811 H8DGU - 5a13 RD890 PCI to PCI bridge (external gfx0 port A) - 5a14 RD890 PCI to PCI bridge (external gfx0 port B) + 5a13 RD890S/SR5650 Host Bridge + 5a14 RD9x0/RX980 Host Bridge 5a15 RD890 PCI to PCI bridge (PCI express gpp port A) - 5a16 RD890 PCI to PCI bridge (PCI express gpp port B) - 5a17 RD890 PCI to PCI bridge (PCI express gpp port C) - 5a18 RD890 PCI to PCI bridge (PCI express gpp port D) + 5a16 RD890/RD9x0/RX980 PCI to PCI bridge (PCI Express GFX port 0) + 5a17 RD890/RD9x0 PCI to PCI bridge (PCI Express GFX port 1) + 5a18 RD890/RD9x0/RX980 PCI to PCI bridge (PCI Express GPP Port 0) 15d9 a811 H8DGU - 5a19 RD890 PCI to PCI bridge (PCI express gpp port E) - 5a1a RD890 PCI to PCI bridge (PCI express gpp port F) - 5a1b RD890 PCI to PCI bridge (PCI express gpp port G) - 5a1c RD890 PCI to PCI bridge (PCI express gpp port H) - 5a1d RD890 PCI to PCI bridge (external gfx1 port A) - 5a1e RD890 PCI to PCI bridge (external gfx1 port B) - 5a1f RD890 PCI to PCI bridge (NB-SB link) + 5a19 RD890/RD9x0/RX980 PCI to PCI bridge (PCI Express GPP Port 1) + 5a1a RD890/RD9x0/RX980 PCI to PCI bridge (PCI Express GPP Port 2) + 5a1b RD890/RD9x0/RX980 PCI to PCI bridge (PCI Express GPP Port 3) + 5a1c RD890/RD9x0/RX980 PCI to PCI bridge (PCI Express GPP Port 4) + 5a1d RD890/RD9x0/RX980 PCI to PCI bridge (PCI Express GPP Port 5) + 5a1e RD890/RD9x0/RX980 PCI to PCI bridge (PCI Express GPP2 Port 0) + 5a1f RD890/RD990 PCI to PCI bridge (PCI Express GFX2 port 0) 15d9 a811 H8DGU - 5a20 RD890S PCI Express bridge for GPP2 port 1 - 5a23 RD990 I/O Memory Management Unit (IOMMU) + 5a20 RD890/RD990 PCI to PCI bridge (PCI Express GFX2 port 1) + 5a23 RD890S/RD990 I/O Memory Management Unit (IOMMU) 5a31 RC410 Host Bridge 5a33 RS400 Host Bridge 5a34 RS4xx PCI Express Port [ext gfx] @@ -1527,6 +1559,7 @@ 6649 Bonaire [FirePro W5100] 1002 0b0c FirePro W4300 103c 0b0c Bonaire [FirePro W4300] + 103c 230c FirePro W5100 6650 Bonaire 6651 Bonaire 6658 Bonaire XTX [Radeon R7 260X/360] @@ -1566,6 +1599,7 @@ 17aa 390c Radeon R5 M330 6663 Sun PRO [Radeon HD 8570A/8570M] 1025 0846 Radeon HD 8570A + 17aa 3805 Radeon HD 8570M 6664 Jet XT [Radeon R5 M240] 6665 Jet PRO [Radeon R5 M230] 17aa 368f Radeon R5 A230 @@ -2100,6 +2134,7 @@ 1462 8036 Radeon HD 8990 OEM 148c 8990 Radeon HD 8990 OEM 679e Tahiti LE [Radeon HD 7870 XT] + 1787 2328 Radeon HD 7870 Black Edition 2 GB GDDR5 [2GBD5-2DHV3E] 679f Tahiti 67a0 Hawaii XT GL [FirePro W9100] 1002 0335 FirePro S9150 @@ -2150,15 +2185,31 @@ 67b1 Hawaii PRO [Radeon R9 290/390] 1043 04dd STRIX R9 390 148c 2358 Radeon R9 390 + 174b e324 Sapphire Nitro R9 390 67b9 Vesuvius [Radeon R9 295X2] 67be Hawaii LE 67c0 Ellesmere [Polaris10] - 67df Ellesmere [Polaris10] + 67df Ellesmere [Radeon RX 470/480] + 1002 0b37 Radeon RX 480 + 1043 04a8 Radeon RX 480 + 1043 04b0 Radeon RX 470 + 1043 04fb Radeon RX 480 + 1462 3411 Radeon RX 470 + 1462 3413 Radeon RX 480 + 148c 2372 Radeon RX 480 + 148c 2373 Radeon RX 470 + 1682 9470 Radeon RX 470 + 1682 9480 Radeon RX 480 + 174b e347 Radeon RX 470/480 + 174b e349 Radeon RX 470 + 1787 a470 Radeon RX 470 + 1787 a480 Radeon RX 480 67e0 Baffin [Polaris11] 67e1 Baffin [Polaris11] 67e8 Baffin [Polaris11] 67e9 Baffin [Polaris11] 67eb Baffin [Polaris11] + 67ef Baffin [Radeon RX 460] 67ff Baffin [Polaris11] 6800 Wimbledon XT [Radeon HD 7970M] 1002 0124 Radeon HD 7970M @@ -2980,6 +3031,7 @@ 72b3 RV560 [Radeon X1650 GT] (Secondary) 7300 Fiji [Radeon R9 FURY / NANO Series] 1002 0b36 Radeon R9 FURY X / NANO + 1002 1b36 Radeon Pro Duo 1043 049e Radeon R9 FURY 1043 04a0 Radeon R9 FURY X 174b e329 Radeon R9 FURY @@ -3174,7 +3226,7 @@ 95cc RV620 GL [FirePro V3700] 95cd RV620 [FirePro 2450] 95cf RV620 GL [FirePro 2260] - 960f RS780 HDMI Audio [Radeon (HD) 3000 Series] + 960f RS780 HDMI Audio [Radeon 3000/3100 / HD 3200/3300] 9610 RS780 [Radeon HD 3200] 1458 d000 GA-MA78GM-S2H Motherboard 9611 RS780C [Radeon 3100] @@ -3275,7 +3327,7 @@ 9917 Trinity [Radeon HD 7620G] 9918 Trinity [Radeon HD 7600G] 9919 Trinity [Radeon HD 7500G] - 9920 Liverpool Graphics + 9920 Liverpool [Playstation 4 APU] 9921 Liverpool HDMI/DP Audio Controller 9990 Trinity [Radeon HD 7520G] 9991 Trinity [Radeon HD 7540D] @@ -3295,40 +3347,41 @@ 99a0 Trinity [Radeon HD 7520G] 99a2 Trinity [Radeon HD 7420G] 99a4 Trinity [Radeon HD 7400G] - aa00 R600 HDMI Audio [Radeon HD 2900 Series] + aa00 R600 HDMI Audio [Radeon HD 2900 GT/PRO/XT] + aa01 RV635 HDMI Audio [Radeon HD 3650/3730/3750] aa08 RV630 HDMI Audio [Radeon HD 2600 Series] - aa10 RV610 HDMI Audio [Radeon HD 2350/2400 Series] + aa10 RV610 HDMI Audio [Radeon HD 2350 PRO / 2400 PRO/XT / HD 3410] 174b aa10 Radeon HD 2400 PRO 18bc aa10 Radeon HD 2400 PRO aa18 RV670/680 HDMI Audio [Radeon HD 3690/3800 Series] - aa20 RV635 HDMI Audio [Radeon HD 3600 Series] - aa28 RV620 HDMI Audio [Radeon HD 3400 Series] + aa20 RV635 HDMI Audio [Radeon HD 3650/3730/3750] + aa28 RV620 HDMI Audio [Radeon HD 3450/3470/3550/3570] aa30 RV770 HDMI Audio [Radeon HD 4850/4870] 174b aa30 Radeon HD 4850 512MB GDDR3 PCI-E Dual Slot Fansink aa38 RV710/730 HDMI Audio [Radeon HD 4000 series] 103c 3628 dv6-1190en - aa50 Cypress HDMI Audio [Radeon HD 5800 Series] + aa50 Cypress HDMI Audio [Radeon HD 5830/5850/5870 / 6850/6870 Rebrand] aa58 Juniper HDMI Audio [Radeon HD 5700 Series] # 5500, 5600 and mobile 5700 series aa60 Redwood HDMI Audio [Radeon HD 5000 Series] 1025 033d Mobility Radeon HD 5650 1025 0347 Aspire 7740G - aa68 Cedar HDMI Audio [Radeon HD 5400/6300 Series] + aa68 Cedar HDMI Audio [Radeon HD 5400/6300/7300 Series] 1028 aa68 XPS 8300 - aa80 Cayman/Antilles HDMI Audio [Radeon HD 6900 Series] + aa80 Cayman/Antilles HDMI Audio [Radeon HD 6930/6950/6970/6990] aa88 Barts HDMI Audio [Radeon HD 6800 Series] - aa90 Turks/Whistler HDMI Audio [Radeon HD 6000 Series] + aa90 Turks HDMI Audio [Radeon HD 6500/6600 / 6700M Series] 1028 04a3 Precision M4600 aa98 Caicos HDMI Audio [Radeon HD 6400 Series] 174b aa98 Radeon HD 6450 1GB DDR3 - aaa0 Tahiti XT HDMI Audio [Radeon HD 7970 Series] + aaa0 Tahiti HDMI Audio [Radeon HD 7870 XT / 7950/7970] aab0 Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series] aac0 Tobago HDMI Audio [Radeon R7 360 / R9 360 OEM] - aac8 Hawaii HDMI Audio + aac8 Hawaii HDMI Audio [Radeon R9 290/290X / 390/390X] # I have a Tonga card and this is the HDMI Audio part aad8 Tonga HDMI Audio [Radeon R9 285/380] 174b aad8 Radeon R9 285/380 HDMI Audio - aae8 Fiji HDMI/DP Audio Controller + aae8 Fiji HDMI/DP Audio [Radeon R9 Nano / FURY/FURY X] ac00 Theater 600 Pro ac02 TV Wonder HD 600 PCIe ac12 Theater HD T507 (DVB-T) TV tuner/capture device @@ -3751,6 +3804,7 @@ 04da PCI-E IPR SAS+ Adapter (ASIC) 1014 04fb PCIe3 x16 20GB Cache 12Gb Quad SAS RAID+ Adapter(580B) 1014 04fc PCIe3 x8 12Gb Quad SAS RAID+ Adapter(580A) + 04ed Internal Shared Memory (ISM) virtual PCI device 3022 QLA3022 Network Adapter 4022 QLA3022 Network Adapter ffff MPIC-2 interrupt controller @@ -4421,6 +4475,11 @@ 102b 2241 M9138 LP PCIe x16 102b 2280 M9188 ATX PCIe x16 102b 22c0 M9128 LP PCIe x16 + 0550 SV2 + 102b 00c0 MURA-IPX-I4EF + 102b 00c1 MURA-IPX-I4DF + 102b 00c3 MURA-IPX-I4DHF + 102b 00c5 MURA-IPX-I4EHF 0d10 MGA Ultima/Impression 1000 MGA G100 [Productiva] 102b ff01 Productiva G100 @@ -5947,8 +6006,14 @@ 1077 029a QLE2742 Dual Port 32Gb Fibre Channel to PCIe Adapter 1077 029b QLE2690 Single Port 16Gb Fibre Channel to PCIe Adapter 1077 029c QLE2692 Dual Port 16Gb Fibre Channel to PCIe Adapter + 1077 02a7 QLE2690 Single Port 16Gb FC to PCIe Gen3 x8 Adapter + 1077 02a8 QLE2692 Dual Port 16Gb FC to PCIe Gen3 x8 Adapter + 1077 02ab QLE2740 Single Port 32Gb FC to PCIe Gen3 x8 Adapter + 1077 02ac QLE2742 Dual Port 32Gb FC to PCIe Gen3 x8 Adapter 1590 00f9 HPE StoreFabric SN1100Q 16Gb Single Port Fibre Channel Host Bus Adapter 1590 00fa HPE StoreFabric SN1100Q 16Gb Dual Port Fibre Channel Host Bus Adapter + 1590 0203 HPE StoreFabric SN1600Q 32Gb Single Port Fibre Channel Host Bus Adapter + 1590 0204 HPE StoreFabric SN1600Q 32Gb Dual Port Fibre Channel Host Bus Adapter 2300 QLA2300 64-bit Fibre Channel Adapter 2312 ISP2312-based 2Gb Fibre Channel to PCI-X HBA 103c 0131 2Gb Fibre Channel - Single port [A7538A] @@ -7308,9 +7373,11 @@ 8696 PEX 8696 96-lane, 24-Port PCI Express Gen 2 (5.0 GT/s) Multi-Root Switch 8717 PEX 8717 16-lane, 8-Port PCI Express Gen 3 (8.0 GT/s) Switch with DMA 8718 PEX 8718 16-Lane, 5-Port PCI Express Gen 3 (8.0 GT/s) Switch + 8724 PEX 8724 24-Lane, 6-Port PCI Express Gen 3 (8 GT/s) Switch, 19 x 19mm FCBGA 8732 PEX 8732 32-lane, 8-Port PCI Express Gen 3 (8.0 GT/s) Switch 8734 PEX 8734 32-lane, 8-Port PCI Express Gen 3 (8.0GT/s) Switch 8747 PEX 8747 48-Lane, 5-Port PCI Express Gen 3 (8.0 GT/s) Switch + 8748 PEX 8748 48-Lane, 12-Port PCI Express Gen 3 (8 GT/s) Switch, 27 x 27mm FCBGA # This is the Non-Transparent-Bridge Virtualized Port as presented by the PLX PEX 8732 chip, the physical bridges show up at 10b5:8732 87b0 PEX 8732 32-lane, 8-Port PCI Express Gen 3 (8.0 GT/s) Switch 1093 7761 PXIe-8830mc @@ -7450,6 +7517,7 @@ 1885 0700 Tsunami FPGA PMC with Altera Stratix S40 1885 0701 Tsunami FPGA PMC with Altera Stratix S30 9733 PEX 9733 33-lane, 9-port PCI Express Gen 3 (8.0 GT/s) Switch + 1d49 0001 ThinkSystem P310W-4P NVMe Switch Card 9749 PEX 9749 49-lane, 13-port PCI Express Gen 3 (8.0 GT/s) Switch a100 Blackmagic Design DeckLink bb04 B&B 3PCIOSD1A Isolated PCI Serial @@ -9992,6 +10060,7 @@ 10c3 GT218 [GeForce 8400 GS Rev. 3] 10c5 GT218 [GeForce 405] 10d8 GT218 [NVS 300] + 10f0 GP104 High Definition Audio Controller 1140 GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M] 1019 0799 GeForce 820M 1019 999f GeForce GT 720M @@ -10187,7 +10256,7 @@ 144d c0e3 NVS 5200M 144d c0e4 NVS 5200M 144d c10d GeForce 820M - 144d c652 GeForce GT 620M + 144d c652 GeForce GT 620M on NP300E5C series laptop 144d c709 GeForce 710M 144d c711 GeForce 710M 144d c736 GeForce 710M @@ -10518,7 +10587,9 @@ 13ba GM107GL [Quadro K2200] 13bb GM107GL [Quadro K620] 13bc GM107GL [Quadro K1200] - 13bd GM107GL [GRID M40] + 13bd GM107GL [Tesla M10] + 10de 110a GRID M40 + 10de 1160 Tesla M10 13c0 GM204 [GeForce GTX 980] 1043 8504 GTX980-4GD5 13c1 GM204 @@ -10535,6 +10606,7 @@ 13f8 GM204GLM [Quadro M5000M] 13f9 GM204GLM [Quadro M4000M] 13fa GM204GLM [Quadro M3000M] + 10de 11c9 Quadro M3000 SE 13fb GM204GLM [Quadro M5500] 1401 GM206 [GeForce GTX 960] 1402 GM206 [GeForce GTX 950] @@ -10543,17 +10615,54 @@ 1427 GM206M [GeForce GTX 965M] 1430 GM206GL [Quadro M2000] 1431 GM206GL [Tesla M4] + 15f0 GP100GL + 15f1 GP100GL + 15f8 GP100GL + 15f9 GP100GL 1617 GM204M [GeForce GTX 980M] 1618 GM204M [GeForce GTX 970M] 1619 GM204M [GeForce GTX 965M] 161a GM204M [GeForce GTX 980] 1667 GM204M [GeForce GTX 965M] + 1725 GP100 + 172e GP100 + 172f GP100 17c2 GM200 [GeForce GTX TITAN X] 17c8 GM200 [GeForce GTX 980 Ti] 17f0 GM200GL [Quadro M6000] 17f1 GM200GL [Quadro M6000 24GB] 17fd GM200GL [Tesla M40] + 1b00 GP102 [TITAN X] + 1b01 GP102 + 1b30 GP102GL [Quadro P6000] + 1b70 GP102GL + 1b78 GP102GL 1b80 GP104 [GeForce GTX 1080] + 1b81 GP104 [GeForce GTX 1070] + 1b82 GP104 + 1b83 GP104 + 1ba0 GP104M [GeForce GTX 1080] + 1ba1 GP104M [GeForce GTX 1070] + 1bb0 GP104GL [Quadro P5000] + 1bb1 GP104GL + 1bb4 GP104GL + 1be0 GP104M [GeForce GTX 1080] + 1be1 GP104M [GeForce GTX 1070] + 1c00 GP106 + 1c01 GP106 + 1c02 GP106 [GeForce GTX 1060 3GB] + 1c03 GP106 [GeForce GTX 1060 6GB] + 1c20 GP106M [GeForce GTX 1060] + 1c30 GP106GL + 1c60 GP106M [GeForce GTX 1060] + 1c70 GP106GL + 1c80 GP107 + 1c81 GP107 + 1c82 GP107 [GeForce GTX 1050 Ti] + 1ca7 GP107GL + 1ca8 GP107GL + 1caa GP107GL + 1d01 GP108 10df Emulex Corporation 0720 OneConnect NIC (Skyhawk) 103c 1934 FlexFabric 20Gb 2-port 650M Adapter @@ -10723,6 +10832,7 @@ 5250 RTS5250 PCI Express Card Reader 525a RTS525A PCI Express Card Reader 5286 RTS5286 PCI Express Card Reader + 5287 RTL8411B PCI Express Card Reader 5288 RTS5288 PCI Express Card Reader 5289 RTL8411 PCI Express Card Reader 1043 1457 K55A Laptop @@ -10738,6 +10848,7 @@ 11ec 8129 RTL8111/8168 PCIe Gigabit Ethernet (misconfigured) 8136 RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller 103c 1985 Pavilion 17-e163sg Notebook PC + 103c 2a8c Compaq 500B Microtower 103c 2ab1 Pavilion p6774 103c 30cc Pavilion dv6700 1179 ff64 RTL8102E PCI-E Fast Ethernet NIC @@ -10804,6 +10915,7 @@ 1028 0283 Vostro 220 1028 04b2 Vostro 3350 1028 04da Vostro 3750 + 1028 06f3 Latitude 3570 103c 1611 Pavilion DM1Z-3000 103c 1950 ProBook 450/455 103c 2a6f Asus IPIBL-LB Motherboard @@ -10815,7 +10927,8 @@ 1043 8505 P8 series motherboard 105b 0d7c D270S/D250S Motherboard 10ec 8168 RTL8111/8168 PCI Express Gigabit Ethernet controller - 1458 e000 Motherboard + 144d c652 RTL8168 on a NP300E5C series laptop + 1458 e000 Onboard Ethernet 1462 238c Onboard RTL8111b on MSI P965 Platinum Mainboard 1462 368c K9AG Neo2 1462 4180 Wind PC MS-7418 @@ -10845,10 +10958,12 @@ 8173 RTL8192SE Wireless LAN Controller 8174 RTL8192SE Wireless LAN Controller 8176 RTL8188CE 802.11b/g/n WiFi Adapter + 1043 84b5 PCE-N10 1a3b 1139 AW-NE139H Half-size Mini PCIe Card 8177 RTL8191CE PCIe Wireless Network Adapter 8178 RTL8192CE PCIe Wireless Network Adapter 8179 RTL8188EE Wireless Network Adapter + 103c 197d RTL8188EE mini-PCIe card 8180 RTL8180L 802.11b MAC 1385 4700 MA521 802.11b Wireless PC Card 1737 0019 WPC11v4 802.11b Wireless-B Notebook Adapter @@ -10858,6 +10973,7 @@ 8191 RTL8192CE PCIe Wireless Network Adapter 8192 RTL8192E/RTL8192SE Wireless LAN Controller 8193 RTL8192DE Wireless LAN Controller + 8196 RTL8196 Integrated PCI-e Bridge 8197 SmartLAN56 56K Modem 8199 RTL8187SE Wireless LAN Controller 1462 6894 MN54G2 / MS-6894 Wireless Mini PCIe Card @@ -10886,6 +11002,8 @@ 3fc4 RME Digi9652 (Hammerfall) 3fc5 RME Hammerfall DSP 3fc6 RME Hammerfall DSP MADI + 7038 FPGA Card XC7VX690T + 17aa 402f FPGA XC7VX690T-3FFG1157E 8380 Ellips ProfiXpress Profibus Master 8381 Ellips Santos Frame Grabber d154 Copley Controls CAN card (PCI-CAN-02) @@ -10930,46 +11048,88 @@ 9500 INI-950 SCSI Adapter 9502 INI-950P Ultra Wide SCSI Adapter 1102 Creative Labs - 0002 SB Live! EMU10k1 + 0002 EMU10k1 [Sound Blaster Live! Series] 100a 1102 SB Live! 5.1 Digital OEM SB0220 EMU10K1-JFF - 1102 0020 CT4850 SBLive! Value + 1102 0020 CT4670/4850 SBLive! Value 1102 0021 CT4620 SBLive! - 1102 002f SBLive! mainboard implementation - 1102 100a SB Live! 5.1 Digital OEM [SB0220] + 1102 002f M002/M003 Integrated SBLive! + 1102 100a SB0220/0229 SBLive! 5.1 Digital OEM 1102 4001 E-mu APS 1102 8022 CT4780 SBLive! Value 1102 8023 CT4790 SoundBlaster PCI512 1102 8024 CT4760 SBLive! - 1102 8025 SBLive! Mainboard Implementation + 1102 8025 CT1140/SB0040 Integrated SBLive! 1102 8026 CT4830 SBLive! Value 1102 8027 CT4832 SBLive! Value - 1102 8028 CT4760 SBLive! OEM version + 1102 8028 CT4870 SBLive! Value + 1102 8029 CT4872 SBLive! Value + 1102 802a CT4890 SoundBlaster PCI256 + 1102 802b CT4891 SoundBlaster PCI256 1102 8031 CT4831 SBLive! Value + 1102 8032 CT4871 SBLive! Value + 1102 8033 CT4893 SoundBlaster PCI256 + 1102 8035 CT0060 SBLive! 1102 8040 CT4760 SBLive! + 1102 8050 CT4750 SoundBlaster PCI512 1102 8051 CT4850 SBLive! Value - 1102 8061 SBLive! Player 5.1 - 1102 8064 SBLive! 5.1 Model SB0100 - 1102 8065 SBLive! 5.1 Digital Model SB0220 - 1102 8066 Live! 5.1 Digital [SB0228] - 1102 8067 SBLive! 5.1 eMicro 28028 - 0004 SB Audigy - 1102 0051 SB0090 Audigy Player - 1102 0053 SB0090 Audigy Player/OEM - 1102 0058 SB0090 Audigy Player/OEM - 1102 1002 SB Audigy2 Platinum - 1102 1003 SB0350 Audigy 2 - 1102 1007 SB0240 Audigy 2 Platinum 6.1 - 1102 1009 SB Audigy2 OEM HP - 1102 2001 SB Audigy 2 ZS Platinum Pro - 1102 2002 SB Audigy 2 ZS (SB0350) - 1102 4001 E-MU 1010 + 1102 8061 SB060 SBLive! Player 5.1 + 1102 8062 SB0100 SBLive! 5.1 + 1102 8063 DXW Integrated SBLive! 5.1 + 1102 8064 SB0100/SB0102 SBLive! 5.1 + 1102 8065 SB0220/0222 SBLive! 5.1 Digital + 1102 8066 SB0228 SBLive! 5.1 Digital + 1102 8067 SB0220 SBLive! 5.1 + 1102 8068 CT0061 SBLive! + 1102 8069 SB0101 SBLive! 5.1 Value + 1102 806a SB0103 SBLive! 5.1 + 1102 806b SB0105 SBLive! 5.1 + 1102 806c SB0221 SBLive! 5.1 + 1102 8071 SB0150 SoundBlaster PCI512 +# EMU8008 PCI version of emu8000 chip + 0003 SB AWE64(D) + 0004 EMU10k2/CA0100/CA0102/CA10200 [Sound Blaster Audigy Series] + 1102 0040 SB0090 Audigy Player +# Probably an early engineering sample + 1102 0041 CT4820 SBLive!2 + 1102 0042 CT0070 Audigy + 1102 0043 CT0072 Audigy + 1102 0051 SB0090 Audigy Player/Platinum (EX) + 1102 0052 SB0162 Audigy ES + 1102 0053 CT0090/SB0092 Audigy Player/OEM + 1102 0054 SB0161 Audigy ES + 1102 0055 SB0192 Audigy + 1102 0056 SB0191 Audigy + 1102 0057 SB0091 Audigy + 1102 0058 SB0095 Audigy Player/OEM + 1102 0059 SB0230 Audigy + 1102 005a SB0231 Audigy + 1102 005b SB0232 Audigy + 1102 005c SB0238 Audigy + 1102 1002 SB0240 Audigy 2 Platinum 6.1 + 1102 1003 SB0350 Audigy 2 / SB0243 Audigy 2 OEM + 1102 1004 SB0242 Audigy 2 + 1102 1005 SB0280 Audigy 2 Platinum Ex + 1102 1006 SB0245 Audigy 2 OEM + 1102 1007 SB0240/SB0244 Audigy 2 Platinum + 1102 1008 SB0320 Audigy 2 + 1102 1009 SB0249 Audigy 2 OEM + 1102 100a SB0246 Audigy 2 + 1102 2001 SB0360 Audigy 2 ZS Platinum Pro + 1102 2002 SB0350 Audigy 2 ZS + 1102 2003 SB0352 Audigy 2 ZS + 1102 2004 SB0355 Audigy 2 ZS + 1102 2005 SB0359 Audigy 2 ZS + 1102 2006 SB035x Audigy 2 OEM + 1102 2007 SB0380 Audigy 4 Pro + 1102 4001 E-MU 1010 [MAEM8810] 1102 4002 E-MU 0404 - 0005 SB X-Fi + 1102 4003 E-MU 1010 + 0005 EMU20k1 [Sound Blaster X-Fi Series] 1102 0021 X-Fi Platinum 1102 002c X-Fi XtremeGamer FATAL1TY PRO 1102 1003 X-Fi XtremeMusic - 0006 [SB Live! Value] EMU10k1X - 0007 CA0106 Soundblaster + 0006 EMU10k1X [SB Live! Value/OEM Series] + 0007 CA0106/CA0111 [SB Live!/Audigy/X-Fi Series] 1102 0007 SBLive! 24bit 1102 1001 SB0310 Audigy LS 1102 1002 SB0312 Audigy LS @@ -10978,15 +11138,30 @@ 1102 1012 SB0790 X-Fi XA 1102 1013 Soundblaster X-Fi Xtreme Audio 1462 1009 K8N Diamond - 0008 SB0400 Audigy2 Value + 0008 CA0108/CA10300 [Sound Blaster Audigy Series] 1102 0008 EMU0404 Digital Audio System + 1102 1001 SB0400 Audigy 2 Value + 1102 1021 SB0610 Audigy 4 Value + 1102 1022 SBxxx Audigy 2/4 Value + 1102 1023 SB0612 Audigy 2 LS + 1102 1024 SB1550 Audigy 5/Rx + 1102 1101 SBxxxx Audigy 2 SA + 1102 2001 SB0530 Audigy 2 ZS Notebook + 1102 2021 SBxxxx Audigy 4 Notebook + 1102 4002 E-MU 0404 + 1102 4003 E-MU 1010 1102 4004 EMU1010 Digital Audio System [MAEM8960] - 0009 [SB X-Fi Xtreme Audio] CA0110-IBG - 1102 0010 [SB X-Fi Xtreme Audio] CA0110-IBG - 1102 0018 SB1040 - 000b EMU20k2 [X-Fi Titanium Series] + 1102 4005 E-MU 0404 [MAEM8984] + 1102 4007 E-MU 1010 [MAEM8982] + 1102 4201 E-MU 0202 [MAEM8950] + 0009 CA0110 [Sound Blaster X-Fi Xtreme Audio] + 1102 0010 MB0820 Integrated + 1102 0018 SB1040 PCI Express + 000b EMU20k2 [Sound Blaster X-Fi Titanium Series] 1102 0041 SB0880 [SoundBlaster X-Fi Titanium PCI-e] - 0012 SB Recon3D + 1102 0062 SB1270 [SoundBlaster X-Fi Titanium HD] + 0012 Sound Core3D [Sound Blaster Recon3D / Z-Series] + 1102 0010 SB1570 SB Audigy Fx 4001 SB Audigy FireWire Port 1102 0010 SB Audigy FireWire Port 7002 SB Live! Game Port @@ -11900,6 +12075,7 @@ 1093 75ff PXIe-8383mc DMA 1093 7600 PXIe-8383mc DMA 1093 7602 PXIe-8384 + 808e PES24NT24G2 PCI Express Switch # 32 port / 8 lane PCIe Gen 2 packet switch 808f PES32NT8AG2 80cf F32P08xG3 [PCIe boot mode] @@ -12820,7 +12996,7 @@ 103c 30b5 Presario V3242AU 103c 30b7 Presario V6133CL 103c 30cc Pavilion dv6700 - 103c 30cf Pavilion dv9500/9600/9700 series + 103c 30cf Pavilion dv95xx/96xx/97xx/98xx series 1043 1237 A6J-Q008 1043 1967 V6800V 144d c018 X20 IV @@ -13542,6 +13718,16 @@ 8032 ATTO Celerity FC8xEN 117c 003b Celerity FC-82EN Fibre Channel Adapter 117c 003c Celerity FC-84EN Fibre Channel Adapter + 8053 PM8053 SXP 12G 24-port SAS/SATA expander + 8054 PM8054 SXP 12G 36-port SAS/SATA expander + 8055 PM8055 SXP 12G 48-port SAS/SATA expander + 8056 PM8056 SXP 12G 68-port SAS/SATA expander + 8060 PM8060 SRCv 12G eight-port SAS/SATA RoC + 8063 PM8063 SRCv 12G 16-port SAS/SATA RoC + 8070 PM8070 Tachyon SPCv 12G eight-port SAS/SATA controller + 8071 PM8071 Tachyon SPCve 12G eight-port SAS/SATA controller + 8072 PM8072 Tachyon SPCv 12G 16-port SAS/SATA controller + 8073 PM8073 Tachyon SPCve 12G 16-port SAS/SATA controller 11f9 I-Cube Inc 11fa Kasan Electronics Company, Ltd. 11fb Datel Inc @@ -13595,6 +13781,7 @@ 1202 9844 SK-9843 SX dual link 1203 Bayer Corporation, Agfa Division 1204 Lattice Semiconductor Corporation + 1965 SB6501 802.11ad Wireless Network Adapter 1205 Array Corporation 1206 Amdahl Corporation 1208 Parsytec GmbH @@ -13685,6 +13872,7 @@ 1028 04a3 Precision M4600 8331 O2 Flash Memory Card 8520 SD/MMC Card Reader Controller + 8621 SD/MMC Card Reader Controller 1218 Hybricon Corp. 1219 First Virtual Corporation 121a 3Dfx Interactive, Inc. @@ -13906,6 +14094,7 @@ 1969 ES1938/ES1946/ES1969 Solo-1 Audiodrive 1014 0166 ES1969 SOLO-1 AudioDrive on IBM Aptiva Mainboard 125d 8888 Solo-1 Audio Adapter + 125d 8898 ES1938S TTSOLO1-SL [TerraTec 128i PCI] 153b 111b Terratec 128i PCI 1978 ES1978 Maestro 2E 0e11 b112 Armada M700/E500 @@ -14030,13 +14219,13 @@ 0002 DirecPC 1274 Ensoniq 1171 ES1373 / Creative Labs CT5803 [AudioPCI] - 1371 ES1371 / Creative Labs CT2518/ES1373 + 1371 ES1371/ES1373 / Creative Labs CT2518 0e11 0024 AudioPCI on Motherboard Compaq Deskpro 0e11 b1a7 ES1371, ES1373 AudioPCI 1033 80ac ES1371, ES1373 AudioPCI 1042 1854 Tazer 107b 8054 Tabor2 - 1274 1371 AudioPCI 64V/128 / Creative CT4810/CT5803/CT5806 [Sound Blaster PCI] + 1274 1371 Audio PCI 64V/128/5200 / Creative CT4810/CT5803/CT5806 [Sound Blaster PCI] 1274 8001 CT4751 board 1462 6470 ES1371, ES1373 AudioPCI On Motherboard MS-6147 1.1A 1462 6560 ES1371, ES1373 AudioPCI On Motherboard MS-6156 1.10 @@ -14319,7 +14508,7 @@ 12a8 News Datacom 12a9 Xiotech Corporation 12aa SDL Communications, Inc. -12ab Yuan Yuan Enterprise Co., Ltd. +12ab YUAN High-Tech Development Co., Ltd. 0000 MPG160/Kuroutoshikou ITVC15-STVLP 0002 AU8830 [Vortex2] Based Sound Card With A3D Support 0003 T507 (DVB-T) TV tuner/capture device @@ -14868,6 +15057,7 @@ 0206 GPS180PEX GPS Receiver (PCI Express) 0207 GLN180PEX GPS/GLONASS receiver (PCI Express) 0208 GPS180AMC GPS Receiver (PCI Express / MicroTCA / AdvancedMC) + 0209 GRC181PEX GPS/GLONASS/BEIDOU receiver (PCI Express) 0301 TCR510PCI IRIG Timecode Reader 0302 TCR167PCI IRIG Timecode Reader 0303 TCR511PCI IRIG Timecode Reader @@ -15758,6 +15948,7 @@ 5015 T502-BT Unified Wire Ethernet Controller 5016 T580-OCP-SO Unified Wire Ethernet Controller 5017 T520-OCP-SO Unified Wire Ethernet Controller + 5018 T540-BT Unified Wire Ethernet Controller 5080 T540-5080 Unified Wire Ethernet Controller 5081 T540-5081 Unified Wire Ethernet Controller 5082 T504-5082 Unified Wire Ethernet Controller @@ -15804,6 +15995,7 @@ 5415 T502-BT Unified Wire Ethernet Controller 5416 T580-OCP-SO Unified Wire Ethernet Controller 5417 T520-OCP-SO Unified Wire Ethernet Controller + 5418 T540-BT Unified Wire Ethernet Controller 5480 T540-5080 Unified Wire Ethernet Controller 5481 T540-5081 Unified Wire Ethernet Controller 5482 T504-5082 Unified Wire Ethernet Controller @@ -15850,6 +16042,7 @@ 5515 T502-BT Unified Wire Storage Controller 5516 T580-OCP-SO Unified Wire Storage Controller 5517 T520-OCP-SO Unified Wire Storage Controller + 5518 T540-BT Unified Wire Storage Controller 5580 T540-5080 Unified Wire Storage Controller 5581 T540-5081 Unified Wire Storage Controller 5582 T504-5082 Unified Wire Storage Controller @@ -15896,6 +16089,7 @@ 5615 T502-BT Unified Wire Storage Controller 5616 T580-OCP-SO Unified Wire Storage Controller 5617 T520-OCP-SO Unified Wire Storage Controller + 5618 T540-BT Unified Wire Storage Controller 5680 T540-5080 Unified Wire Storage Controller 5681 T540-5081 Unified Wire Storage Controller 5682 T504-5082 Unified Wire Storage Controller @@ -15981,6 +16175,7 @@ 5815 T502-BT Unified Wire Ethernet Controller [VF] 5816 T580-OCP-SO Unified Wire Ethernet Controller [VF] 5817 T520-OCP-SO Unified Wire Ethernet Controller [VF] + 5818 T540-BT Unified Wire Ethernet Controller [VF] 5880 T540-5080 Unified Wire Ethernet Controller [VF] 5881 T540-5081 Unified Wire Ethernet Controller [VF] 5882 T504-5082 Unified Wire Ethernet Controller [VF] @@ -16341,7 +16536,8 @@ 14e1 INVERTEX 14e2 INFOLIBRIA 14e3 AMTELCO -14e4 Broadcom Corporation +# Formerly Broadcom Corporation +14e4 Broadcom Limited 0576 BCM43224 802.11a/b/g/n 0800 Sentry5 Chipcommon I/O Controller 0804 Sentry5 PCI Bridge @@ -16725,15 +16921,41 @@ 103c 1321 Core I/O LAN/SCSI Combo [AB314A] 14e4 0009 NetXtreme BCM5703 1000Base-T 14e4 000a NetXtreme BCM5703 1000Base-SX - 16c8 BCM57301 NetXtreme-C Single-port 10Gb Ethernet - 16c9 BCM57302 NetXtreme-C Dual-port 10Gb/25Gb Ethernet - 16ca BCM57304 NetXtreme-C Dual-port 10Gb/25Gb/40Gb/50Gb Ethernet + 16c8 BCM57301 NetXtreme-C 10Gb Ethernet Controller + 16c9 BCM57302 NetXtreme-C 10Gb/25Gb Ethernet Controller + 16ca BCM57304 NetXtreme-C 10Gb/25Gb/40Gb/50Gb Ethernet Controller 16cb BCM57304 NetXtreme-C Ethernet Virtual Function - 16d0 BCM57402 NetXtreme-E Dual-port 10Gb Ethernet - 16d1 BCM57404 NetXtreme-E Dual-port 10Gb/25Gb Ethernet - 16d2 BCM57406 NetXtreme-E Dual-port 10GBase-T Ethernet + 16cc BCM57417 NetXtreme-E Ethernet Partition + 16ce BCM57311 NetXtreme-C 10Gb RDMA Ethernet Controller + 16cf BCM57312 NetXtreme-C 10Gb/25Gb RDMA Ethernet Controller + 16d0 BCM57402 NetXtreme-E 10Gb Ethernet Controller + 16d1 BCM57404 NetXtreme-E 10Gb/25Gb Ethernet Controller + 16d2 BCM57406 NetXtreme-E 10GBASE-T Ethernet Controller 16d3 BCM57404 NetXtreme-E Ethernet Virtual Function + 16d4 BCM57402 NetXtreme-E Ethernet Partition + 16d5 BCM57407 NetXtreme-E 10GBase-T Ethernet Controller + 16d6 BCM57412 NetXtreme-E 10Gb RDMA Ethernet Controller + 16d7 BCM57414 NetXtreme-E 10Gb/25Gb RDMA Ethernet Controller + 1590 020e Ethernet 25Gb 2-port 631SFP28 Adapter + 1590 0211 Ethernet 25Gb 2-port 631FLR-SFP28 Adapter + 16d8 BCM57416 NetXtreme-E 10GBase-T RDMA Ethernet Controller + 1590 020c Ethernet 10Gb 2-port 535T Adapter + 1590 0212 Ethernet 10Gb 2-port 535FLR-T Adapter + 16d9 BCM57417 NetXtreme-E 10GBASE-T RDMA Ethernet Controller + 108e 4866 Dual Port 10GBase-T Ethernet Controller + 16dc BCM57414 NetXtreme-E Ethernet Virtual Function 16dd NetLink BCM5781 Gigabit Ethernet PCI Express + 16de BCM57412 NetXtreme-E Ethernet Partition + 16df BCM57314 NetXtreme-C 10Gb/25Gb/40Gb/50Gb RDMA Ethernet Controller + 16e1 BCM57314 NetXtreme-C Ethernet Virtual Function + 16e2 BCM57417 NetXtreme-E 10Gb/25Gb RDMA Ethernet Controller + 108e 4866 Dual Port 10Gb/25Gb SFP28 Ethernet Controller + 16e3 BCM57416 NetXtreme-E 10Gb RDMA Ethernet Controller + 16e7 BCM57404 NetXtreme-E Ethernet Partition + 16e8 BCM57406 NetXtreme-E Ethernet Partition + 16e9 BCM57407 NetXtreme-E 25Gb Ethernet Controller + 16ec BCM57414 NetXtreme-E Ethernet Partition + 16ee BCM57416 NetXtreme-E Ethernet Partition 16f3 NetXtreme BCM5727 Gigabit Ethernet PCIe 16f7 NetXtreme BCM5753 Gigabit Ethernet PCI Express 16fd NetXtreme BCM5753M Gigabit Ethernet PCI Express @@ -17282,6 +17504,7 @@ 0070 8010 WinTV HVR-1400 ExpressCard 0070 f038 WinTV HVR-5525 107d 6f22 WinFast PxTV1200 + 12ab d585 PE988J Hybrid ATSC/QAM PCI-E AVS Video Capture (SoftEncoder) 13c2 3013 TT-budget CT2-4500 CI 1461 c039 AVerTV Hybrid Express (A577) 153b 117e Cinergy T PCIe Dual @@ -17432,6 +17655,7 @@ 1410 CB1410 Cardbus Controller 1025 003c CL50 motherboard 1025 005a TravelMate 290 + 103c 30d5 530 Laptop 1411 CB-710/2/4 Cardbus Controller 103c 006a NX9500 1412 CB-712/4 Cardbus Controller @@ -17481,6 +17705,7 @@ 9277 5 Volt Delta Sigma Converter Card 9278 10 Volt Delta Sigma Converter Card 9287 Analog Output Card + 9290 FPGA Card 1543 SILICON Laboratories 3052 Intel 537 [Winmodem] 4c22 Si3036 MC'97 DAA @@ -17657,6 +17882,10 @@ 0209 MT27700 Family [ConnectX-4 Flash Recovery] 020b MT27710 Family [ConnectX-4 Lx Flash Recovery] 020d MT28800 Family [ConnectX-5 Flash Recovery] +# reserved for RM#105916 + 024e MT53100 [Spectrum-2, Flash recovery mode] +# Actual value to be used + 024f MT53100 [Spectrum-2, Flash recovery mode] 0262 MT27710 [ConnectX-4 Lx Programmable] EN 0263 MT27710 [ConnectX-4 Lx Programmable Virtual Function] EN 1002 MT25400 Family [ConnectX-2 Virtual Function] @@ -17691,10 +17920,10 @@ 1014 MT27700 Family [ConnectX-4 Virtual Function] 1015 MT27710 Family [ConnectX-4 Lx] 1016 MT27710 Family [ConnectX-4 Lx Virtual Function] - 1017 MT27800 Family [ConnectX-5, PCIe 3.0] + 1017 MT27800 Family [ConnectX-5] 1018 MT28800 Family [ConnectX-5 Virtual Function] - 1019 MT28800 Family [ConnectX-5, PCIe 4.0] - 101a MT28830 + 1019 MT28800 Family [ConnectX-5 Ex] + 101a MT28800 Family [ConnectX-5 Ex Virtual Function] 101b MT28831 101c MT28840 101d MT28841 @@ -17702,6 +17931,7 @@ 101f MT28851 1020 MT28860 1021 MT28861 + 1974 MT28800 Family [ConnectX-5 PCIe Bridge] 5274 MT21108 InfiniBridge 5a44 MT23108 InfiniHost 5a45 MT23108 [Infinihost HCA Flash Recovery] @@ -17744,6 +17974,9 @@ caf1 ConnectX-4 CAPI Function # Spectrum, 100GbE Switch cb84 MT52100 + cf08 MT53236 + cf6c MT53100 [Spectrum-2, 64 x 100GbE switch] + d2f0 Switch-IB 3 HDR (200Gbps) switch 15b4 CCI/TRIAD 15b5 Cimetrics Inc 15b6 Texas Memory Systems Inc @@ -18015,6 +18248,7 @@ 7181 Proc10a_27S 7191 Proc10a_48S 71a1 Proc10a_66S + 71b1 Proc10A 165d Hsing Tech. Enterprise Co., Ltd. 165f Linux Media Labs, LLC 1020 LMLM4 MPEG-4 encoder @@ -18261,9 +18495,12 @@ 1028 0208 Wireless 1506 WLAN Half Mini-Card 103c 1838 AR9485/HB125 802.11bgn 1×1 Wi-Fi Adapter 105b e044 Unex DHXA-225 + 144d 410e AR9485WB-EG 802.11b/g/n mini-PCIe card on a series 3 laptop 1a3b 1186 AW-NE186H - 0033 AR9580 Wireless Network Adapter + 0033 AR958x 802.11abgn Wireless Network Adapter + 168c a120 AR9582 802.11a/n WLAN Mini-PCIe Adapter 0034 AR9462 Wireless Network Adapter + 1028 0300 Wireless 1802 802.11abgn Adapter 1a56 2003 Killer Wireless-N 1202 Half-size Mini PCIe Card 0036 QCA9565 / AR9565 Wireless Network Adapter 0037 AR9485 Wireless Network Adapter @@ -18393,6 +18630,16 @@ 7005 XMC-7K410CC: User-Configurable Kintex-7 FPGA, 410k logic cells, conduction-cooled 7006 XMC-7A200: User-Configurable Artix-7 FPGA, 200k logic cells with Plug-In I/O 7007 XMC-7A200CC: User-Configurable Conduction-Cooled Artix-7 FPGA, with 200k logic cells + 7011 AP440-1: 32-Channel Isolated Digital Input Module + 7012 AP440-2: 32-Channel Isolated Digital Input Module + 7013 AP440-3: 32-Channel Isolated Digital Input Module + 7014 AP445: 32-Channel Isolated Digital Output Module + 7016 AP470 48-Channel TTL Level Digital Input/Output Module + 7018 AP408: 32-Channel Digital I/O Module + 701a AP220-16 12-Bit, 16-Channel Analog Output Module + 701b AP231-16 16-Bit, 16-Channel Analog Output Module + 7042 AP482 Counter Timer Module with TTL Level Input/Output + 7044 AP484 Counter Timer Module with RS422 Input/Output 16da Advantech Co., Ltd. 0011 INES GPIB-PCI 16df PIKA Technologies Inc. @@ -18494,7 +18741,7 @@ 177d 0003 CN2350 [LiquidIO II] 2-port 10GbE SRIOV Virtual Function 9713 CN23XX [LiquidIO II] NVMe SRIOV Virtual Function 9800 Octeon Fusion CNF75XX Processor - a001 THUNDERX MRML Bridge + a001 ThunderX MRML(Master RML Bridge to RSL devices) a002 THUNDERX PCC Bridge 177d a102 CN88XX PCC Bridge a008 THUNDERX SMMU @@ -18532,15 +18779,24 @@ a026 THUNDERX BGX (Common Ethernet Interface) a027 THUNDERX IOBN a029 THUNDERX NCSI (Network Controller Sideband Interface) - a02a THUNDERX SGP + a02a ThunderX SGPIO (Serial GPIO controller for SATA disk lights) a02b THUNDERX SMI / MDIO Controller a02c THUNDERX DAP (Debug Access Port) a02d THUNDERX PCIERC (PCIe Root Complex) - a02e THUNDERX L2C-TAD + a02e ThunderX L2C-TAD (Level 2 cache tag and data) a02f THUNDERX L2C-CBC a030 THUNDERX L2C-MCI a031 THUNDERX MIO-FUS (Fuse Access Controller) a032 THUNDERX FUSF (Fuse Controller) + a033 THUNDERX Random Number Generator virtual function + a034 THUNDERX Network Interface Controller virtual function + a035 THUNDERX Parallel Bus + a036 ThunderX RAD (RAID acceleration engine) virtual function + a037 THUNDERX ZIP virtual function + a040 THUNDERX CPT Cryptographic Accelerator + a100 THUNDERX CN88XX 48 core SoC + a200 OCTEON TX CN81XX/CN80XX + a300 OCTEON TX CN83XX 1787 Hightech Information System Ltd. 1789 Ennyah Technologies Corp. # also used by Struck Innovative Systeme for joint developments @@ -18600,6 +18856,7 @@ 8083 GL880 USB 1.1 UHCI controller 8084 GL880 USB 2.0 EHCI controller 17aa Lenovo + 402b Intel 82599ES 10Gb 2-port Server Adapter X520-2 17ab Phillips Components 17af Hightech Information System Ltd. 17b3 Hawking Technologies @@ -18612,13 +18869,16 @@ 0017 StorSecure 300 GZIP Compression and AES Encryption Card 17c0 Wistron Corp. 17c2 Newisys, Inc. -17cb Airgo Networks, Inc. +# nee Airgo Networks, Inc. +17cb Qualcomm 0001 AGN100 802.11 a/b/g True MIMO Wireless Card 1385 5c00 WGM511 Pre-N 802.11g Wireless CardBus Adapter 1737 0045 WMP54GX v1 802.11g Wireless-G PCI Adapter with SRX 0002 AGN300 802.11 a/b/g True MIMO Wireless Card 1385 6d00 WPNT511 RangeMax 240 Mbps Wireless CardBus Adapter 1737 0054 WPC54GX4 v1 802.11g Wireless-G Notebook Adapter with SRX400 + 0400 Datacenter Technologies QDF2432 PCI Express Root Port + 0401 Datacenter Technologies QDF2400 PCI Express Root Port 17cc NetChip Technology, Inc 2280 USB 2.0 17cf Z-Com, Inc. @@ -18692,6 +18952,44 @@ 17db Cray Inc 0101 XT Series [Seastar] 3D Toroidal Router 17de KWorld Computer Co. Ltd. +17df Dini Group + 1864 Virtex4 PCI Board w/ QL5064 Bridge [DN7000K10PCI/DN8000K10PCI/DN8000K10PSX/NOTUS] + 1865 Virtex4 ASIC Emulator [DN8000K10PCIe] + 1866 Virtex4 ASIC Emulator Cable Connection [DN8000K10PCI] + 1867 Virtex4 ASIC Emulator Cable Connection [DN8000K10PCIe] + 1868 Virtex4 ASIC Emulator [DN8000K10PCIe-8] + 1900 Virtex5 PCIe ASIC Emulator [DN9000K10PCIe8T/DN9002K10PCIe8T/DN9200K10PCIe8T/DN7006K10PCIe8T/DN7406K10PCIe8T] + 1901 Virtex5 PCIe ASIC Emulator Large BARs [DN9000K10PCIe8T/DN9002K10PCIe8T/DN9200K10PCIe8T/DN7006K10PCIe8T/DN7406K10PCIe8T] + 1902 Virtex5 PCIe ASIC Emulator Low Power [Interceptor] + 1903 Spartan6 PCIe FPGA Accelerator Board [DNBFCS12PCIe] + 1904 Virtex6 PCIe ASIC Emulation Board [DNDUALV6_PCIe4] + 1905 Virtex6 PCIe ASIC Emulation Board [DNV6F6PCIe] + 1906 Virtex6 PCIe ASIC Emulation Board [DN2076K10] + 1907 Virtex6 PCIe ASIC Emulation Board [DNV6F2PCIe] + 1908 Virtex6 PCIe ASIC Emulation Board Large BARs[DNV6F2PCIe] *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Oct 8 17:58:28 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CD3BC065E3; Sat, 8 Oct 2016 17:58:28 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDB3DB37; Sat, 8 Oct 2016 17:58:27 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u98HwRRF089455; Sat, 8 Oct 2016 17:58:27 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u98HwQlJ089451; Sat, 8 Oct 2016 17:58:26 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201610081758.u98HwQlJ089451@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sat, 8 Oct 2016 17:58:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306855 - head/sys/dev/evdev X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 17:58:28 -0000 Author: gonzo Date: Sat Oct 8 17:58:26 2016 New Revision: 306855 URL: https://svnweb.freebsd.org/changeset/base/306855 Log: Allow using of driver's mutex instead internal one for evdev locking. Add new API call: evdev_register_mtx which takes lock argument that should be used instead of internal one for evdev locking. Useful for cases if evdev_push_event() is always called with driver's lock taken and reduces amount of lock aquisitions. This allows to avoid LOR between ev_open/ev_close invocations and evdev_push_event() Such LOR can happen when ev_open/ev_close methods acquire driver lock and evdev_push_event() is called with this lock taken. Submitted by: Vladimir Kondratiev Modified: head/sys/dev/evdev/evdev.c head/sys/dev/evdev/evdev.h head/sys/dev/evdev/evdev_mt.c head/sys/dev/evdev/evdev_private.h Modified: head/sys/dev/evdev/evdev.c ============================================================================== --- head/sys/dev/evdev/evdev.c Sat Oct 8 17:51:15 2016 (r306854) +++ head/sys/dev/evdev/evdev.c Sat Oct 8 17:58:26 2016 (r306855) @@ -187,8 +187,8 @@ evdev_estimate_report_size(struct evdev_ return (size); } -int -evdev_register(struct evdev_dev *evdev) +static int +evdev_register_common(struct evdev_dev *evdev) { int ret; @@ -196,7 +196,6 @@ evdev_register(struct evdev_dev *evdev) evdev->ev_shortname, evdev->ev_name, evdev->ev_serial); /* Initialize internal structures */ - mtx_init(&evdev->ev_mtx, "evmtx", NULL, MTX_DEF); LIST_INIT(&evdev->ev_clients); if (evdev_event_supported(evdev, EV_REP) && @@ -228,6 +227,19 @@ evdev_register(struct evdev_dev *evdev) /* Create char device node */ ret = evdev_cdev_create(evdev); bail_out: + return (ret); +} + +int +evdev_register(struct evdev_dev *evdev) +{ + int ret; + + evdev->ev_lock_type = EV_LOCK_INTERNAL; + evdev->ev_lock = &evdev->ev_mtx; + mtx_init(&evdev->ev_mtx, "evmtx", NULL, MTX_DEF); + + ret = evdev_register_common(evdev); if (ret != 0) mtx_destroy(&evdev->ev_mtx); @@ -235,6 +247,15 @@ bail_out: } int +evdev_register_mtx(struct evdev_dev *evdev, struct mtx *mtx) +{ + + evdev->ev_lock_type = EV_LOCK_MTX; + evdev->ev_lock = mtx; + return (evdev_register_common(evdev)); +} + +int evdev_unregister(struct evdev_dev *evdev) { struct evdev_client *client; @@ -257,7 +278,7 @@ evdev_unregister(struct evdev_dev *evdev /* destroy_dev can sleep so release lock */ ret = evdev_cdev_destroy(evdev); evdev->ev_cdev = NULL; - if (ret == 0) + if (ret == 0 && evdev->ev_lock_type == EV_LOCK_INTERNAL) mtx_destroy(&evdev->ev_mtx); evdev_free_absinfo(evdev->ev_absinfo); @@ -735,16 +756,21 @@ evdev_push_event(struct evdev_dev *evdev int32_t value) { + if (evdev->ev_lock_type != EV_LOCK_INTERNAL) + EVDEV_LOCK_ASSERT(evdev); + if (evdev_check_event(evdev, type, code, value) != 0) return (EINVAL); - EVDEV_LOCK(evdev); + if (evdev->ev_lock_type == EV_LOCK_INTERNAL) + EVDEV_LOCK(evdev); evdev_modify_event(evdev, type, code, &value); if (type == EV_SYN && code == SYN_REPORT && evdev->ev_report_opened && bit_test(evdev->ev_flags, EVDEV_FLAG_MT_STCOMPAT)) evdev_send_mt_compat(evdev); evdev_send_event(evdev, type, code, value); - EVDEV_UNLOCK(evdev); + if (evdev->ev_lock_type == EV_LOCK_INTERNAL) + EVDEV_UNLOCK(evdev); return (0); } Modified: head/sys/dev/evdev/evdev.h ============================================================================== --- head/sys/dev/evdev/evdev.h Sat Oct 8 17:51:15 2016 (r306854) +++ head/sys/dev/evdev/evdev.h Sat Oct 8 17:58:26 2016 (r306855) @@ -92,6 +92,7 @@ void evdev_set_serial(struct evdev_dev * void evdev_set_methods(struct evdev_dev *, void *, const struct evdev_methods *); int evdev_register(struct evdev_dev *); +int evdev_register_mtx(struct evdev_dev *, struct mtx *); int evdev_unregister(struct evdev_dev *); int evdev_push_event(struct evdev_dev *, uint16_t, uint16_t, int32_t); int evdev_sync(struct evdev_dev *); Modified: head/sys/dev/evdev/evdev_mt.c ============================================================================== --- head/sys/dev/evdev/evdev_mt.c Sat Oct 8 17:51:15 2016 (r306854) +++ head/sys/dev/evdev/evdev_mt.c Sat Oct 8 17:58:26 2016 (r306855) @@ -227,9 +227,13 @@ void evdev_push_nfingers(struct evdev_dev *evdev, int32_t nfingers) { - EVDEV_LOCK(evdev); + if (evdev->ev_lock_type == EV_LOCK_INTERNAL) + EVDEV_LOCK(evdev); + else + EVDEV_LOCK_ASSERT(evdev); evdev_send_nfingers(evdev, nfingers); - EVDEV_UNLOCK(evdev); + if (evdev->ev_lock_type == EV_LOCK_INTERNAL) + EVDEV_UNLOCK(evdev); } void @@ -263,7 +267,11 @@ void evdev_push_mt_compat(struct evdev_dev *evdev) { - EVDEV_LOCK(evdev); + if (evdev->ev_lock_type == EV_LOCK_INTERNAL) + EVDEV_LOCK(evdev); + else + EVDEV_LOCK_ASSERT(evdev); evdev_send_mt_compat(evdev); - EVDEV_UNLOCK(evdev); + if (evdev->ev_lock_type == EV_LOCK_INTERNAL) + EVDEV_UNLOCK(evdev); } Modified: head/sys/dev/evdev/evdev_private.h ============================================================================== --- head/sys/dev/evdev/evdev_private.h Sat Oct 8 17:51:15 2016 (r306854) +++ head/sys/dev/evdev/evdev_private.h Sat Oct 8 17:58:26 2016 (r306855) @@ -71,6 +71,12 @@ enum evdev_clock_id EV_CLOCK_BOOTTIME /* monotonic, suspend-awared */ }; +enum evdev_lock_type +{ + EV_LOCK_INTERNAL = 0, /* Internal evdev mutex */ + EV_LOCK_MTX, /* Driver`s mutex */ +}; + struct evdev_dev { char ev_name[NAMELEN]; @@ -78,6 +84,8 @@ struct evdev_dev char ev_serial[NAMELEN]; struct cdev * ev_cdev; int ev_unit; + enum evdev_lock_type ev_lock_type; + struct mtx * ev_lock; struct mtx ev_mtx; struct input_id ev_id; struct evdev_client * ev_grabber; @@ -123,9 +131,9 @@ struct evdev_dev LIST_HEAD(, evdev_client) ev_clients; }; -#define EVDEV_LOCK(evdev) mtx_lock(&(evdev)->ev_mtx) -#define EVDEV_UNLOCK(evdev) mtx_unlock(&(evdev)->ev_mtx) -#define EVDEV_LOCK_ASSERT(evdev) mtx_assert(&(evdev)->ev_mtx, MA_OWNED) +#define EVDEV_LOCK(evdev) mtx_lock((evdev)->ev_lock) +#define EVDEV_UNLOCK(evdev) mtx_unlock((evdev)->ev_lock) +#define EVDEV_LOCK_ASSERT(evdev) mtx_assert((evdev)->ev_lock, MA_OWNED) struct evdev_client { From owner-svn-src-all@freebsd.org Sat Oct 8 17:59:55 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D42DC06680; Sat, 8 Oct 2016 17:59:55 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 075D5DD8; Sat, 8 Oct 2016 17:59:54 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u98HxsKQ089597; Sat, 8 Oct 2016 17:59:54 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u98HxrYu089592; Sat, 8 Oct 2016 17:59:53 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201610081759.u98HxrYu089592@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sat, 8 Oct 2016 17:59:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306857 - head/sys/dev/evdev X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 17:59:55 -0000 Author: gonzo Date: Sat Oct 8 17:59:53 2016 New Revision: 306857 URL: https://svnweb.freebsd.org/changeset/base/306857 Log: Implement EVDEV_FLAG_MT_AUTOREL flag (autorelease touchpoints) Automaticaly release (send ABS_MT_TRACKING_ID = -1) MT-slots that has not been listed in current MT protocol type B report. Slot is counted as listed if corresponding ABS_MT_SLOT event has been sent regardless of other MT events. Events are sent on SYN_REPORT event. Submitted by: Vladimir Kondratiev Modified: head/sys/dev/evdev/evdev.c head/sys/dev/evdev/evdev.h head/sys/dev/evdev/evdev_mt.c head/sys/dev/evdev/evdev_private.h Modified: head/sys/dev/evdev/evdev.c ============================================================================== --- head/sys/dev/evdev/evdev.c Sat Oct 8 17:58:40 2016 (r306856) +++ head/sys/dev/evdev/evdev.c Sat Oct 8 17:59:53 2016 (r306857) @@ -686,6 +686,8 @@ evdev_sparse_event(struct evdev_dev *evd case EV_SYN: if (code == SYN_REPORT) { + /* Count empty reports as well as non empty */ + evdev->ev_report_count++; /* Skip empty reports */ if (!evdev->ev_report_opened) return (EV_SKIP_EVENT); @@ -722,10 +724,7 @@ evdev_propagate_event(struct evdev_dev * EVDEV_CLIENT_UNLOCKQ(client); } - /* Update counters */ evdev->ev_event_count++; - if (type == EV_SYN && code == SYN_REPORT) - evdev->ev_report_count++; } void @@ -765,6 +764,9 @@ evdev_push_event(struct evdev_dev *evdev if (evdev->ev_lock_type == EV_LOCK_INTERNAL) EVDEV_LOCK(evdev); evdev_modify_event(evdev, type, code, &value); + if (type == EV_SYN && code == SYN_REPORT && + bit_test(evdev->ev_flags, EVDEV_FLAG_MT_AUTOREL)) + evdev_send_mt_autorel(evdev); if (type == EV_SYN && code == SYN_REPORT && evdev->ev_report_opened && bit_test(evdev->ev_flags, EVDEV_FLAG_MT_STCOMPAT)) evdev_send_mt_compat(evdev); Modified: head/sys/dev/evdev/evdev.h ============================================================================== --- head/sys/dev/evdev/evdev.h Sat Oct 8 17:58:40 2016 (r306856) +++ head/sys/dev/evdev/evdev.h Sat Oct 8 17:59:53 2016 (r306857) @@ -70,6 +70,8 @@ extern int evdev_rcpt_mask; #define EVDEV_FLAG_SOFTREPEAT 0x00 /* use evdev to repeat keys */ #define EVDEV_FLAG_MT_STCOMPAT 0x01 /* autogenerate ST-compatible events * for MT protocol type B reports */ +#define EVDEV_FLAG_MT_AUTOREL 0x02 /* Autorelease MT-slots not listed in + * current MT protocol type B report */ #define EVDEV_FLAG_MAX 0x1F #define EVDEV_FLAG_CNT (EVDEV_FLAG_MAX + 1) Modified: head/sys/dev/evdev/evdev_mt.c ============================================================================== --- head/sys/dev/evdev/evdev_mt.c Sat Oct 8 17:58:40 2016 (r306856) +++ head/sys/dev/evdev/evdev_mt.c Sat Oct 8 17:59:53 2016 (r306857) @@ -112,6 +112,7 @@ void evdev_set_last_mt_slot(struct evdev_dev *evdev, int32_t slot) { + evdev->ev_mt->ev_mt_slots[slot].ev_report = evdev->ev_report_count; evdev->ev_mt->ev_mt_last_reported_slot = slot; } @@ -128,10 +129,6 @@ evdev_set_mt_value(struct evdev_dev *evd int32_t value) { - if (code == ABS_MT_TRACKING_ID && value == -1) - evdev->ev_mt->ev_mt_slots[slot].ev_report = - evdev->ev_report_count; - evdev->ev_mt->ev_mt_slots[slot].ev_mt_states[ABS_MT_INDEX(code)] = value; } @@ -275,3 +272,21 @@ evdev_push_mt_compat(struct evdev_dev *e if (evdev->ev_lock_type == EV_LOCK_INTERNAL) EVDEV_UNLOCK(evdev); } + +void +evdev_send_mt_autorel(struct evdev_dev *evdev) +{ + int32_t slot; + + EVDEV_LOCK_ASSERT(evdev); + + for (slot = 0; slot <= MAXIMAL_MT_SLOT(evdev); slot++) { + if (evdev->ev_mt->ev_mt_slots[slot].ev_report != + evdev->ev_report_count && + evdev_get_mt_value(evdev, slot, ABS_MT_TRACKING_ID) != -1){ + evdev_send_event(evdev, EV_ABS, ABS_MT_SLOT, slot); + evdev_send_event(evdev, EV_ABS, ABS_MT_TRACKING_ID, + -1); + } + } +} Modified: head/sys/dev/evdev/evdev_private.h ============================================================================== --- head/sys/dev/evdev/evdev_private.h Sat Oct 8 17:58:40 2016 (r306856) +++ head/sys/dev/evdev/evdev_private.h Sat Oct 8 17:59:53 2016 (r306857) @@ -192,6 +192,7 @@ void evdev_set_last_mt_slot(struct evdev int32_t evdev_get_mt_value(struct evdev_dev *, int32_t, int16_t); void evdev_set_mt_value(struct evdev_dev *, int32_t, int16_t, int32_t); void evdev_send_mt_compat(struct evdev_dev *); +void evdev_send_mt_autorel(struct evdev_dev *); /* Utility functions: */ void evdev_client_dumpqueue(struct evdev_client *); From owner-svn-src-all@freebsd.org Sat Oct 8 18:19:53 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88E45C06C2E; Sat, 8 Oct 2016 18:19:53 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4956BD31; Sat, 8 Oct 2016 18:19:53 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u98IJq5j097214; Sat, 8 Oct 2016 18:19:52 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u98IJqur097213; Sat, 8 Oct 2016 18:19:52 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201610081819.u98IJqur097213@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sat, 8 Oct 2016 18:19:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306860 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 18:19:53 -0000 Author: gonzo Date: Sat Oct 8 18:19:52 2016 New Revision: 306860 URL: https://svnweb.freebsd.org/changeset/base/306860 Log: Add multitouch support for RPi's FT5406 - Add multitouch support (protocol B) - Report physical size of the screen - Switch from using busy loop to callbacks - Enable callbacks only when there is active listener on /dev/input/eventX Submitted by: Vladimir Kondratiev Modified: head/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c Sat Oct 8 18:16:18 2016 (r306859) +++ head/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c Sat Oct 8 18:19:52 2016 (r306860) @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -102,14 +101,20 @@ __FBSDID("$FreeBSD$"); (buf[FT5406_POINT_YL(n)])) #define GET_TOUCH_ID(buf, n) ((buf[FT5406_POINT_YH(n)] >> 4) & 0xf) -#define NO_POINTS 99 -#define SCREEN_WIDTH 800 -#define SCREEN_HEIGHT 480 +#define NO_POINTS 99 +#define SCREEN_WIDTH 800 +#define SCREEN_HEIGHT 480 +#define SCREEN_WIDTH_MM 155 +#define SCREEN_HEIGHT_MM 86 +#define SCREEN_RES_X (SCREEN_WIDTH / SCREEN_WIDTH_MM) +#define SCREEN_RES_Y (SCREEN_HEIGHT / SCREEN_HEIGHT_MM) +#define MAX_TOUCH_ID (10 - 1) struct ft5406ts_softc { device_t sc_dev; struct mtx sc_mtx; - struct proc *sc_worker; + int sc_tick; + struct callout sc_callout; /* mbox buffer (mapped to KVA) */ uint8_t *touch_buf; @@ -118,86 +123,76 @@ struct ft5406ts_softc { struct intr_config_hook sc_init_hook; struct evdev_dev *sc_evdev; - int sc_detaching; + + uint8_t sc_window[FT5406_WINDOW_SIZE]; +}; + +static evdev_open_t ft5406ts_ev_open; +static evdev_close_t ft5406ts_ev_close; + +static const struct evdev_methods ft5406ts_evdev_methods = { + .ev_open = &ft5406ts_ev_open, + .ev_close = &ft5406ts_ev_close, }; static void -ft5406ts_worker(void *data) +ft5406ts_callout(void *data) { struct ft5406ts_softc *sc = (struct ft5406ts_softc *)data; int points; - int id, new_x, new_y, i, new_pen_down, updated; - int x, y, pen_down; - uint8_t window[FT5406_WINDOW_SIZE]; - int tick; + int id, i, x, y; - /* 60Hz */ - tick = hz*17/1000; - if (tick == 0) - tick = 1; - - x = y = -1; - pen_down = 0; - - FT5406_LOCK(sc); - while(1) { - msleep(sc, &sc->sc_mtx, PCATCH | PZERO, "ft5406ts", tick); - - if (sc->sc_detaching) - break; - - memcpy(window, sc->touch_buf, sizeof(window)); - sc->touch_buf[FT5406_NUM_POINTS] = NO_POINTS; - - points = GET_NUM_POINTS(window); - /* - * No update from VC - do nothing - */ - if (points == NO_POINTS) - continue; + FT5406_LOCK_ASSERT(sc); - /* No points and pen is already up */ - if ((points == 0) && !pen_down) - continue; + memcpy(sc->sc_window, sc->touch_buf, FT5406_WINDOW_SIZE); + sc->touch_buf[FT5406_NUM_POINTS] = NO_POINTS; - new_pen_down = 0; - for (i = 0; i < points; i++) { - id = GET_TOUCH_ID(window, 0); - /* For now consider only touch 0 */ - if (id != 0) - continue; - new_pen_down = 1; - new_x = GET_X(window, 0); - new_y = GET_Y(window, 0); + points = GET_NUM_POINTS(sc->sc_window); + /* + * No update from VC - do nothing. + */ + if (points == NO_POINTS) + goto out; + + for (i = 0; i < points; i++) { + id = GET_TOUCH_ID(sc->sc_window, i); + x = GET_X(sc->sc_window, i); + y = GET_Y(sc->sc_window, i); + + if (id > MAX_TOUCH_ID) { + device_printf(sc->sc_dev, "bad touch id: %d", id); + continue; } + evdev_push_event(sc->sc_evdev, EV_ABS, ABS_MT_SLOT, id); + evdev_push_event(sc->sc_evdev, EV_ABS, ABS_MT_TRACKING_ID, id); + evdev_push_event(sc->sc_evdev, EV_ABS, ABS_MT_POSITION_X, x); + evdev_push_event(sc->sc_evdev, EV_ABS, ABS_MT_POSITION_Y, y); + } + evdev_sync(sc->sc_evdev); +out: + callout_reset(&sc->sc_callout, sc->sc_tick, ft5406ts_callout, sc); +} - updated = 0; +static void +ft5406ts_ev_close(struct evdev_dev *evdev, void *data) +{ + struct ft5406ts_softc *sc = (struct ft5406ts_softc *)data; - if (new_x != x) { - x = new_x; - updated = 1; - } + FT5406_LOCK_ASSERT(sc); - if (new_y != y) { - y = new_y; - updated = 1; - } + callout_stop(&sc->sc_callout); +} - if (new_pen_down != pen_down) { - pen_down = new_pen_down; - updated = 1; - } +static int +ft5406ts_ev_open(struct evdev_dev *evdev, void *data) +{ + struct ft5406ts_softc *sc = (struct ft5406ts_softc *)data; - if (updated) { - evdev_push_event(sc->sc_evdev, EV_ABS, ABS_X, x); - evdev_push_event(sc->sc_evdev, EV_ABS, ABS_Y, y); - evdev_push_event(sc->sc_evdev, EV_KEY, BTN_TOUCH, pen_down); - evdev_sync(sc->sc_evdev); - } - } - FT5406_UNLOCK(sc); + FT5406_LOCK_ASSERT(sc); - kproc_exit(0); + callout_reset(&sc->sc_callout, sc->sc_tick, ft5406ts_callout, sc); + + return (0); } static void @@ -234,33 +229,40 @@ ft5406ts_init(void *arg) touchbuf = VCBUS_TO_PHYS(msg.body.resp.address); sc->touch_buf = (uint8_t*)pmap_mapdev(touchbuf, FT5406_WINDOW_SIZE); + /* 60Hz */ + sc->sc_tick = hz * 17 / 1000; + if (sc->sc_tick == 0) + sc->sc_tick = 1; + sc->sc_evdev = evdev_alloc(); evdev_set_name(sc->sc_evdev, device_get_desc(sc->sc_dev)); evdev_set_phys(sc->sc_evdev, device_get_nameunit(sc->sc_dev)); - evdev_set_id(sc->sc_evdev, BUS_VIRTUAL, 0, 0, 0); + evdev_set_id(sc->sc_evdev, BUS_HOST, 0, 0, 0); + evdev_set_methods(sc->sc_evdev, sc, &ft5406ts_evdev_methods); + evdev_set_flag(sc->sc_evdev, EVDEV_FLAG_MT_STCOMPAT); + evdev_set_flag(sc->sc_evdev, EVDEV_FLAG_MT_AUTOREL); evdev_support_prop(sc->sc_evdev, INPUT_PROP_DIRECT); evdev_support_event(sc->sc_evdev, EV_SYN); evdev_support_event(sc->sc_evdev, EV_ABS); - evdev_support_event(sc->sc_evdev, EV_KEY); - evdev_support_abs(sc->sc_evdev, ABS_X, 0, 0, - SCREEN_WIDTH, 0, 0, 0); - evdev_support_abs(sc->sc_evdev, ABS_Y, 0, 0, - SCREEN_HEIGHT, 0, 0, 0); + evdev_support_abs(sc->sc_evdev, ABS_MT_SLOT, 0, 0, + MAX_TOUCH_ID, 0, 0, 0); + evdev_support_abs(sc->sc_evdev, ABS_MT_TRACKING_ID, 0, -1, + MAX_TOUCH_ID, 0, 0, 0); + evdev_support_abs(sc->sc_evdev, ABS_MT_POSITION_X, 0, 0, + SCREEN_WIDTH, 0, 0, SCREEN_RES_X); + evdev_support_abs(sc->sc_evdev, ABS_MT_POSITION_Y, 0, 0, + SCREEN_HEIGHT, 0, 0, SCREEN_RES_Y); - evdev_support_key(sc->sc_evdev, BTN_TOUCH); - - err = evdev_register(sc->sc_evdev); + err = evdev_register_mtx(sc->sc_evdev, &sc->sc_mtx); if (err) { evdev_free(sc->sc_evdev); + sc->sc_evdev = NULL; /* Avoid double free */ return; } sc->touch_buf[FT5406_NUM_POINTS] = NO_POINTS; - if (kproc_create(ft5406ts_worker, (void*)sc, &sc->sc_worker, 0, 0, - "ft5406ts_worker") != 0) { - printf("failed to create ft5406ts_worker\n"); - } + callout_init_mtx(&sc->sc_callout, &sc->sc_mtx, 0); } static int @@ -292,6 +294,7 @@ ft5406ts_attach(device_t dev) if (config_intrhook_establish(&sc->sc_init_hook) != 0) { device_printf(dev, "config_intrhook_establish failed\n"); + FT5406_LOCK_DESTROY(sc); return (ENOMEM); } @@ -305,14 +308,7 @@ ft5406ts_detach(device_t dev) sc = device_get_softc(dev); - FT5406_LOCK(sc); - if (sc->sc_worker) - sc->sc_detaching = 1; - wakeup(sc); - FT5406_UNLOCK(sc); - - if (sc->sc_evdev) - evdev_free(sc->sc_evdev); + evdev_free(sc->sc_evdev); FT5406_LOCK_DESTROY(sc); From owner-svn-src-all@freebsd.org Sat Oct 8 18:57:12 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 884D8C06813; Sat, 8 Oct 2016 18:57:12 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 525ED6B2; Sat, 8 Oct 2016 18:57:12 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u98IvBMd012375; Sat, 8 Oct 2016 18:57:11 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u98IvB7l012374; Sat, 8 Oct 2016 18:57:11 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201610081857.u98IvB7l012374@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 8 Oct 2016 18:57:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306864 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 18:57:12 -0000 Author: bapt Date: Sat Oct 8 18:57:11 2016 New Revision: 306864 URL: https://svnweb.freebsd.org/changeset/base/306864 Log: groff is not needed in the bootstrap tools if the system is built WITHOUT_SHAREDOCS MFC after: 2 weeks Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat Oct 8 18:44:29 2016 (r306863) +++ head/Makefile.inc1 Sat Oct 8 18:57:11 2016 (r306864) @@ -1586,7 +1586,7 @@ _strfile= usr.bin/fortune/strfile _gperf= gnu/usr.bin/gperf .endif -.if ${MK_GROFF} != "no" +.if ${MK_SHAREDOCS} != "no" || ${MK_GROFF} != "no" _groff= gnu/usr.bin/groff \ usr.bin/soelim .endif From owner-svn-src-all@freebsd.org Sat Oct 8 19:41:00 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4241CC064ED; Sat, 8 Oct 2016 19:41:00 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E830926; Sat, 8 Oct 2016 19:40:59 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u98JexeS029138; Sat, 8 Oct 2016 19:40:59 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u98Jexx2029137; Sat, 8 Oct 2016 19:40:59 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201610081940.u98Jexx2029137@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sat, 8 Oct 2016 19:40:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306874 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 19:41:00 -0000 Author: cem Date: Sat Oct 8 19:40:58 2016 New Revision: 306874 URL: https://svnweb.freebsd.org/changeset/base/306874 Log: sys/module.h: Unbreak MOD_DPF printf MOD_DPF's args parameter already has parentheses around it. This was broken 14 years ago in r91472. Sponsored by: Dell EMC Isilon Modified: head/sys/sys/module.h Modified: head/sys/sys/module.h ============================================================================== --- head/sys/sys/module.h Sat Oct 8 19:32:17 2016 (r306873) +++ head/sys/sys/module.h Sat Oct 8 19:40:58 2016 (r306874) @@ -233,7 +233,7 @@ extern int mod_debug; #define MOD_DPF(cat, args) do { \ if (mod_debug & MOD_DEBUG_##cat) \ - printf(args); \ + printf args; \ } while (0) #else /* !MOD_DEBUG */ From owner-svn-src-all@freebsd.org Sat Oct 8 19:54:02 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1F2EC068CE; Sat, 8 Oct 2016 19:54:02 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 752593EC; Sat, 8 Oct 2016 19:54:02 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u98Js1o9036086; Sat, 8 Oct 2016 19:54:01 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u98Js1Yt036085; Sat, 8 Oct 2016 19:54:01 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201610081954.u98Js1Yt036085@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 8 Oct 2016 19:54:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306877 - head/tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 19:54:02 -0000 Author: bapt Date: Sat Oct 8 19:54:01 2016 New Revision: 306877 URL: https://svnweb.freebsd.org/changeset/base/306877 Log: Remove the WITH_FMAKE option left over from r284464 MFC after: 3 days Deleted: head/tools/build/options/WITH_FMAKE From owner-svn-src-all@freebsd.org Sat Oct 8 20:41:09 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9508BC06333; Sat, 8 Oct 2016 20:41:09 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4EB7A9D7; Sat, 8 Oct 2016 20:41:09 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u98Kf8JR052098; Sat, 8 Oct 2016 20:41:08 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u98Kf8tb052096; Sat, 8 Oct 2016 20:41:08 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201610082041.u98Kf8tb052096@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sat, 8 Oct 2016 20:41:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306878 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 20:41:09 -0000 Author: avos Date: Sat Oct 8 20:41:08 2016 New Revision: 306878 URL: https://svnweb.freebsd.org/changeset/base/306878 Log: wpi: restore frame header before submitting an mbuf to ieee80211_tx_complete() This change allows to pass packet length to rate control modules and fixes IFCOUNTER_OBYTES calculation. Tested with Intel 3945BG, STA mode. Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpivar.h Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sat Oct 8 19:54:01 2016 (r306877) +++ head/sys/dev/wpi/if_wpi.c Sat Oct 8 20:41:08 2016 (r306878) @@ -527,7 +527,8 @@ wpi_attach(device_t dev) wpi_radiotap_attach(sc); /* Setup Tx status flags (constant). */ - sc->sc_txs.flags = IEEE80211_RATECTL_STATUS_SHORT_RETRY | + sc->sc_txs.flags = IEEE80211_RATECTL_STATUS_PKTLEN | + IEEE80211_RATECTL_STATUS_SHORT_RETRY | IEEE80211_RATECTL_STATUS_LONG_RETRY; callout_init_mtx(&sc->calib_to, &sc->rxon_mtx, 0); @@ -2079,9 +2080,15 @@ wpi_tx_done(struct wpi_softc *sc, struct m = data->m, data->m = NULL; ni = data->ni, data->ni = NULL; + /* Restore frame header. */ + KASSERT(M_LEADINGSPACE(m) >= data->hdrlen, ("no frame header!")); + M_PREPEND(m, data->hdrlen, M_NOWAIT); + KASSERT(m != NULL, ("%s: m is NULL\n", __func__)); + /* * Update rate control statistics for the node. */ + txs->pktlen = m->m_pkthdr.len; txs->short_retries = stat->rtsfailcnt; txs->long_retries = stat->ackfailcnt / WPI_NTRIES_DEFAULT; if (!(status & WPI_TX_STATUS_FAIL)) @@ -2721,6 +2728,7 @@ wpi_cmd2(struct wpi_softc *sc, struct wp data->m = buf->m; data->ni = buf->ni; + data->hdrlen = hdrlen; DPRINTF(sc, WPI_DEBUG_XMIT, "%s: qid %d idx %d len %d nsegs %d\n", __func__, ring->qid, cur, totlen, nsegs); Modified: head/sys/dev/wpi/if_wpivar.h ============================================================================== --- head/sys/dev/wpi/if_wpivar.h Sat Oct 8 19:54:01 2016 (r306877) +++ head/sys/dev/wpi/if_wpivar.h Sat Oct 8 20:41:08 2016 (r306878) @@ -63,6 +63,7 @@ struct wpi_tx_data { bus_addr_t cmd_paddr; struct mbuf *m; struct ieee80211_node *ni; + int hdrlen; }; struct wpi_tx_ring { From owner-svn-src-all@freebsd.org Sat Oct 8 21:13:57 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CAA7C06DAD; Sat, 8 Oct 2016 21:13:57 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CEE2E28; Sat, 8 Oct 2016 21:13:56 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u98LDtOR067241; Sat, 8 Oct 2016 21:13:55 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u98LDt9g067240; Sat, 8 Oct 2016 21:13:55 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610082113.u98LDt9g067240@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sat, 8 Oct 2016 21:13:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306879 - stable/11/sbin/dmesg X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 21:13:57 -0000 Author: sevan (doc committer) Date: Sat Oct 8 21:13:55 2016 New Revision: 306879 URL: https://svnweb.freebsd.org/changeset/base/306879 Log: MFC r306599: dmesg(8) first appeared in 3BSD. http://minnie.tuhs.org/cgi-bin/utree.pl?file=3BSD/usr/man/man1/dmesg.1m PR: 212443 Approved by: bcr (mentor) Obtained from: TUHS Differential Revision: https://reviews.freebsd.org/D8105 Modified: stable/11/sbin/dmesg/dmesg.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/dmesg/dmesg.8 ============================================================================== --- stable/11/sbin/dmesg/dmesg.8 Sat Oct 8 20:41:08 2016 (r306878) +++ stable/11/sbin/dmesg/dmesg.8 Sat Oct 8 21:13:55 2016 (r306879) @@ -28,7 +28,7 @@ .\" @(#)dmesg.8 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd May 9, 2013 +.Dd October 3, 2016 .Dt DMESG 8 .Os .Sh NAME @@ -84,4 +84,4 @@ at startup time The .Nm utility appeared in -.Bx 4.0 . +.Bx 3 . From owner-svn-src-all@freebsd.org Sat Oct 8 21:19:45 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA498C06EA2; Sat, 8 Oct 2016 21:19:45 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9BCCF20F; Sat, 8 Oct 2016 21:19:45 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u98LJiag067529; Sat, 8 Oct 2016 21:19:44 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u98LJiHI067528; Sat, 8 Oct 2016 21:19:44 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201610082119.u98LJiHI067528@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sat, 8 Oct 2016 21:19:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306880 - stable/10/sbin/dmesg X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 21:19:45 -0000 Author: sevan (doc committer) Date: Sat Oct 8 21:19:44 2016 New Revision: 306880 URL: https://svnweb.freebsd.org/changeset/base/306880 Log: MFC r306599: dmesg(8) first appeared in 3BSD. http://minnie.tuhs.org/cgi-bin/utree.pl?file=3BSD/usr/man/man1/dmesg.1m PR: 212443 Approved by: bcr (mentor) Obtained from: TUHS Differential Revision: https://reviews.freebsd.org/D8105 Modified: stable/10/sbin/dmesg/dmesg.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/dmesg/dmesg.8 ============================================================================== --- stable/10/sbin/dmesg/dmesg.8 Sat Oct 8 21:13:55 2016 (r306879) +++ stable/10/sbin/dmesg/dmesg.8 Sat Oct 8 21:19:44 2016 (r306880) @@ -28,7 +28,7 @@ .\" @(#)dmesg.8 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd May 9, 2013 +.Dd October 3, 2016 .Dt DMESG 8 .Os .Sh NAME @@ -84,4 +84,4 @@ at startup time The .Nm utility appeared in -.Bx 4.0 . +.Bx 3 .