svn commit: r306014 - head/sys/dev/hyperv/netvsc
Author: sephe Date: Tue Sep 20 05:45:18 2016 New Revision: 306014 URL: https://svnweb.freebsd.org/changeset/base/306014 Log: hyperv/hn: Let the caller of hn_nvs_doinit() do the error logging. So that NVS version probing failure does not look too scary. MFC after:1 week Sponsored by: Microsoft Differential Revision:https://reviews.freebsd.org/D7950 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c == --- head/sys/dev/hyperv/netvsc/hv_net_vsc.c Tue Sep 20 05:26:40 2016 (r306013) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.c Tue Sep 20 05:45:18 2016 (r306014) @@ -444,8 +444,15 @@ hn_nvs_doinit(struct hn_softc *sc, uint3 vmbus_xact_put(xact); if (status != HN_NVS_STATUS_OK) { - if_printf(sc->hn_ifp, "nvs init failed for ver 0x%x\n", - nvs_ver); + if (bootverbose) { + /* +* Caller may try another NVS version, and will log +* error if there are no more NVS versions to try, +* so don't bark out loud here. +*/ + if_printf(sc->hn_ifp, "nvs init failed for ver 0x%x\n", + nvs_ver); + } return (EINVAL); } return (0); @@ -499,7 +506,7 @@ hn_nvs_init_ndis(struct hn_softc *sc) static int hn_nvs_init(struct hn_softc *sc) { - int i; + int i, error; if (device_is_attached(sc->hn_dev)) { /* @@ -511,15 +518,19 @@ hn_nvs_init(struct hn_softc *sc) HN_NDIS_VERSION_MAJOR(sc->hn_ndis_ver), HN_NDIS_VERSION_MINOR(sc->hn_ndis_ver)); } - return (hn_nvs_doinit(sc, sc->hn_nvs_ver)); + + error = hn_nvs_doinit(sc, sc->hn_nvs_ver); + if (error) { + if_printf(sc->hn_ifp, "reinit NVS version 0x%x " + "failed: %d\n", sc->hn_nvs_ver, error); + } + return (error); } /* * Find the supported NVS version and set NDIS version accordingly. */ for (i = 0; i < nitems(hn_nvs_version); ++i) { - int error; - error = hn_nvs_doinit(sc, hn_nvs_version[i]); if (!error) { sc->hn_nvs_ver = hn_nvs_version[i]; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306013 - head/sys/dev/hyperv/netvsc
Author: sephe Date: Tue Sep 20 05:26:40 2016 New Revision: 306013 URL: https://svnweb.freebsd.org/changeset/base/306013 Log: hyperv/hn: Fix ifnet hwassist setup. MFC after:1 week Sponsored by: Microsoft Differential Revision:https://reviews.freebsd.org/D7948 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c == --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Tue Sep 20 04:54:00 2016(r306012) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Tue Sep 20 05:26:40 2016(r306013) @@ -180,14 +180,6 @@ struct hn_txdesc { #define HN_TXD_FLAG_ONLIST 0x1 #define HN_TXD_FLAG_DMAMAP 0x2 -/* - * Only enable UDP checksum offloading when it is on 2012R2 or - * later. UDP checksum offloading doesn't work on earlier - * Windows releases. - */ -#define HN_CSUM_ASSIST_WIN8(CSUM_IP | CSUM_TCP) -#define HN_CSUM_ASSIST (CSUM_IP | CSUM_UDP | CSUM_TCP) - #define HN_LRO_LENLIM_MULTIRX_DEF (12 * ETHERMTU) #define HN_LRO_LENLIM_DEF (25 * ETHERMTU) /* YYY 2*MTU is a bit rough, but should be good enough. */ @@ -202,6 +194,13 @@ struct hn_txdesc { #define HN_LOCK(sc)sx_xlock(&(sc)->hn_lock) #define HN_UNLOCK(sc) sx_xunlock(&(sc)->hn_lock) +#define HN_CSUM_IP_MASK(CSUM_IP | CSUM_IP_TCP | CSUM_IP_UDP) +#define HN_CSUM_IP6_MASK (CSUM_IP6_TCP | CSUM_IP6_UDP) +#define HN_CSUM_IP_HWASSIST(sc)\ + ((sc)->hn_tx_ring[0].hn_csum_assist & HN_CSUM_IP_MASK) +#define HN_CSUM_IP6_HWASSIST(sc) \ + ((sc)->hn_tx_ring[0].hn_csum_assist & HN_CSUM_IP6_MASK) + /* * Globals */ @@ -326,12 +325,14 @@ static int hn_tx_stat_ulong_sysctl(SYSCT static int hn_tx_conf_int_sysctl(SYSCTL_HANDLER_ARGS); static int hn_ndis_version_sysctl(SYSCTL_HANDLER_ARGS); static int hn_caps_sysctl(SYSCTL_HANDLER_ARGS); +static int hn_hwassist_sysctl(SYSCTL_HANDLER_ARGS); static int hn_rss_key_sysctl(SYSCTL_HANDLER_ARGS); static int hn_rss_ind_sysctl(SYSCTL_HANDLER_ARGS); static int hn_check_iplen(const struct mbuf *, int); static int hn_create_tx_ring(struct hn_softc *, int); static void hn_destroy_tx_ring(struct hn_tx_ring *); static int hn_create_tx_data(struct hn_softc *, int); +static void hn_fixup_tx_data(struct hn_softc *); static void hn_destroy_tx_data(struct hn_softc *); static void hn_start_taskfunc(void *, int); static void hn_start_txeof_taskfunc(void *, int); @@ -632,10 +633,10 @@ netvsc_attach(device_t dev) } #endif - hn_set_chim_size(sc, sc->hn_chim_szmax); - if (hn_tx_chimney_size > 0 && - hn_tx_chimney_size < sc->hn_chim_szmax) - hn_set_chim_size(sc, hn_tx_chimney_size); + /* +* Fixup TX stuffs after synthetic parts are attached. +*/ + hn_fixup_tx_data(sc); ctx = device_get_sysctl_ctx(dev); child = SYSCTL_CHILDREN(device_get_sysctl_tree(dev)); @@ -647,6 +648,9 @@ netvsc_attach(device_t dev) SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "caps", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, hn_caps_sysctl, "A", "capabilities"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "hwassist", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, + hn_hwassist_sysctl, "A", "hwassist"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "rss_key", CTLTYPE_OPAQUE | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, 0, hn_rss_key_sysctl, "IU", "RSS key"); @@ -681,13 +685,32 @@ netvsc_attach(device_t dev) ifp->if_qflush = hn_xmit_qflush; } - ifp->if_capabilities |= - IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | IFCAP_TSO | - IFCAP_LRO; - ifp->if_capenable |= - IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | IFCAP_TSO | - IFCAP_LRO; - ifp->if_hwassist = sc->hn_tx_ring[0].hn_csum_assist | CSUM_TSO; + ifp->if_capabilities |= IFCAP_RXCSUM | IFCAP_LRO; +#ifdef foo + /* We can't diff IPv6 packets from IPv4 packets on RX path. */ + ifp->if_capabilities |= IFCAP_RXCSUM_IPV6; +#endif + if (sc->hn_caps & HN_CAP_VLAN) { + /* XXX not sure about VLAN_MTU. */ + ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU; + } + + ifp->if_hwassist = sc->hn_tx_ring[0].hn_csum_assist; + if (ifp->if_hwassist & HN_CSUM_IP_MASK) + ifp->if_capabilities |= IFCAP_TXCSUM; + if (ifp->if_hwassist & HN_CSUM_IP6_MASK) + ifp->if_capabilities |= IFCAP_TXCSUM_IPV6; + if (sc->hn_caps & HN_CAP_TSO4) { + ifp->if_capabilities |= IFCAP_TSO4; + ifp->if_hwassist |= CSUM_IP_TSO; + } + if (sc->hn_caps & HN_CAP_TSO6) { + ifp->if_capabilities
svn commit: r306012 - head/etc/autofs
Author: trasz Date: Tue Sep 20 04:54:00 2016 New Revision: 306012 URL: https://svnweb.freebsd.org/changeset/base/306012 Log: Fix -media to not mount ufs with "async"; it doesn't make sense when there is softupdates. Suggested by: imp@ MFC after:1 month Modified: head/etc/autofs/special_media Modified: head/etc/autofs/special_media == --- head/etc/autofs/special_media Tue Sep 20 04:52:01 2016 (r306011) +++ head/etc/autofs/special_media Tue Sep 20 04:54:00 2016 (r306012) @@ -48,7 +48,7 @@ print_map_entry() { exit 1 fi ;; - "ext2fs" | "msdosfs" | "ufs") + "ext2fs" | "msdosfs") echo "-fstype=${_fstype},nosuid,async :/dev/${_p}" ;; *) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r305968 - head/etc/autofs
Good point; fixed. On 0919T2219, Warner Losh wrote: > For MSDOS it's one thing and likely helps. But for ufs it doesn't > help. Soft updates already does an excellent job at reducing wear and > all async does is give added danger of dataloss. Linux distros don't > matter for UFS because different design decisions have been made for > ext[234] and UFS. > > Warner > > On Mon, Sep 19, 2016 at 9:43 PM, Edward Tomasz Napierala >wrote: > > Mounting removable media async improves performance and reduces wear. > > And AFAIK that's what most Linux distros used to do. > > > > On 0919T2032, Ronald Klop wrote: > >> Hi, > >> > >> Your commit message says in words exactly what the diff says in code. > >> Would you like to elaborate on why the change is made? I'm curious > >> because this could cause severe damage to the filesystem on unclean eject > >> of the media. > >> > >> Regards, > >> Ronald. > >> > >> > >> On Mon, 19 Sep 2016 10:51:27 +0200, Edward Tomasz Napierala > >> wrote: > >> > >> > Author: trasz > >> > Date: Mon Sep 19 08:51:27 2016 > >> > New Revision: 305968 > >> > URL: https://svnweb.freebsd.org/changeset/base/305968 > >> > > >> > Log: > >> > Make autofs use the "async" flag for msdosfs and ufs filesystems > >> > mounted > >> > on /media. > >> > MFC after: 1 month > >> > > >> > Modified: > >> > head/etc/autofs/special_media > >> > > >> > Modified: head/etc/autofs/special_media > >> > == > >> > --- head/etc/autofs/special_media Mon Sep 19 07:47:56 2016 > >> > (r305967) > >> > +++ head/etc/autofs/special_media Mon Sep 19 08:51:27 2016 > >> > (r305968) > >> > @@ -46,6 +46,8 @@ print_map_entry() { > >> > "Cannot mount ${_fstype} formatted device > >> > /dev/${_p}: Install > >> > sysutils/fusefs-ntfs first" > >> > exit 1 > >> > fi > >> > + elif [ "${_fstype}" = "msdosfs" -o "${_fstype}" = "ufs" ]; then > >> > + echo "-fstype=${_fstype},nosuid,async :/dev/${_p}" > >> > else > >> > echo "-fstype=${_fstype},nosuid :/dev/${_p}" > >> > fi > >> > ___ > >> > svn-src-...@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-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r306010 - head/share/man/man9
Thanks! On Mon, Sep 19, 2016 at 9:50 PM, Warner Loshwrote: > Author: imp > Date: Tue Sep 20 04:50:53 2016 > New Revision: 306010 > URL: https://svnweb.freebsd.org/changeset/base/306010 > > Log: > Document existing practice and be more clear about sys/foo.h files > being alphabetical with sys/param.h or sys/types.h being first. Expand > the example to hopefully make this (slightly) clearer. > > Noticed by: cem@ > > Modified: > head/share/man/man9/style.9 > > Modified: head/share/man/man9/style.9 > == > --- head/share/man/man9/style.9 Tue Sep 20 04:33:58 2016(r306009) > +++ head/share/man/man9/style.9 Tue Sep 20 04:50:53 2016(r306010) > @@ -118,17 +118,21 @@ Leave another blank line before the head > .Pp > Kernel include files (i.e.\& > .Pa sys/*.h ) > -come first; normally, include > +come first sorted alphebetially where possible. > +Include > .In sys/types.h > OR > .In sys/param.h , > -but not both. > +but not both and include it first. > .In sys/types.h > includes > .In sys/cdefs.h , > and it is okay to depend on that. > .Bd -literal > #include /* Non-local includes in angle brackets. */ > +#include > +#include > +#include > .Ed > .Pp > For a network program, put the network include files next. > ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306011 - in head/etc: . autofs
Author: trasz Date: Tue Sep 20 04:52:01 2016 New Revision: 306011 URL: https://svnweb.freebsd.org/changeset/base/306011 Log: Stop appending "noatime" in the autofs -media map, and instead add it to auto_master, since all filesystems seem to support it. It's cleaner this way, and easier to customize. MFC after:1 month Modified: head/etc/auto_master head/etc/autofs/special_media Modified: head/etc/auto_master == --- head/etc/auto_masterTue Sep 20 04:50:53 2016(r306010) +++ head/etc/auto_masterTue Sep 20 04:52:01 2016(r306011) @@ -5,5 +5,5 @@ /net -hosts -nobrowse,nosuid,intr # When using the -media special map, make sure to edit devd.conf(5) # to move the call to "automount -c" out of the comments section. -#/media-media -nosuid +#/media-media -nosuid,noatime #/--noauto Modified: head/etc/autofs/special_media == --- head/etc/autofs/special_media Tue Sep 20 04:50:53 2016 (r306010) +++ head/etc/autofs/special_media Tue Sep 20 04:52:01 2016 (r306011) @@ -41,7 +41,7 @@ print_map_entry() { case "${_fstype}" in "ntfs") if [ -f "/usr/local/bin/ntfs-3g" ]; then - echo "-mountprog=/usr/local/bin/ntfs-3g,fstype=${_fstype},nosuid,noatime :/dev/${_p}" + echo "-mountprog=/usr/local/bin/ntfs-3g,fstype=${_fstype},nosuid:/dev/${_p}" else /usr/bin/logger -p info -t "special_media[$$]" \ "Cannot mount ${_fstype} formatted device /dev/${_p}: Install sysutils/fusefs-ntfs first" @@ -49,7 +49,7 @@ print_map_entry() { fi ;; "ext2fs" | "msdosfs" | "ufs") - echo "-fstype=${_fstype},nosuid,noatime,async :/dev/${_p}" + echo "-fstype=${_fstype},nosuid,async :/dev/${_p}" ;; *) echo "-fstype=${_fstype},nosuid :/dev/${_p}" ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306010 - head/share/man/man9
Author: imp Date: Tue Sep 20 04:50:53 2016 New Revision: 306010 URL: https://svnweb.freebsd.org/changeset/base/306010 Log: Document existing practice and be more clear about sys/foo.h files being alphabetical with sys/param.h or sys/types.h being first. Expand the example to hopefully make this (slightly) clearer. Noticed by: cem@ Modified: head/share/man/man9/style.9 Modified: head/share/man/man9/style.9 == --- head/share/man/man9/style.9 Tue Sep 20 04:33:58 2016(r306009) +++ head/share/man/man9/style.9 Tue Sep 20 04:50:53 2016(r306010) @@ -118,17 +118,21 @@ Leave another blank line before the head .Pp Kernel include files (i.e.\& .Pa sys/*.h ) -come first; normally, include +come first sorted alphebetially where possible. +Include .In sys/types.h OR .In sys/param.h , -but not both. +but not both and include it first. .In sys/types.h includes .In sys/cdefs.h , and it is okay to depend on that. .Bd -literal #include /* Non-local includes in angle brackets. */ +#include +#include +#include .Ed .Pp For a network program, put the network include files next. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306009 - head/etc/autofs
Author: trasz Date: Tue Sep 20 04:33:58 2016 New Revision: 306009 URL: https://svnweb.freebsd.org/changeset/base/306009 Log: Make autofs(5) -media map also use "async" and "noatime" for ext2fs(5). Suggested by: pfg@ MFC after:1 month Modified: head/etc/autofs/special_media Modified: head/etc/autofs/special_media == --- head/etc/autofs/special_media Tue Sep 20 00:22:35 2016 (r306008) +++ head/etc/autofs/special_media Tue Sep 20 04:33:58 2016 (r306009) @@ -38,7 +38,8 @@ print_map_entry() { _fstype="$1" _p="$2" - if [ "${_fstype}" = "ntfs" ]; then + case "${_fstype}" in + "ntfs") if [ -f "/usr/local/bin/ntfs-3g" ]; then echo "-mountprog=/usr/local/bin/ntfs-3g,fstype=${_fstype},nosuid,noatime :/dev/${_p}" else @@ -46,11 +47,14 @@ print_map_entry() { "Cannot mount ${_fstype} formatted device /dev/${_p}: Install sysutils/fusefs-ntfs first" exit 1 fi - elif [ "${_fstype}" = "msdosfs" -o "${_fstype}" = "ufs" ]; then + ;; + "ext2fs" | "msdosfs" | "ufs") echo "-fstype=${_fstype},nosuid,noatime,async :/dev/${_p}" - else + ;; + *) echo "-fstype=${_fstype},nosuid :/dev/${_p}" - fi + ;; + esac } # Determine map entry contents for the given key and print out the entry. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r305968 - head/etc/autofs
For MSDOS it's one thing and likely helps. But for ufs it doesn't help. Soft updates already does an excellent job at reducing wear and all async does is give added danger of dataloss. Linux distros don't matter for UFS because different design decisions have been made for ext[234] and UFS. Warner On Mon, Sep 19, 2016 at 9:43 PM, Edward Tomasz Napieralawrote: > Mounting removable media async improves performance and reduces wear. > And AFAIK that's what most Linux distros used to do. > > On 0919T2032, Ronald Klop wrote: >> Hi, >> >> Your commit message says in words exactly what the diff says in code. >> Would you like to elaborate on why the change is made? I'm curious >> because this could cause severe damage to the filesystem on unclean eject >> of the media. >> >> Regards, >> Ronald. >> >> >> On Mon, 19 Sep 2016 10:51:27 +0200, Edward Tomasz Napierala >> wrote: >> >> > Author: trasz >> > Date: Mon Sep 19 08:51:27 2016 >> > New Revision: 305968 >> > URL: https://svnweb.freebsd.org/changeset/base/305968 >> > >> > Log: >> > Make autofs use the "async" flag for msdosfs and ufs filesystems >> > mounted >> > on /media. >> > MFC after: 1 month >> > >> > Modified: >> > head/etc/autofs/special_media >> > >> > Modified: head/etc/autofs/special_media >> > == >> > --- head/etc/autofs/special_media Mon Sep 19 07:47:56 2016 >> > (r305967) >> > +++ head/etc/autofs/special_media Mon Sep 19 08:51:27 2016 >> > (r305968) >> > @@ -46,6 +46,8 @@ print_map_entry() { >> > "Cannot mount ${_fstype} formatted device >> > /dev/${_p}: Install >> > sysutils/fusefs-ntfs first" >> > exit 1 >> > fi >> > + elif [ "${_fstype}" = "msdosfs" -o "${_fstype}" = "ufs" ]; then >> > + echo "-fstype=${_fstype},nosuid,async :/dev/${_p}" >> > else >> > echo "-fstype=${_fstype},nosuid :/dev/${_p}" >> > fi >> > ___ >> > svn-src-...@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-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r305998 - in head/usr.bin: cmp indent tr
If you read style(9) as an annotated example of best practices, you'll see that it is actually documented there, but poorly. It's the first one after cdefs for the FreeBSD ID. It says to include one or the other, with the implication it's first. It's the common interpretation of the project (this issue has come up before) and it's just one tiny sliver of tribal knowledge that was attempted to be enshrined there. Yes, it isn't explicit, but it matches convention in the rest of the tree. Maybe it should be explicit, but it's always a shit-show when people tinker with style(9) to make it "clearer" because other people think you did it wrong, or need to list a big set of exceptions to the rule or who knows what. Hell, I couldn't even add that {} were allowed in contexts where people had been using them for a decade without it being a stupid bikeshed and despite extremely careful vetting and consensus building I have been told that one committer left the project over it. So I'd think twice about modifying style.9 and go have a beer or your favorite relaxing beverage instead. Warner On Mon, Sep 19, 2016 at 3:03 PM, Conrad Meyerwrote: > If you re-read the sentences you've pasted carefully, I think you'll > find it doesn't actually say that the types or param headers come > before other sys/ headers. Just that sys/ headers come before > non-sys/ headers. > > Best, > Conrad > > On Mon, Sep 19, 2016 at 1:45 PM, Ngie Cooper (yaneurabeya) > wrote: >> >> On Sep 19, 2016, at 1:43 PM, Conrad E. Meyer wrote: >> >> Author: cem >> Date: Mon Sep 19 20:43:03 2016 >> New Revision: 305998 >> URL: https://svnweb.freebsd.org/changeset/base/305998 >> >> Log: >> Move sys/capsicum.h includes after types.h or param.h >> >> This is not actually documented or even implied in style(9). Make the >> change >> to match convention. Someone should document this convention in style(9). >> >> Reported by: jhb >> Sponsored by: EMC Dell Isilon >> >> >> Uh… yes it clearly states it in style(9). From >> https://www.freebsd.org/cgi/man.cgi?query=style=9 : >> >> Kernel include files (i.e. sys/*.h) come first; normally, include >> OR , but not both. includes >> , and it is okay to depend on that. >> >> Thanks, >> -Ngie > ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r305998 - in head/usr.bin: cmp indent tr
On Mon, Sep 19, 2016 at 2:43 PM, Conrad E. Meyerwrote: > Author: cem > Date: Mon Sep 19 20:43:03 2016 > New Revision: 305998 > URL: https://svnweb.freebsd.org/changeset/base/305998 > > Log: > Move sys/capsicum.h includes after types.h or param.h > > This is not actually documented or even implied in style(9). Make the > change > to match convention. Someone should document this convention in style(9). style(9) should be read as an annotated example. It comes first in the example, therefore, it's convention. It is documented, just poorly. There's many examples in style(9) that are treated this way and it takes much careful study to understand it. It's tribal knowledge, and sometimes the only way to learn is to transgress. Attempts to modify style(9) are fraught with politics, intrigue and generally a lot of flames even when all that's being done is codifying existing practice. When I tried to do this last it was a shit storm, and generally things devolve into a shit storm with no real gain. Warner ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r305968 - head/etc/autofs
Mounting removable media async improves performance and reduces wear. And AFAIK that's what most Linux distros used to do. On 0919T2032, Ronald Klop wrote: > Hi, > > Your commit message says in words exactly what the diff says in code. > Would you like to elaborate on why the change is made? I'm curious > because this could cause severe damage to the filesystem on unclean eject > of the media. > > Regards, > Ronald. > > > On Mon, 19 Sep 2016 10:51:27 +0200, Edward Tomasz Napierala >wrote: > > > Author: trasz > > Date: Mon Sep 19 08:51:27 2016 > > New Revision: 305968 > > URL: https://svnweb.freebsd.org/changeset/base/305968 > > > > Log: > > Make autofs use the "async" flag for msdosfs and ufs filesystems > > mounted > > on /media. > > MFC after: 1 month > > > > Modified: > > head/etc/autofs/special_media > > > > Modified: head/etc/autofs/special_media > > == > > --- head/etc/autofs/special_media Mon Sep 19 07:47:56 2016 > > (r305967) > > +++ head/etc/autofs/special_media Mon Sep 19 08:51:27 2016 > > (r305968) > > @@ -46,6 +46,8 @@ print_map_entry() { > > "Cannot mount ${_fstype} formatted device > > /dev/${_p}: Install > > sysutils/fusefs-ntfs first" > > exit 1 > > fi > > + elif [ "${_fstype}" = "msdosfs" -o "${_fstype}" = "ufs" ]; then > > + echo "-fstype=${_fstype},nosuid,async :/dev/${_p}" > > else > > echo "-fstype=${_fstype},nosuid :/dev/${_p}" > > fi > > ___ > > svn-src-...@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-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306008 - head/contrib/elftoolchain/libdwarf
Author: markj Date: Tue Sep 20 00:22:35 2016 New Revision: 306008 URL: https://svnweb.freebsd.org/changeset/base/306008 Log: libdwarf: Add definitions for Apple's DWARF extension attributes. Reviewed by: emaste MFC after:1 week Modified: head/contrib/elftoolchain/libdwarf/dwarf.h head/contrib/elftoolchain/libdwarf/dwarf_dump.c Modified: head/contrib/elftoolchain/libdwarf/dwarf.h == --- head/contrib/elftoolchain/libdwarf/dwarf.h Mon Sep 19 22:36:30 2016 (r306007) +++ head/contrib/elftoolchain/libdwarf/dwarf.h Tue Sep 20 00:22:35 2016 (r306008) @@ -234,6 +234,21 @@ #defineDW_AT_GNU_all_call_sites0x2117 #defineDW_AT_GNU_all_source_call_sites 0x2118 +/* Apple extensions. */ +#defineDW_AT_APPLE_optimized 0x3fe1 +#defineDW_AT_APPLE_flags 0x3fe2 +#defineDW_AT_APPLE_isa 0x3fe3 +#defineDW_AT_APPLE_block 0x3fe4 +#defineDW_AT_APPLE_major_runtime_vers 0x3fe5 +#defineDW_AT_APPLE_runtime_class 0x3fe6 +#defineDW_AT_APPLE_omit_frame_ptr 0x3fe7 +#defineDW_AT_APPLE_property_name 0x3fe8 +#defineDW_AT_APPLE_property_getter 0x3fe9 +#defineDW_AT_APPLE_property_setter 0x3fea +#defineDW_AT_APPLE_property_attribute 0x3feb +#defineDW_AT_APPLE_objc_complete_type 0x3fec +#defineDW_AT_APPLE_property0x3fed + #define DW_FORM_addr 0x01 #define DW_FORM_block2 0x03 #define DW_FORM_block4 0x04 Modified: head/contrib/elftoolchain/libdwarf/dwarf_dump.c == --- head/contrib/elftoolchain/libdwarf/dwarf_dump.c Mon Sep 19 22:36:30 2016(r306007) +++ head/contrib/elftoolchain/libdwarf/dwarf_dump.c Tue Sep 20 00:22:35 2016(r306008) @@ -298,6 +298,32 @@ dwarf_get_AT_name(unsigned attr, const c *s = "DW_AT_GNU_all_call_sites"; break; case DW_AT_GNU_all_source_call_sites: *s = "DW_AT_GNU_all_source_call_sites"; break; + case DW_AT_APPLE_optimized: + *s = "DW_AT_APPLE_optimized"; break; + case DW_AT_APPLE_flags: + *s = "DW_AT_APPLE_flags"; break; + case DW_AT_APPLE_isa: + *s = "DW_AT_APPLE_isa"; break; + case DW_AT_APPLE_block: + *s = "DW_AT_APPLE_block"; break; + case DW_AT_APPLE_major_runtime_vers: + *s = "DW_AT_APPLE_major_runtime_vers"; break; + case DW_AT_APPLE_runtime_class: + *s = "DW_AT_APPLE_runtime_class"; break; + case DW_AT_APPLE_omit_frame_ptr: + *s = "DW_AT_APPLE_omit_frame_ptr"; break; + case DW_AT_APPLE_property_name: + *s = "DW_AT_APPLE_property_name"; break; + case DW_AT_APPLE_property_getter: + *s = "DW_AT_APPLE_property_getter"; break; + case DW_AT_APPLE_property_setter: + *s = "DW_AT_APPLE_property_setter"; break; + case DW_AT_APPLE_property_attribute: + *s = "DW_AT_APPLE_property_attribute"; break; + case DW_AT_APPLE_objc_complete_type: + *s = "DW_AT_APPLE_objc_complete_type"; break; + case DW_AT_APPLE_property: + *s = "DW_AT_APPLE_property"; break; default: return (DW_DLV_NO_ENTRY); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306007 - head/sys/dev/iwm
Author: ivadasz Date: Mon Sep 19 22:36:30 2016 New Revision: 306007 URL: https://svnweb.freebsd.org/changeset/base/306007 Log: [iwm] Improve reliability of iwm_release on disassociation a bit. * We need to first call ivp->iv_newstate(), to enqueue the deauth/deassoc mgmt frame, then flush the tx queue, before actually calling iwm_release(). * cycling a wlan connection via wpa_cli frontend to wpa_supplicant, by issuing disconnect and reconnect commandos works quite well. (There is still an issue when disconnecting/reconnecting too quickly) * Reassociating or roaming via wpa_supplicant is still broken. Approved by: adrian (mentor) Differential Revision:https://reviews.freebsd.org/D7943 Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c == --- head/sys/dev/iwm/if_iwm.c Mon Sep 19 22:26:37 2016(r306006) +++ head/sys/dev/iwm/if_iwm.c Mon Sep 19 22:36:30 2016(r306007) @@ -329,6 +329,8 @@ static int iwm_tx(struct iwm_softc *, st struct ieee80211_node *, int); static int iwm_raw_xmit(struct ieee80211_node *, struct mbuf *, const struct ieee80211_bpf_params *); +static int iwm_mvm_flush_tx_path(struct iwm_softc *sc, + uint32_t tfd_msk, uint32_t flags); static int iwm_mvm_send_add_sta_cmd_status(struct iwm_softc *, struct iwm_mvm_add_sta_cmd_v7 *, int *); @@ -3517,7 +3519,6 @@ iwm_raw_xmit(struct ieee80211_node *ni, * mvm/tx.c */ -#if 0 /* * Note that there are transports that buffer frames before they reach * the firmware. This means that after flush_tx_path is called, the @@ -3527,23 +3528,21 @@ iwm_raw_xmit(struct ieee80211_node *ni, * 3) wait for the transport queues to be empty */ int -iwm_mvm_flush_tx_path(struct iwm_softc *sc, int tfd_msk, int sync) +iwm_mvm_flush_tx_path(struct iwm_softc *sc, uint32_t tfd_msk, uint32_t flags) { + int ret; struct iwm_tx_path_flush_cmd flush_cmd = { .queues_ctl = htole32(tfd_msk), .flush_ctl = htole16(IWM_DUMP_TX_FIFO_FLUSH), }; - int ret; - ret = iwm_mvm_send_cmd_pdu(sc, IWM_TXPATH_FLUSH, - sync ? IWM_CMD_SYNC : IWM_CMD_ASYNC, + ret = iwm_mvm_send_cmd_pdu(sc, IWM_TXPATH_FLUSH, flags, sizeof(flush_cmd), _cmd); if (ret) device_printf(sc->sc_dev, "Flushing tx queue failed: %d\n", ret); return ret; } -#endif /* * BEGIN mvm/sta.c @@ -3899,6 +3898,8 @@ iwm_assoc(struct ieee80211vap *vap, stru static int iwm_release(struct iwm_softc *sc, struct iwm_node *in) { + uint32_t tfd_msk; + /* * Ok, so *technically* the proper set of calls for going * from RUN back to SCAN is: @@ -3918,7 +3919,18 @@ iwm_release(struct iwm_softc *sc, struct * back to nothing anyway, we'll just do a complete device reset. * Up your's, device! */ - /* iwm_mvm_flush_tx_path(sc, 0xf, 1); */ + /* +* Just using 0xf for the queues mask is fine as long as we only +* get here from RUN state. +*/ + tfd_msk = 0xf; + mbufq_drain(>sc_snd); + iwm_mvm_flush_tx_path(sc, tfd_msk, IWM_CMD_SYNC); + /* +* We seem to get away with just synchronously sending the +* IWM_TXPATH_FLUSH command. +*/ +// iwm_trans_wait_tx_queue_empty(sc, tfd_msk); iwm_stop_device(sc); iwm_init_hw(sc); if (in) @@ -4125,7 +4137,17 @@ iwm_newstate(struct ieee80211vap *vap, e if (((in = IWM_NODE(vap->iv_bss)) != NULL)) in->in_assoc = 0; - iwm_release(sc, NULL); + if (nstate == IEEE80211_S_INIT) { + IWM_UNLOCK(sc); + IEEE80211_LOCK(ic); + error = ivp->iv_newstate(vap, nstate, arg); + IEEE80211_UNLOCK(ic); + IWM_LOCK(sc); + iwm_release(sc, NULL); + IWM_UNLOCK(sc); + IEEE80211_LOCK(ic); + return error; + } /* * It's impossible to directly go RUN->SCAN. If we iwm_release() ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306006 - head/sys/dev/iwm
Author: ivadasz Date: Mon Sep 19 22:26:37 2016 New Revision: 306006 URL: https://svnweb.freebsd.org/changeset/base/306006 Log: [iwm] Remove dead fw_totlen from struct iwm_fw_sects; clean up struct iwm_nvm_data. * No functional change, none of these values were ever read. * The values removed from struct iwm_nvm_data are only used for old dvm devices in Linux iwlwifi, and irrelevant to iwm hence. Approved by: adrian (mentor) Differential Revision:https://reviews.freebsd.org/D7945 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c == --- head/sys/dev/iwm/if_iwm.c Mon Sep 19 22:23:46 2016(r306005) +++ head/sys/dev/iwm/if_iwm.c Mon Sep 19 22:26:37 2016(r306006) @@ -437,7 +437,6 @@ iwm_firmware_store_section(struct iwm_so fwone->fws_len = dlen - sizeof(uint32_t); fws->fw_count++; - fws->fw_totlen += fwone->fws_len; return 0; } @@ -2151,11 +2150,6 @@ iwm_parse_nvm_data(struct iwm_softc *sc, memcpy(data->nvm_ch_flags, [IWM_NVM_CHANNELS_8000], IWM_NUM_CHANNELS_8000 * sizeof(uint16_t)); } - data->calib_version = 255; /* TODO: - this value will prevent some checks from - failing, we need to check if this - field is still needed, and if it does, - where is it in the NVM */ return 0; } Modified: head/sys/dev/iwm/if_iwmvar.h == --- head/sys/dev/iwm/if_iwmvar.hMon Sep 19 22:23:46 2016 (r306005) +++ head/sys/dev/iwm/if_iwmvar.hMon Sep 19 22:26:37 2016 (r306006) @@ -170,7 +170,6 @@ struct iwm_fw_info { uint32_t fws_len; uint32_t fws_devoff; } fw_sect[IWM_UCODE_SECT_MAX]; - size_t fw_totlen; int fw_count; } fw_sects[IWM_UCODE_TYPE_MAX]; }; @@ -179,14 +178,6 @@ struct iwm_nvm_data { int n_hw_addrs; uint8_t hw_addr[IEEE80211_ADDR_LEN]; - uint8_t calib_version; - uint16_t calib_voltage; - - uint16_t raw_temperature; - uint16_t kelvin_temperature; - uint16_t kelvin_voltage; - uint16_t xtal_calib[2]; - int sku_cap_band_24GHz_enable; int sku_cap_band_52GHz_enable; int sku_cap_11n_enable; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306005 - head/sys/dev/iwm
Author: ivadasz Date: Mon Sep 19 22:23:46 2016 New Revision: 306005 URL: https://svnweb.freebsd.org/changeset/base/306005 Log: [iwm] Use IWM_DEFAULT_SCAN_CHANNELS define as default for sc_capa_n_scan_channels. Approved by: adrian (mentor) Obtained from:Linux iwlwifi Differential Revision:https://reviews.freebsd.org/D7938 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwmreg.h Modified: head/sys/dev/iwm/if_iwm.c == --- head/sys/dev/iwm/if_iwm.c Mon Sep 19 22:20:46 2016(r306004) +++ head/sys/dev/iwm/if_iwm.c Mon Sep 19 22:23:46 2016(r306005) @@ -442,6 +442,8 @@ iwm_firmware_store_section(struct iwm_so return 0; } +#define IWM_DEFAULT_SCAN_CHANNELS 40 + /* iwlwifi: iwl-drv.c */ struct iwm_tlv_calib_data { uint32_t ucode_type; @@ -518,7 +520,7 @@ iwm_read_firmware(struct iwm_softc *sc, /* (Re-)Initialize default values. */ sc->sc_capaflags = 0; - sc->sc_capa_n_scan_channels = IWM_MAX_NUM_SCAN_CHANNELS; + sc->sc_capa_n_scan_channels = IWM_DEFAULT_SCAN_CHANNELS; memset(sc->sc_enabled_capa, 0, sizeof(sc->sc_enabled_capa)); memset(sc->sc_fw_mcc, 0, sizeof(sc->sc_fw_mcc)); Modified: head/sys/dev/iwm/if_iwmreg.h == --- head/sys/dev/iwm/if_iwmreg.hMon Sep 19 22:20:46 2016 (r306004) +++ head/sys/dev/iwm/if_iwmreg.hMon Sep 19 22:23:46 2016 (r306005) @@ -4799,9 +4799,6 @@ struct iwm_ssid_ie { #define IWM_FAST_SCHED_SCAN_ITERATIONS 3 #define IWM_MAX_SCHED_SCAN_PLANS 2 -/* Maximal number of channels to scan */ -#define IWM_MAX_NUM_SCAN_CHANNELS 0x24 - /** * iwm_scan_schedule_lmac - schedule of scan offload * @delay: delay between iterations, in seconds. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306004 - head/sys/dev/iwm
Author: ivadasz Date: Mon Sep 19 22:20:46 2016 New Revision: 306004 URL: https://svnweb.freebsd.org/changeset/base/306004 Log: [iwm] Remove deprecated scan API definitions. * This removes deprecated scan API definitions, which have been unused since the upgrade to version 16 firmware in change r303327. * Part of this change matches the header-file changes in Linux git commit 1f9403863c080478ad78247c89b018e95bdfb027. * No functional change. Approved by: adrian (mentor) Differential Revision:https://reviews.freebsd.org/D7937 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwmreg.h Modified: head/sys/dev/iwm/if_iwm.c == --- head/sys/dev/iwm/if_iwm.c Mon Sep 19 22:16:03 2016(r306003) +++ head/sys/dev/iwm/if_iwm.c Mon Sep 19 22:20:46 2016(r306004) @@ -5207,7 +5207,6 @@ iwm_notif_intr(struct iwm_softc *sc) case IWM_PHY_CONTEXT_CMD: case IWM_BINDING_CONTEXT_CMD: case IWM_TIME_EVENT_CMD: - case IWM_SCAN_REQUEST_CMD: case IWM_WIDE_ID(IWM_ALWAYS_LONG_GROUP, IWM_SCAN_CFG_CMD): case IWM_WIDE_ID(IWM_ALWAYS_LONG_GROUP, IWM_SCAN_REQ_UMAC): case IWM_SCAN_OFFLOAD_REQUEST_CMD: Modified: head/sys/dev/iwm/if_iwmreg.h == --- head/sys/dev/iwm/if_iwmreg.hMon Sep 19 22:16:03 2016 (r306003) +++ head/sys/dev/iwm/if_iwmreg.hMon Sep 19 22:20:46 2016 (r306004) @@ -1839,11 +1839,9 @@ enum { IWM_REPLY_THERMAL_MNG_BACKOFF = 0x7e, /* Scanning */ - IWM_SCAN_REQUEST_CMD = 0x80, IWM_SCAN_ABORT_CMD = 0x81, IWM_SCAN_START_NOTIFICATION = 0x82, IWM_SCAN_RESULTS_NOTIFICATION = 0x83, - IWM_SCAN_COMPLETE_NOTIFICATION = 0x84, /* NVM */ IWM_NVM_ACCESS_CMD = 0x88, @@ -4767,53 +4765,11 @@ struct iwm_scd_txq_cfg_rsp { /* Masks for iwm_scan_channel.type flags */ #define IWM_SCAN_CHANNEL_TYPE_ACTIVE (1 << 0) #define IWM_SCAN_CHANNEL_NSSIDS(x) (((1 << (x)) - 1) << 1) -#define IWM_SCAN_CHANNEL_NARROW_BAND (1 << 22) /* Max number of IEs for direct SSID scans in a command */ #define IWM_PROBE_OPTION_MAX 20 /** - * struct iwm_scan_channel - entry in IWM_REPLY_SCAN_CMD channel table - * @channel: band is selected by iwm_scan_cmd "flags" field - * @tx_gain: gain for analog radio - * @dsp_atten: gain for DSP - * @active_dwell: dwell time for active scan in TU, typically 5-50 - * @passive_dwell: dwell time for passive scan in TU, typically 20-500 - * @type: type is broken down to these bits: - * bit 0: 0 = passive, 1 = active - * bits 1-20: SSID direct bit map. If any of these bits is set then - * the corresponding SSID IE is transmitted in probe request - * (bit i adds IE in position i to the probe request) - * bit 22: channel width, 0 = regular, 1 = TGj narrow channel - * - * @iteration_count: - * @iteration_interval: - * This struct is used once for each channel in the scan list. - * Each channel can independently select: - * 1) SSID for directed active scans - * 2) Txpower setting (for rate specified within Tx command) - * 3) How long to stay on-channel (behavior may be modified by quiet_time, - * quiet_plcp_th, good_CRC_th) - * - * To avoid uCode errors, make sure the following are true (see comments - * under struct iwm_scan_cmd about max_out_time and quiet_time): - * 1) If using passive_dwell (i.e. passive_dwell != 0): - * active_dwell <= passive_dwell (< max_out_time if max_out_time != 0) - * 2) quiet_time <= active_dwell - * 3) If restricting off-channel time (i.e. max_out_time !=0): - * passive_dwell < max_out_time - * active_dwell < max_out_time - */ -struct iwm_scan_channel { - uint32_t type; - uint16_t channel; - uint16_t iteration_count; - uint32_t iteration_interval; - uint16_t active_dwell; - uint16_t passive_dwell; -} __packed; /* IWM_SCAN_CHANNEL_CONTROL_API_S_VER_1 */ - -/** * struct iwm_ssid_ie - directed scan network information element * * Up to 20 of these may appear in IWM_REPLY_SCAN_CMD, @@ -4828,7 +4784,6 @@ struct iwm_ssid_ie { } __packed; /* IWM_SCAN_DIRECT_SSID_IE_API_S_VER_1 */ /* scan offload */ -#define IWM_MAX_SCAN_CHANNELS 40 #define IWM_SCAN_MAX_BLACKLIST_LEN 64 #define IWM_SCAN_SHORT_BLACKLIST_LEN 16 #define IWM_SCAN_MAX_PROFILES 11 @@ -4844,45 +4799,6 @@ struct iwm_ssid_ie { #define IWM_FAST_SCHED_SCAN_ITERATIONS 3 #define IWM_MAX_SCHED_SCAN_PLANS 2 -/** - * iwm_scan_flags - masks for scan command flags - *@IWM_SCAN_FLAGS_PERIODIC_SCAN: - *@IWM_SCAN_FLAGS_P2P_PUBLIC_ACTION_FRAME_TX: - *@IWM_SCAN_FLAGS_DELAYED_SCAN_LOWBAND: - *@IWM_SCAN_FLAGS_DELAYED_SCAN_HIGHBAND: - *@IWM_SCAN_FLAGS_FRAGMENTED_SCAN: -
svn commit: r306003 - head/sys/dev/iwm
Author: ivadasz Date: Mon Sep 19 22:16:03 2016 New Revision: 306003 URL: https://svnweb.freebsd.org/changeset/base/306003 Log: [iwm] Remove wrappers around iwm_dma_contig_free() calls. No functional changes. Inspired by: OpenBSD Approved by: adrian (mentor) Differential Revision:https://reviews.freebsd.org/D7933 Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c == --- head/sys/dev/iwm/if_iwm.c Mon Sep 19 22:13:08 2016(r306002) +++ head/sys/dev/iwm/if_iwm.c Mon Sep 19 22:16:03 2016(r306003) @@ -234,13 +234,9 @@ static int iwm_dma_contig_alloc(bus_dma_ bus_size_t, bus_size_t); static voidiwm_dma_contig_free(struct iwm_dma_info *); static int iwm_alloc_fwmem(struct iwm_softc *); -static voidiwm_free_fwmem(struct iwm_softc *); static int iwm_alloc_sched(struct iwm_softc *); -static voidiwm_free_sched(struct iwm_softc *); static int iwm_alloc_kw(struct iwm_softc *); -static voidiwm_free_kw(struct iwm_softc *); static int iwm_alloc_ict(struct iwm_softc *); -static voidiwm_free_ict(struct iwm_softc *); static int iwm_alloc_rx_ring(struct iwm_softc *, struct iwm_rx_ring *); static voidiwm_disable_rx_dma(struct iwm_softc *); static voidiwm_reset_rx_ring(struct iwm_softc *, struct iwm_rx_ring *); @@ -902,12 +898,6 @@ iwm_alloc_fwmem(struct iwm_softc *sc) sc->sc_fwdmasegsz, 16); } -static void -iwm_free_fwmem(struct iwm_softc *sc) -{ - iwm_dma_contig_free(>fw_dma); -} - /* tx scheduler rings. not used? */ static int iwm_alloc_sched(struct iwm_softc *sc) @@ -917,12 +907,6 @@ iwm_alloc_sched(struct iwm_softc *sc) nitems(sc->txq) * sizeof(struct iwm_agn_scd_bc_tbl), 1024); } -static void -iwm_free_sched(struct iwm_softc *sc) -{ - iwm_dma_contig_free(>sched_dma); -} - /* keep-warm page is used internally by the card. see iwl-fh.h for more info */ static int iwm_alloc_kw(struct iwm_softc *sc) @@ -930,12 +914,6 @@ iwm_alloc_kw(struct iwm_softc *sc) return iwm_dma_contig_alloc(sc->sc_dmat, >kw_dma, 4096, 4096); } -static void -iwm_free_kw(struct iwm_softc *sc) -{ - iwm_dma_contig_free(>kw_dma); -} - /* interrupt cause table */ static int iwm_alloc_ict(struct iwm_softc *sc) @@ -944,12 +922,6 @@ iwm_alloc_ict(struct iwm_softc *sc) IWM_ICT_SIZE, 1<ict_dma); -} - static int iwm_alloc_rx_ring(struct iwm_softc *sc, struct iwm_rx_ring *ring) { @@ -6174,13 +6146,10 @@ iwm_detach_local(struct iwm_softc *sc, i iwm_fw_info_free(fw); /* Free scheduler */ - iwm_free_sched(sc); - if (sc->ict_dma.vaddr != NULL) - iwm_free_ict(sc); - if (sc->kw_dma.vaddr != NULL) - iwm_free_kw(sc); - if (sc->fw_dma.vaddr != NULL) - iwm_free_fwmem(sc); + iwm_dma_contig_free(>sched_dma); + iwm_dma_contig_free(>ict_dma); + iwm_dma_contig_free(>kw_dma); + iwm_dma_contig_free(>fw_dma); /* Finished with the hardware - detach things */ iwm_pci_detach(dev); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r305998 - in head/usr.bin: cmp indent tr
If you re-read the sentences you've pasted carefully, I think you'll find it doesn't actually say that the types or param headers come before other sys/ headers. Just that sys/ headers come before non-sys/ headers. Best, Conrad On Mon, Sep 19, 2016 at 1:45 PM, Ngie Cooper (yaneurabeya)wrote: > > On Sep 19, 2016, at 1:43 PM, Conrad E. Meyer wrote: > > Author: cem > Date: Mon Sep 19 20:43:03 2016 > New Revision: 305998 > URL: https://svnweb.freebsd.org/changeset/base/305998 > > Log: > Move sys/capsicum.h includes after types.h or param.h > > This is not actually documented or even implied in style(9). Make the > change > to match convention. Someone should document this convention in style(9). > > Reported by: jhb > Sponsored by: EMC Dell Isilon > > > Uh… yes it clearly states it in style(9). From > https://www.freebsd.org/cgi/man.cgi?query=style=9 : > > Kernel include files (i.e. sys/*.h) come first; normally, include > OR , but not both. includes > , and it is okay to depend on that. > > Thanks, > -Ngie ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306002 - head/sys/dev/iwm
Author: ivadasz Date: Mon Sep 19 22:13:08 2016 New Revision: 306002 URL: https://svnweb.freebsd.org/changeset/base/306002 Log: [iwm] Fix iwm_poll_bit() error value check in iwm_attach(). The iwm(4) iwm_poll_bit() function returns 1 on success, and 0 on failure, whereas the iwl_poll_bit() in Linux iwlwifi returns < 0 on failure. So the (ret < 0) check ended up ignoring any error returned by iwm_poll_bit(). Approved by: adrian (mentor) Differential Revision:https://reviews.freebsd.org/D7932 Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c == --- head/sys/dev/iwm/if_iwm.c Mon Sep 19 22:11:34 2016(r306001) +++ head/sys/dev/iwm/if_iwm.c Mon Sep 19 22:13:08 2016(r306002) @@ -5762,7 +5762,7 @@ iwm_attach(device_t dev) IWM_CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, IWM_CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000); - if (ret < 0) { + if (!ret) { device_printf(sc->sc_dev, "Failed to wake up the nic\n"); goto fail; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306001 - head/sys/dev/iwm
Author: ivadasz Date: Mon Sep 19 22:11:34 2016 New Revision: 306001 URL: https://svnweb.freebsd.org/changeset/base/306001 Log: [iwm] Fix off-by-one check in iwm_read_firmware(). This fixes a potential buffer overrun in the firmware parsing code. Reported by: Coverity Approved by: adrian (mentor) Differential Revision:https://reviews.freebsd.org/D7931 Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c == --- head/sys/dev/iwm/if_iwm.c Mon Sep 19 22:08:47 2016(r306000) +++ head/sys/dev/iwm/if_iwm.c Mon Sep 19 22:11:34 2016(r306001) @@ -739,7 +739,7 @@ iwm_read_firmware(struct iwm_softc *sc, } capa = (const struct iwm_ucode_capa *)tlv_data; idx = le32toh(capa->api_index); - if (idx > howmany(IWM_NUM_UCODE_TLV_CAPA, 32)) { + if (idx >= howmany(IWM_NUM_UCODE_TLV_CAPA, 32)) { device_printf(sc->sc_dev, "unsupported API index %d\n", idx); goto parse_out; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306000 - head/sys/dev/iwm
Author: ivadasz Date: Mon Sep 19 22:08:47 2016 New Revision: 306000 URL: https://svnweb.freebsd.org/changeset/base/306000 Log: [iwm] Remove unused field from iwm_rx_data. Use uint32_t instead of enum type. The wantresp field in struct iwm_rx_data has never been used for anything, so we can just delete it. Apparently struct iwm_sf_cfg_cmd was compiled correctly (using a 32bit value to represent the enum), but it still seems like a very bad idea to use an enum type in a __packed struct. Approved by: adrian (mentor) Differential Revision:https://reviews.freebsd.org/D7930 Modified: head/sys/dev/iwm/if_iwmreg.h head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwmreg.h == --- head/sys/dev/iwm/if_iwmreg.hMon Sep 19 22:06:00 2016 (r305999) +++ head/sys/dev/iwm/if_iwmreg.hMon Sep 19 22:08:47 2016 (r306000) @@ -3251,7 +3251,7 @@ enum iwm_sf_scenario { * @full_on_timeouts: timer values for each scenario in full on state. */ struct iwm_sf_cfg_cmd { - enum iwm_sf_state state; + uint32_t state; uint32_t watermark[IWM_SF_TRANSIENT_STATES_NUMBER]; uint32_t long_delay_timeouts[IWM_SF_NUM_SCENARIO][IWM_SF_NUM_TIMEOUT_TYPES]; uint32_t full_on_timeouts[IWM_SF_NUM_SCENARIO][IWM_SF_NUM_TIMEOUT_TYPES]; Modified: head/sys/dev/iwm/if_iwmvar.h == --- head/sys/dev/iwm/if_iwmvar.hMon Sep 19 22:06:00 2016 (r305999) +++ head/sys/dev/iwm/if_iwmvar.hMon Sep 19 22:08:47 2016 (r306000) @@ -275,7 +275,6 @@ struct iwm_tx_ring { struct iwm_rx_data { struct mbuf *m; bus_dmamap_tmap; - int wantresp; }; struct iwm_rx_ring { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305999 - head/sys/dev/iwm
Author: ivadasz Date: Mon Sep 19 22:06:00 2016 New Revision: 305999 URL: https://svnweb.freebsd.org/changeset/base/305999 Log: [iwm] Use htole16 for policy field in struct iwm_time_event_cmd_v2. The htole32 was working fine for little-endian machines, but would have been broken on big-endian. Approved by: adrian (mentor) Differential Revision:https://reviews.freebsd.org/D7929 Modified: head/sys/dev/iwm/if_iwm_time_event.c Modified: head/sys/dev/iwm/if_iwm_time_event.c == --- head/sys/dev/iwm/if_iwm_time_event.cMon Sep 19 20:43:03 2016 (r305998) +++ head/sys/dev/iwm/if_iwm_time_event.cMon Sep 19 22:06:00 2016 (r305999) @@ -266,7 +266,7 @@ iwm_mvm_protect_session(struct iwm_softc time_cmd.duration = htole32(duration); time_cmd.repeat = 1; time_cmd.policy - = htole32(IWM_TE_V2_NOTIF_HOST_EVENT_START | + = htole16(IWM_TE_V2_NOTIF_HOST_EVENT_START | IWM_TE_V2_NOTIF_HOST_EVENT_END | IWM_T2_V2_START_IMMEDIATELY); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r305998 - in head/usr.bin: cmp indent tr
> On Sep 19, 2016, at 2:22 PM, John Baldwinwrote: > > On Monday, September 19, 2016 01:45:01 PM Ngie Cooper wrote: >> >>> On Sep 19, 2016, at 1:43 PM, Conrad E. Meyer wrote: >>> >>> Author: cem >>> Date: Mon Sep 19 20:43:03 2016 >>> New Revision: 305998 >>> URL: https://svnweb.freebsd.org/changeset/base/305998 >>> >>> Log: >>> Move sys/capsicum.h includes after types.h or param.h >>> >>> This is not actually documented or even implied in style(9). Make the >>> change >>> to match convention. Someone should document this convention in style(9). >>> >>> Reported by:jhb >>> Sponsored by: EMC Dell Isilon >> >> Uh… yes it clearly states it in style(9). From >> https://www.freebsd.org/cgi/man.cgi?query=style=9 : >> Kernel include files (i.e. sys/*.h) come first; normally, include >> OR , but not both. includes >> , and it is okay to depend on that. > > It doesn't actually say that types.h/param.h has to come before other sys/*.h > headers though. Normally sys/foo.h requires sys/types.h to compile hence the > rule, but sys/capsicum.h gets around this by a nested include of sys/param.h > (which is itself probably dubious). > > I do think we should explicitly add a note to style.9 though to say that > types.h|param.h comes first. Yeah… I just reread it and I noticed that it’s not 100% explicit. Thanks, -Ngie ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r305998 - in head/usr.bin: cmp indent tr
On Monday, September 19, 2016 01:45:01 PM Ngie Cooper wrote: > > > On Sep 19, 2016, at 1:43 PM, Conrad E. Meyerwrote: > > > > Author: cem > > Date: Mon Sep 19 20:43:03 2016 > > New Revision: 305998 > > URL: https://svnweb.freebsd.org/changeset/base/305998 > > > > Log: > > Move sys/capsicum.h includes after types.h or param.h > > > > This is not actually documented or even implied in style(9). Make the > > change > > to match convention. Someone should document this convention in style(9). > > > > Reported by: jhb > > Sponsored by: EMC Dell Isilon > > Uh… yes it clearly states it in style(9). From > https://www.freebsd.org/cgi/man.cgi?query=style=9 : > Kernel include files (i.e. sys/*.h) come first; normally, include > OR , but not both. includes > , and it is okay to depend on that. It doesn't actually say that types.h/param.h has to come before other sys/*.h headers though. Normally sys/foo.h requires sys/types.h to compile hence the rule, but sys/capsicum.h gets around this by a nested include of sys/param.h (which is itself probably dubious). I do think we should explicitly add a note to style.9 though to say that types.h|param.h comes first. -- John Baldwin ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r305998 - in head/usr.bin: cmp indent tr
> On Sep 19, 2016, at 1:43 PM, Conrad E. Meyerwrote: > > Author: cem > Date: Mon Sep 19 20:43:03 2016 > New Revision: 305998 > URL: https://svnweb.freebsd.org/changeset/base/305998 > > Log: > Move sys/capsicum.h includes after types.h or param.h > > This is not actually documented or even implied in style(9). Make the change > to match convention. Someone should document this convention in style(9). > > Reported by: jhb > Sponsored by:EMC Dell Isilon Uh… yes it clearly states it in style(9). From https://www.freebsd.org/cgi/man.cgi?query=style=9 : Kernel include files (i.e. sys/*.h) come first; normally, include OR , but not both. includes , and it is okay to depend on that. Thanks, -Ngie ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305998 - in head/usr.bin: cmp indent tr
Author: cem Date: Mon Sep 19 20:43:03 2016 New Revision: 305998 URL: https://svnweb.freebsd.org/changeset/base/305998 Log: Move sys/capsicum.h includes after types.h or param.h This is not actually documented or even implied in style(9). Make the change to match convention. Someone should document this convention in style(9). Reported by: jhb Sponsored by: EMC Dell Isilon Modified: head/usr.bin/cmp/cmp.c head/usr.bin/indent/indent.c head/usr.bin/tr/tr.c Modified: head/usr.bin/cmp/cmp.c == --- head/usr.bin/cmp/cmp.c Mon Sep 19 19:18:40 2016(r305997) +++ head/usr.bin/cmp/cmp.c Mon Sep 19 20:43:03 2016(r305998) @@ -42,8 +42,8 @@ static char sccsid[] = "@(#)cmp.c 8.3 (B #include __FBSDID("$FreeBSD$"); -#include #include +#include #include #include Modified: head/usr.bin/indent/indent.c == --- head/usr.bin/indent/indent.cMon Sep 19 19:18:40 2016 (r305997) +++ head/usr.bin/indent/indent.cMon Sep 19 20:43:03 2016 (r305998) @@ -50,8 +50,8 @@ static char sccsid[] = "@(#)indent.c 5.1 #include __FBSDID("$FreeBSD$"); -#include #include +#include #include #include #include Modified: head/usr.bin/tr/tr.c == --- head/usr.bin/tr/tr.cMon Sep 19 19:18:40 2016(r305997) +++ head/usr.bin/tr/tr.cMon Sep 19 20:43:03 2016(r305998) @@ -41,8 +41,8 @@ static const char copyright[] = static const char sccsid[] = "@(#)tr.c 8.2 (Berkeley) 5/4/95"; #endif -#include #include +#include #include #include ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r305952 - head/lib/libc/gen
On Monday, September 19, 2016 07:34:54 PM Ed Schouten wrote: > 2016-09-19 18:06 GMT+02:00 John Baldwin: > > Don't you need the _Generic hack we have for basename now? > > The _Generic() hack that we have in place is for dirname() right now. > I'll extend it to also cover basename() when replacing that function > as well. Oh, somehow I had misread this commit to be the commit to fix the other one rather than a followup to the previous change. -- John Baldwin ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r305933 - head/share/man/man5
On 9/18/2016 8:40 AM, Baptiste Daroussin wrote: > Author: bapt > Date: Sun Sep 18 15:40:36 2016 > New Revision: 305933 > URL: https://svnweb.freebsd.org/changeset/base/305933 > > Log: > Modify manually given makeman is broken due to errors in share/mk/* I don't get the errors you reported. Did you modify makeman, and is it up-to-date? > > Modified: > head/share/man/man5/src.conf.5 > > Modified: head/share/man/man5/src.conf.5 > == > --- head/share/man/man5/src.conf.5Sun Sep 18 15:06:28 2016 > (r305932) > +++ head/share/man/man5/src.conf.5Sun Sep 18 15:40:36 2016 > (r305933) > @@ -1,7 +1,7 @@ > .\" DO NOT EDIT-- this file is automatically generated. > .\" from FreeBSD: head/tools/build/options/makeman 292283 2015-12-15 > 18:42:30Z bdrewery > .\" $FreeBSD$ > -.Dd August 23, 2016 > +.Dd September 18, 2016 > .Dt SRC.CONF 5 > .Os > .Sh NAME > @@ -1319,11 +1319,10 @@ This includes > .Xr rlogin 1 , > .Xr rsh 1 , > etc. > -.It Va WITHOUT_RCS > -.\" from FreeBSD: head/tools/build/options/WITHOUT_RCS 275138 2014-11-26 > 20:43:09Z gjb > -Set to not build > -.Xr rcs 1 , > -.Xr etcupdate 8 , > +.It Va WITH_RCS > +.\" from FreeBSD: head/tools/build/options/WITH_RCS 305931 2016-09-18 > 15:01:11Z bapt > +Set to build > +.Xr rcs 1 > and related utilities. > .It Va WITHOUT_RESCUE > .\" from FreeBSD: head/tools/build/options/WITHOUT_RESCUE 156932 2006-03-21 > 07:50:50Z ru > -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
Re: svn commit: r305981 - head/usr.bin/cmp
On Monday, September 19, 2016 04:13:00 PM Conrad E. Meyer wrote: > Author: cem > Date: Mon Sep 19 16:13:00 2016 > New Revision: 305981 > URL: https://svnweb.freebsd.org/changeset/base/305981 > > Log: > cmp(1): Capsicumify > > Reviewed by:allanjude, bapt, oshogbo > Sponsored by: Dell EMC Isilon > Differential Revision: https://reviews.freebsd.org/D7912 > > Modified: > head/usr.bin/cmp/cmp.c > > Modified: head/usr.bin/cmp/cmp.c > == > --- head/usr.bin/cmp/cmp.cMon Sep 19 16:07:32 2016(r305980) > +++ head/usr.bin/cmp/cmp.cMon Sep 19 16:13:00 2016(r305981) > @@ -42,15 +42,18 @@ static char sccsid[] = "@(#)cmp.c 8.3 (B > #include > __FBSDID("$FreeBSD$"); > > +#include > #include > #include Style nit: why is first? or should be first (from style(9)) then remaining sys/foo.h headers are alphabetically sorted after that. Does have to be before for some reason? -- John Baldwin ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r305968 - head/etc/autofs
Hi, Your commit message says in words exactly what the diff says in code. Would you like to elaborate on why the change is made? I'm curious because this could cause severe damage to the filesystem on unclean eject of the media. Regards, Ronald. On Mon, 19 Sep 2016 10:51:27 +0200, Edward Tomasz Napieralawrote: Author: trasz Date: Mon Sep 19 08:51:27 2016 New Revision: 305968 URL: https://svnweb.freebsd.org/changeset/base/305968 Log: Make autofs use the "async" flag for msdosfs and ufs filesystems mounted on /media. MFC after: 1 month Modified: head/etc/autofs/special_media Modified: head/etc/autofs/special_media == --- head/etc/autofs/special_media Mon Sep 19 07:47:56 2016 (r305967) +++ head/etc/autofs/special_media Mon Sep 19 08:51:27 2016 (r305968) @@ -46,6 +46,8 @@ print_map_entry() { "Cannot mount ${_fstype} formatted device /dev/${_p}: Install sysutils/fusefs-ntfs first" exit 1 fi + elif [ "${_fstype}" = "msdosfs" -o "${_fstype}" = "ufs" ]; then + echo "-fstype=${_fstype},nosuid,async :/dev/${_p}" else echo "-fstype=${_fstype},nosuid:/dev/${_p}" fi ___ svn-src-...@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-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305995 - in head/sys/boot/efi/loader/arch: amd64 i386
Author: emaste Date: Mon Sep 19 18:45:57 2016 New Revision: 305995 URL: https://svnweb.freebsd.org/changeset/base/305995 Log: revert unintended change from r305994 Modified: head/sys/boot/efi/loader/arch/amd64/ldscript.amd64 head/sys/boot/efi/loader/arch/i386/ldscript.i386 Modified: head/sys/boot/efi/loader/arch/amd64/ldscript.amd64 == --- head/sys/boot/efi/loader/arch/amd64/ldscript.amd64 Mon Sep 19 18:44:43 2016(r305994) +++ head/sys/boot/efi/loader/arch/amd64/ldscript.amd64 Mon Sep 19 18:45:57 2016(r305995) @@ -19,7 +19,7 @@ SECTIONS /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) *(.plt) - } =0x + } =0xCC . = ALIGN(4096); .data: { *(.rodata .rodata.* .gnu.linkonce.r.*) Modified: head/sys/boot/efi/loader/arch/i386/ldscript.i386 == --- head/sys/boot/efi/loader/arch/i386/ldscript.i386Mon Sep 19 18:44:43 2016(r305994) +++ head/sys/boot/efi/loader/arch/i386/ldscript.i386Mon Sep 19 18:45:57 2016(r305995) @@ -14,7 +14,7 @@ SECTIONS /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) *(.plt) - } =0x + } =0xCC . = ALIGN(4096); .data: { *(.rodata .rodata.* .gnu.linkonce.r.*) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305994 - in head/sys: amd64/linux boot/efi/loader/arch/amd64 boot/efi/loader/arch/i386 compat/linux
Author: emaste Date: Mon Sep 19 18:44:43 2016 New Revision: 305994 URL: https://svnweb.freebsd.org/changeset/base/305994 Log: Catch up to sys/capability.h rename to sys/capsicum.h in r263232 MFC after:1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/amd64/linux/linux_machdep.c head/sys/boot/efi/loader/arch/amd64/ldscript.amd64 head/sys/boot/efi/loader/arch/i386/ldscript.i386 head/sys/compat/linux/linux_event.c Modified: head/sys/amd64/linux/linux_machdep.c == --- head/sys/amd64/linux/linux_machdep.cMon Sep 19 18:42:58 2016 (r305993) +++ head/sys/amd64/linux/linux_machdep.cMon Sep 19 18:44:43 2016 (r305994) @@ -35,7 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include #include Modified: head/sys/boot/efi/loader/arch/amd64/ldscript.amd64 == --- head/sys/boot/efi/loader/arch/amd64/ldscript.amd64 Mon Sep 19 18:42:58 2016(r305993) +++ head/sys/boot/efi/loader/arch/amd64/ldscript.amd64 Mon Sep 19 18:44:43 2016(r305994) @@ -19,7 +19,7 @@ SECTIONS /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) *(.plt) - } =0xCC + } =0x . = ALIGN(4096); .data: { *(.rodata .rodata.* .gnu.linkonce.r.*) Modified: head/sys/boot/efi/loader/arch/i386/ldscript.i386 == --- head/sys/boot/efi/loader/arch/i386/ldscript.i386Mon Sep 19 18:42:58 2016(r305993) +++ head/sys/boot/efi/loader/arch/i386/ldscript.i386Mon Sep 19 18:44:43 2016(r305994) @@ -14,7 +14,7 @@ SECTIONS /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) *(.plt) - } =0xCC + } =0x . = ALIGN(4096); .data: { *(.rodata .rodata.* .gnu.linkonce.r.*) Modified: head/sys/compat/linux/linux_event.c == --- head/sys/compat/linux/linux_event.c Mon Sep 19 18:42:58 2016 (r305993) +++ head/sys/compat/linux/linux_event.c Mon Sep 19 18:44:43 2016 (r305994) @@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include #include ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305993 - head/sbin/mount
Author: pfg Date: Mon Sep 19 18:42:58 2016 New Revision: 305993 URL: https://svnweb.freebsd.org/changeset/base/305993 Log: mount(1): Simplify by using asprintf(3) Instead of strlen() + malloc() + snprintf, just use asprintf(). No functional change. Obtained from:OpenBSD (CVS Rev. 1.67) Modified: head/sbin/mount/mount.c Modified: head/sbin/mount/mount.c == --- head/sbin/mount/mount.c Mon Sep 19 18:40:54 2016(r305992) +++ head/sbin/mount/mount.c Mon Sep 19 18:42:58 2016(r305993) @@ -705,17 +705,14 @@ getmntpt(const char *name) char * catopt(char *s0, const char *s1) { - size_t i; char *cp; if (s1 == NULL || *s1 == '\0') return (s0); if (s0 && *s0) { - i = strlen(s0) + strlen(s1) + 1 + 1; - if ((cp = malloc(i)) == NULL) - errx(1, "malloc failed"); - (void)snprintf(cp, i, "%s,%s", s0, s1); + if (asprintf(, "%s,%s", s0, s1) == -1) + errx(1, "asprintf failed"); } else cp = strdup(s1); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305991 - head/sys/dev/usb
Author: avos Date: Mon Sep 19 18:36:26 2016 New Revision: 305991 URL: https://svnweb.freebsd.org/changeset/base/305991 Log: dev/usb: add USB IDs for Realtek 802.11ac wireless adapters. They are will be used by the updated rtwn(4) / urtwn(4) driver. Suggested by: adrian Modified: head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsMon Sep 19 18:35:22 2016(r305990) +++ head/sys/dev/usb/usbdevsMon Sep 19 18:36:26 2016(r305991) @@ -1206,6 +1206,7 @@ product ASUS RTL8192CU0x17ab RTL8192CU product ASUS USBN660x17ad USB-N66 product ASUS USBN10NANO0x17ba USB-N10 Nano product ASUS USBAC51 0x17d1 USB-AC51 +product ASUS USBAC56 0x17d2 USB-AC56 product ASUS A730W 0x4202 ASUS MyPal A730W product ASUS P535 0x420f ASUS P535 PDA product ASUS GMSC 0x422f ASUS Generic Mass Storage @@ -1426,6 +1427,7 @@ product CISCOLINKSYS WUSB54GC 0x0020 WUS product CISCOLINKSYS WUSB54GR 0x0023 WUSB54GR product CISCOLINKSYS WUSBF54G 0x0024 WUSBF54G product CISCOLINKSYS AE10000x002f AE1000 +product CISCOLINKSYS WUSB6300 0x003f WUSB6300 product CISCOLINKSYS USB3GIGV1 0x0041 USB3GIGV1 USB Ethernet Adapter product CISCOLINKSYS2 RT3070 0x4001 RT3070 product CISCOLINKSYS3 RT3070 0x0101 RT3070 @@ -1620,6 +1622,10 @@ product DLINK DSB650TX4 0x200c 10/100 E product DLINK DWL120E 0x3200 DWL-120 rev E product DLINK DWA125D1 0x330f DWA-125 rev D1 product DLINK DWA123D1 0x3310 DWA-123 rev D1 +product DLINK DWA171A1 0x3314 DWA-171 rev A1 +product DLINK DWA182C1 0x3315 DWA-182 rev C1 +product DLINK DWA180A1 0x3316 DWA-180 rev A1 +product DLINK DWA172A1 0x3318 DWA-172 rev A1 product DLINK DWL122 0x3700 DWL-122 product DLINK DWLG120 0x3701 DWL-G120 product DLINK DWL120F 0x3702 DWL-120 rev F @@ -1738,6 +1744,9 @@ product EDIMAX EW7718 0x7718 EW-7718 product EDIMAX EW7733UND 0x7733 EW-7733UnD product EDIMAX EW7811UN0x7811 EW-7811Un productEDIMAX RTL8192CU0x7822 RTL8192CU +product EDIMAX EW7811UTC_1 0xa811 EW-7811UTC +product EDIMAX EW7811UTC_2 0xa812 EW-7811UTC +product EDIMAX EW7822UAC 0xa822 EW-7822UAC /* eGalax Products */ product EGALAX TPANEL 0x0001 Touch Panel @@ -2261,6 +2270,7 @@ product HAWKING RTL8192CU 0x0019 RTL819 product HAWKING UF100 0x400c 10/100 USB Ethernet product HAWKING RTL8192SU_10x0015 RTL8192SU product HAWKING RTL8192SU_20x0016 RTL8192SU +product HAWKING HD65U 0x0023 HD65U /* HID Global GmbH products */ product HIDGLOBAL CM2020 0x0596 Omnikey Cardman 2020 @@ -2501,6 +2511,7 @@ product IODATA RT3072_1 0x0944 RT3072 product IODATA RT3072_20x0945 RT3072 product IODATA RT3072_30x0947 RT3072 product IODATA RT3072_40x0948 RT3072 +product IODATA WNAC867U0x0952 WN-AC867U product IODATA USBRSAQ 0x0a03 Serial USB-RSAQ1 product IODATA USBRSAQ50x0a0e Serial USB-RSAQ5 product IODATA2 USB2SC 0x0a09 USB2.0-SCSI Bridge USB2-SC @@ -3060,6 +3071,8 @@ product MELCO WLIUCG301N 0x016f WLI-UC-G product MELCO WLIUCGNM 0x01a2 WLI-UC-GNM product MELCO WLIUCG300HPV10x01a8 WLI-UC-G300HP-V1 product MELCO WLIUCGNM20x01ee WLI-UC-GNM2 +product MELCO WIU2433DM0x0242 WI-U2-433DM +product MELCO WIU3866D 0x025d WI-U3-866D /* Merlin products */ product MERLIN V620 0x1110 Merlin V620 @@ -3239,6 +3252,7 @@ product NATIONAL BEARPAW2400 0x1001 Bear product NEC HUB_0050 0x0050 USB 2.0 7-Port Hub product NEC HUB_005A 0x005a USB 2.0 4-Port Hub product NEC WL300NUG 0x0249 WL300NU-G +product NEC WL900U 0x0408 Aterm WL900U product NEC HUB0x55aa hub product NEC HUB_B 0x55ab hub @@ -3278,6 +3292,7 @@ product NETGEAR WNDA3200 0x9018 WNDA3200 product NETGEAR RTL8192CU 0x9021 RTL8192CU product NETGEAR WNA10000x9040 WNA1000 product NETGEAR WNA1000M 0x9041 WNA1000M +product NETGEAR A6100 0x9052 A6100 product NETGEAR2 MA101 0x4100 MA101 product NETGEAR2 MA101B0x4102 MA101 Rev B product NETGEAR3 WG111T0x4250 WG111T @@ -3550,6 +3565,7 @@ product PLANEX2 GWUS54HP 0xab01 GW-US54H product PLANEX2 GWUS300MINIS 0xab24 GW-US300MiniS product PLANEX2RT3070 0xab25 RT3070 product PLANEX2 MZKUE150N 0xab2f MZK-UE150N +product PLANEX2 GW900D 0xab30 GW-900D product PLANEX2 GWUS54MINI20xab50 GW-US54Mini2 product PLANEX2 GWUS54SG 0xc002
svn commit: r305990 - head/usr.bin/hexdump
Author: pfg Date: Mon Sep 19 18:35:22 2016 New Revision: 305990 URL: https://svnweb.freebsd.org/changeset/base/305990 Log: hexdump(1): Simplify by using asprintf(3) Instead of strlen() + calloc() + snprintf, just use asprintf(). No functional change. Obtained from:OpenBSD (CVS Rev. 1.22) Modified: head/usr.bin/hexdump/parse.c Modified: head/usr.bin/hexdump/parse.c == --- head/usr.bin/hexdump/parse.cMon Sep 19 17:51:56 2016 (r305989) +++ head/usr.bin/hexdump/parse.cMon Sep 19 18:35:22 2016 (r305990) @@ -208,7 +208,6 @@ rewrite(FS *fs) unsigned char *p1, *p2, *fmtp; char savech, cs[3]; int nconv, prec; - size_t len; prec = 0; @@ -389,10 +388,8 @@ isint2: switch(fu->bcnt) { */ savech = *p2; p1[0] = '\0'; - len = strlen(fmtp) + strlen(cs) + 1; - if ((pr->fmt = calloc(1, len)) == NULL) + if (asprintf(>fmt, "%s%s", fmtp, cs) == -1) err(1, NULL); - snprintf(pr->fmt, len, "%s%s", fmtp, cs); *p2 = savech; pr->cchar = pr->fmt + (p1 - fmtp); fmtp = p2; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305989 - head/contrib/tcpdump
Author: emaste Date: Mon Sep 19 17:51:56 2016 New Revision: 305989 URL: https://svnweb.freebsd.org/changeset/base/305989 Log: tcpdump: remove sys/capability.h #include sys/capability.h is just a backwards compatibility wrapper around sys/capsicum.h, which is already #included. Modified: head/contrib/tcpdump/tcpdump.c Modified: head/contrib/tcpdump/tcpdump.c == --- head/contrib/tcpdump/tcpdump.c Mon Sep 19 17:46:15 2016 (r305988) +++ head/contrib/tcpdump/tcpdump.c Mon Sep 19 17:51:56 2016 (r305989) @@ -92,7 +92,6 @@ extern int SIZE_BUF; #include #include #include -#include #include #include #include ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305988 - in head/sys: geom sys
Author: trasz Date: Mon Sep 19 17:46:15 2016 New Revision: 305988 URL: https://svnweb.freebsd.org/changeset/base/305988 Log: Remove unused bio_taskqueue(). MFC after:1 month Modified: head/sys/geom/geom_io.c head/sys/sys/bio.h Modified: head/sys/geom/geom_io.c == --- head/sys/geom/geom_io.c Mon Sep 19 17:31:05 2016(r305987) +++ head/sys/geom/geom_io.c Mon Sep 19 17:46:15 2016(r305988) @@ -884,26 +884,6 @@ g_io_schedule_down(struct thread *tp __u } void -bio_taskqueue(struct bio *bp, bio_task_t *func, void *arg) -{ - bp->bio_task = func; - bp->bio_task_arg = arg; - /* -* The taskqueue is actually just a second queue off the "up" -* queue, so we use the same lock. -*/ - g_bioq_lock(_bio_run_up); - KASSERT(!(bp->bio_flags & BIO_ONQUEUE), - ("Bio already on queue bp=%p target taskq", bp)); - bp->bio_flags |= BIO_ONQUEUE; - TAILQ_INSERT_TAIL(_bio_run_task.bio_queue, bp, bio_queue); - g_bio_run_task.bio_queue_length++; - wakeup(_wait_up); - g_bioq_unlock(_bio_run_up); -} - - -void g_io_schedule_up(struct thread *tp __unused) { struct bio *bp; Modified: head/sys/sys/bio.h == --- head/sys/sys/bio.h Mon Sep 19 17:31:05 2016(r305987) +++ head/sys/sys/bio.h Mon Sep 19 17:46:15 2016(r305988) @@ -151,8 +151,6 @@ void bioq_insert_head(struct bio_queue_h void bioq_insert_tail(struct bio_queue_head *head, struct bio *bp); void bioq_remove(struct bio_queue_head *head, struct bio *bp); -void bio_taskqueue(struct bio *bp, bio_task_t *fund, void *arg); - intphysio(struct cdev *dev, struct uio *uio, int ioflag); #define physread physio #define physwrite physio ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r305952 - head/lib/libc/gen
2016-09-19 18:06 GMT+02:00 John Baldwin: > Don't you need the _Generic hack we have for basename now? The _Generic() hack that we have in place is for dirname() right now. I'll extend it to also cover basename() when replacing that function as well. While we're on the subject, anyone willing to review this change? :-) https://reviews.freebsd.org/D7844 -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305987 - head/sys/contrib/cloudabi
Author: ed Date: Mon Sep 19 17:31:05 2016 New Revision: 305987 URL: https://svnweb.freebsd.org/changeset/base/305987 Log: Sync in latest vDSOs from upstream. - Use conditional instruction to simplify the ARMv6 vDSO. This means that we no longer perform any branching. In the failure case, we simply slide over the assignments of the return values. The vDSO could be improved even further by using stmia to do assignments in parallel. Unfortunately, the script used to generate these is not smart enough for that (yet). Spotted by: andrew@. - Make the style of the i686 vDSO more similar to the others by using decimal literals. Modified: head/sys/contrib/cloudabi/cloudabi_vdso_armv6.S head/sys/contrib/cloudabi/cloudabi_vdso_i686.S Modified: head/sys/contrib/cloudabi/cloudabi_vdso_armv6.S == --- head/sys/contrib/cloudabi/cloudabi_vdso_armv6.S Mon Sep 19 17:17:29 2016(r305986) +++ head/sys/contrib/cloudabi/cloudabi_vdso_armv6.S Mon Sep 19 17:31:05 2016(r305987) @@ -38,24 +38,20 @@ ENTRY(cloudabi_sys_clock_res_get) str r1, [sp, #-4] mov ip, #0 swi 0 - ldr r2, [sp, #-4] - bcs 1f - str r0, [r2, 0] - str r1, [r2, 4] - mov r0, $0 -1: + ldrcc r2, [sp, #-4] + strcc r0, [r2, 0] + strcc r1, [r2, 4] + movcc r0, $0 bx lr END(cloudabi_sys_clock_res_get) ENTRY(cloudabi_sys_clock_time_get) mov ip, #1 swi 0 - bcs 1f - ldr r2, [sp, #0] - str r0, [r2, 0] - str r1, [r2, 4] - mov r0, $0 -1: + ldrcc r2, [sp, #0] + strcc r0, [r2, 0] + strcc r1, [r2, 4] + movcc r0, $0 bx lr END(cloudabi_sys_clock_time_get) @@ -75,11 +71,9 @@ ENTRY(cloudabi_sys_fd_create1) str r1, [sp, #-4] mov ip, #4 swi 0 - ldr r2, [sp, #-4] - bcs 1f - str r0, [r2] - mov r0, $0 -1: + ldrcc r2, [sp, #-4] + strcc r0, [r2] + movcc r0, $0 bx lr END(cloudabi_sys_fd_create1) @@ -88,13 +82,11 @@ ENTRY(cloudabi_sys_fd_create2) str r2, [sp, #-8] mov ip, #5 swi 0 - ldr r2, [sp, #-4] - ldr r3, [sp, #-8] - bcs 1f - str r0, [r2] - str r1, [r3] - mov r0, $0 -1: + ldrcc r2, [sp, #-4] + ldrcc r3, [sp, #-8] + strcc r0, [r2] + strcc r1, [r3] + movcc r0, $0 bx lr END(cloudabi_sys_fd_create2) @@ -108,33 +100,27 @@ ENTRY(cloudabi_sys_fd_dup) str r1, [sp, #-4] mov ip, #7 swi 0 - ldr r2, [sp, #-4] - bcs 1f - str r0, [r2] - mov r0, $0 -1: + ldrcc r2, [sp, #-4] + strcc r0, [r2] + movcc r0, $0 bx lr END(cloudabi_sys_fd_dup) ENTRY(cloudabi_sys_fd_pread) mov ip, #8 swi 0 - bcs 1f - ldr r2, [sp, #8] - str r0, [r2] - mov r0, $0 -1: + ldrcc r2, [sp, #8] + strcc r0, [r2] + movcc r0, $0 bx lr END(cloudabi_sys_fd_pread) ENTRY(cloudabi_sys_fd_pwrite) mov ip, #9 swi 0 - bcs 1f - ldr r2, [sp, #8] - str r0, [r2] - mov r0, $0 -1: + ldrcc r2, [sp, #8] + strcc r0, [r2] + movcc r0, $0 bx lr END(cloudabi_sys_fd_pwrite) @@ -142,11 +128,9 @@ ENTRY(cloudabi_sys_fd_read) str r3, [sp, #-4] mov ip, #10 swi 0 - ldr r2, [sp, #-4] - bcs 1f - str r0, [r2] - mov r0, $0 -1: + ldrcc r2, [sp, #-4] + strcc r0, [r2] + movcc r0, $0 bx lr END(cloudabi_sys_fd_read) @@ -159,12 +143,10 @@ END(cloudabi_sys_fd_replace) ENTRY(cloudabi_sys_fd_seek) mov ip, #12 swi 0 - bcs 1f - ldr r2, [sp, #4] - str r0, [r2, 0] - str r1, [r2, 4] - mov r0, $0 -1: + ldrcc r2, [sp, #4] + strcc r0, [r2, 0] + strcc r1, [r2, 4] + movcc r0, $0 bx lr END(cloudabi_sys_fd_seek) @@ -190,11 +172,9 @@ ENTRY(cloudabi_sys_fd_write) str r3, [sp, #-4] mov ip, #16 swi 0 - ldr r2, [sp, #-4] - bcs 1f - str r0, [r2] - mov r0, $0 -1: + ldrcc r2, [sp, #-4] + strcc r0, [r2] + movcc r0, $0 bx lr END(cloudabi_sys_fd_write) @@ -225,33 +205,27 @@ END(cloudabi_sys_file_link) ENTRY(cloudabi_sys_file_open) mov ip, #21 swi 0 - bcs 1f - ldr r2, [sp, #8] - str r0, [r2] - mov r0, $0 -1: + ldrcc r2, [sp, #8] + strcc r0, [r2] + movcc r0, $0 bx lr END(cloudabi_sys_file_open) ENTRY(cloudabi_sys_file_readdir) mov ip, #22 swi 0 - bcs 1f - ldr r2, [sp, #8] - str r0, [r2] - mov r0, $0 -1: + ldrcc r2, [sp, #8] + strcc r0, [r2] + movcc r0, $0 bx lr END(cloudabi_sys_file_readdir) ENTRY(cloudabi_sys_file_readlink) mov ip, #23 swi 0 - bcs 1f - ldr r2, [sp, #4] - str r0, [r2] - mov r0, $0 -1: + ldrcc r2, [sp, #4] + strcc r0, [r2] + movcc r0, $0 bx lr END(cloudabi_sys_file_readlink) @@ -318,11 +292,9 @@ END(cloudabi_sys_mem_lock) ENTRY(cloudabi_sys_mem_map) mov ip, #34 swi 0 - bcs 1f - ldr r2, [sp, #16] - str r0, [r2] - mov r0, $0 -1: + ldrcc r2, [sp, #16] + strcc r0, [r2] + movcc r0, $0 bx lr END(cloudabi_sys_mem_map) @@ -354,22 +326,18 @@ ENTRY(cloudabi_sys_poll) str r3, [sp, #-4] mov ip, #39 swi 0 - ldr r2, [sp, #-4] - bcs 1f - str r0, [r2] - mov r0, $0 -1: + ldrcc r2, [sp, #-4] + strcc r0, [r2] + movcc r0, $0 bx lr
svn commit: r305985 - head/sys/dev/cxgbe
Author: np Date: Mon Sep 19 17:16:51 2016 New Revision: 305985 URL: https://svnweb.freebsd.org/changeset/base/305985 Log: cxgbe(4): Fixes to wrq stats. - Increment tx_wrs_copied in the correct place. - Add tx_wrs_sspace to the sysctl MIB. Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c == --- head/sys/dev/cxgbe/t4_sge.c Mon Sep 19 17:15:01 2016(r305984) +++ head/sys/dev/cxgbe/t4_sge.c Mon Sep 19 17:16:51 2016(r305985) @@ -1902,6 +1902,7 @@ drain_wrq_wr_list(struct adapter *sc, st } eq->pidx = n - (eq->sidx - eq->pidx); } + wrq->tx_wrs_copied++; if (available < eq->sidx / 4 && atomic_cmpset_int(>equiq, 0, 1)) { @@ -3561,6 +3562,8 @@ alloc_wrq(struct adapter *sc, struct vi_ >tx_wrs_direct, "# of work requests (direct)"); SYSCTL_ADD_UQUAD(ctx, children, OID_AUTO, "tx_wrs_copied", CTLFLAG_RD, >tx_wrs_copied, "# of work requests (copied)"); + SYSCTL_ADD_UQUAD(ctx, children, OID_AUTO, "tx_wrs_sspace", CTLFLAG_RD, + >tx_wrs_ss, "# of work requests (copied from scratch space)"); return (rc); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r305952 - head/lib/libc/gen
On Sunday, September 18, 2016 08:47:55 PM Ed Schouten wrote: > Author: ed > Date: Sun Sep 18 20:47:55 2016 > New Revision: 305952 > URL: https://svnweb.freebsd.org/changeset/base/305952 > > Log: > Replace dirname(3) by a copy that complies to POSIX. > > It turns out that the path normalization that our brand new copy of > dirname(3) does is actually not allowed by the draft version of the > upcoming version of POSIX. It has to behave identically to the > dirname(1) utility. > > This change replaces our new dirname(3) implementation by yet another > version that doesn't implement the path normalization logic; it merely > looks for the end of the directory name and overwrites that with a null > byte. > > More details: See note #3370 at http://austingroupbugs.net/view.php?id=1073 Don't you need the _Generic hack we have for basename now? -- John Baldwin ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r305981 - head/usr.bin/cmp
On 19.09.2016 19:13, Conrad E. Meyer wrote: > + /* > + * Cache NLS data, for strerror, for err(3), before entering capability > + * mode. > + */ > + (void)catopen("libc", NL_CAT_LOCALE); This code should be common for all programs which use err(), perror() etc. since they all should call setlocale() with LC_ALL. If they not do it, they should be fixed in the same time. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305983 - head/usr.bin/indent
Author: cem Date: Mon Sep 19 16:16:14 2016 New Revision: 305983 URL: https://svnweb.freebsd.org/changeset/base/305983 Log: indent(1): Capsicumify This is a nice and trivial program for sandboxing. One input file, one output file. Reviewed by: pfg Sponsored by: Dell EMC Isilon Differential Revision:https://reviews.freebsd.org/D7920 Modified: head/usr.bin/indent/indent.c Modified: head/usr.bin/indent/indent.c == --- head/usr.bin/indent/indent.cMon Sep 19 16:14:38 2016 (r305982) +++ head/usr.bin/indent/indent.cMon Sep 19 16:16:14 2016 (r305983) @@ -50,8 +50,10 @@ static char sccsid[] = "@(#)indent.c 5.1 #include __FBSDID("$FreeBSD$"); +#include #include #include +#include #include #include #include @@ -74,6 +76,7 @@ charbakfile[MAXPATHLEN] = ""; int main(int argc, char **argv) { +cap_rights_t rights; int dec_ind; /* current indentation for declarations */ int di_stack[20]; /* a stack of structure indentation levels */ @@ -234,6 +237,17 @@ main(int argc, char **argv) bakcopy(); } } + +/* Restrict input/output descriptors and enter Capsicum sandbox. */ +cap_rights_init(, CAP_FSTAT, CAP_WRITE); +if (cap_rights_limit(fileno(output), ) < 0 && errno != ENOSYS) + err(EXIT_FAILURE, "unable to limit rights for %s", out_name); +cap_rights_init(, CAP_FSTAT, CAP_READ); +if (cap_rights_limit(fileno(input), ) < 0 && errno != ENOSYS) + err(EXIT_FAILURE, "unable to limit rights for %s", in_name); +if (cap_enter() < 0 && errno != ENOSYS) + err(EXIT_FAILURE, "unable to enter capability mode"); + if (ps.com_ind <= 1) ps.com_ind = 2; /* dont put normal comments before column 2 */ if (troff) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305982 - head/usr.bin/tr
Author: cem Date: Mon Sep 19 16:14:38 2016 New Revision: 305982 URL: https://svnweb.freebsd.org/changeset/base/305982 Log: tr(1): Capsicumify This is a straightforward single input, single output program for capsicum. Reviewed by: bapt Sponsored by: Dell EMC Isilon Differential Revision:https://reviews.freebsd.org/D7928 Modified: head/usr.bin/tr/tr.c Modified: head/usr.bin/tr/tr.c == --- head/usr.bin/tr/tr.cMon Sep 19 16:13:00 2016(r305981) +++ head/usr.bin/tr/tr.cMon Sep 19 16:14:38 2016(r305982) @@ -41,16 +41,19 @@ static const char copyright[] = static const char sccsid[] = "@(#)tr.c 8.2 (Berkeley) 5/4/95"; #endif +#include #include #include #include +#include #include #include #include #include #include #include +#include #include #include #include @@ -69,6 +72,8 @@ int main(int argc, char **argv) { static int carray[NCHARS_SB]; + cap_rights_t rights; + unsigned long cmd; struct cmap *map; struct cset *delete, *squeeze; int n, *p; @@ -77,6 +82,27 @@ main(int argc, char **argv) (void)setlocale(LC_ALL, ""); + cap_rights_init(, CAP_FSTAT, CAP_IOCTL, CAP_READ); + if (cap_rights_limit(STDIN_FILENO, ) < 0 && errno != ENOSYS) + err(1, "unable to limit rights for stdin"); + cap_rights_init(, CAP_FSTAT, CAP_IOCTL, CAP_WRITE); + if (cap_rights_limit(STDOUT_FILENO, ) < 0 && errno != ENOSYS) + err(1, "unable to limit rights for stdout"); + if (cap_rights_limit(STDERR_FILENO, ) < 0 && errno != ENOSYS) + err(1, "unable to limit rights for stderr"); + + /* Required for isatty(3). */ + cmd = TIOCGETA; + if (cap_ioctls_limit(STDIN_FILENO, , 1) < 0 && errno != ENOSYS) + err(1, "unable to limit ioctls for stdin"); + if (cap_ioctls_limit(STDOUT_FILENO, , 1) < 0 && errno != ENOSYS) + err(1, "unable to limit ioctls for stdout"); + if (cap_ioctls_limit(STDERR_FILENO, , 1) < 0 && errno != ENOSYS) + err(1, "unable to limit ioctls for stderr"); + + if (cap_enter() < 0 && errno != ENOSYS) + err(1, "unable to enter capability mode"); + Cflag = cflag = dflag = sflag = 0; while ((ch = getopt(argc, argv, "Ccdsu")) != -1) switch((char)ch) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305981 - head/usr.bin/cmp
Author: cem Date: Mon Sep 19 16:13:00 2016 New Revision: 305981 URL: https://svnweb.freebsd.org/changeset/base/305981 Log: cmp(1): Capsicumify Reviewed by: allanjude, bapt, oshogbo Sponsored by: Dell EMC Isilon Differential Revision:https://reviews.freebsd.org/D7912 Modified: head/usr.bin/cmp/cmp.c Modified: head/usr.bin/cmp/cmp.c == --- head/usr.bin/cmp/cmp.c Mon Sep 19 16:07:32 2016(r305980) +++ head/usr.bin/cmp/cmp.c Mon Sep 19 16:13:00 2016(r305981) @@ -42,15 +42,18 @@ static char sccsid[] = "@(#)cmp.c 8.3 (B #include __FBSDID("$FreeBSD$"); +#include #include #include #include #include #include +#include #include #include #include +#include #include #include "extern.h" @@ -66,6 +69,9 @@ main(int argc, char *argv[]) off_t skip1, skip2; int ch, fd1, fd2, oflag, special; const char *file1, *file2; + cap_rights_t rights; + unsigned long cmd; + uint32_t fcntls; oflag = O_RDONLY; while ((ch = getopt(argc, argv, "hlsxz")) != -1) @@ -146,6 +152,37 @@ main(int argc, char *argv[]) exit(ERR_EXIT); } + cap_rights_init(, CAP_FCNTL, CAP_FSTAT, CAP_MMAP_R); + if (cap_rights_limit(fd1, ) < 0 && errno != ENOSYS) + err(ERR_EXIT, "unable to limit rights for %s", file1); + if (cap_rights_limit(fd2, ) < 0 && errno != ENOSYS) + err(ERR_EXIT, "unable to limit rights for %s", file2); + + /* Required for fdopen(3). */ + fcntls = CAP_FCNTL_GETFL; + if (cap_fcntls_limit(fd1, fcntls) < 0 && errno != ENOSYS) + err(ERR_EXIT, "unable to limit fcntls for %s", file1); + if (cap_fcntls_limit(fd2, fcntls) < 0 && errno != ENOSYS) + err(ERR_EXIT, "unable to limit fcntls for %s", file2); + + cap_rights_init(, CAP_FSTAT, CAP_WRITE, CAP_IOCTL); + if (cap_rights_limit(STDOUT_FILENO, ) < 0 && errno != ENOSYS) + err(ERR_EXIT, "unable to limit rights for stdout"); + + /* Required for printf(3) via isatty(3). */ + cmd = TIOCGETA; + if (cap_ioctls_limit(STDOUT_FILENO, , 1) < 0 && errno != ENOSYS) + err(ERR_EXIT, "unable to limit ioctls for stdout"); + + /* +* Cache NLS data, for strerror, for err(3), before entering capability +* mode. +*/ + (void)catopen("libc", NL_CAT_LOCALE); + + if (cap_enter() < 0 && errno != ENOSYS) + err(ERR_EXIT, "unable to enter capability mode"); + if (!special) { if (fstat(fd1, )) { if (!sflag) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305980 - head/usr.sbin/uefisign
Author: emaste Date: Mon Sep 19 16:07:32 2016 New Revision: 305980 URL: https://svnweb.freebsd.org/changeset/base/305980 Log: uefisign: Remove backwards-compatibility sys/capability.h support uefisign previously included sys/capability.h or sys/capsicum.h based on __FreeBSD_version in order to facilitate development on the stable branch. The Capsicum header is now installed as sys/capsicum.h in stable/10 and FreeBSD 10.3, so there's no need for the backwards compatibility support. Reviewed by: trasz Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/uefisign/child.c Modified: head/usr.sbin/uefisign/child.c == --- head/usr.sbin/uefisign/child.c Mon Sep 19 16:05:10 2016 (r305979) +++ head/usr.sbin/uefisign/child.c Mon Sep 19 16:07:32 2016 (r305980) @@ -32,11 +32,7 @@ __FBSDID("$FreeBSD$"); #include -#if __FreeBSD_version >= 110 #include -#else -#include -#endif #include #include #include ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305978 - in head/sys/x86: acpica include x86 xen
Author: kib Date: Mon Sep 19 15:58:45 2016 New Revision: 305978 URL: https://svnweb.freebsd.org/changeset/base/305978 Log: Detect x2APIC mode on boot and obey it. If BIOS performed hand-off to OS with BSP LAPIC in the x2APIC mode, system usually consumes such configuration without a notice, since x2APIC is turned on by OS if possible (nop). But if BIOS simultaneously requested OS to not use x2APIC, code assumption that that xAPIC is active breaks. In my opinion, we cannot safely turn off x2APIC if control is passed in this mode. Make madt.c ignore user or BIOS requests to turn x2APIC off, and do not check the x2APIC black list. Just trust the config and try to continue, giving a warning in dmesg. Reported and tested by: Slawa Olhovchenkov(previous version) Diagnosed by and discussed with: avg Sponsored by: The FreeBSD Foundation MFC after:2 weeks Modified: head/sys/x86/acpica/madt.c head/sys/x86/include/apicvar.h head/sys/x86/x86/local_apic.c head/sys/x86/xen/xen_apic.c Modified: head/sys/x86/acpica/madt.c == --- head/sys/x86/acpica/madt.c Mon Sep 19 15:58:33 2016(r305977) +++ head/sys/x86/acpica/madt.c Mon Sep 19 15:58:45 2016(r305978) @@ -135,10 +135,11 @@ madt_setup_local(void) const char *reason; char *hw_vendor; u_int p[4]; + int user_x2apic; + bool bios_x2apic; madt = pmap_mapbios(madt_physaddr, madt_length); if ((cpu_feature2 & CPUID2_X2APIC) != 0) { - x2apic_mode = 1; reason = NULL; /* @@ -150,21 +151,17 @@ madt_setup_local(void) if (dmartbl_physaddr != 0) { dmartbl = acpi_map_table(dmartbl_physaddr, ACPI_SIG_DMAR); - if ((dmartbl->Flags & ACPI_DMAR_X2APIC_OPT_OUT) != 0) { - x2apic_mode = 0; + if ((dmartbl->Flags & ACPI_DMAR_X2APIC_OPT_OUT) != 0) reason = "by DMAR table"; - } acpi_unmap_table(dmartbl); } if (vm_guest == VM_GUEST_VMWARE) { vmware_hvcall(VMW_HVCMD_GETVCPU_INFO, p); if ((p[0] & VMW_VCPUINFO_VCPU_RESERVED) != 0 || - (p[0] & VMW_VCPUINFO_LEGACY_X2APIC) == 0) { - x2apic_mode = 0; - reason = "inside VMWare without intr redirection"; - } + (p[0] & VMW_VCPUINFO_LEGACY_X2APIC) == 0) + reason = + "inside VMWare without intr redirection"; } else if (vm_guest == VM_GUEST_XEN) { - x2apic_mode = 0; reason = "due to running under XEN"; } else if (vm_guest == VM_GUEST_NO && CPUID_TO_FAMILY(cpu_id) == 0x6 && @@ -184,16 +181,33 @@ madt_setup_local(void) if (!strcmp(hw_vendor, "LENOVO") || !strcmp(hw_vendor, "ASUSTeK Computer Inc.")) { - x2apic_mode = 0; reason = "for a suspected SandyBridge BIOS bug"; } freeenv(hw_vendor); } } - TUNABLE_INT_FETCH("hw.x2apic_enable", _mode); - if (!x2apic_mode && reason != NULL && bootverbose) + bios_x2apic = lapic_is_x2apic(); + if (reason != NULL && bios_x2apic) { + if (bootverbose) + printf("x2APIC should be disabled %s but " + "already enabled by BIOS; enabling.\n", +reason); + reason = NULL; + } + if (reason == NULL) + x2apic_mode = 1; + else if (bootverbose) printf("x2APIC available but disabled %s\n", reason); + user_x2apic = x2apic_mode; + TUNABLE_INT_FETCH("hw.x2apic_enable", _x2apic); + if (user_x2apic != x2apic_mode) { + if (bios_x2apic && !user_x2apic) + printf("x2APIC disabled by tunable and " + "enabled by BIOS; ignoring tunable."); + else + x2apic_mode = user_x2apic; + } } lapic_init(madt->Address); Modified: head/sys/x86/include/apicvar.h
svn commit: r305977 - in head/sys/ufs: ffs ufs
Author: kib Date: Mon Sep 19 15:58:33 2016 New Revision: 305977 URL: https://svnweb.freebsd.org/changeset/base/305977 Log: Be more strict when selecting between snapshot/regular mount. Reclaimed vnode type is VBAD, so succesful comparision like devvp->v_type != VREG does not imply that the devvp references snapshot, it might be due to a reclaimed vnode. Explicitely check the vnode type. In the the most important case of ffs_blkfree(), the devfs vnode is locked and its type is stable. In other cases, if the vnode is reclaimed right after the check, hopefully the buffer methods return right error codes. Reviewed by: mckusick Sponsored by: The FreeBSD Foundation MFC after:2 weeks Modified: head/sys/ufs/ffs/ffs_alloc.c head/sys/ufs/ufs/ufs_gjournal.c Modified: head/sys/ufs/ffs/ffs_alloc.c == --- head/sys/ufs/ffs/ffs_alloc.cMon Sep 19 15:39:24 2016 (r305976) +++ head/sys/ufs/ffs/ffs_alloc.cMon Sep 19 15:58:33 2016 (r305977) @@ -2171,12 +2171,13 @@ ffs_blkfree_cg(ump, fs, devvp, bno, size MPASS(devvp->v_mount->mnt_data == ump); dev = ump->um_devvp->v_rdev; cgblkno = fragstoblks(fs, cgtod(fs, cg)); - } else { + } else if (devvp->v_type == VCHR) { /* devvp is a normal disk device */ dev = devvp->v_rdev; cgblkno = fsbtodb(fs, cgtod(fs, cg)); ASSERT_VOP_LOCKED(devvp, "ffs_blkfree_cg"); - } + } else + return; #ifdef INVARIANTS if ((u_int)size > fs->fs_bsize || fragoff(fs, size) != 0 || fragnum(fs, bno) + numfrags(fs, size) > fs->fs_frag) { @@ -2270,7 +2271,7 @@ ffs_blkfree_cg(ump, fs, devvp, bno, size ACTIVECLEAR(fs, cg); UFS_UNLOCK(ump); mp = UFSTOVFS(ump); - if (MOUNTEDSOFTDEP(mp) && devvp->v_type != VREG) + if (MOUNTEDSOFTDEP(mp) && devvp->v_type == VCHR) softdep_setup_blkfree(UFSTOVFS(ump), bp, bno, numfrags(fs, size), dephd); bdwrite(bp); @@ -2335,7 +2336,7 @@ ffs_blkfree(ump, fs, devvp, bno, size, i * it has a snapshot(s) associated with it, and one of the * snapshots wants to claim the block. */ - if (devvp->v_type != VREG && + if (devvp->v_type == VCHR && (devvp->v_vflag & VV_COPYONWRITE) && ffs_snapblkfree(fs, devvp, bno, size, inum, vtype, dephd)) { return; @@ -2480,10 +2481,13 @@ ffs_freefile(ump, fs, devvp, ino, mode, MPASS(devvp->v_mount->mnt_data == ump); dev = ump->um_devvp->v_rdev; cgbno = fragstoblks(fs, cgtod(fs, cg)); - } else { + } else if (devvp->v_type == VCHR) { /* devvp is a normal disk device */ dev = devvp->v_rdev; cgbno = fsbtodb(fs, cgtod(fs, cg)); + } else { + bp = NULL; + return (0); } if (ino >= fs->fs_ipg * fs->fs_ncg) panic("ffs_freefile: range: dev = %s, ino = %ju, fs = %s", @@ -2522,7 +2526,7 @@ ffs_freefile(ump, fs, devvp, ino, mode, fs->fs_fmod = 1; ACTIVECLEAR(fs, cg); UFS_UNLOCK(ump); - if (MOUNTEDSOFTDEP(UFSTOVFS(ump)) && devvp->v_type != VREG) + if (MOUNTEDSOFTDEP(UFSTOVFS(ump)) && devvp->v_type == VCHR) softdep_setup_inofree(UFSTOVFS(ump), bp, ino + cg * fs->fs_ipg, wkhd); bdwrite(bp); @@ -2549,9 +2553,11 @@ ffs_checkfreefile(fs, devvp, ino) if (devvp->v_type == VREG) { /* devvp is a snapshot */ cgbno = fragstoblks(fs, cgtod(fs, cg)); - } else { + } else if (devvp->v_type == VCHR) { /* devvp is a normal disk device */ cgbno = fsbtodb(fs, cgtod(fs, cg)); + } else { + return (1); } if (ino >= fs->fs_ipg * fs->fs_ncg) return (1); Modified: head/sys/ufs/ufs/ufs_gjournal.c == --- head/sys/ufs/ufs/ufs_gjournal.c Mon Sep 19 15:39:24 2016 (r305976) +++ head/sys/ufs/ufs/ufs_gjournal.c Mon Sep 19 15:58:33 2016 (r305977) @@ -71,14 +71,17 @@ ufs_gjournal_modref(struct vnode *vp, in ino = ip->i_number; cg = ino_to_cg(fs, ino); - if (devvp->v_type != VCHR) { + if (devvp->v_type == VREG) { /* devvp is a snapshot */ dev = VFSTOUFS(devvp->v_mount)->um_devvp->v_rdev; cgbno = fragstoblks(fs, cgtod(fs, cg)); - } else { + } else if (devvp->v_type == VCHR) { /* devvp is a normal disk device */ dev = devvp->v_rdev; cgbno = fsbtodb(fs, cgtod(fs, cg)); + } else { + bp = NULL; +
svn commit: r305974 - head/lib/libc/aarch64/string
Author: andrew Date: Mon Sep 19 15:08:03 2016 New Revision: 305974 URL: https://svnweb.freebsd.org/changeset/base/305974 Log: Attach the cortex strings library to the build. Only a subset of functions have been added as some don't seem to be improvements over the libc C implementation. Obtained from:ABT Systems Ltd Sponsored by: The FreeBSD Foundation Added: head/lib/libc/aarch64/string/ head/lib/libc/aarch64/string/Makefile.inc (contents, props changed) Added: head/lib/libc/aarch64/string/Makefile.inc == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/aarch64/string/Makefile.inc Mon Sep 19 15:08:03 2016 (r305974) @@ -0,0 +1,19 @@ +# $FreeBSD$ +# +# String handling from the Cortex Strings library +# https://git.linaro.org/toolchain/cortex-strings.git +# + +.PATH: ${LIBC_SRCTOP}/../../contrib/cortex-strings/src/aarch64 + +MDSRCS+=memchr.S \ + memcmp.S \ + memcpy.S \ + memmove.S \ + memset.S \ + strchr.S \ + strcmp.S \ + strcpy.S \ + strlen.S \ + strncmp.S \ + strnlen.S ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305973 - head/contrib/cortex-strings/src/aarch64
Author: andrew Date: Mon Sep 19 14:36:16 2016 New Revision: 305973 URL: https://svnweb.freebsd.org/changeset/base/305973 Log: Fix the asm on the memchr and strchr functions. Add an alias from index to strchr as is done in the libc C implementation. Obtained from:ABT Systems Ltd Sponsored by: The FreeBSD Foundation Modified: head/contrib/cortex-strings/src/aarch64/memchr.S head/contrib/cortex-strings/src/aarch64/strchr.S head/contrib/cortex-strings/src/aarch64/strchrnul.S Modified: head/contrib/cortex-strings/src/aarch64/memchr.S == --- head/contrib/cortex-strings/src/aarch64/memchr.SMon Sep 19 13:12:09 2016(r305972) +++ head/contrib/cortex-strings/src/aarch64/memchr.SMon Sep 19 14:36:16 2016(r305973) @@ -107,7 +107,7 @@ def_fn memchr and vhas_chr2.16b, vhas_chr2.16b, vrepmask.16b addpvend.16b, vhas_chr1.16b, vhas_chr2.16b /* 256->128 */ addpvend.16b, vend.16b, vend.16b/* 128->64 */ - mov synd, vend.2d[0] + mov synd, vend.d[0] /* Clear the soff*2 lower bits */ lsl tmp, soff, #1 lsr synd, synd, tmp @@ -127,7 +127,7 @@ def_fn memchr /* Use a fast check for the termination condition */ orr vend.16b, vhas_chr1.16b, vhas_chr2.16b addpvend.2d, vend.2d, vend.2d - mov synd, vend.2d[0] + mov synd, vend.d[0] /* We're not out of data, loop if we haven't found the character */ cbz synd, .Lloop @@ -137,7 +137,7 @@ def_fn memchr and vhas_chr2.16b, vhas_chr2.16b, vrepmask.16b addpvend.16b, vhas_chr1.16b, vhas_chr2.16b /* 256->128 */ addpvend.16b, vend.16b, vend.16b/* 128->64 */ - mov synd, vend.2d[0] + mov synd, vend.d[0] /* Only do the clear for the last possible block */ b.hi.Ltail Modified: head/contrib/cortex-strings/src/aarch64/strchr.S == --- head/contrib/cortex-strings/src/aarch64/strchr.SMon Sep 19 13:12:09 2016(r305972) +++ head/contrib/cortex-strings/src/aarch64/strchr.SMon Sep 19 14:36:16 2016(r305973) @@ -78,7 +78,13 @@ \f: .endm + .macro def_alias f a + .weak \a + .set \a,\f + .endm + def_fn strchr +def_alias strchr index /* Magic constant 0x40100401 to allow us to identify which lane matches the requested byte. Magic constant 0x80200802 used similarly for NUL termination. */ @@ -113,7 +119,7 @@ def_fn strchr addpvend1.16b, vend1.16b, vend2.16b // 128->64 lsr tmp1, tmp3, tmp1 - mov tmp3, vend1.2d[0] + mov tmp3, vend1.d[0] bic tmp1, tmp3, tmp1// Mask padding bits. cbnztmp1, .Ltail @@ -128,7 +134,7 @@ def_fn strchr orr vend2.16b, vhas_nul2.16b, vhas_chr2.16b orr vend1.16b, vend1.16b, vend2.16b addpvend1.2d, vend1.2d, vend1.2d - mov tmp1, vend1.2d[0] + mov tmp1, vend1.d[0] cbz tmp1, .Lloop /* Termination condition found. Now need to establish exactly why @@ -142,7 +148,7 @@ def_fn strchr addpvend1.16b, vend1.16b, vend2.16b // 256->128 addpvend1.16b, vend1.16b, vend2.16b // 128->64 - mov tmp1, vend1.2d[0] + mov tmp1, vend1.d[0] .Ltail: /* Count the trailing zeros, by bit reversing... */ rbittmp1, tmp1 Modified: head/contrib/cortex-strings/src/aarch64/strchrnul.S == --- head/contrib/cortex-strings/src/aarch64/strchrnul.S Mon Sep 19 13:12:09 2016(r305972) +++ head/contrib/cortex-strings/src/aarch64/strchrnul.S Mon Sep 19 14:36:16 2016(r305973) @@ -105,7 +105,7 @@ def_fn strchrnul addpvend1.16b, vend1.16b, vend1.16b // 128->64 lsr tmp1, tmp3, tmp1 - mov tmp3, vend1.2d[0] + mov tmp3, vend1.d[0] bic tmp1, tmp3, tmp1// Mask padding bits. cbnztmp1, .Ltail @@ -120,7 +120,7 @@ def_fn strchrnul orr vhas_chr2.16b, vhas_nul2.16b, vhas_chr2.16b orr vend1.16b, vhas_chr1.16b, vhas_chr2.16b addpvend1.2d, vend1.2d, vend1.2d - mov tmp1, vend1.2d[0] + mov tmp1, vend1.d[0] cbz tmp1, .Lloop /* Termination condition found. Now need to establish exactly why @@ -130,7 +130,7 @@ def_fn strchrnul addpvend1.16b, vhas_chr1.16b, vhas_chr2.16b // 256->128 addpvend1.16b, vend1.16b, vend1.16b // 128->64 - mov tmp1, vend1.2d[0] + mov tmp1, vend1.d[0] .Ltail: /* Count the trailing
svn commit: r305972 - in head/contrib/cortex-strings: . reference tests
Author: andrew Date: Mon Sep 19 13:12:09 2016 New Revision: 305972 URL: https://svnweb.freebsd.org/changeset/base/305972 Log: Import the Linaro Cortex Strings library into contrib. Sponsored by: The FreeBSD Foundation Added: head/contrib/cortex-strings/ - copied from r305970, vendor/cortex-strings/dist/ Deleted: head/contrib/cortex-strings/reference/ head/contrib/cortex-strings/tests/ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305970 - head/tests/sys
Author: ngie Date: Mon Sep 19 09:15:12 2016 New Revision: 305970 URL: https://svnweb.freebsd.org/changeset/base/305970 Log: Remove change accidentally committed via r305963 for upcoming tests/sys/fs/... work MFC after:3 days Sponsored by: Dell EMC Isilon Modified: head/tests/sys/Makefile Modified: head/tests/sys/Makefile == --- head/tests/sys/Makefile Mon Sep 19 08:55:36 2016(r305969) +++ head/tests/sys/Makefile Mon Sep 19 09:15:12 2016(r305970) @@ -6,7 +6,6 @@ TESTS_SUBDIRS+= acl TESTS_SUBDIRS+=aio TESTS_SUBDIRS+=fifo TESTS_SUBDIRS+=file -TESTS_SUBDIRS+=fs TESTS_SUBDIRS+=geom TESTS_SUBDIRS+=kern TESTS_SUBDIRS+=kqueue ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305969 - head/etc/autofs
Author: trasz Date: Mon Sep 19 08:55:36 2016 New Revision: 305969 URL: https://svnweb.freebsd.org/changeset/base/305969 Log: Make autofs use the "noatime" flag for msdosfs, ntfs, and ufs filesystems mounted on /media. MFC after:1 month Modified: head/etc/autofs/special_media Modified: head/etc/autofs/special_media == --- head/etc/autofs/special_media Mon Sep 19 08:51:27 2016 (r305968) +++ head/etc/autofs/special_media Mon Sep 19 08:55:36 2016 (r305969) @@ -40,14 +40,14 @@ print_map_entry() { if [ "${_fstype}" = "ntfs" ]; then if [ -f "/usr/local/bin/ntfs-3g" ]; then - echo "-mountprog=/usr/local/bin/ntfs-3g,fstype=${_fstype},nosuid:/dev/${_p}" + echo "-mountprog=/usr/local/bin/ntfs-3g,fstype=${_fstype},nosuid,noatime :/dev/${_p}" else /usr/bin/logger -p info -t "special_media[$$]" \ "Cannot mount ${_fstype} formatted device /dev/${_p}: Install sysutils/fusefs-ntfs first" exit 1 fi elif [ "${_fstype}" = "msdosfs" -o "${_fstype}" = "ufs" ]; then - echo "-fstype=${_fstype},nosuid,async :/dev/${_p}" + echo "-fstype=${_fstype},nosuid,noatime,async :/dev/${_p}" else echo "-fstype=${_fstype},nosuid :/dev/${_p}" fi ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305968 - head/etc/autofs
Author: trasz Date: Mon Sep 19 08:51:27 2016 New Revision: 305968 URL: https://svnweb.freebsd.org/changeset/base/305968 Log: Make autofs use the "async" flag for msdosfs and ufs filesystems mounted on /media. MFC after:1 month Modified: head/etc/autofs/special_media Modified: head/etc/autofs/special_media == --- head/etc/autofs/special_media Mon Sep 19 07:47:56 2016 (r305967) +++ head/etc/autofs/special_media Mon Sep 19 08:51:27 2016 (r305968) @@ -46,6 +46,8 @@ print_map_entry() { "Cannot mount ${_fstype} formatted device /dev/${_p}: Install sysutils/fusefs-ntfs first" exit 1 fi + elif [ "${_fstype}" = "msdosfs" -o "${_fstype}" = "ufs" ]; then + echo "-fstype=${_fstype},nosuid,async :/dev/${_p}" else echo "-fstype=${_fstype},nosuid :/dev/${_p}" fi ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305967 - head/sys/dev/hyperv/netvsc
Author: sephe Date: Mon Sep 19 07:47:56 2016 New Revision: 305967 URL: https://svnweb.freebsd.org/changeset/base/305967 Log: hyperv/hn: Allow RSS capability flipping upon attach/reinit. MFC after:1 week Sponsored by: Microsoft Differential Revision:https://reviews.freebsd.org/D7927 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h == --- head/sys/dev/hyperv/netvsc/hv_net_vsc.h Mon Sep 19 07:39:42 2016 (r305966) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.h Mon Sep 19 07:47:56 2016 (r305967) @@ -245,6 +245,8 @@ struct hn_softc { #define HN_FLAG_RXBUF_CONNECTED0x0001 #define HN_FLAG_CHIM_CONNECTED 0x0002 +#define HN_FLAG_HAS_RSSKEY 0x0004 +#define HN_FLAG_HAS_RSSIND 0x0008 #define HN_CAP_VLAN0x0001 #define HN_CAP_MTU 0x0002 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c == --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Mon Sep 19 07:39:42 2016(r305966) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Mon Sep 19 07:47:56 2016(r305967) @@ -2146,6 +2146,7 @@ hn_rss_key_sysctl(SYSCTL_HANDLER_ARGS) error = SYSCTL_IN(req, sc->hn_rss.rss_key, sizeof(sc->hn_rss.rss_key)); if (error) goto back; + sc->hn_flags |= HN_FLAG_HAS_RSSKEY; if (sc->hn_rx_ring_inuse > 1) { error = hn_rss_reconfig(sc); @@ -2182,6 +2183,7 @@ hn_rss_ind_sysctl(SYSCTL_HANDLER_ARGS) error = SYSCTL_IN(req, sc->hn_rss.rss_ind, sizeof(sc->hn_rss.rss_ind)); if (error) goto back; + sc->hn_flags |= HN_FLAG_HAS_RSSIND; hn_rss_ind_fixup(sc, sc->hn_rx_ring_inuse); error = hn_rss_reconfig(sc); @@ -3335,24 +3337,29 @@ hn_synth_attach(struct hn_softc *sc, int * are allocated. */ - if (!device_is_attached(sc->hn_dev)) { + if ((sc->hn_flags & HN_FLAG_HAS_RSSKEY) == 0) { /* -* Setup default RSS key and indirect table for the -* attach DEVMETHOD. They can be altered later on, -* so don't mess them up once this interface is attached. +* RSS key is not set yet; set it to the default RSS key. */ - if (bootverbose) { - if_printf(sc->hn_ifp, "setup default RSS key and " - "indirect table\n"); - } - - /* Setup default RSS key. */ + if (bootverbose) + if_printf(sc->hn_ifp, "setup default RSS key\n"); memcpy(rss->rss_key, hn_rss_key_default, sizeof(rss->rss_key)); + sc->hn_flags |= HN_FLAG_HAS_RSSKEY; + } - /* Setup default RSS indirect table. */ + if ((sc->hn_flags & HN_FLAG_HAS_RSSIND) == 0) { + /* +* RSS indirect table is not set yet; set it up in round- +* robin fashion. +*/ + if (bootverbose) { + if_printf(sc->hn_ifp, "setup default RSS indirect " + "table\n"); + } /* TODO: Take ndis_rss_caps.ndis_nind into account. */ for (i = 0; i < NDIS_HASH_INDCNT; ++i) rss->rss_ind[i] = i % nchan; + sc->hn_flags |= HN_FLAG_HAS_RSSIND; } else { /* * # of usable channels may be changed, so we have to ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305966 - head/sys/dev/hyperv/netvsc
Author: sephe Date: Mon Sep 19 07:39:42 2016 New Revision: 305966 URL: https://svnweb.freebsd.org/changeset/base/305966 Log: hyperv/hn: Stringent RSS sysctl checks - Don't change RNDIS RSS configuration for RSS key sysctl, if the interface is not capable of RSS yet. - Don't change RSS indirect table (both cached one and RNDIS RSS configuration), if the interface is not capable of RSS yet. MFC after:1 week Sponsored by: Microsoft Differential Revision:https://reviews.freebsd.org/D7924 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c == --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Mon Sep 19 07:32:08 2016(r305965) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Mon Sep 19 07:39:42 2016(r305966) @@ -435,6 +435,8 @@ hn_rss_ind_fixup(struct hn_softc *sc, in struct ndis_rssprm_toeplitz *rss = >hn_rss; int i; + KASSERT(nchan > 1, ("invalid # of channels %d", nchan)); + /* * Check indirect table to make sure that all channels in it * can be used. @@ -2145,7 +2147,12 @@ hn_rss_key_sysctl(SYSCTL_HANDLER_ARGS) if (error) goto back; - error = hn_rss_reconfig(sc); + if (sc->hn_rx_ring_inuse > 1) { + error = hn_rss_reconfig(sc); + } else { + /* Not RSS capable, at least for now; just save the RSS key. */ + error = 0; + } back: HN_UNLOCK(sc); return (error); @@ -2163,6 +2170,15 @@ hn_rss_ind_sysctl(SYSCTL_HANDLER_ARGS) if (error || req->newptr == NULL) goto back; + /* +* Don't allow RSS indirect table change, if this interface is not +* RSS capable currently. +*/ + if (sc->hn_rx_ring_inuse == 1) { + error = EOPNOTSUPP; + goto back; + } + error = SYSCTL_IN(req, sc->hn_rss.rss_ind, sizeof(sc->hn_rss.rss_ind)); if (error) goto back; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305965 - head/sys/dev/hyperv/netvsc
Author: sephe Date: Mon Sep 19 07:32:08 2016 New Revision: 305965 URL: https://svnweb.freebsd.org/changeset/base/305965 Log: hyperv/hn: Don't allow MTU change, if it is not supported by the NVS. MFC after:1 week Sponsored by: Microsoft Differential Revision:https://reviews.freebsd.org/D7923 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c == --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Mon Sep 19 07:17:43 2016(r305964) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Mon Sep 19 07:32:08 2016(r305965) @@ -1572,6 +1572,13 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, HN_LOCK(sc); + if ((sc->hn_caps & HN_CAP_MTU) == 0) { + /* Can't change MTU */ + HN_UNLOCK(sc); + error = EOPNOTSUPP; + break; + } + if (ifp->if_mtu == ifr->ifr_mtu) { HN_UNLOCK(sc); break; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305964 - head/sys/dev/hyperv/netvsc
Author: sephe Date: Mon Sep 19 07:17:43 2016 New Revision: 305964 URL: https://svnweb.freebsd.org/changeset/base/305964 Log: hyperv/hn: Save capabilities for later use. And don't allow capability changes during reinitialization, which breaks too much static configuration. MFC after:1 week Sponsored by: Microsoft Differential Revision:https://reviews.freebsd.org/D7922 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c head/sys/dev/hyperv/netvsc/hv_net_vsc.h head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c == --- head/sys/dev/hyperv/netvsc/hv_net_vsc.c Mon Sep 19 07:07:55 2016 (r305963) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.c Mon Sep 19 07:17:43 2016 (r305964) @@ -467,9 +467,15 @@ hn_nvs_conf_ndis(struct hn_softc *sc, in /* NOTE: No response. */ error = hn_nvs_req_send(sc, , sizeof(conf)); - if (error) + if (error) { if_printf(sc->hn_ifp, "send nvs ndis conf failed: %d\n", error); - return (error); + return (error); + } + + if (bootverbose) + if_printf(sc->hn_ifp, "nvs ndis conf done\n"); + sc->hn_caps |= HN_CAP_MTU | HN_CAP_VLAN; + return (0); } static int Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h == --- head/sys/dev/hyperv/netvsc/hv_net_vsc.h Mon Sep 19 07:07:55 2016 (r305963) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.h Mon Sep 19 07:17:43 2016 (r305964) @@ -228,7 +228,8 @@ struct hn_softc { struct vmbus_xact_ctx *hn_xact; uint32_thn_nvs_ver; - uint32_thn_flags; + uint32_thn_caps;/* HN_CAP_ */ + uint32_thn_flags; /* HN_FLAG_ */ void*hn_rxbuf; uint32_thn_rxbuf_gpadl; struct hyperv_dma hn_rxbuf_dma; @@ -245,6 +246,16 @@ struct hn_softc { #define HN_FLAG_RXBUF_CONNECTED0x0001 #define HN_FLAG_CHIM_CONNECTED 0x0002 +#define HN_CAP_VLAN0x0001 +#define HN_CAP_MTU 0x0002 +#define HN_CAP_IPCS0x0004 +#define HN_CAP_TCP4CS 0x0008 +#define HN_CAP_TCP6CS 0x0010 +#define HN_CAP_UDP4CS 0x0020 +#define HN_CAP_UDP6CS 0x0040 +#define HN_CAP_TSO40x0080 +#define HN_CAP_TSO60x0100 + /* * Externs */ Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c == --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Mon Sep 19 07:07:55 2016(r305963) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Mon Sep 19 07:17:43 2016(r305964) @@ -325,6 +325,7 @@ static int hn_rx_stat_ulong_sysctl(SYSCT static int hn_tx_stat_ulong_sysctl(SYSCTL_HANDLER_ARGS); static int hn_tx_conf_int_sysctl(SYSCTL_HANDLER_ARGS); static int hn_ndis_version_sysctl(SYSCTL_HANDLER_ARGS); +static int hn_caps_sysctl(SYSCTL_HANDLER_ARGS); static int hn_rss_key_sysctl(SYSCTL_HANDLER_ARGS); static int hn_rss_ind_sysctl(SYSCTL_HANDLER_ARGS); static int hn_check_iplen(const struct mbuf *, int); @@ -641,6 +642,9 @@ netvsc_attach(device_t dev) SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "ndis_version", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, hn_ndis_version_sysctl, "A", "NDIS version"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "caps", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, + hn_caps_sysctl, "A", "capabilities"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "rss_key", CTLTYPE_OPAQUE | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, 0, hn_rss_key_sysctl, "IU", "RSS key"); @@ -2095,6 +2099,30 @@ hn_ndis_version_sysctl(SYSCTL_HANDLER_AR } static int +hn_caps_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct hn_softc *sc = arg1; + char caps_str[128]; + uint32_t caps; + + HN_LOCK(sc); + caps = sc->hn_caps; + HN_UNLOCK(sc); + snprintf(caps_str, sizeof(caps_str), "%b", caps, + "\020" + "\001VLAN" + "\002MTU" + "\003IPCS" + "\004TCP4CS" + "\005TCP6CS" + "\006UDP4CS" + "\007UDP6CS" + "\010TSO4" + "\011TSO6"); + return sysctl_handle_string(oidp, caps_str, sizeof(caps_str), req); +} + +static int hn_rss_key_sysctl(SYSCTL_HANDLER_ARGS) { struct hn_softc *sc = arg1; @@ -3223,6 +3251,11 @@ hn_synth_attach(struct hn_softc *sc, int { struct ndis_rssprm_toeplitz *rss = >hn_rss; int error, nsubch, nchan, i; +
svn commit: r305963 - head/tests/sys
Author: ngie Date: Mon Sep 19 07:07:55 2016 New Revision: 305963 URL: https://svnweb.freebsd.org/changeset/base/305963 Log: Reindent TESTSDIR definition for consistency/readability MFC after:3 days Sponsored by: Dell EMC Isilon Modified: head/tests/sys/Makefile Modified: head/tests/sys/Makefile == --- head/tests/sys/Makefile Mon Sep 19 07:07:23 2016(r305962) +++ head/tests/sys/Makefile Mon Sep 19 07:07:55 2016(r305963) @@ -1,11 +1,12 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/sys +TESTSDIR= ${TESTSBASE}/sys TESTS_SUBDIRS+=acl TESTS_SUBDIRS+=aio TESTS_SUBDIRS+=fifo TESTS_SUBDIRS+=file +TESTS_SUBDIRS+=fs TESTS_SUBDIRS+=geom TESTS_SUBDIRS+=kern TESTS_SUBDIRS+=kqueue ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305962 - head/sys/dev/hyperv/netvsc
Author: sephe Date: Mon Sep 19 07:07:23 2016 New Revision: 305962 URL: https://svnweb.freebsd.org/changeset/base/305962 Log: hyperv/hn: Don't allow NVS and NDIS version change upon reinitailization NVS and NDIS version change would break too much assumption and static configuration. MFC after:1 week Sponsored by: Microsoft Differential Revision:https://reviews.freebsd.org/D7919 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c == --- head/sys/dev/hyperv/netvsc/hv_net_vsc.c Mon Sep 19 06:59:17 2016 (r305961) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.c Mon Sep 19 07:07:23 2016 (r305962) @@ -495,6 +495,22 @@ hn_nvs_init(struct hn_softc *sc) { int i; + if (device_is_attached(sc->hn_dev)) { + /* +* NVS version and NDIS version MUST NOT be changed. +*/ + if (bootverbose) { + if_printf(sc->hn_ifp, "reinit NVS version 0x%x, " + "NDIS version %u.%u\n", sc->hn_nvs_ver, + HN_NDIS_VERSION_MAJOR(sc->hn_ndis_ver), + HN_NDIS_VERSION_MINOR(sc->hn_ndis_ver)); + } + return (hn_nvs_doinit(sc, sc->hn_nvs_ver)); + } + + /* +* Find the supported NVS version and set NDIS version accordingly. +*/ for (i = 0; i < nitems(hn_nvs_version); ++i) { int error; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r305949 - head/usr.bin/soelim
On Sun, Sep 18, 2016 at 11:52 PM, Warner Loshwrote: > On Sun, Sep 18, 2016 at 11:44 PM, Warner Losh wrote: >> On Sun, Sep 18, 2016 at 6:24 PM, Allan Jude wrote: >>> On 2016-09-18 15:16, Baptiste Daroussin wrote: Author: bapt Date: Sun Sep 18 19:16:48 2016 New Revision: 305949 URL: https://svnweb.freebsd.org/changeset/base/305949 Log: Simplify the fix for bootstrap tools building head is not supported from prior to stable/10 where sys/capsicum.h was named sys/capabilities.h >> >> There's still a lot of people building head on 9.x systems. You sure >> this is a good idea? > > MINIMUM_SUPPORTED_OSREL?= 900044 > > is the currently listed minimum version. Last time I tried it, it worked. So in case it wasn't clear, I'd like to request a backout of the elimination of the #ifdef, or at least permission to add them back when I can show that 9.x systems still can build HEAD. Unlike clang requiring c++11 to build, this is a trivial thing to maintain compatibility. Warner ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r305949 - head/usr.bin/soelim
On Sun, Sep 18, 2016 at 11:44 PM, Warner Loshwrote: > On Sun, Sep 18, 2016 at 6:24 PM, Allan Jude wrote: >> On 2016-09-18 15:16, Baptiste Daroussin wrote: >>> Author: bapt >>> Date: Sun Sep 18 19:16:48 2016 >>> New Revision: 305949 >>> URL: https://svnweb.freebsd.org/changeset/base/305949 >>> >>> Log: >>> Simplify the fix for bootstrap tools >>> >>> building head is not supported from prior to stable/10 where >>> sys/capsicum.h was >>> named sys/capabilities.h > > There's still a lot of people building head on 9.x systems. You sure > this is a good idea? MINIMUM_SUPPORTED_OSREL?= 900044 is the currently listed minimum version. Last time I tried it, it worked. Warner ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305961 - in head/lib/libc/tests: net/getaddrinfo sys
Author: ngie Date: Mon Sep 19 06:59:17 2016 New Revision: 305961 URL: https://svnweb.freebsd.org/changeset/base/305961 Log: Re-add PACKAGE=> tests to lib/libc/tests/net/getaddrinfo/Makefile and add it to lib/libc/tests/sys/Makefile [*] Even though make -VPACKAGE and make -n install seem to do the right thing, the effects are a bit different, depending on the build host. MFC after:1 week Obtained from:HardenedBSD (af602f0db) [*] Reported by: Oliver Pinter[*] Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/net/getaddrinfo/Makefile head/lib/libc/tests/sys/Makefile Modified: head/lib/libc/tests/net/getaddrinfo/Makefile == --- head/lib/libc/tests/net/getaddrinfo/MakefileMon Sep 19 06:46:22 2016(r305960) +++ head/lib/libc/tests/net/getaddrinfo/MakefileMon Sep 19 06:59:17 2016(r305961) @@ -1,5 +1,7 @@ # $FreeBSD$ +PACKAGE= tests + TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libc/net/${.CURDIR:T} .include Modified: head/lib/libc/tests/sys/Makefile == --- head/lib/libc/tests/sys/MakefileMon Sep 19 06:46:22 2016 (r305960) +++ head/lib/libc/tests/sys/MakefileMon Sep 19 06:59:17 2016 (r305961) @@ -1,5 +1,7 @@ # $FreeBSD$ +PACKAGE= tests + .include ATF_TESTS_C+= queue_test ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305960 - head/sys/dev/hyperv/netvsc
Author: sephe Date: Mon Sep 19 06:46:22 2016 New Revision: 305960 URL: https://svnweb.freebsd.org/changeset/base/305960 Log: hyperv/hn: Apply RSS indirect table fixup before configure RNDIS RSS. MFC after:1 week Sponsored by: Microsoft Differential Revision:https://reviews.freebsd.org/D7916 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c == --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Mon Sep 19 06:39:11 2016(r305959) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Mon Sep 19 06:46:22 2016(r305960) @@ -428,6 +428,26 @@ hn_rss_reconfig(struct hn_softc *sc) return (0); } +static void +hn_rss_ind_fixup(struct hn_softc *sc, int nchan) +{ + struct ndis_rssprm_toeplitz *rss = >hn_rss; + int i; + + /* +* Check indirect table to make sure that all channels in it +* can be used. +*/ + for (i = 0; i < NDIS_HASH_INDCNT; ++i) { + if (rss->rss_ind[i] >= nchan) { + if_printf(sc->hn_ifp, + "RSS indirect table %d fixup: %u -> %d\n", + i, rss->rss_ind[i], nchan - 1); + rss->rss_ind[i] = nchan - 1; + } + } +} + static int hn_ifmedia_upd(struct ifnet *ifp __unused) { @@ -2112,6 +2132,7 @@ hn_rss_ind_sysctl(SYSCTL_HANDLER_ARGS) if (error) goto back; + hn_rss_ind_fixup(sc, sc->hn_rx_ring_inuse); error = hn_rss_reconfig(sc); back: HN_UNLOCK(sc); @@ -3265,6 +3286,13 @@ hn_synth_attach(struct hn_softc *sc, int /* TODO: Take ndis_rss_caps.ndis_nind into account. */ for (i = 0; i < NDIS_HASH_INDCNT; ++i) rss->rss_ind[i] = i % nchan; + } else { + /* +* # of usable channels may be changed, so we have to +* make sure that all entries in RSS indirect table +* are valid. +*/ + hn_rss_ind_fixup(sc, nchan); } error = hn_rndis_conf_rss(sc, NDIS_RSS_FLAG_NONE); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r305949 - head/usr.bin/soelim
On Mon, Sep 19, 2016 at 12:41 AM, Baptiste Daroussinwrote: > On Mon, Sep 19, 2016 at 12:04:16AM -0600, Warner Losh wrote: >> On Sun, Sep 18, 2016 at 11:52 PM, Warner Losh wrote: >> > On Sun, Sep 18, 2016 at 11:44 PM, Warner Losh wrote: >> >> On Sun, Sep 18, 2016 at 6:24 PM, Allan Jude wrote: >> >>> On 2016-09-18 15:16, Baptiste Daroussin wrote: >> Author: bapt >> Date: Sun Sep 18 19:16:48 2016 >> New Revision: 305949 >> URL: https://svnweb.freebsd.org/changeset/base/305949 >> >> Log: >> Simplify the fix for bootstrap tools >> >> building head is not supported from prior to stable/10 where >> sys/capsicum.h was >> named sys/capabilities.h >> >> >> >> There's still a lot of people building head on 9.x systems. You sure >> >> this is a good idea? >> > >> > MINIMUM_SUPPORTED_OSREL?= 900044 >> > >> > is the currently listed minimum version. Last time I tried it, it worked. >> >> So in case it wasn't clear, I'd like to request a backout of the >> elimination of the #ifdef, or at least permission to add them back >> when I can show that 9.x systems still can build HEAD. Unlike clang >> requiring c++11 to build, this is a trivial thing to maintain >> compatibility. >> > > Agree, I had also other reasons to back out the entire capsicum support. I > will > bring it back later (and make sure it can build on FreeBSD 9 Thanks! I'll be happy to help test or code review if you'd like. Warner ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r305949 - head/usr.bin/soelim
On Mon, Sep 19, 2016 at 12:04:16AM -0600, Warner Losh wrote: > On Sun, Sep 18, 2016 at 11:52 PM, Warner Loshwrote: > > On Sun, Sep 18, 2016 at 11:44 PM, Warner Losh wrote: > >> On Sun, Sep 18, 2016 at 6:24 PM, Allan Jude wrote: > >>> On 2016-09-18 15:16, Baptiste Daroussin wrote: > Author: bapt > Date: Sun Sep 18 19:16:48 2016 > New Revision: 305949 > URL: https://svnweb.freebsd.org/changeset/base/305949 > > Log: > Simplify the fix for bootstrap tools > > building head is not supported from prior to stable/10 where > sys/capsicum.h was > named sys/capabilities.h > >> > >> There's still a lot of people building head on 9.x systems. You sure > >> this is a good idea? > > > > MINIMUM_SUPPORTED_OSREL?= 900044 > > > > is the currently listed minimum version. Last time I tried it, it worked. > > So in case it wasn't clear, I'd like to request a backout of the > elimination of the #ifdef, or at least permission to add them back > when I can show that 9.x systems still can build HEAD. Unlike clang > requiring c++11 to build, this is a trivial thing to maintain > compatibility. > Agree, I had also other reasons to back out the entire capsicum support. I will bring it back later (and make sure it can build on FreeBSD 9 Best regards, Bapt signature.asc Description: PGP signature
Re: svn commit: r305949 - head/usr.bin/soelim
On Sun, Sep 18, 2016 at 6:24 PM, Allan Judewrote: > On 2016-09-18 15:16, Baptiste Daroussin wrote: >> Author: bapt >> Date: Sun Sep 18 19:16:48 2016 >> New Revision: 305949 >> URL: https://svnweb.freebsd.org/changeset/base/305949 >> >> Log: >> Simplify the fix for bootstrap tools >> >> building head is not supported from prior to stable/10 where >> sys/capsicum.h was >> named sys/capabilities.h There's still a lot of people building head on 9.x systems. You sure this is a good idea? And why does soelim need capsicum anyway in its role as a bootstrap tool? Warner ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305958 - head/contrib/netbsd-tests/usr.bin/dirname
Author: ngie Date: Mon Sep 19 06:39:08 2016 New Revision: 305958 URL: https://svnweb.freebsd.org/changeset/base/305958 Log: Remove expected failure for :basic (effectively reverting r305007, r305031) This no longer fails as of r305952 PR: 212193 Sponsored by: Dell EMC Isilon Modified: head/contrib/netbsd-tests/usr.bin/dirname/t_dirname.sh Modified: head/contrib/netbsd-tests/usr.bin/dirname/t_dirname.sh == --- head/contrib/netbsd-tests/usr.bin/dirname/t_dirname.sh Mon Sep 19 03:02:43 2016(r305957) +++ head/contrib/netbsd-tests/usr.bin/dirname/t_dirname.sh Mon Sep 19 06:39:08 2016(r305958) @@ -32,9 +32,6 @@ basic_head() } basic_body() { - # Begin FreeBSD - atf_expect_fail "dirname //usr//bin doesn't return //usr like it used to; bug # 212193" - # End FreeBSD atf_check -o inline:"/\n" dirname / atf_check -o inline:"/\n" dirname // atf_check -o inline:"/usr\n" dirname /usr/bin/ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r305959 - head/usr.bin/soelim
Author: bapt Date: Mon Sep 19 06:39:11 2016 New Revision: 305959 URL: https://svnweb.freebsd.org/changeset/base/305959 Log: Revert capsicum support In some corner case VFS lookup is not working and I do not have time to debug it for now. Modified: head/usr.bin/soelim/soelim.c Modified: head/usr.bin/soelim/soelim.c == --- head/usr.bin/soelim/soelim.cMon Sep 19 06:39:08 2016 (r305958) +++ head/usr.bin/soelim/soelim.cMon Sep 19 06:39:11 2016 (r305959) @@ -27,24 +27,15 @@ #include __FBSDID("$FreeBSD$"); -#include -#if __FreeBSD_version > 1001510 -#include -#else -#include -#endif #include #include #include -#include -#include #include #include #include #include #include -#include #include #define C_OPTION 0x1 @@ -60,31 +51,18 @@ usage(void) exit(EXIT_FAILURE); } -static const char * -relpath(const char *path) -{ - - while (*path == '/' && *path != '\0') - path++; - - return (path); -} - static FILE * -soelim_fopen(int rootfd, const char *name) +soelim_fopen(const char *name) { - FILE *f = NULL; + FILE *f; char path[PATH_MAX]; size_t i; - int fd; if (strcmp(name, "-") == 0) return (stdin); - if ((fd = openat(rootfd, relpath(name), O_RDONLY)) != -1) { - f = fdopen(fd, "r"); - goto out; - } + if ((f = fopen(name, "r")) != NULL) + return (f); if (*name == '/') { warn("can't open '%s'", name); @@ -94,21 +72,17 @@ soelim_fopen(int rootfd, const char *nam for (i = 0; i < includes->sl_cur; i++) { snprintf(path, sizeof(path), "%s/%s", includes->sl_str[i], name); - if ((fd = openat(rootfd, relpath(path), O_RDONLY)) != -1) { - f = fdopen(fd, "r"); - break; - } + if ((f = fopen(path, "r")) != NULL) + return (f); } -out: - if (f == NULL) - warn("can't open '%s'", name); + warn("can't open '%s'", name); return (f); } static int -soelim_file(int rootfd, FILE *f, int flag) +soelim_file(FILE *f, int flag) { char *line = NULL; char *walk, *cp; @@ -144,7 +118,7 @@ soelim_file(int rootfd, FILE *f, int fla printf("%s", line); continue; } - if (soelim_file(rootfd, soelim_fopen(rootfd, walk), flag) == 1) { + if (soelim_file(soelim_fopen(walk), flag) == 1) { free(line); return (1); } @@ -161,17 +135,11 @@ soelim_file(int rootfd, FILE *f, int fla int main(int argc, char **argv) { - int ch, i, rootfd; + int ch, i; int ret = 0; int flags = 0; - char cwd[MAXPATHLEN]; - unsigned long cmd; - cap_rights_t rights; includes = sl_init(); - if (getcwd(cwd, sizeof(cwd)) != NULL) - sl_add(includes, cwd); - if (includes == NULL) err(EXIT_FAILURE, "sl_init()"); @@ -197,44 +165,13 @@ main(int argc, char **argv) argc -= optind; argv += optind; - rootfd = open("/", O_DIRECTORY | O_RDONLY); - if (rootfd == -1) - err(EXIT_FAILURE, "unable to open '/'"); - cap_rights_init(, CAP_READ, CAP_FSTAT, CAP_IOCTL); - /* -* EBADF in case stdin is closed by the caller -*/ - if (cap_rights_limit(STDIN_FILENO, ) < 0 && errno != ENOSYS - && errno != EBADF) - err(EXIT_FAILURE, "unable to limit rights for stdin"); - cap_rights_init(, CAP_WRITE, CAP_FSTAT, CAP_IOCTL); - if (cap_rights_limit(STDOUT_FILENO, ) < 0 && errno != ENOSYS) - err(EXIT_FAILURE, "unable to limit rights for stdout"); - if (cap_rights_limit(STDERR_FILENO, ) < 0 && errno != ENOSYS) - err(EXIT_FAILURE, "unable to limit rights for stderr"); - cap_rights_init(, CAP_READ, CAP_LOOKUP, CAP_FSTAT, CAP_FCNTL); - if (cap_rights_limit(rootfd, ) < 0 && errno != ENOSYS) - err(EXIT_FAILURE, "unable to limit rights"); - - cmd = TIOCGETA; - if (cap_ioctls_limit(STDOUT_FILENO, , 1) < 0 && errno != ENOSYS) - err(EXIT_FAILURE, "unable to limit ioctls for stdout"); - if (cap_ioctls_limit(STDERR_FILENO, , 1) < 0 && errno != ENOSYS) - err(EXIT_FAILURE, "unable to limit ioctls for stderr"); - if (cap_ioctls_limit(STDIN_FILENO, , 1) < 0 && errno != ENOSYS) - err(EXIT_FAILURE, "unable to limit ioctls for stdin"); - - if (cap_enter() < 0 && errno != ENOSYS) - err(EXIT_FAILURE, "unable to enter capability mode"); - if (argc == 0) - ret =