From owner-svn-src-head@freebsd.org Sun Oct 2 00:35:02 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Oct 2 00:56:23 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Oct 2 01:42:46 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Oct 2 03:07:00 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Oct 2 03:20:33 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Oct 2 11:56:19 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Oct 2 14:22:10 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Oct 2 14:27:19 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Oct 2 14:32:05 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Oct 2 14:42:47 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Oct 2 15:01:32 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Oct 2 17:03:01 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Oct 2 17:36:56 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Oct 2 19:39:24 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Oct 2 20:35:59 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Oct 2 20:48:13 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Oct 2 23:13:48 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Oct 2 23:19:06 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Oct 2 23:26:42 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Oct 2 23:30:29 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Oct 2 23:35:46 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Oct 2 23:40:18 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Oct 2 23:44:54 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Oct 2 23:48:34 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Oct 2 23:51:14 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Oct 2 23:56:09 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Oct 2 23:59:32 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 00:02:33 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 00:16:17 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 00:25:16 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 00:28:43 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 00:31:59 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 00:35:16 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 00:40:21 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 00:42:26 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 00:55:19 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 01:07:07 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 01:08:36 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 01:12:59 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 01:46:49 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 02:37:30 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 04:00:31 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 06:43:58 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B005CAC6769 for ; Mon, 3 Oct 2016 06:43:58 +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 6EA9B6C5 for ; Mon, 3 Oct 2016 06:43:58 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yw0-x231.google.com with SMTP id u124so10282475ywg.3 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=hVvLOdGcl9pPydOFJ1DbiegFs5MqhmJBfazrEv7bi0EHcIQE1loP957pZokJjunbD2 8o99QChaZ0BB+s5AgYcVRMX46jIYDOf0+2ALA4jQiMjWedbwpPAZ3lPvQsMys1+M9gwx 63dwKdv2OWdz3S9CDIxYdbbqSvIbH17S5LxEl9oAUemrrYtKJ65unYDOJ0fk/3LgD0qP xUdDMIC31YDz0lfOijiXhqEvl0RdW99f7mwCBO0H4ANzsKkekJApTKkg1BTDTJ1LNdZM TgilZJUhrLNIYPTf+u1U9HdJEz0LMgMf3rrm8hLUH3zy88+n+4SKHcrlMrDrgRt5tHgp o68Q== X-Gm-Message-State: AA6/9Rk+yjq2rysOcb3vWVT9+7pBZzKvMsVmNZC7LiT2Eq7EYBYSKOQSC99pGx/bnZqgESEq7HqL4DbvVX5Llg== 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 06:52:32 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04F6BAC697F for ; Mon, 3 Oct 2016 06:52:32 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x236.google.com (mail-io0-x236.google.com [IPv6:2607:f8b0:4001:c06::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 CEB97B19 for ; Mon, 3 Oct 2016 06:52:31 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x236.google.com with SMTP id e66so111927546iod.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=B97vrGSONbQiGb7otgH1OtZumFYI7lISvTrg7jPP/T9CkCg+HOckAw+w9P/o8CYa5L kAOwufWVO77MTxeIcfClCIg/hbSdvd1V7c2uwpDyvvP2rT/CnGzvHVvbq3i2CqDdqaZp 9Gthh38sSILohbDGn+hCd73HNM3P87nGztTiAiKimpFJsFoCfd9cqBAhbGPL/mUjCXgs haWVcyBP5LQuhneEn1E2FjqOh2pIDvnjNUTmAU72f1mvd7sYjC7vFw8necGsj+Ga1lWm Nr35IXh1nC3imA5X69NzRnPcOWevXAY/dpFUeWHPR7qo6eWEyvsZgA5pT/rdlV7MM14X pTgQ== X-Gm-Message-State: AA6/9RkH6Y+2T/jpJHR8JPJvI0qC/Rtq8+tzUsAceDcHdes9Mk04NmU0p3g5OpQkE5JNad4lH401HLyaGXO51w== 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 09:16:06 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 11:57:11 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 12:48:56 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 13:12:45 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 13:23:45 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 14:07:16 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 14:18:14 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 14:26:56 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 14:43:58 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 15:13:21 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 16:10:40 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 16:25:58 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 16:47:48 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 17:20:36 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 17:34:51 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 17:36:26 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 17:49:28 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 18:00:11 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 18:03:20 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 18:20:59 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 18:30:44 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 18:34:28 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 868D1AF3048 for ; Mon, 3 Oct 2016 18:34:28 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yw0-x22a.google.com (mail-yw0-x22a.google.com [IPv6:2607:f8b0:4002:c05::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 452DC159 for ; Mon, 3 Oct 2016 18:34:28 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yw0-x22a.google.com with SMTP id u124so21269532ywg.3 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=Yjeqg8ibHXWF+5LpBwmSeEh07Bz6Mjot95R9KCvA/SVIH6XWDkDuUbRsvnFeTF9NK2 bafhZMGml3q9Di1WzxdHEn2x5fZphc8n/u7Zs1OuKEsewAfQb8Qt2K2+pY0gr/XOke+7 cGVKLfv2ax03Bs5tRoI6VjA51JiXAasnacEJPfnU+ztsvw5lZ88ZA29886hpgZ97D/LA H/Of9eFPQTGPyjY4NckYeiL22bxbzMMJxABYOtMY/EEfDtEo1Njzy6sUbbITSlpw/PUB 4ijoZT7rwk7btgNGyQNS5tdBAQMpgpZX/BJ/BO/b/8TvADruvhBq/L0zMkfSpRJKUeB6 lE6Q== X-Gm-Message-State: AA6/9RkLh+kAwb7Go9YWng8HyvYwOatvVN8qRYUCE7HtcNFDEuJxEeHxkGU+v0P8rYuiD80lqP0CKudcDV1o/w== 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 18:36:53 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 927D0AF30E3 for ; Mon, 3 Oct 2016 18:36:53 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yb0-x231.google.com (mail-yb0-x231.google.com [IPv6:2607:f8b0:4002:c09::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 5180B36F for ; Mon, 3 Oct 2016 18:36:53 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yb0-x231.google.com with SMTP id v83so51724819ybv.0 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=cGKgim1GqQA3216utpRHScFMW2NX+iFsbuFVXhRJNJKvKzfXeiBtHQtfS400jNO2KJ FnfLnrYqTbIbBWJL+bRGZBP2gEQ2jNIH9pxx0vQULl2YpUmj6XrxKl6WybfgTum/D9O1 6ILwCSwFno0z0HfoOimQPu23s6yJ2a0iJ19ovRuxARxBbbIi1ovc29nwKrZv/yhj2KLC FVmYIpYkaexotDeevjtCYNvPx6IFFb9qJD3Iru0BdyzVI64YAM099hShGG4ttgIR5NC0 oATlktpXJlApFhbYArmzlku2lKqUvPQlpt644WqlizvjtiShod+u0zmLZgQFUtixX4A6 xDgA== X-Gm-Message-State: AA6/9RlDbAUjpK7cuQEcJfaLT1wQDNi8cbEN5MYxReBtWbHkRuLoAkm4uSSP8BvoWduyPYn0473hpIAVl5LXeQ== 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 18:47:20 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 18:48:23 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7270AF3482 for ; Mon, 3 Oct 2016 18:48:23 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yb0-x22f.google.com (mail-yb0-x22f.google.com [IPv6:2607:f8b0:4002:c09::22f]) (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 95858C87 for ; Mon, 3 Oct 2016 18:48:23 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yb0-x22f.google.com with SMTP id 191so13903836ybv.3 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=HtHVzE02WIIaetdRjymyxgOfrGrm2uqTtJWfVfNC+/7NkCZhEQakeEpIWmGd4fQbWJ PyK2mkDP/i3rNQcgeZ5GV6UYnO23rZe5YtSFHiNAmRHL2I1BA4IS+KjkcGH84JvlOfHG gchpCkGmMU6rK1s9lxOWwqhrfEfUgQCYDQJwXMblP7z7id4GxMQddsFYerY2att8+fXy F3yt89A2JIbIoxmGlhSgxN9oj2JAkaDPgkYk10WpP9Rsyx85MiHK/vRctqsfHbn9mZe+ C6fUICFj2jmUtaad8uzh7Ds8WBiGKkTX+PW1i3F8LZ9QUHZtnZwIHXt2FMfO1+UHKtiX ADyw== X-Gm-Message-State: AA6/9RlAaviMJVNMkjpr8crBJfBiErM0bGT1WbTCDu2zX2NA69DJgZoXGI+pWFeUbVkXE2WF19s1hNkuFVhBrw== 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 19:02:23 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 19:11:46 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 19:18:49 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 19:22:56 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 19:32:06 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 19:34:33 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 19:48:57 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 20:05:34 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 20:48:20 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 21:15:32 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 21:42:06 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Oct 3 23:56:53 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Oct 4 00:55:08 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Oct 4 06:25:59 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68F06AF4D5C for ; Tue, 4 Oct 2016 06:25:59 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-66.reflexion.net [208.70.210.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02CD8306 for ; Tue, 4 Oct 2016 06:25:58 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 29235 invoked from network); 4 Oct 2016 06:20:10 -0000 Received: from unknown (HELO mail-cs-01.app.dca.reflexion.local) (10.81.19.1) by 0 (rfx-qmail) with SMTP; 4 Oct 2016 06:20:10 -0000 Received: by mail-cs-01.app.dca.reflexion.local (Reflexion email security v8.00.0) with SMTP; Tue, 04 Oct 2016 02:19:23 -0400 (EDT) Received: (qmail 30638 invoked from network); 4 Oct 2016 06:19:23 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 4 Oct 2016 06:19:23 -0000 Received: from [192.168.0.105] (ip70-189-131-151.lv.lv.cox.net [70.189.131.151]) by iron2.pdx.net (Postfix) with ESMTPSA id 736B0EC88B5; Mon, 3 Oct 2016 23:19:16 -0700 (PDT) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Re: svn commit: r306658 - head/sys/arm/arm Message-Id: <704B13C1-CA13-4D44-BDE7-E63BAF5236C6@dsl-only.net> Date: Mon, 3 Oct 2016 23:19:14 -0700 To: svn-src-head@freebsd.org, jmcneill@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 06:25:59 -0000 > Author: jmcneill > Date: Mon Oct 3 21:42:05 2016 > New Revision: 306658 > URL:=20 > https://svnweb.freebsd.org/changeset/base/306658 >=20 >=20 > Log: > Clear GT_CTRL_ENABLE to stop the timer. > =20 > Reviewed by: andrew >=20 > Modified: > head/sys/arm/arm/generic_timer.c >=20 > Modified: head/sys/arm/arm/generic_timer.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/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 =3D (struct arm_tmr_softc *)et->et_priv; > =20 > ctrl =3D get_ctrl(sc->physical); > - ctrl &=3D GT_CTRL_ENABLE; > + ctrl &=3D ~GT_CTRL_ENABLE; > set_ctrl(ctrl, sc->physical); > =20 > return (0); MFC at some point? =3D=3D=3D Mark Millard markmi at dsl-only.net From owner-svn-src-head@freebsd.org Tue Oct 4 08:09:26 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Oct 4 09:14:49 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Oct 4 09:51:55 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Oct 4 09:59:38 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Oct 4 10:16:03 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2CD2FAF4236 for ; Tue, 4 Oct 2016 10:16:03 +0000 (UTC) (envelope-from jmcneill@invisible.ca) Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF2DCC7B for ; Tue, 4 Oct 2016 10:16:02 +0000 (UTC) (envelope-from jmcneill@invisible.ca) Received: from mfilter41-d.gandi.net (mfilter41-d.gandi.net [217.70.178.173]) by relay5-d.mail.gandi.net (Postfix) with ESMTP id 0971541C07E; Tue, 4 Oct 2016 12:15:54 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter41-d.gandi.net Received: from relay5-d.mail.gandi.net ([IPv6:::ffff:217.70.183.197]) by mfilter41-d.gandi.net (mfilter41-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id 3AhI9DuwXWhm; Tue, 4 Oct 2016 12:15:52 +0200 (CEST) X-Originating-IP: 142.163.95.249 Received: from dis (stjhnbsu1kw-142163095249.dhcp-dynamic.FibreOP.nb.bellaliant.net [142.163.95.249]) (Authenticated sender: jmcneill@invisible.ca) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id CA5FE41C0A8; Tue, 4 Oct 2016 12:15:51 +0200 (CEST) Date: Tue, 4 Oct 2016 07:15:49 -0300 (ADT) From: Jared McNeill To: Mark Millard cc: svn-src-head@freebsd.org Subject: Re: svn commit: r306658 - head/sys/arm/arm In-Reply-To: <704B13C1-CA13-4D44-BDE7-E63BAF5236C6@dsl-only.net> Message-ID: References: <704B13C1-CA13-4D44-BDE7-E63BAF5236C6@dsl-only.net> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 10:16:03 -0000 On Tue, 4 Oct 2016, Mark Millard wrote: > > MFC at some point? Good idea, I will do that. Cheers, Jared From owner-svn-src-head@freebsd.org Tue Oct 4 11:56:49 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Oct 4 12:01:09 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Oct 4 12:25:48 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Oct 4 13:33:45 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Oct 4 15:23:04 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Oct 4 16:27:37 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Oct 4 16:29:28 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Oct 4 16:33:04 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Oct 4 16:35:39 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Oct 4 16:44:41 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Oct 4 17:01:26 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Oct 4 17:57:31 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Oct 4 19:09:21 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Oct 4 19:35:16 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Oct 4 20:27:18 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Oct 4 20:53:54 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Oct 4 20:56:01 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Oct 4 20:59:52 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57F41AF56B7 for ; Tue, 4 Oct 2016 20:59:52 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from mail.strugglingcoder.info (strugglingcoder.info [104.236.146.68]) by mx1.freebsd.org (Postfix) with ESMTP id 4A49B625; Tue, 4 Oct 2016 20:59:51 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPA id 4060817906; Tue, 4 Oct 2016 13:59:45 -0700 (PDT) Date: Tue, 4 Oct 2016 13:59:45 -0700 From: Hiren Panchasara To: Gleb Smirnoff Cc: svn-src-head@freebsd.org, lohith.bellad@me.com Subject: Re: svn commit: r306337 - head/sys/kern Message-ID: <20161004205945.GA50669@strugglingcoder.info> References: <201609261013.u8QADwrV002892@repo.freebsd.org> <20161004205352.GM23123@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="AhhlLboLdkugWU4S" Content-Disposition: inline In-Reply-To: <20161004205352.GM23123@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 20:59:52 -0000 --AhhlLboLdkugWU4S Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable + Lohith On 10/04/16 at 01:53P, Gleb Smirnoff wrote: > Hiren, >=20 > 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>=20 > H> Log: > H> In sendit(), if mp->msg_control is present, then in sockargs() we ar= e allocating > H> mbuf to store mp->msg_control. Later in kern_sendit(), call to getso= ck_cap(), > H> will check validity of file pointer passed, if this fails EBADF is r= eturned but > H> mbuf allocated in sockargs() is not freed. Fix this possible leak. > H> =20 > H> Submitted by: Lohith Bellad > H> Reviewed by: adrian > H> MFC after: 3 weeks > H> Differential Revision: https://reviews.freebsd.org/D7910 >=20 > The commit appeared to be incorrect, but a problem exists. I'd like to lo= ok at it. > Is there any reproduce recipe for the leak or bug filed? > Cheers, Hiren --AhhlLboLdkugWU4S Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAABCgBmBQJX9Bg+XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lXagH/1dNc8iQ62XL4YOT/SVqxNE2 9TFdd5RQmv64ZrNdHT56MbI35VBg+2fOkL5ANpeES6tdQ+z46tNA3A6HQ+/Yyu10 D2IKOBktvsmsYd2O8Qc63a7ycBWBjrNM7DY3H8pxPz0GXK75RvUmToGYg+pFQ/hM YFR+FJVA8gijxeuqUu3pMD/m9KtADGIcYQqfgaMW5dVX4j83r2NoUZurZ4pbGGQq cct5P5r1D8enxxT0C/8M9pGoEiG6VoEmlco1AA6vN8WJxC5BEREZoHjMlznQV1qd lKGmGPUv7d4Z4uAAnkcvXZxBFpyYrQ5XXyboVZ1dZ/0Tkt6IZ1XZN1MD43V+BmI= =2X+S -----END PGP SIGNATURE----- --AhhlLboLdkugWU4S-- From owner-svn-src-head@freebsd.org Tue Oct 4 21:27:42 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4E5CAF5DD1 for ; Tue, 4 Oct 2016 21:27:42 +0000 (UTC) (envelope-from lohith.bellad@me.com) Received: from pv33p04im-asmtp002.me.com (pv33p04im-asmtp002.me.com [17.143.181.11]) (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 8BB89289; Tue, 4 Oct 2016 21:27:42 +0000 (UTC) (envelope-from lohith.bellad@me.com) Received: from process-dkim-sign-daemon.pv33p04im-asmtp002.me.com by pv33p04im-asmtp002.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0OEJ00300IPR5M00@pv33p04im-asmtp002.me.com>; Tue, 04 Oct 2016 21:27:28 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=4d515a; t=1475616447; bh=oGrFMXsvNyeQVeqCP4w9IpYU8+Nk42mr2YULlD5vc2A=; h=Content-type:MIME-version:Subject:From:Date:Message-id:To; b=VabQtiPAfvyy3jwZ7YpvQkpCzPbsmelpYd7xntHLeNFIhnoKgfZ+3W5xaYoLxHRXm WySPiCd8o4N5c8m07qVEo8EmOfu68ARmcpHCHBEpj41zMG8Fociy8auzgra/En3Sg6 rmjqXDmXzTZKV9vmqquqKI60p/qEaFs/pAXGKSxou5SpF6RYtNSDTFQR7TzBs91YYb EMp4/qhHW2u+HRWFDlfM5SLQChGa9rELagJEaiGfbg7ExzC63q0Gww1lZ1xxD9JfYH tR74rS6T+8rqAW3nd2iT9qgqF2sIbR2qcO0QMTX4rBpnZMqEfZSSCKuO47fGhnf8ZT 900np/YuLp1UA== Received: from lbellad-mba.jnpr.net (unknown [66.129.239.12]) by pv33p04im-asmtp002.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0OEJ003TJKXK4V20@pv33p04im-asmtp002.me.com>; Tue, 04 Oct 2016 21:27:26 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-10-04_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1034 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1603290000 definitions=main-1610040368 MIME-version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: svn commit: r306337 - head/sys/kern From: Lohith Bellad In-reply-to: <20161004205945.GA50669@strugglingcoder.info> Date: Tue, 04 Oct 2016 14:27:19 -0700 Cc: lohithbsd@gmail.com Message-id: References: <201609261013.u8QADwrV002892@repo.freebsd.org> <20161004205352.GM23123@FreeBSD.org> <20161004205945.GA50669@strugglingcoder.info> To: Hiren Panchasara , Gleb Smirnoff , svn-src-head@freebsd.org X-Mailer: Apple Mail (2.2104) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 21:27:42 -0000 Hi Gleb and Hiren, > On Oct 4, 2016, at 1:59 PM, Hiren Panchasara = wrote: >=20 > + Lohith >=20 > On 10/04/16 at 01:53P, Gleb Smirnoff wrote: >> Hiren, >>=20 >> 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>=20 >> 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> =20 >> H> Submitted by: Lohith Bellad >> H> Reviewed by: adrian >> H> MFC after: 3 weeks >> H> Differential Revision: https://reviews.freebsd.org/D7910 >>=20 >> 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? >>=20 I figured out a way to prevent this leak. I completed running stress = test on the image built with this patch and it looks fine. I will send = out for review once I reach my FreeBSD system tonight. This is regarding the following commit, which led to kernel panic!!! https://svnweb.freebsd.org/base?view=3Drevision&revision=3D306337 = Discussion thread regarding the kernel panic, = https://lists.freebsd.org/pipermail/svn-src-head/2016-September/092110.htm= l = Thanks a lot for the input and sorry for the trouble created. Modified diff: Since its not possible to check and free the control mbuf correclty in = sendit() routine. We can clear the control mbuf in kern_sendit() routine after checking = correctly. Here is the diff, Index: sys/kern/uipc_syscalls.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 --- sys/kern/uipc_syscalls.c (revision 305955) +++ sys/kern/uipc_syscalls.c (working copy) @@ -809,6 +809,9 @@ } if (error =3D=3D 0) td->td_retval[0] =3D len - auio.uio_resid; +=20 + /* call to sosend would have cleared control */ + control =3D NULL; #ifdef KTRACE if (ktruio !=3D NULL) { ktruio->uio_resid =3D td->td_retval[0]; @@ -816,6 +819,8 @@ } #endif bad: + if (control !=3D NULL) + m_freem(control); fdrop(fp, td); return (error); } Since, we know for sure sosend() routine will consume the control mbuf = if its present else it will clear the mbuf. So, making control =3D NULL, = after the call to sosend() will prevent double freeing of control mbuf.=20= If there are any errors before call to sosend() in kern_sendit(), for = example EBADF (Bad File Descriptor) then we will fall to "bad:" and if = control !=3D NULL, we will clear the mbuf. This way mbuf leak for EBADF = is also prevented. Cheers, Lohith From owner-svn-src-head@freebsd.org Tue Oct 4 21:44:21 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Oct 4 22:22:34 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Oct 4 22:26:46 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Oct 4 23:10:44 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Oct 4 23:12:36 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 00:45:59 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 00:49:46 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 03:21:59 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 03:48:41 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 04:40:50 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 12:17:44 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 12:19:10 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 14:00:07 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 16:15:27 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 16:23:03 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 17:03:23 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 17:04:59 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 17:18:25 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 17:32:08 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 18:26:40 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 18:38:40 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 19:01:02 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 19:09:29 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 19:16:56 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 19:26:36 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 19:31:30 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 19:37:47 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 19:47:04 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 19:49:49 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 19:56:11 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 20:01:10 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 20:02:35 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 20:04:37 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 20:08:08 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 20:12:02 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 20:18:19 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 20:21:07 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 20:28:06 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 20:29:19 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 20:31:45 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 20:38:50 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 20:42:36 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 20:45:00 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 20:45:23 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 20:46:23 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 23:14:43 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 23:25:30 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 23:42:04 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Oct 5 23:55:03 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Oct 6 00:05:46 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Oct 6 00:13:56 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Oct 6 00:51:29 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Oct 6 01:01:01 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Oct 6 01:14:11 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Oct 6 01:52:01 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Oct 6 03:31:26 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Oct 6 03:32:31 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Oct 6 05:16:45 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Oct 6 10:40:20 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Oct 6 11:54:43 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Oct 6 12:01:12 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Oct 6 13:18:21 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Oct 6 13:21:43 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Oct 6 13:37:47 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Oct 6 13:53:18 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Oct 6 14:42:08 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Oct 6 14:55:17 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Oct 6 15:20:06 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Oct 6 15:57:16 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Oct 6 16:00:49 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Oct 6 16:09:47 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Oct 6 16:28:37 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Oct 6 17:35:51 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Oct 6 17:54:35 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Oct 6 18:05:26 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Oct 6 18:09:24 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Oct 6 18:10:20 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Oct 6 19:46:44 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Oct 6 19:51:31 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Oct 6 20:27:41 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Oct 6 20:37:24 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Oct 6 21:25:18 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Oct 6 21:39:06 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Oct 6 21:53:57 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Oct 7 00:26:38 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Oct 7 00:34:58 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Oct 7 00:35:29 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Oct 7 00:36:20 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Oct 7 06:29:26 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Oct 7 11:38:29 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Oct 7 12:57:37 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Oct 7 13:41:30 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Oct 7 13:43:39 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Oct 7 15:42:23 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Oct 7 16:17:52 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Oct 7 17:56:59 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Oct 7 18:02:43 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Oct 7 19:02:14 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Oct 7 19:02:41 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Oct 7 19:12:17 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Oct 7 19:13:30 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Oct 7 20:02:00 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Oct 7 20:17:12 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Oct 7 21:02:31 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Oct 7 21:03:13 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Oct 7 21:03:20 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Oct 7 21:10:55 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Oct 7 22:17:26 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Oct 7 22:18:09 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Oct 7 23:12:16 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Oct 7 23:18:30 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Oct 7 23:29:42 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Oct 8 00:13:09 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Oct 8 00:25:05 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Oct 8 01:00:32 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Oct 8 01:12:31 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Oct 8 01:18:02 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Oct 8 05:26:46 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Oct 8 12:53:24 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Oct 8 13:37:01 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Oct 8 13:38:06 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Oct 8 13:40:14 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Oct 8 14:48:29 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81635C05A6E 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 4D7BF380 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Oct 8 14:57:22 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Oct 8 14:58:27 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Oct 8 15:00:16 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Oct 8 17:46:31 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Oct 8 17:47:01 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Oct 8 17:47:22 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Oct 8 17:47:45 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Oct 8 17:51:16 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Oct 8 17:58:28 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Oct 8 17:59:55 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Oct 8 18:19:53 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Oct 8 18:57:12 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Oct 8 19:41:00 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Oct 8 19:54:02 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Oct 8 20:41:09 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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 {