svn commit: r306799 - stable/11/contrib/blacklist/bin
Author: lidl Date: Fri Oct 7 02:33:45 2016 New Revision: 306799 URL: https://svnweb.freebsd.org/changeset/base/306799 Log: MFC r306508: Fix blacklistd's state restoral at startup The blacklistd daemon attempted to restore the filtering rules before the database of blocked addresses was opened, so no rules were being reloaded. Now the rules are properly recreated when the daemon is started with '-r'. This bug was fixed locally, and then sent upstream to NetBSD. This changeset is the import the NetBSD version of the change, which added debugging output to alert about a null database. Sponsored by: The FreeBSD Foundation Modified: stable/11/contrib/blacklist/bin/blacklistd.c stable/11/contrib/blacklist/bin/state.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/blacklist/bin/blacklistd.c == --- stable/11/contrib/blacklist/bin/blacklistd.cFri Oct 7 02:32:01 2016(r306798) +++ stable/11/contrib/blacklist/bin/blacklistd.cFri Oct 7 02:33:45 2016(r306799) @@ -1,4 +1,4 @@ -/* $NetBSD: blacklistd.c,v 1.34 2016/04/04 15:52:56 christos Exp $ */ +/* $NetBSD: blacklistd.c,v 1.35 2016/09/26 19:43:43 christos Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include "config.h" #endif #include -__RCSID("$NetBSD: blacklistd.c,v 1.34 2016/04/04 15:52:56 christos Exp $"); +__RCSID("$NetBSD: blacklistd.c,v 1.35 2016/09/26 19:43:43 christos Exp $"); #include #include @@ -473,9 +473,6 @@ main(int argc, char *argv[]) flags |= O_TRUNC; } - if (restore) - rules_restore(); - struct pollfd *pfd = NULL; bl_t *bl = NULL; size_t nfd = 0; @@ -500,6 +497,9 @@ main(int argc, char *argv[]) if (state == NULL) return EXIT_FAILURE; + if (restore) + rules_restore(); + if (!debug) { if (daemon(0, 0) == -1) err(EXIT_FAILURE, "daemon failed"); Modified: stable/11/contrib/blacklist/bin/state.c == --- stable/11/contrib/blacklist/bin/state.c Fri Oct 7 02:32:01 2016 (r306798) +++ stable/11/contrib/blacklist/bin/state.c Fri Oct 7 02:33:45 2016 (r306799) @@ -1,4 +1,4 @@ -/* $NetBSD: state.c,v 1.18 2016/04/04 15:52:56 christos Exp $ */ +/* $NetBSD: state.c,v 1.19 2016/09/26 19:43:43 christos Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #endif #include -__RCSID("$NetBSD: state.c,v 1.18 2016/04/04 15:52:56 christos Exp $"); +__RCSID("$NetBSD: state.c,v 1.19 2016/09/26 19:43:43 christos Exp $"); #include #include @@ -200,8 +200,10 @@ state_iterate(DB *db, struct conf *c, st int rv; DBT k, v; - if (db == NULL) + if (db == NULL) { + (*lfun)(LOG_ERR, "%s: called with no database file", __func__); return -1; + } first = first ? R_FIRST : R_NEXT; ___ 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-unsubscr...@freebsd.org"
svn commit: r306798 - stable/11/contrib/blacklist/bin
Author: lidl Date: Fri Oct 7 02:32:01 2016 New Revision: 306798 URL: https://svnweb.freebsd.org/changeset/base/306798 Log: MFC r306507: Update blacklistd.8 with changes from NetBSD Sponsored by: The FreeBSD Foundation Modified: stable/11/contrib/blacklist/bin/blacklistd.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/blacklist/bin/blacklistd.8 == --- stable/11/contrib/blacklist/bin/blacklistd.8Fri Oct 7 01:33:03 2016(r306797) +++ stable/11/contrib/blacklist/bin/blacklistd.8Fri Oct 7 02:32:01 2016(r306798) @@ -1,4 +1,4 @@ -.\" $NetBSD: blacklistd.8,v 1.15 2016/03/11 17:16:40 christos Exp $ +.\" $NetBSD: blacklistd.8,v 1.18 2016/07/30 06:09:29 dholland Exp $ .\" .\" Copyright (c) 2015 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -47,7 +47,7 @@ .Nm is a daemon similar to .Xr syslogd 8 -that listens to a sockets at paths specified in the +that listens to sockets at paths specified in the .Ar sockpathsfile for notifications from other daemons about successful or failed connection attempts. @@ -218,7 +218,8 @@ Socket to receive connection notificatio .Nm first appeared in .Nx 7 . -.Fx support for +.Fx +support for .Nm was implemented in .Fx 11 . ___ 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-unsubscr...@freebsd.org"
svn commit: r306796 - stable/11/usr.sbin/sesutil
Author: mav Date: Fri Oct 7 01:32:29 2016 New Revision: 306796 URL: https://svnweb.freebsd.org/changeset/base/306796 Log: MFC r306528: Fix `sesutil fault` operation. Fault and ident bits are located in different control bytes, so previous code was just doing nothing, writing into reserved bit. Modified: stable/11/usr.sbin/sesutil/sesutil.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/sesutil/sesutil.c == --- stable/11/usr.sbin/sesutil/sesutil.cFri Oct 7 00:36:18 2016 (r306795) +++ stable/11/usr.sbin/sesutil/sesutil.cFri Oct 7 01:32:29 2016 (r306796) @@ -118,10 +118,16 @@ do_led(int fd, unsigned int idx, bool on err(EXIT_FAILURE, "ENCIOC_GETELMSTAT"); } o.cstat[0] |= 0x80; - if (onoff) { - o.cstat[2] |= (setfault ? 0x20 : 0x02); + if (setfault) { + if (onoff) + o.cstat[3] |= 0x20; + else + o.cstat[3] &= 0xdf; } else { - o.cstat[2] &= (setfault ? 0xdf : 0xfd); + if (onoff) + o.cstat[2] |= 0x02; + else + o.cstat[2] &= 0xfd; } if (ioctl(fd, ENCIOC_SETELMSTAT, (caddr_t) ) < 0) { ___ 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-unsubscr...@freebsd.org"
svn commit: r306797 - stable/10/usr.sbin/sesutil
Author: mav Date: Fri Oct 7 01:33:03 2016 New Revision: 306797 URL: https://svnweb.freebsd.org/changeset/base/306797 Log: MFC r306528: Fix `sesutil fault` operation. Fault and ident bits are located in different control bytes, so previous code was just doing nothing, writing into reserved bit. Modified: stable/10/usr.sbin/sesutil/sesutil.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/sesutil/sesutil.c == --- stable/10/usr.sbin/sesutil/sesutil.cFri Oct 7 01:32:29 2016 (r306796) +++ stable/10/usr.sbin/sesutil/sesutil.cFri Oct 7 01:33:03 2016 (r306797) @@ -119,10 +119,16 @@ do_led(int fd, unsigned int idx, bool on err(EXIT_FAILURE, "ENCIOC_GETELMSTAT"); } o.cstat[0] |= 0x80; - if (onoff) { - o.cstat[2] |= (setfault ? 0x20 : 0x02); + if (setfault) { + if (onoff) + o.cstat[3] |= 0x20; + else + o.cstat[3] &= 0xdf; } else { - o.cstat[2] &= (setfault ? 0xdf : 0xfd); + if (onoff) + o.cstat[2] |= 0x02; + else + o.cstat[2] &= 0xfd; } if (ioctl(fd, ENCIOC_SETELMSTAT, (caddr_t) ) < 0) { ___ 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-unsubscr...@freebsd.org"
svn commit: r306795 - head/sys/netinet6
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 *); ___ 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-unsubscr...@freebsd.org"
svn commit: r306793 - head/sys/netinet6
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, _nd_prefix, ndpr_entry) { /* XXX: a link-local prefix should never be detached */ - if (IN6_IS_ADDR_LINKLOCAL(>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(>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, _nd_prefix, ndpr_entry) { - if (IN6_IS_ADDR_LINKLOCAL(>ndpr_prefix.sin6_addr)) - continue; - - if (pr->ndpr_raf_onlink == 0) - continue; - - if (pr->ndpr_raf_auto == 0) + if (IN6_IS_ADDR_LINKLOCAL(>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, _nd_prefix, ndpr_entry) { - int e; char ip6buf[INET6_ADDRSTRLEN]; + int e; - if (IN6_IS_ADDR_LINKLOCAL(>ndpr_prefix.sin6_addr)) - continue; - - if (pr->ndpr_raf_onlink == 0) - continue; - - if (pr->ndpr_raf_auto == 0) + if (IN6_IS_ADDR_LINKLOCAL(>ndpr_prefix.sin6_addr) || + pr->ndpr_raf_onlink == 0 || + pr->ndpr_raf_auto == 0) continue; if ((pr->ndpr_stateflags & NDPRF_DETACHED) != 0 && ___ 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-unsubscr...@freebsd.org"
svn commit: r306794 - head/sys/netinet6
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. ___ 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-unsubscr...@freebsd.org"
svn commit: r306792 - head/sys/netinet6
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 *)>ndpr_prefix; + dst6 = (const struct sockaddr *)>ndpr_prefix; /* Restore length field before retrying lookup */ rt_key.sin6_len = sizeof(rt_key); ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r306762 - head/sys/geom/mirror
> On Oct 6, 2016, at 08:20, Alexander Motinwrote: > > 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. 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 > > Modified: head/sys/geom/mirror/g_mirror.c > == > --- head/sys/geom/mirror/g_mirror.cThu Oct 6 14:55:15 2016(r306761) > +++ head/sys/geom/mirror/g_mirror.cThu Oct 6 15:20:05 2016(r306762) > @@ -2153,10 +2153,9 @@ g_mirror_destroy_provider(struct g_mirro >} >} >mtx_unlock(>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_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_lock); >if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROY) != 0 || > +(sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROYING) != 0 || >LIST_EMPTY(>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_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_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_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.hThu
svn commit: r306790 - head/sys/dev/qlxgbe
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_terr; device_tdev = 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
svn commit: r306789 - vendor/heirloom-doctools/20161006
Author: bapt Date: Thu Oct 6 21:32:03 2016 New Revision: 306789 URL: https://svnweb.freebsd.org/changeset/base/306789 Log: Tag import of heirloom-doctools 20161006 Added: vendor/heirloom-doctools/20161006/ - copied from r306788, vendor/heirloom-doctools/dist/ ___ 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-unsubscr...@freebsd.org"
svn commit: r306788 - in vendor/heirloom-doctools: . dist dist/LICENSE.d dist/checknr dist/col dist/doc dist/doc/fonts dist/doc/just dist/doc/quickstart dist/doc/troff dist/eqn dist/eqn/checkeq.d d...
Author: bapt Date: Thu Oct 6 21:30:09 2016 New Revision: 306788 URL: https://svnweb.freebsd.org/changeset/base/306788 Log: Import heirloom doctools snapshot from git as of 161006 Added: vendor/heirloom-doctools/ vendor/heirloom-doctools/dist/ vendor/heirloom-doctools/dist/CHANGES vendor/heirloom-doctools/dist/CHANGES_GR vendor/heirloom-doctools/dist/LICENSE vendor/heirloom-doctools/dist/LICENSE.d/ vendor/heirloom-doctools/dist/LICENSE.d/BERKELEY.LICENSE vendor/heirloom-doctools/dist/LICENSE.d/CALDERA.LICENSE vendor/heirloom-doctools/dist/LICENSE.d/COPYING.LGPL vendor/heirloom-doctools/dist/LICENSE.d/LPPL-1-0.LICENSE vendor/heirloom-doctools/dist/LICENSE.d/LUCENT.LICENSE vendor/heirloom-doctools/dist/LICENSE.d/OPENSOLARIS.LICENSE vendor/heirloom-doctools/dist/README vendor/heirloom-doctools/dist/README.md vendor/heirloom-doctools/dist/checknr/ vendor/heirloom-doctools/dist/checknr/Makefile.mk (contents, props changed) vendor/heirloom-doctools/dist/checknr/checknr.1 (contents, props changed) vendor/heirloom-doctools/dist/checknr/checknr.c (contents, props changed) vendor/heirloom-doctools/dist/col/ vendor/heirloom-doctools/dist/col/Makefile.mk (contents, props changed) vendor/heirloom-doctools/dist/col/col.c (contents, props changed) vendor/heirloom-doctools/dist/configure (contents, props changed) vendor/heirloom-doctools/dist/doc/ vendor/heirloom-doctools/dist/doc/fonts/ vendor/heirloom-doctools/dist/doc/fonts/README vendor/heirloom-doctools/dist/doc/fonts/doc.more vendor/heirloom-doctools/dist/doc/fonts/doc.ps (contents, props changed) vendor/heirloom-doctools/dist/doc/fonts/doc.tr vendor/heirloom-doctools/dist/doc/fonts/makefile (contents, props changed) vendor/heirloom-doctools/dist/doc/just/ vendor/heirloom-doctools/dist/doc/just/README vendor/heirloom-doctools/dist/doc/just/doc.more vendor/heirloom-doctools/dist/doc/just/doc.ps (contents, props changed) vendor/heirloom-doctools/dist/doc/just/doc.tr vendor/heirloom-doctools/dist/doc/just/makefile (contents, props changed) vendor/heirloom-doctools/dist/doc/quickstart/ vendor/heirloom-doctools/dist/doc/quickstart/README vendor/heirloom-doctools/dist/doc/quickstart/doc.more vendor/heirloom-doctools/dist/doc/quickstart/doc.ps (contents, props changed) vendor/heirloom-doctools/dist/doc/quickstart/doc.tr vendor/heirloom-doctools/dist/doc/quickstart/makefile (contents, props changed) vendor/heirloom-doctools/dist/doc/troff/ vendor/heirloom-doctools/dist/doc/troff/README vendor/heirloom-doctools/dist/doc/troff/doc.more vendor/heirloom-doctools/dist/doc/troff/doc.ps (contents, props changed) vendor/heirloom-doctools/dist/doc/troff/doc.tr (contents, props changed) vendor/heirloom-doctools/dist/doc/troff/makefile (contents, props changed) vendor/heirloom-doctools/dist/eqn/ vendor/heirloom-doctools/dist/eqn/checkeq.d/ vendor/heirloom-doctools/dist/eqn/checkeq.d/Makefile.mk (contents, props changed) vendor/heirloom-doctools/dist/eqn/checkeq.d/checkeq.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/diacrit.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/e.h (contents, props changed) vendor/heirloom-doctools/dist/eqn/e.y vendor/heirloom-doctools/dist/eqn/eqn.d/ vendor/heirloom-doctools/dist/eqn/eqn.d/Makefile.mk (contents, props changed) vendor/heirloom-doctools/dist/eqn/eqn.d/eqn.1 (contents, props changed) vendor/heirloom-doctools/dist/eqn/eqn.d/eqnchar.7 (contents, props changed) vendor/heirloom-doctools/dist/eqn/eqnbox.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/eqnchar.d/ vendor/heirloom-doctools/dist/eqn/eqnchar.d/Makefile.mk (contents, props changed) vendor/heirloom-doctools/dist/eqn/eqnchar.d/ascii vendor/heirloom-doctools/dist/eqn/eqnchar.d/eqnchar vendor/heirloom-doctools/dist/eqn/eqnchar.d/genutf8.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/eqnchar.d/greek (contents, props changed) vendor/heirloom-doctools/dist/eqn/eqnchar.d/iso vendor/heirloom-doctools/dist/eqn/font.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/fromto.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/funny.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/glob.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/integral.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/io.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/lex.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/lookup.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/mark.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/matrix.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/move.c (contents, props changed) vendor/heirloom-doctools/dist/eqn/neqn.d/ vendor/heirloom-doctools/dist/eqn/neqn.d/Makefile.mk
svn commit: r306787 - head/sys/dev/cxgbe
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.cThu Oct 6 21:17:18 2016 (r306786) +++ head/sys/dev/cxgbe/t4_main.cThu 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); ___ 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-unsubscr...@freebsd.org"
svn commit: r306786 - in stable: 10/sys/kern 10/usr.bin/gcore 11/sys/kern 11/usr.bin/gcore
Author: jhb Date: Thu Oct 6 21:17:18 2016 New Revision: 306786 URL: https://svnweb.freebsd.org/changeset/base/306786 Log: MFC 302859: Include command line arguments in core dump process info. Fill in pr_psargs in the NT_PRSINFO ELF core dump note with command line arguments. Modified: stable/10/sys/kern/imgact_elf.c stable/10/usr.bin/gcore/elfcore.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/kern/imgact_elf.c stable/11/usr.bin/gcore/elfcore.c Directory Properties: stable/11/ (props changed) Modified: stable/10/sys/kern/imgact_elf.c == --- stable/10/sys/kern/imgact_elf.c Thu Oct 6 20:37:23 2016 (r306785) +++ stable/10/sys/kern/imgact_elf.c Thu Oct 6 21:17:18 2016 (r306786) @@ -1785,8 +1785,12 @@ typedef vm_offset_t elf_ps_strings_t; static void __elfN(note_prpsinfo)(void *arg, struct sbuf *sb, size_t *sizep) { + struct sbuf sbarg; + size_t len; + char *cp, *end; struct proc *p; elf_prpsinfo_t *psinfo; + int error; p = (struct proc *)arg; if (sb != NULL) { @@ -1795,13 +1799,43 @@ __elfN(note_prpsinfo)(void *arg, struct psinfo->pr_version = PRPSINFO_VERSION; psinfo->pr_psinfosz = sizeof(elf_prpsinfo_t); strlcpy(psinfo->pr_fname, p->p_comm, sizeof(psinfo->pr_fname)); - /* -* XXX - We don't fill in the command line arguments properly -* yet. -*/ - strlcpy(psinfo->pr_psargs, p->p_comm, - sizeof(psinfo->pr_psargs)); - + PROC_LOCK(p); + if (p->p_args != NULL) { + len = sizeof(psinfo->pr_psargs) - 1; + if (len > p->p_args->ar_length) + len = p->p_args->ar_length; + memcpy(psinfo->pr_psargs, p->p_args->ar_args, len); + PROC_UNLOCK(p); + error = 0; + } else { + _PHOLD(p); + PROC_UNLOCK(p); + sbuf_new(, psinfo->pr_psargs, + sizeof(psinfo->pr_psargs), SBUF_FIXEDLEN); + error = proc_getargv(curthread, p, ); + PRELE(p); + if (sbuf_finish() == 0) + len = sbuf_len() - 1; + else + len = sizeof(psinfo->pr_psargs) - 1; + sbuf_delete(); + } + if (error || len == 0) + strlcpy(psinfo->pr_psargs, p->p_comm, + sizeof(psinfo->pr_psargs)); + else { + KASSERT(len < sizeof(psinfo->pr_psargs), + ("len is too long: %zu vs %zu", len, + sizeof(psinfo->pr_psargs))); + cp = psinfo->pr_psargs; + end = cp + len - 1; + for (;;) { + cp = memchr(cp, '\0', end - cp); + if (cp == NULL) + break; + *cp = ' '; + } + } sbuf_bcat(sb, psinfo, sizeof(*psinfo)); free(psinfo, M_TEMP); } Modified: stable/10/usr.bin/gcore/elfcore.c == --- stable/10/usr.bin/gcore/elfcore.c Thu Oct 6 20:37:23 2016 (r306785) +++ stable/10/usr.bin/gcore/elfcore.c Thu Oct 6 21:17:18 2016 (r306786) @@ -542,6 +542,7 @@ readmap(pid_t pid) static void * elf_note_prpsinfo(void *arg, size_t *sizep) { + char *cp, *end; pid_t pid; elfcore_prpsinfo_t *psinfo; struct kinfo_proc kip; @@ -565,7 +566,20 @@ elf_note_prpsinfo(void *arg, size_t *siz if (kip.ki_pid != pid) err(1, "kern.proc.pid.%u", pid); strlcpy(psinfo->pr_fname, kip.ki_comm, sizeof(psinfo->pr_fname)); - strlcpy(psinfo->pr_psargs, psinfo->pr_fname, sizeof(psinfo->pr_psargs)); + name[2] = KERN_PROC_ARGS; + len = sizeof(psinfo->pr_psargs) - 1; + if (sysctl(name, 4, psinfo->pr_psargs, , NULL, 0) == 0 && len > 0) { + cp = psinfo->pr_psargs; + end = cp + len - 1; + for (;;) { + cp = memchr(cp, '\0', end - cp); + if (cp == NULL) + break; + *cp = ' '; + } + } else + strlcpy(psinfo->pr_psargs, kip.ki_comm, + sizeof(psinfo->pr_psargs)); *sizep = sizeof(*psinfo); return (psinfo);
svn commit: r306786 - in stable: 10/sys/kern 10/usr.bin/gcore 11/sys/kern 11/usr.bin/gcore
Author: jhb Date: Thu Oct 6 21:17:18 2016 New Revision: 306786 URL: https://svnweb.freebsd.org/changeset/base/306786 Log: MFC 302859: Include command line arguments in core dump process info. Fill in pr_psargs in the NT_PRSINFO ELF core dump note with command line arguments. Modified: stable/11/sys/kern/imgact_elf.c stable/11/usr.bin/gcore/elfcore.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/kern/imgact_elf.c stable/10/usr.bin/gcore/elfcore.c Directory Properties: stable/10/ (props changed) Modified: stable/11/sys/kern/imgact_elf.c == --- stable/11/sys/kern/imgact_elf.c Thu Oct 6 20:37:23 2016 (r306785) +++ stable/11/sys/kern/imgact_elf.c Thu Oct 6 21:17:18 2016 (r306786) @@ -1823,8 +1823,12 @@ typedef vm_offset_t elf_ps_strings_t; static void __elfN(note_prpsinfo)(void *arg, struct sbuf *sb, size_t *sizep) { + struct sbuf sbarg; + size_t len; + char *cp, *end; struct proc *p; elf_prpsinfo_t *psinfo; + int error; p = (struct proc *)arg; if (sb != NULL) { @@ -1833,13 +1837,43 @@ __elfN(note_prpsinfo)(void *arg, struct psinfo->pr_version = PRPSINFO_VERSION; psinfo->pr_psinfosz = sizeof(elf_prpsinfo_t); strlcpy(psinfo->pr_fname, p->p_comm, sizeof(psinfo->pr_fname)); - /* -* XXX - We don't fill in the command line arguments properly -* yet. -*/ - strlcpy(psinfo->pr_psargs, p->p_comm, - sizeof(psinfo->pr_psargs)); - + PROC_LOCK(p); + if (p->p_args != NULL) { + len = sizeof(psinfo->pr_psargs) - 1; + if (len > p->p_args->ar_length) + len = p->p_args->ar_length; + memcpy(psinfo->pr_psargs, p->p_args->ar_args, len); + PROC_UNLOCK(p); + error = 0; + } else { + _PHOLD(p); + PROC_UNLOCK(p); + sbuf_new(, psinfo->pr_psargs, + sizeof(psinfo->pr_psargs), SBUF_FIXEDLEN); + error = proc_getargv(curthread, p, ); + PRELE(p); + if (sbuf_finish() == 0) + len = sbuf_len() - 1; + else + len = sizeof(psinfo->pr_psargs) - 1; + sbuf_delete(); + } + if (error || len == 0) + strlcpy(psinfo->pr_psargs, p->p_comm, + sizeof(psinfo->pr_psargs)); + else { + KASSERT(len < sizeof(psinfo->pr_psargs), + ("len is too long: %zu vs %zu", len, + sizeof(psinfo->pr_psargs))); + cp = psinfo->pr_psargs; + end = cp + len - 1; + for (;;) { + cp = memchr(cp, '\0', end - cp); + if (cp == NULL) + break; + *cp = ' '; + } + } sbuf_bcat(sb, psinfo, sizeof(*psinfo)); free(psinfo, M_TEMP); } Modified: stable/11/usr.bin/gcore/elfcore.c == --- stable/11/usr.bin/gcore/elfcore.c Thu Oct 6 20:37:23 2016 (r306785) +++ stable/11/usr.bin/gcore/elfcore.c Thu Oct 6 21:17:18 2016 (r306786) @@ -548,6 +548,7 @@ readmap(pid_t pid) static void * elf_note_prpsinfo(void *arg, size_t *sizep) { + char *cp, *end; pid_t pid; elfcore_prpsinfo_t *psinfo; struct kinfo_proc kip; @@ -571,7 +572,20 @@ elf_note_prpsinfo(void *arg, size_t *siz if (kip.ki_pid != pid) err(1, "kern.proc.pid.%u", pid); strlcpy(psinfo->pr_fname, kip.ki_comm, sizeof(psinfo->pr_fname)); - strlcpy(psinfo->pr_psargs, psinfo->pr_fname, sizeof(psinfo->pr_psargs)); + name[2] = KERN_PROC_ARGS; + len = sizeof(psinfo->pr_psargs) - 1; + if (sysctl(name, 4, psinfo->pr_psargs, , NULL, 0) == 0 && len > 0) { + cp = psinfo->pr_psargs; + end = cp + len - 1; + for (;;) { + cp = memchr(cp, '\0', end - cp); + if (cp == NULL) + break; + *cp = ' '; + } + } else + strlcpy(psinfo->pr_psargs, kip.ki_comm, + sizeof(psinfo->pr_psargs)); *sizep = sizeof(*psinfo); return (psinfo);
svn commit: r306785 - head/sys/mips/conf
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 HirokiDifferential 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.hintsThu 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=0x1C03 +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=0x1810 +hint.are.0.msize=0x0010 +hint.are.0.irq=1 + +hint.are.1.at="nexus0" +hint.are.1.maddr=0x1820 +hint.are.1.msize=0x0010 +hint.are.1.irq=2 + +# GEOM redboot FIS directory offset +#hint.redboot.0.fisoffset="0x007e" 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.hintsThu 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=0x1113 +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=0x1130 +hint.spi.0.msize=0x000c +#hint.spi.0.irq=2 + +# Ethernet +hint.are.0.at="nexus0" +hint.are.0.maddr=0x1050 +hint.are.0.msize=0x50 +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="0x007e" + 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$ +# + +machinemips mips +#ident AR5312_BASE +cpuCPU_MIPS4KC +makeoptionsKERNLOADADDR=0x8005 +optionsHZ=1000 + +makeoptionsMODULES_OVERRIDE="" + +files "../atheros/ar531x/files.ar5315" + +optionsINTRNG +optionsAR531X_1ST_GENERATION + +# For now, hints are per-board. + +hints "AR5312_BASE.hints" + +makeoptionsDEBUG=-g#Build kernel with gdb(1) debug symbols + +# For small memory footprints +options VM_KMEM_SIZE_SCALE=1 + +optionsDDB +optionsKDB + +optionsSCHED_4BSD #4BSD scheduler +optionsINET#InterNETworking +optionsINET6 # IPv6 + +# options NFSCL #Network Filesystem Client + +optionsPSEUDOFS#Pseudo-filesystem framework +options_KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions + +# options NFS_LEGACYRPC +# Debugging for use in -current +optionsINVARIANTS +optionsINVARIANT_SUPPORT +optionsWITNESS +optionsWITNESS_SKIPSPIN +optionsDEBUG_REDZONE +optionsDEBUG_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 +optionsCFI_HARDWAREBYTESWAP +device geom_redboot + +device ar5315_wdog + +device uart +device uart_ar5315 + +device loop +device ether +device md +device bpf +device random + +optionsARGE_DEBUG # Enable if_arge debugging for now + +# Enable GPIO +device gpio +device gpioled Added: head/sys/mips/conf/std.AR5315 ==
svn commit: r306784 - head/contrib/netbsd-tests/lib/libc/string
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.cThu Oct 6 19:51:30 2016(r306783) +++ head/contrib/netbsd-tests/lib/libc/string/t_memmem.cThu 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) ___ 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-unsubscr...@freebsd.org"
svn commit: r306783 - head/usr.bin/localedef
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); } ___ 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-unsubscr...@freebsd.org"
svn commit: r306782 - in head: contrib/netbsd-tests/lib/libc/locale usr.bin/localedef
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 RaderObtained 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 { 0x, 0x5D, 0x5B, 0x1, 0x10, 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) && ___ 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-unsubscr...@freebsd.org"
svn commit: r306781 - stable/10/usr.bin/gcore
Author: jhb Date: Thu Oct 6 19:41:09 2016 New Revision: 306781 URL: https://svnweb.freebsd.org/changeset/base/306781 Log: MFC 299458: Fix buffer overrun in gcore(1) NT_PRPSINFO Use size of destination buffer, rather than a constant that may or may not correspond to the source buffer, to restrict the length of copied strings. In particular, pr_fname has 16+1 characters but MAXCOMLEN is 18+1. Use strlcpy instead of strncpy to ensure the result is nul-terminated. This seems to be what is expected of these fields. Modified: stable/10/usr.bin/gcore/elfcore.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/gcore/elfcore.c == --- stable/10/usr.bin/gcore/elfcore.c Thu Oct 6 19:06:10 2016 (r306780) +++ stable/10/usr.bin/gcore/elfcore.c Thu Oct 6 19:41:09 2016 (r306781) @@ -564,8 +564,8 @@ elf_note_prpsinfo(void *arg, size_t *siz err(1, "kern.proc.pid.%u", pid); if (kip.ki_pid != pid) err(1, "kern.proc.pid.%u", pid); - strncpy(psinfo->pr_fname, kip.ki_comm, MAXCOMLEN); - strncpy(psinfo->pr_psargs, psinfo->pr_fname, PRARGSZ); + strlcpy(psinfo->pr_fname, kip.ki_comm, sizeof(psinfo->pr_fname)); + strlcpy(psinfo->pr_psargs, psinfo->pr_fname, sizeof(psinfo->pr_psargs)); *sizep = sizeof(*psinfo); return (psinfo); ___ 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-unsubscr...@freebsd.org"
svn commit: r306780 - stable/9/sys/dev/qlxgbe
Author: davidcs Date: Thu Oct 6 19:06:10 2016 New Revision: 306780 URL: https://svnweb.freebsd.org/changeset/base/306780 Log: MFC r306522 Upgrade Firmware/Bootloader/ResetSeq/Minidump to revision 5.4.62 Modified: stable/9/sys/dev/qlxgbe/ql_boot.c stable/9/sys/dev/qlxgbe/ql_fw.c stable/9/sys/dev/qlxgbe/ql_minidump.c stable/9/sys/dev/qlxgbe/ql_reset.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/dev/qlxgbe/ql_boot.c == --- stable/9/sys/dev/qlxgbe/ql_boot.c Thu Oct 6 18:56:06 2016 (r306779) +++ stable/9/sys/dev/qlxgbe/ql_boot.c Thu Oct 6 19:06:10 2016 (r306780) @@ -35,13 +35,13 @@ __FBSDID("$FreeBSD$"); unsigned int ql83xx_bootloader_version_major = 5; unsigned int ql83xx_bootloader_version_minor = 4; -unsigned int ql83xx_bootloader_version_sub = 58; +unsigned int ql83xx_bootloader_version_sub = 62; unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x04, 0x00, 0xc0, 0x81, 0x05, 0x1f, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x00, 0xc0, 0x83, 0x05, 0x1f, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1e, 0x02, 0x21, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, @@ -71,7 +71,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x83, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, + 0x8b, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -703,11 +703,11 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x80, 0x02, 0xe0, 0x0e, 0x07, 0x84, 0x0b, 0x08, 0x60, 0x00, 0xa0, 0xc3, 0x01, 0x81, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x4f, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x0c, 0x00, 0x0d, 0x01, + 0x57, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x0c, 0x00, 0x0d, 0x01, 0x40, 0x04, 0x1a, 0x03, 0x00, 0x10, 0x78, 0x02, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x4c, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, + 0x54, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0xc0, 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1384,7 +1384,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x81, 0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x14, 0xe0, 0x11, 0x20, 0xa2, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbb, 0x11, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x40, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x5c, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x64, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x02, 0x00, 0x80, 0x40, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0b, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, @@ -1421,14 +1421,14 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xce, 0x11, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x1f, 0x02, 0x16, 0x04, 0x00, 0x00, 0x00, 0x60, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x21, 0x7c, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x5c, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x49, 0x07, + 0x64, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x49, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa2, 0x07, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x80, 0x01, 0xa0,
svn commit: r306779 - stable/10/sys/dev/qlxgbe
Author: davidcs Date: Thu Oct 6 18:56:06 2016 New Revision: 306779 URL: https://svnweb.freebsd.org/changeset/base/306779 Log: MFC r306522 Upgrade Firmware/Bootloader/ResetSeq/Minidump to revision 5.4.62 Modified: stable/10/sys/dev/qlxgbe/ql_boot.c stable/10/sys/dev/qlxgbe/ql_fw.c stable/10/sys/dev/qlxgbe/ql_minidump.c stable/10/sys/dev/qlxgbe/ql_reset.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/qlxgbe/ql_boot.c == --- stable/10/sys/dev/qlxgbe/ql_boot.c Thu Oct 6 18:52:09 2016 (r306778) +++ stable/10/sys/dev/qlxgbe/ql_boot.c Thu Oct 6 18:56:06 2016 (r306779) @@ -35,13 +35,13 @@ __FBSDID("$FreeBSD$"); unsigned int ql83xx_bootloader_version_major = 5; unsigned int ql83xx_bootloader_version_minor = 4; -unsigned int ql83xx_bootloader_version_sub = 58; +unsigned int ql83xx_bootloader_version_sub = 62; unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x04, 0x00, 0xc0, 0x81, 0x05, 0x1f, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x00, 0xc0, 0x83, 0x05, 0x1f, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1e, 0x02, 0x21, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, @@ -71,7 +71,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x83, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, + 0x8b, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -703,11 +703,11 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x80, 0x02, 0xe0, 0x0e, 0x07, 0x84, 0x0b, 0x08, 0x60, 0x00, 0xa0, 0xc3, 0x01, 0x81, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x4f, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x0c, 0x00, 0x0d, 0x01, + 0x57, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x0c, 0x00, 0x0d, 0x01, 0x40, 0x04, 0x1a, 0x03, 0x00, 0x10, 0x78, 0x02, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x4c, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, + 0x54, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0xc0, 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1384,7 +1384,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x81, 0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x14, 0xe0, 0x11, 0x20, 0xa2, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbb, 0x11, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x40, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x5c, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x64, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x02, 0x00, 0x80, 0x40, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0b, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, @@ -1421,14 +1421,14 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xce, 0x11, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x1f, 0x02, 0x16, 0x04, 0x00, 0x00, 0x00, 0x60, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x21, 0x7c, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x5c, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x49, 0x07, + 0x64, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x49, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa2, 0x07, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x80, 0x01, 0xa0, 0x20, 0x00, 0x00, 0x00, -
svn commit: r306778 - stable/11/sys/dev/qlxgbe
Author: davidcs Date: Thu Oct 6 18:52:09 2016 New Revision: 306778 URL: https://svnweb.freebsd.org/changeset/base/306778 Log: MFC r306522 Upgrade Firmware/Bootloader/ResetSeq/Minidump to revision 5.4.62 Modified: stable/11/sys/dev/qlxgbe/ql_boot.c stable/11/sys/dev/qlxgbe/ql_fw.c stable/11/sys/dev/qlxgbe/ql_minidump.c stable/11/sys/dev/qlxgbe/ql_reset.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/qlxgbe/ql_boot.c == --- stable/11/sys/dev/qlxgbe/ql_boot.c Thu Oct 6 18:45:10 2016 (r306777) +++ stable/11/sys/dev/qlxgbe/ql_boot.c Thu Oct 6 18:52:09 2016 (r306778) @@ -35,13 +35,13 @@ __FBSDID("$FreeBSD$"); unsigned int ql83xx_bootloader_version_major = 5; unsigned int ql83xx_bootloader_version_minor = 4; -unsigned int ql83xx_bootloader_version_sub = 58; +unsigned int ql83xx_bootloader_version_sub = 62; unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x04, 0x00, 0xc0, 0x81, 0x05, 0x1f, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x00, 0xc0, 0x83, 0x05, 0x1f, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1e, 0x02, 0x21, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, @@ -71,7 +71,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x83, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, + 0x8b, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -703,11 +703,11 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x80, 0x01, 0xa0, 0x00, 0x00, 0x80, 0x02, 0xe0, 0x0e, 0x07, 0x84, 0x0b, 0x08, 0x60, 0x00, 0xa0, 0xc3, 0x01, 0x81, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x4f, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x0c, 0x00, 0x0d, 0x01, + 0x57, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x0c, 0x00, 0x0d, 0x01, 0x40, 0x04, 0x1a, 0x03, 0x00, 0x10, 0x78, 0x02, 0x00, 0x82, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x4c, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, + 0x54, 0x14, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0xc0, 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1384,7 +1384,7 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x81, 0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x14, 0xe0, 0x11, 0x20, 0xa2, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbb, 0x11, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x40, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x5c, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x64, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x02, 0x00, 0x80, 0x40, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0b, 0x00, 0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, @@ -1421,14 +1421,14 @@ unsigned char ql83xx_bootloader[] = { 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xce, 0x11, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x1f, 0x02, 0x16, 0x04, 0x00, 0x00, 0x00, 0x60, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x21, 0x7c, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x5c, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x49, 0x07, + 0x64, 0x21, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x49, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x20, 0x50, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa2, 0x07, 0x00, 0x00, 0x26, 0x00, 0xe0, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x80, 0x01, 0xa0, 0x20, 0x00, 0x00, 0x00, -
svn commit: r306775 - head/sys/kern
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.cThu Oct 6 18:09:22 2016(r306774) +++ head/sys/kern/vfs_subr.cThu 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); ___ 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-unsubscr...@freebsd.org"
svn commit: r306774 - in head/sys: kern sys
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.cThu Oct 6 18:05:25 2016(r306773) +++ head/sys/kern/vfs_subr.cThu 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.hThu Oct 6 18:05:25 2016(r306773) +++ head/sys/sys/vnode.hThu 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); intvrecycle(struct vnode *vp); +intvrecyclel(struct vnode *vp); intvn_bmap_seekhole(struct vnode *vp, u_long cmd, off_t *off, struct ucred *cred); intvn_close(struct vnode *vp, ___ 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-unsubscr...@freebsd.org"
svn commit: r306773 - head/share/man/man9
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/MakefileThu Oct 6 17:54:34 2016 (r306772) +++ head/share/man/man9/MakefileThu 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 ___ 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-unsubscr...@freebsd.org"
svn commit: r306772 - head/sys/dev/netmap
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: mm...@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) ___ 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-unsubscr...@freebsd.org"
svn commit: r306771 - head/lib/libc/sys
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 , ___ 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-unsubscr...@freebsd.org"
svn commit: r306770 - in stable/11/sys: dev/cxgbe net sys x86/iommu
Author: jhb Date: Thu Oct 6 17:21:19 2016 New Revision: 306770 URL: https://svnweb.freebsd.org/changeset/base/306770 Log: MFC 303754: Add __printflike() to bus_describe_intr() to enable -Wformat checks. Fix a few places that were passing a raw string as the format to use a "%s" format string instead. Modified: stable/11/sys/dev/cxgbe/t4_main.c stable/11/sys/net/iflib.c stable/11/sys/sys/bus.h stable/11/sys/x86/iommu/intel_drv.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/t4_main.c == --- stable/11/sys/dev/cxgbe/t4_main.c Thu Oct 6 16:28:34 2016 (r306769) +++ stable/11/sys/dev/cxgbe/t4_main.c Thu Oct 6 17:21:19 2016 (r306770) @@ -4388,7 +4388,7 @@ t4_alloc_irq(struct adapter *sc, struct "failed to setup interrupt for rid %d, name %s: %d\n", rid, name, rc); } else if (name) - bus_describe_intr(sc->dev, irq->res, irq->tag, name); + bus_describe_intr(sc->dev, irq->res, irq->tag, "%s", name); return (rc); } Modified: stable/11/sys/net/iflib.c == --- stable/11/sys/net/iflib.c Thu Oct 6 16:28:34 2016(r306769) +++ stable/11/sys/net/iflib.c Thu Oct 6 17:21:19 2016(r306770) @@ -1216,7 +1216,7 @@ _iflib_irq_alloc(if_ctx_t ctx, if_irq_t rid, name ? name : "unknown", rc); return (rc); } else if (name) - bus_describe_intr(dev, res, tag, name); + bus_describe_intr(dev, res, tag, "%s", name); irq->ii_tag = tag; return (0); Modified: stable/11/sys/sys/bus.h == --- stable/11/sys/sys/bus.h Thu Oct 6 16:28:34 2016(r306769) +++ stable/11/sys/sys/bus.h Thu Oct 6 17:21:19 2016(r306770) @@ -538,7 +538,7 @@ int bus_setup_intr(device_t dev, struct intbus_teardown_intr(device_t dev, struct resource *r, void *cookie); intbus_bind_intr(device_t dev, struct resource *r, int cpu); intbus_describe_intr(device_t dev, struct resource *irq, void *cookie, - const char *fmt, ...); + const char *fmt, ...) __printflike(4, 5); intbus_set_resource(device_t dev, int type, int rid, rman_res_t start, rman_res_t count); intbus_get_resource(device_t dev, int type, int rid, Modified: stable/11/sys/x86/iommu/intel_drv.c == --- stable/11/sys/x86/iommu/intel_drv.c Thu Oct 6 16:28:34 2016 (r306769) +++ stable/11/sys/x86/iommu/intel_drv.c Thu Oct 6 17:21:19 2016 (r306770) @@ -306,7 +306,7 @@ dmar_alloc_irq(device_t dev, struct dmar dmd->name, error); goto err4; } - bus_describe_intr(dev, dmd->irq_res, dmd->intr_handle, dmd->name); + bus_describe_intr(dev, dmd->irq_res, dmd->intr_handle, "%s", dmd->name); error = PCIB_MAP_MSI(pcib, dev, dmd->irq, _addr, _data); if (error != 0) { device_printf(dev, "cannot map %s interrupt, %d\n", ___ 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-unsubscr...@freebsd.org"
svn commit: r306769 - in head: sys/netinet sys/netinet/cc sys/netinet/khelp sys/netinet/tcp_stacks usr.sbin/trpt
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.cThu Oct 6 16:09:45 2016 (r306768) +++ head/sys/netinet/cc/cc_cdg.cThu 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. */ - longlen; + uint32_tlen; /* 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 _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 */
svn commit: r306768 - head/sys/netinet
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) && ___ 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-unsubscr...@freebsd.org"
svn commit: r306767 - head/sys/netinet
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) { ___ 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-unsubscr...@freebsd.org"
svn commit: r306766 - head/sys/netinet
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 voidtcp_sack_partialack(struct tcpcb *, struct tcphdr *); voidtcp_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 ___ 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-unsubscr...@freebsd.org"
svn commit: r306765 - in stable/10/sys/geom: bde concat gate journal linux_lvm mirror mountver raid3 shsec stripe vinum virstor
Author: mav Date: Thu Oct 6 15:36:13 2016 New Revision: 306765 URL: https://svnweb.freebsd.org/changeset/base/306765 Log: MFC r306279: Use g_wither_provider() where applicable. It is just a helper function combining G_PF_WITHER setting with g_orphan_provider(). Modified: stable/10/sys/geom/bde/g_bde.c stable/10/sys/geom/concat/g_concat.c stable/10/sys/geom/gate/g_gate.c stable/10/sys/geom/journal/g_journal.c stable/10/sys/geom/linux_lvm/g_linux_lvm.c stable/10/sys/geom/mirror/g_mirror.c stable/10/sys/geom/mountver/g_mountver.c stable/10/sys/geom/raid3/g_raid3.c stable/10/sys/geom/shsec/g_shsec.c stable/10/sys/geom/stripe/g_stripe.c stable/10/sys/geom/vinum/geom_vinum_rm.c stable/10/sys/geom/virstor/g_virstor.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/bde/g_bde.c == --- stable/10/sys/geom/bde/g_bde.c Thu Oct 6 15:35:36 2016 (r306764) +++ stable/10/sys/geom/bde/g_bde.c Thu Oct 6 15:36:13 2016 (r306765) @@ -85,7 +85,7 @@ g_bde_orphan(struct g_consumer *cp) sc = gp->softc; gp->flags |= G_GEOM_WITHER; LIST_FOREACH(pp, >provider, provider) - g_orphan_provider(pp, ENXIO); + g_wither_provider(pp, ENXIO); bzero(sc, sizeof(struct g_bde_softc)); /* destroy evidence */ return; } Modified: stable/10/sys/geom/concat/g_concat.c == --- stable/10/sys/geom/concat/g_concat.cThu Oct 6 15:35:36 2016 (r306764) +++ stable/10/sys/geom/concat/g_concat.cThu Oct 6 15:36:13 2016 (r306765) @@ -130,10 +130,9 @@ g_concat_remove_disk(struct g_concat_dis } if (sc->sc_provider != NULL) { - sc->sc_provider->flags |= G_PF_WITHER; G_CONCAT_DEBUG(0, "Device %s deactivated.", sc->sc_provider->name); - g_orphan_provider(sc->sc_provider, ENXIO); + g_wither_provider(sc->sc_provider, ENXIO); sc->sc_provider = NULL; } Modified: stable/10/sys/geom/gate/g_gate.c == --- stable/10/sys/geom/gate/g_gate.cThu Oct 6 15:35:36 2016 (r306764) +++ stable/10/sys/geom/gate/g_gate.cThu Oct 6 15:36:13 2016 (r306765) @@ -111,8 +111,7 @@ g_gate_destroy(struct g_gate_softc *sc, wakeup(sc); mtx_unlock(>sc_queue_mtx); gp = pp->geom; - pp->flags |= G_PF_WITHER; - g_orphan_provider(pp, ENXIO); + g_wither_provider(pp, ENXIO); callout_drain(>sc_callout); bioq_init(); mtx_lock(>sc_queue_mtx); Modified: stable/10/sys/geom/journal/g_journal.c == --- stable/10/sys/geom/journal/g_journal.c Thu Oct 6 15:35:36 2016 (r306764) +++ stable/10/sys/geom/journal/g_journal.c Thu Oct 6 15:36:13 2016 (r306765) @@ -2465,8 +2465,7 @@ g_journal_destroy(struct g_journal_softc GJ_DEBUG(1, "Marking %s as clean.", sc->sc_name); g_journal_metadata_update(sc); g_topology_lock(); - pp->flags |= G_PF_WITHER; - g_orphan_provider(pp, ENXIO); + g_wither_provider(pp, ENXIO); } else { g_topology_lock(); } Modified: stable/10/sys/geom/linux_lvm/g_linux_lvm.c == --- stable/10/sys/geom/linux_lvm/g_linux_lvm.c Thu Oct 6 15:35:36 2016 (r306764) +++ stable/10/sys/geom/linux_lvm/g_linux_lvm.c Thu Oct 6 15:36:13 2016 (r306765) @@ -334,7 +334,7 @@ g_llvm_remove_disk(struct g_llvm_vg *vg, if (found) { G_LLVM_DEBUG(0, "Device %s removed.", lv->lv_gprov->name); - g_orphan_provider(lv->lv_gprov, ENXIO); + g_wither_provider(lv->lv_gprov, ENXIO); lv->lv_gprov = NULL; } } Modified: stable/10/sys/geom/mirror/g_mirror.c == --- stable/10/sys/geom/mirror/g_mirror.cThu Oct 6 15:35:36 2016 (r306764) +++ stable/10/sys/geom/mirror/g_mirror.cThu Oct 6 15:36:13 2016 (r306765) @@ -2145,10 +2145,9 @@ g_mirror_destroy_provider(struct g_mirro mtx_unlock(>sc_queue_mtx); G_MIRROR_DEBUG(0, "Device %s: provider %s destroyed.", sc->sc_name, sc->sc_provider->name); - sc->sc_provider->flags |= G_PF_WITHER; - g_orphan_provider(sc->sc_provider, ENXIO); - g_topology_unlock(); + g_wither_provider(sc->sc_provider, ENXIO); sc->sc_provider = NULL; +
svn commit: r306764 - in stable/11/sys/geom: bde concat gate journal linux_lvm mirror mountver raid3 shsec stripe vinum virstor
Author: mav Date: Thu Oct 6 15:35:36 2016 New Revision: 306764 URL: https://svnweb.freebsd.org/changeset/base/306764 Log: MFC r306279: Use g_wither_provider() where applicable. It is just a helper function combining G_PF_WITHER setting with g_orphan_provider(). Modified: stable/11/sys/geom/bde/g_bde.c stable/11/sys/geom/concat/g_concat.c stable/11/sys/geom/gate/g_gate.c stable/11/sys/geom/journal/g_journal.c stable/11/sys/geom/linux_lvm/g_linux_lvm.c stable/11/sys/geom/mirror/g_mirror.c stable/11/sys/geom/mountver/g_mountver.c stable/11/sys/geom/raid3/g_raid3.c stable/11/sys/geom/shsec/g_shsec.c stable/11/sys/geom/stripe/g_stripe.c stable/11/sys/geom/vinum/geom_vinum_rm.c stable/11/sys/geom/virstor/g_virstor.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/geom/bde/g_bde.c == --- stable/11/sys/geom/bde/g_bde.c Thu Oct 6 15:30:26 2016 (r306763) +++ stable/11/sys/geom/bde/g_bde.c Thu Oct 6 15:35:36 2016 (r306764) @@ -85,7 +85,7 @@ g_bde_orphan(struct g_consumer *cp) sc = gp->softc; gp->flags |= G_GEOM_WITHER; LIST_FOREACH(pp, >provider, provider) - g_orphan_provider(pp, ENXIO); + g_wither_provider(pp, ENXIO); bzero(sc, sizeof(struct g_bde_softc)); /* destroy evidence */ return; } Modified: stable/11/sys/geom/concat/g_concat.c == --- stable/11/sys/geom/concat/g_concat.cThu Oct 6 15:30:26 2016 (r306763) +++ stable/11/sys/geom/concat/g_concat.cThu Oct 6 15:35:36 2016 (r306764) @@ -129,10 +129,9 @@ g_concat_remove_disk(struct g_concat_dis } if (sc->sc_provider != NULL) { - sc->sc_provider->flags |= G_PF_WITHER; G_CONCAT_DEBUG(0, "Device %s deactivated.", sc->sc_provider->name); - g_orphan_provider(sc->sc_provider, ENXIO); + g_wither_provider(sc->sc_provider, ENXIO); sc->sc_provider = NULL; } Modified: stable/11/sys/geom/gate/g_gate.c == --- stable/11/sys/geom/gate/g_gate.cThu Oct 6 15:30:26 2016 (r306763) +++ stable/11/sys/geom/gate/g_gate.cThu Oct 6 15:35:36 2016 (r306764) @@ -109,8 +109,7 @@ g_gate_destroy(struct g_gate_softc *sc, wakeup(sc); mtx_unlock(>sc_queue_mtx); gp = pp->geom; - pp->flags |= G_PF_WITHER; - g_orphan_provider(pp, ENXIO); + g_wither_provider(pp, ENXIO); callout_drain(>sc_callout); bioq_init(); mtx_lock(>sc_queue_mtx); Modified: stable/11/sys/geom/journal/g_journal.c == --- stable/11/sys/geom/journal/g_journal.c Thu Oct 6 15:30:26 2016 (r306763) +++ stable/11/sys/geom/journal/g_journal.c Thu Oct 6 15:35:36 2016 (r306764) @@ -2462,8 +2462,7 @@ g_journal_destroy(struct g_journal_softc GJ_DEBUG(1, "Marking %s as clean.", sc->sc_name); g_journal_metadata_update(sc); g_topology_lock(); - pp->flags |= G_PF_WITHER; - g_orphan_provider(pp, ENXIO); + g_wither_provider(pp, ENXIO); } else { g_topology_lock(); } Modified: stable/11/sys/geom/linux_lvm/g_linux_lvm.c == --- stable/11/sys/geom/linux_lvm/g_linux_lvm.c Thu Oct 6 15:30:26 2016 (r306763) +++ stable/11/sys/geom/linux_lvm/g_linux_lvm.c Thu Oct 6 15:35:36 2016 (r306764) @@ -333,7 +333,7 @@ g_llvm_remove_disk(struct g_llvm_vg *vg, if (found) { G_LLVM_DEBUG(0, "Device %s removed.", lv->lv_gprov->name); - g_orphan_provider(lv->lv_gprov, ENXIO); + g_wither_provider(lv->lv_gprov, ENXIO); lv->lv_gprov = NULL; } } Modified: stable/11/sys/geom/mirror/g_mirror.c == --- stable/11/sys/geom/mirror/g_mirror.cThu Oct 6 15:30:26 2016 (r306763) +++ stable/11/sys/geom/mirror/g_mirror.cThu Oct 6 15:35:36 2016 (r306764) @@ -2139,10 +2139,9 @@ g_mirror_destroy_provider(struct g_mirro mtx_unlock(>sc_queue_mtx); G_MIRROR_DEBUG(0, "Device %s: provider %s destroyed.", sc->sc_name, sc->sc_provider->name); - sc->sc_provider->flags |= G_PF_WITHER; - g_orphan_provider(sc->sc_provider, ENXIO); - g_topology_unlock(); + g_wither_provider(sc->sc_provider, ENXIO); sc->sc_provider = NULL; +
svn commit: r306762 - head/sys/geom/mirror
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_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_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_lock); if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROY) != 0 || + (sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROYING) != 0 || LIST_EMPTY(>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_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_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_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
svn commit: r306761 - head/usr.bin/write
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(, CAP_FCNTL, CAP_FSTAT, CAP_IOCTL, CAP_LOOKUP, + CAP_PWRITE); + if (cap_rights_limit(devfd, ) < 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(, CAP_FCNTL, CAP_FSTAT, CAP_IOCTL, CAP_READ, + CAP_WRITE); + if ((cap_rights_limit(STDIN_FILENO, ) < 0 && errno != ENOSYS) || + (cap_rights_limit(STDOUT_FILENO, ) < 0 && errno != ENOSYS) || + (cap_rights_limit(STDERR_FILENO, ) < 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, , , 1)) + if (term_chk(devfd, mytty, , , 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
svn commit: r306760 - head/sys/net
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.cThu Oct 6 13:53:17 2016(r306759) +++ head/sys/net/route.cThu Oct 6 14:42:06 2016(r306760) @@ -352,7 +352,7 @@ rt_table_init(int offset) rh->head.rnh_masks = >rmhead; /* Init locks */ - rw_init(>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(>rmhead.head, rt_freeentry, >rmhead.head); /* Assume table is already empty */ - rw_destroy(>rib_lock); + RIB_LOCK_DESTROY(rh); free(rh, M_RTABLE); } Modified: head/sys/net/route_var.h == --- head/sys/net/route_var.hThu Oct 6 13:53:17 2016(r306759) +++ head/sys/net/route_var.hThu Oct 6 14:42:06 2016(r306760) @@ -48,6 +48,8 @@ struct rib_head { struct radix_mask_head rmhead; /* masks radix head */ }; +#defineRIB_LOCK_INIT(rh) rw_init(&(rh)->rib_lock, "rib head lock") +#defineRIB_LOCK_DESTROY(rh)rw_destroy(&(rh)->rib_lock) #defineRIB_RLOCK(rh) rw_rlock(&(rh)->rib_lock) #defineRIB_RUNLOCK(rh) rw_runlock(&(rh)->rib_lock) #defineRIB_WLOCK(rh) rw_wlock(&(rh)->rib_lock) ___ 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-unsubscr...@freebsd.org"
svn commit: r306759 - head/sys/arm/arm
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.cThu Oct 6 13:37:46 2016 (r306758) +++ head/sys/arm/arm/busdma_machdep-v6.cThu Oct 6 13:53:17 2016 (r306759) @@ -60,13 +60,8 @@ __FBSDID("$FreeBSD$"); #include #include -#if __ARM_ARCH < 6 -#defineBUSDMA_DCACHE_ALIGN arm_dcache_align -#defineBUSDMA_DCACHE_MASK arm_dcache_align_mask -#else #defineBUSDMA_DCACHE_ALIGN cpuinfo.dcache_line_size #defineBUSDMA_DCACHE_MASK cpuinfo.dcache_line_mask -#endif #defineMAX_BPAGES 64 #defineMAX_DMA_SEGMENTS4096 @@ -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); } /* ___ 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-unsubscr...@freebsd.org"
svn commit: r306758 - head/usr.bin/locate/locate
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; ___ 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-unsubscr...@freebsd.org"
svn commit: r306757 - head/usr.bin/login
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.cThu Oct 6 13:18:18 2016 (r306756) +++ head/usr.bin/login/login_audit.cThu Oct 6 13:21:42 2016 (r306757) @@ -73,14 +73,14 @@ au_login_success(void) if (auditon(A_GETCOND, _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, ) == -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, )) == 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, _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, )) == 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, )) == 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, _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, )) == NULL) - errx(1, "Audit Error: au_to_subject32() failed"); + errx(1, "audit error: au_to_subject32() failed");
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
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.cThu Oct 6 12:01:10 2016 (r306755) +++ head/sys/arm/altera/socfpga/socfpga_mp.cThu 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.SThu Oct 6 12:01:10 2016 (r306755) +++ head/sys/arm/arm/cpufunc_asm_armv7.SThu 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(_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, _cpus); Modified: head/sys/arm/freescale/imx/imx6_mp.c == --- head/sys/arm/freescale/imx/imx6_mp.cThu Oct 6 12:01:10 2016 (r306755) +++ head/sys/arm/freescale/imx/imx6_mp.cThu Oct 6 13:18:18
svn commit: r306755 - in head/sys/arm: arm include
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_A120xC0D #define CPU_ARCH_CORTEX_A150xC0F #define CPU_ARCH_CORTEX_A170xC11 +#define CPU_ARCH_CORTEX_A530xD03 +#define CPU_ARCH_CORTEX_A570xD07 +#define CPU_ARCH_CORTEX_A720xD08 + /* QCOM */ #define CPU_ARCH_KRAIT_300 0x06F +/* MRVL */ +#define CPU_ARCH_SHEEVA_8510x581 /* PJ4/PJ4B */ +#define CPU_ARCH_SHEEVA_5840x584 /* PJ4B-MP/PJ4C */ + struct cpuinfo { /* raw id registers */ uint32_t midr; ___ 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-unsubscr...@freebsd.org"
svn commit: r306754 - head/sys/arm/arm
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.SThu Oct 6 08:11:53 2016 (r306753) +++ head/sys/arm/arm/locore-v6.SThu 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) ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r306346 - head/sys/kern
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 +, 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 0x8031fadb = > > db_trace_self_wrapper+0x2b/frame 0xfe1f9e198120 > > vpanic() at 0x804a0302 = vpanic+0x182/frame 0xfe1f9e1981a0 > > panic() at 0x804a0383 = panic+0x43/frame 0xfe1f9e198200 > > db_panic() at 0x8031d987 = db_panic+0x17/frame 0xfe1f9e198210 > > db_command() at 0x8031d019 = db_command+0x299/frame > > 0xfe1f9e1982e0 > > db_command_loop() at 0x8031cd74 = db_command_loop+0x64/frame > > 0xfe1f9e1982f0 > > db_trap() at 0x8031fc1b = db_trap+0xdb/frame 0xfe1f9e198380 > > kdb_trap() at 0x804dd8c3 = kdb_trap+0x193/frame 0xfe1f9e198410 > > trap() at 0x806e3065 = trap+0x255/frame 0xfe1f9e198620 > > calltrap() at 0x806cafd1 = calltrap+0x8/frame 0xfe1f9e198620 > > --- trap 0x3, rip = 0x804dd11e, rsp = 0xfe1f9e1986f0, rbp = > > 0xfe1f9e198710 --- > > kdb_alt_break_internal() at 0x804dd11e = > > kdb_alt_break_internal+0x18e/frame 0xfe1f9e198710 > > kdb_alt_break() at 0x804dcf8b = kdb_alt_break+0xb/frame > > 0xfe1f9e198720 > > uart_intr_rxready() at 0x803e38a8 = uart_intr_rxready+0x98/frame > > 0xfe1f9e198750 > > uart_intr() at 0x803e4621 = uart_intr+0x121/frame 0xfe1f9e198790 > > intr_event_handle() at 0x8046c74b = intr_event_handle+0x9b/frame > > 0xfe1f9e1987e0 > > intr_execute_handlers() at 0x8076d2d8 = > > intr_execute_handlers+0x48/frame 0xfe1f9e198810 > > lapic_handle_intr() at 0x8077163f = lapic_handle_intr+0x3f/frame > > 0xfe1f9e198830 > > Xapic_isr1() at 0x806cb6b7 = Xapic_isr1+0xb7/frame > > 0xfe1f9e198830 > > --- interrupt, rip = 0x8032fedf, rsp = 0xfe1f9e198900, rbp = > > 0xfe1f9e198940 --- > > acpi_cpu_idle() at 0x8032fedf = acpi_cpu_idle+0x2af/frame > > 0xfe1f9e198940 > > cpu_idle_acpi() at 0x8076ad1f = cpu_idle_acpi+0x3f/frame > > 0xfe1f9e198960 > > cpu_idle() at 0x8076adc5 = cpu_idle+0x95/frame 0xfe1f9e198980 > > sched_idletd() at 0x804cbbe5 = sched_idletd+0x495/frame > > 0xfe1f9e198a70 > > fork_exit() at 0x8046a211 = fork_exit+0x71/frame 0xfe1f9e198ab0 > > fork_trampoline() at 0x806cb50e = fork_trampoline+0xe/frame > > 0xfe1f9e198ab0 > > --- 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:): handle 12 > > mps2: Incrementing SSU count > > mps2: Sending StopUnit: path (xpt0:mps2:0:18:): 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
svn commit: r306753 - stable/11/sys/netinet6
Author: ae Date: Thu Oct 6 08:11:53 2016 New Revision: 306753 URL: https://svnweb.freebsd.org/changeset/base/306753 Log: MFC r306459: Fix bug introduced in r274300. In icmp6_reflect() use original source address of erroneous packet as destination address for source selection algorithm when original destination address is not one of our own. Reported by:Mark Kamichoff Modified: stable/11/sys/netinet6/icmp6.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet6/icmp6.c == --- stable/11/sys/netinet6/icmp6.c Thu Oct 6 05:16:44 2016 (r306752) +++ stable/11/sys/netinet6/icmp6.c Thu Oct 6 08:11:53 2016 (r306753) @@ -2146,7 +2146,7 @@ icmp6_reflect(struct mbuf *m, size_t off * that we do not own. Select a source address based on the * source address of the erroneous packet. */ - in6_splitscope(>ip6_dst, , ); + in6_splitscope(>ip6_src, , ); error = in6_selectsrc_addr(RT_DEFAULT_FIB, , scopeid, NULL, , ); ___ 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-unsubscr...@freebsd.org"