svn commit: r308162 - head/sys/dev/hyperv/netvsc
Author: sephe Date: Tue Nov 1 04:44:11 2016 New Revision: 308162 URL: https://svnweb.freebsd.org/changeset/base/308162 Log: hyperv/hn: Cosmetic cleanup; no functional changes. MFC after:1 week Sponsored by: Microsoft Differential Revision:https://reviews.freebsd.org/D8389 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 Nov 1 03:49:31 2016(r308161) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Tue Nov 1 04:44:11 2016(r308162) @@ -59,62 +59,41 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" #include -#include -#include +#include +#include #include -#include #include +#include #include -#include -#include #include #include -#include #include +#include +#include +#include #include -#include +#include #include +#include -#include -#include +#include +#include + +#include #include -#include +#include #include -#include -#include - -#include #include -#include +#include +#include #include #include #include -#include +#include #include #include #include -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include - -#include #include #include @@ -129,24 +108,11 @@ __FBSDID("$FreeBSD$"); #include "vmbus_if.h" -/* Short for Hyper-V network interface */ -#define NETVSC_DEVNAME"hn" - -/* - * It looks like offset 0 of buf is reserved to hold the softc pointer. - * The sc pointer evidently not needed, and is not presently populated. - * The packet offset is where the netvsc_packet starts in the buffer. - */ -#define HV_NV_SC_PTR_OFFSET_IN_BUF 0 -#define HV_NV_PACKET_OFFSET_IN_BUF 16 +#define HN_RING_CNT_DEF_MAX8 /* YYY should get it from the underlying channel */ #define HN_TX_DESC_CNT 512 -#define HN_LROENT_CNT_DEF 128 - -#define HN_RING_CNT_DEF_MAX8 - #define HN_RNDIS_PKT_LEN \ (sizeof(struct rndis_packet_msg) + \ HN_RNDIS_PKTINFO_SIZE(HN_NDIS_HASH_VALUE_SIZE) + \ @@ -166,50 +132,9 @@ __FBSDID("$FreeBSD$"); #define HN_EARLY_TXEOF_THRESH 8 -#define HN_RXINFO_VLAN 0x0001 -#define HN_RXINFO_CSUM 0x0002 -#define HN_RXINFO_HASHINF 0x0004 -#define HN_RXINFO_HASHVAL 0x0008 -#define HN_RXINFO_ALL \ - (HN_RXINFO_VLAN | \ -HN_RXINFO_CSUM | \ -HN_RXINFO_HASHINF |\ -HN_RXINFO_HASHVAL) - #define HN_PKTBUF_LEN_DEF (16 * 1024) -struct hn_txdesc { -#ifndef HN_USE_TXDESC_BUFRING - SLIST_ENTRY(hn_txdesc) link; -#endif - struct mbuf *m; - struct hn_tx_ring *txr; - int refs; - uint32_tflags; /* HN_TXD_FLAG_ */ - struct hn_nvs_sendctx send_ctx; - uint32_tchim_index; - int chim_size; - - bus_dmamap_tdata_dmap; - - bus_addr_t rndis_pkt_paddr; - struct rndis_packet_msg *rndis_pkt; - bus_dmamap_trndis_pkt_dmap; -}; - -#define HN_TXD_FLAG_ONLIST 0x1 -#define HN_TXD_FLAG_DMAMAP 0x2 - -#define HN_NDIS_VLAN_INFO_INVALID 0x -#define HN_NDIS_RXCSUM_INFO_INVALID0 -#define HN_NDIS_HASH_INFO_INVALID 0 - -struct hn_rxinfo { - uint32_tvlan_info; - uint32_tcsum_info; - uint32_thash_info; - uint32_thash_value; -}; +#define HN_LROENT_CNT_DEF 128 #define HN_LRO_LENLIM_MULTIRX_DEF (12 * ETHERMTU) #define HN_LRO_LENLIM_DEF (25 * ETHERMTU) @@ -220,8 +145,8 @@ struct hn_rxinfo { #define HN_LOCK_INIT(sc) \ sx_init(&(sc)->hn_lock, device_get_nameunit((sc)->hn_dev)) -#define HN_LOCK_ASSERT(sc) sx_assert(&(sc)->hn_lock, SA_XLOCKED) #define HN_LOCK_DESTROY(sc)sx_destroy(&(sc)->hn_lock) +#define HN_LOCK_ASSERT(sc) sx_assert(&(sc)->hn_lock, SA_XLOCKED) #define HN_LOCK(sc)sx_xlock(&(sc)->hn_lock) #define HN_UNLOCK(sc) sx_xunlock(&(sc)->hn_lock) @@ -232,199 +157,276 @@ struct hn_rxinfo { #define HN_CSUM_IP6_HWASSIST(sc) \ ((sc)->hn_tx_ring[0].hn_csum_assist & HN_CSUM_IP6_MASK) -/* - * Globals - */ +struct hn_txdesc { +#ifndef HN_USE_TXDESC_BUFRING + SLIST_ENTRY(hn_txdesc) link; +#endif + struct mbuf *m; + struct hn_tx_ring *txr; + int refs; +
svn commit: r308161 - head/sys/dev/bhnd
Author: lwhsu (ports committer) Date: Tue Nov 1 03:49:31 2016 New Revision: 308161 URL: https://svnweb.freebsd.org/changeset/base/308161 Log: - Fix `make` in sys/modules/bhnd Reviewed by: landonf, imp Differential Revision:https://reviews.freebsd.org/D8385 Modified: head/sys/dev/bhnd/bhnd_debug.h Modified: head/sys/dev/bhnd/bhnd_debug.h == --- head/sys/dev/bhnd/bhnd_debug.h Tue Nov 1 01:41:24 2016 (r308160) +++ head/sys/dev/bhnd/bhnd_debug.h Tue Nov 1 03:49:31 2016 (r308161) @@ -70,8 +70,6 @@ #include -#include "opt_global.h" - #defineBHND_ERROR_LEVEL0x00 #defineBHND_ERROR_MSG "ERROR" #defineBHND_WARN_LEVEL 0x10 ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308160 - in head: etc etc/mtree usr.sbin/syslogd
Author: bapt Date: Tue Nov 1 01:41:24 2016 New Revision: 308160 URL: https://svnweb.freebsd.org/changeset/base/308160 Log: syslogd(8): add an 'include' keyword All the '.conf' files not beginning with a '.' contained int he directory following the keyword will be included. This keyword can only be used in the first level configuration files. Modify the default syslogd.conf to 'include' /etc/syslog.d and /usr/local/etc/syslog.d It simplify a lot handling of syslog from automation tools. Reviewed by: markj, kib (via irc) Approved by: markj MFC after:2 weeks Relnotes: yes Differential Revision:https://reviews.freebsd.org/D8402 Modified: head/etc/mtree/BSD.root.dist head/etc/syslog.conf head/usr.sbin/syslogd/syslog.conf.5 head/usr.sbin/syslogd/syslogd.c Modified: head/etc/mtree/BSD.root.dist == --- head/etc/mtree/BSD.root.distTue Nov 1 01:19:48 2016 (r308159) +++ head/etc/mtree/BSD.root.distTue Nov 1 01:41:24 2016 (r308160) @@ -78,6 +78,8 @@ .. ssl .. +syslog.d +.. zfs .. .. Modified: head/etc/syslog.conf == --- head/etc/syslog.confTue Nov 1 01:19:48 2016(r308159) +++ head/etc/syslog.confTue Nov 1 01:41:24 2016(r308160) @@ -34,3 +34,5 @@ cron.* /var/log/cron !ppp *.*/var/log/ppp.log !* +include/etc/syslog.d +include/usr/local/etc/syslog.d Modified: head/usr.sbin/syslogd/syslog.conf.5 == --- head/usr.sbin/syslogd/syslog.conf.5 Tue Nov 1 01:19:48 2016 (r308159) +++ head/usr.sbin/syslogd/syslog.conf.5 Tue Nov 1 01:41:24 2016 (r308160) @@ -28,7 +28,7 @@ .\" @(#)syslog.conf.5 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd September 12, 2012 +.Dd November 1, 2016 .Dt SYSLOG.CONF 5 .Os .Sh NAME @@ -62,6 +62,12 @@ field is separated from the .Em action field by one or more tab characters or spaces. .Pp +A special +.Em include +keyword can be used to include all files with names ending in '.conf' and not +beginning with a '.' contained in the directory following the keyword. +This keyword can only be used in the first level configuration file. +.Pp Note that if you use spaces as separators, your .Nm might be incompatible with other Unices or Unix-like systems. Modified: head/usr.sbin/syslogd/syslogd.c == --- head/usr.sbin/syslogd/syslogd.c Tue Nov 1 01:19:48 2016 (r308159) +++ head/usr.sbin/syslogd/syslogd.c Tue Nov 1 01:41:24 2016 (r308160) @@ -95,6 +95,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -118,6 +119,8 @@ __FBSDID("$FreeBSD$"); const char *ConfFile = _PATH_LOGCONF; const char *PidFile = _PATH_LOGPID; const char ctty[] = _PATH_CONSOLE; +static const char include_str[] = "include"; +static const char include_ext[] = ".conf"; #definedprintf if (Debug) printf @@ -1601,6 +1604,157 @@ die(int signo) exit(1); } +static int +configfiles(const struct dirent *dp) +{ + const char *p; + size_t ext_len; + + if (dp->d_name[0] == '.') + return (0); + + ext_len = sizeof(include_ext) -1; + + if (dp->d_namlen <= ext_len) + return (0); + + p = >d_name[dp->d_namlen - ext_len]; + if (strcmp(p, include_ext) != 0) + return (0); + + return (1); +} + +static void +readconfigfile(FILE *cf, struct filed **nextp, int allow_includes) +{ + FILE *cf2; + struct filed *f; + struct dirent **ent; + char cline[LINE_MAX]; + char host[MAXHOSTNAMELEN]; + char prog[LINE_MAX]; + char file[MAXPATHLEN]; + char *p, *tmp; + int i, nents; + size_t include_len; + + /* +* Foreach line in the conf table, open that file. +*/ + f = NULL; + include_len = sizeof(include_str) -1; + (void)strlcpy(host, "*", sizeof(host)); + (void)strlcpy(prog, "*", sizeof(prog)); + while (fgets(cline, sizeof(cline), cf) != NULL) { + /* +* check for end-of-section, comments, strip off trailing +* spaces and newline character. #!prog is treated specially: +* following lines apply only to that program. +*/ + for (p = cline; isspace(*p); ++p) + continue; + if (*p == 0) +
Re: svn commit: r308026 - in head/sys: kern sys ufs/ffs
Hi, On Fri, Oct 28, 2016 at 11:43:59AM +, Konstantin Belousov wrote: K> Author: kib K> Date: Fri Oct 28 11:43:59 2016 K> New Revision: 308026 K> URL: https://svnweb.freebsd.org/changeset/base/308026 K> K> Log: K> Generalize UFS buffer pager to allow it serving other filesystems K> which also use buffer cache. K> K> Most important addition to the code is the handling of filesystems K> where the block size is less than the machine page size, which might K> require reading several buffers to validate single page. K> K> Tested by: pho K> Sponsored by: The FreeBSD Foundation K> MFC after: 2 weeks K> K> Modified: K> head/sys/kern/vfs_bio.c K> head/sys/sys/buf.h K> head/sys/ufs/ffs/ffs_vnops.c K> K> Modified: head/sys/kern/vfs_bio.c K> == K> --- head/sys/kern/vfs_bio.c Fri Oct 28 11:35:06 2016(r308025) K> +++ head/sys/kern/vfs_bio.c Fri Oct 28 11:43:59 2016(r308026) K> @@ -75,9 +75,10 @@ __FBSDID("$FreeBSD$"); K> #include K> #include K> #include K> -#include K> -#include K> #include K> +#include K> +#include K> +#include K> #include K> #include K> #include K> @@ -4636,6 +4637,161 @@ bdata2bio(struct buf *bp, struct bio *bi K> } K> } K> K> +static int buf_pager_relbuf; K> +SYSCTL_INT(_vfs, OID_AUTO, buf_pager_relbuf, CTLFLAG_RWTUN, K> +_pager_relbuf, 0, K> +"Make buffer pager release buffers after reading"); K> + K> +/* K> + * The buffer pager. It uses buffer reads to validate pages. K> + * K> + * In contrast to the generic local pager from vm/vnode_pager.c, this K> + * pager correctly and easily handles volumes where the underlying K> + * device block size is greater than the machine page size. The K> + * buffer cache transparently extends the requested page run to be K> + * aligned at the block boundary, and does the necessary bogus page K> + * replacements in the addends to avoid obliterating already valid K> + * pages. K> + * K> + * The only non-trivial issue is that the exclusive busy state for K> + * pages, which is assumed by the vm_pager_getpages() interface, is K> + * incompatible with the VMIO buffer cache's desire to share-busy the K> + * pages. This function performs a trivial downgrade of the pages' K> + * state before reading buffers, and a less trivial upgrade from the K> + * shared-busy to excl-busy state after the read. IMHO, should be noted that the pager ignores requested rbehind and rahead values, and does the rbehind and rahead sizes that he prefers. -- Totus tuus, Glebius. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308158 - head/usr.sbin/cron/cron
Author: bapt Date: Mon Oct 31 23:40:04 2016 New Revision: 308158 URL: https://svnweb.freebsd.org/changeset/base/308158 Log: Allow symlinks to be followed in cron.d directories and fix detection of regular files on NFS Reported by: jilles Modified: head/usr.sbin/cron/cron/database.c Modified: head/usr.sbin/cron/cron/database.c == --- head/usr.sbin/cron/cron/database.c Mon Oct 31 23:32:38 2016 (r308157) +++ head/usr.sbin/cron/cron/database.c Mon Oct 31 23:40:04 2016 (r308158) @@ -44,7 +44,7 @@ load_database(old_db) { DIR *dir; struct stat statbuf; - struct stat syscron_stat; + struct stat syscron_stat, st; time_t maxmtime; DIR_T *dp; cron_db new_db; @@ -124,7 +124,8 @@ load_database(old_db) while (NULL != (dp = readdir(dir))) { if (dp->d_name[0] == '.') continue; - if (dp->d_type != DT_REG) + if (fstatat(dirfd(dir), dp->d_name, , 0) == 0 && + !S_ISREG(st.st_mode)) continue; snprintf(tabname, sizeof(tabname), "%s/%s", syscrontabs[i].name, dp->d_name); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308157 - head/usr.sbin/cron/cron
Author: bapt Date: Mon Oct 31 23:32:38 2016 New Revision: 308157 URL: https://svnweb.freebsd.org/changeset/base/308157 Log: Fix typo in cron(8) date Reported by: jilles Modified: head/usr.sbin/cron/cron/cron.8 Modified: head/usr.sbin/cron/cron/cron.8 == --- head/usr.sbin/cron/cron/cron.8 Mon Oct 31 23:13:09 2016 (r308156) +++ head/usr.sbin/cron/cron/cron.8 Mon Oct 31 23:32:38 2016 (r308157) @@ -17,7 +17,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Octobre 31, 2016 +.Dd October 31, 2016 .Dt CRON 8 .Os .Sh NAME ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308156 - head/gnu/lib/libgcc
Author: gjb Date: Mon Oct 31 23:13:09 2016 New Revision: 308156 URL: https://svnweb.freebsd.org/changeset/base/308156 Log: Fix packaging /usr/lib{,32}/libgcc_eh{,_p}.a. Reported by: woodsb02 MFC after:3 days Sponsored by: The FreeBSD Foundation Modified: head/gnu/lib/libgcc/Makefile Modified: head/gnu/lib/libgcc/Makefile == --- head/gnu/lib/libgcc/MakefileMon Oct 31 23:09:52 2016 (r308155) +++ head/gnu/lib/libgcc/MakefileMon Oct 31 23:13:09 2016 (r308156) @@ -397,11 +397,11 @@ _libinstall: _lib-eh-install _lib-eh-install: .if ${MK_INSTALLLIB} != "no" - ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ + ${INSTALL} ${TAG_ARGS} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ ${_INSTALLFLAGS} libgcc_eh.a ${DESTDIR}${LIBDIR} .endif .if ${MK_PROFILE} != "no" - ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ + ${INSTALL} ${TAG_ARGS} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ ${_INSTALLFLAGS} libgcc_eh_p.a ${DESTDIR}${LIBDIR} .endif ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308155 - in head/sys: amd64/conf cam cam/scsi conf dev/mps geom geom/part kern sys vm
Author: cem Date: Mon Oct 31 23:09:52 2016 New Revision: 308155 URL: https://svnweb.freebsd.org/changeset/base/308155 Log: Add BUF_TRACKING and FULL_BUF_TRACKING buffer debugging Upstream the BUF_TRACKING and FULL_BUF_TRACKING buffer debugging code. This can be handy in tracking down what code touched hung bios and bufs last. The full history is especially useful, but adds enough bloat that it shouldn't be enabled in release builds. Function names (or arbitrary string constants) are tracked in a fixed-size ring in bufs. Bios gain a pointer to the upper buf for tracking. SCSI CCBs gain a pointer to the upper bio for tracking. Reviewed by: markj Sponsored by: Dell EMC Isilon Differential Revision:https://reviews.freebsd.org/D8366 Modified: head/sys/amd64/conf/GENERIC head/sys/amd64/conf/GENERIC-NODEBUG head/sys/cam/cam_ccb.h head/sys/cam/cam_periph.c head/sys/cam/cam_xpt.c head/sys/cam/scsi/scsi_da.c head/sys/conf/options head/sys/dev/mps/mps_sas.c head/sys/geom/geom_dev.c head/sys/geom/geom_disk.c head/sys/geom/geom_io.c head/sys/geom/geom_subr.c head/sys/geom/geom_vfs.c head/sys/geom/part/g_part.c head/sys/kern/vfs_bio.c head/sys/kern/vfs_cluster.c head/sys/sys/bio.h head/sys/sys/buf.h head/sys/vm/vm_pager.c Modified: head/sys/amd64/conf/GENERIC == --- head/sys/amd64/conf/GENERIC Mon Oct 31 22:45:11 2016(r308154) +++ head/sys/amd64/conf/GENERIC Mon Oct 31 23:09:52 2016(r308155) @@ -83,7 +83,9 @@ options RCTL# Resource limits optionsKDB # Enable kernel debugger support. optionsKDB_TRACE # Print a stack trace for a panic. # For full debugger support use (turn off in stable branch): +optionsBUF_TRACKING# Track buffer history optionsDDB # Support DDB. +optionsFULL_BUF_TRACKING # Track more buffer history optionsGDB # Support remote GDB. optionsDEADLKRES # Enable the deadlock resolver optionsINVARIANTS # Enable calls of extra sanity checking Modified: head/sys/amd64/conf/GENERIC-NODEBUG == --- head/sys/amd64/conf/GENERIC-NODEBUG Mon Oct 31 22:45:11 2016 (r308154) +++ head/sys/amd64/conf/GENERIC-NODEBUG Mon Oct 31 23:09:52 2016 (r308155) @@ -34,5 +34,7 @@ nooptions INVARIANTS nooptions INVARIANT_SUPPORT nooptions WITNESS nooptions WITNESS_SKIPSPIN +nooptions BUF_TRACKING nooptions DEADLKRES +nooptions FULL_BUF_TRACKING Modified: head/sys/cam/cam_ccb.h == --- head/sys/cam/cam_ccb.h Mon Oct 31 22:45:11 2016(r308154) +++ head/sys/cam/cam_ccb.h Mon Oct 31 23:09:52 2016(r308155) @@ -744,6 +744,9 @@ struct ccb_scsiio { #defineCAM_TAG_ACTION_NONE 0x00 u_int tag_id; /* tag id from initator (target mode) */ u_int init_id; /* initiator id of who selected */ +#if defined(BUF_TRACKING) || defined(FULL_BUF_TRACKING) + struct bio *bio;/* Associated bio */ +#endif }; static __inline uint8_t * @@ -1335,6 +1338,9 @@ cam_fill_csio(struct ccb_scsiio *csio, u csio->sense_len = sense_len; csio->cdb_len = cdb_len; csio->tag_action = tag_action; +#if defined(BUF_TRACKING) || defined(FULL_BUF_TRACKING) + csio->bio = NULL; +#endif } static __inline void Modified: head/sys/cam/cam_periph.c == --- head/sys/cam/cam_periph.c Mon Oct 31 22:45:11 2016(r308154) +++ head/sys/cam/cam_periph.c Mon Oct 31 23:09:52 2016(r308155) @@ -1427,6 +1427,11 @@ camperiphscsisenseerror(union ccb *ccb, union ccb *orig_ccb = ccb; int error, recoveryccb; +#if defined(BUF_TRACKING) || defined(FULL_BUF_TRACKING) + if (ccb->ccb_h.func_code == XPT_SCSI_IO && ccb->csio.bio != NULL) + biotrack(ccb->csio.bio, __func__); +#endif + periph = xpt_path_periph(ccb->ccb_h.path); recoveryccb = (ccb->ccb_h.cbfcnp == camperiphdone); if ((periph->flags & CAM_PERIPH_RECOVERY_INPROG) && !recoveryccb) { Modified: head/sys/cam/cam_xpt.c == --- head/sys/cam/cam_xpt.c Mon Oct 31 22:45:11 2016(r308154) +++ head/sys/cam/cam_xpt.c Mon Oct 31 23:09:52 2016(r308155) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -4471,6 +4472,12 @@ xpt_done(union ccb *done_ccb) struct cam_doneq *queue; int run, hash; +#if
svn commit: r308154 - in stable/10: share/man/man4 sys/dev/cxgbe sys/dev/cxgbe/common sys/dev/cxgbe/iw_cxgbe sys/dev/cxgbe/tom
Author: jhb Date: Mon Oct 31 22:45:11 2016 New Revision: 308154 URL: https://svnweb.freebsd.org/changeset/base/308154 Log: MFC 291665,291685,291856,297467,302110,302263: Add support for VIs. 291665: Add support for configuring additional virtual interfaces (VIs) on a port. Each virtual interface has its own MAC address, queues, and statistics. The dedicated netmap interfaces (ncxgbeX / ncxlX) were already implemented as additional VIs on each port. This change allows additional non-netmap interfaces to be configured on each port. Additional virtual interfaces use the naming scheme vcxgbeX or vcxlX. Additional VIs are enabled by setting the hw.cxgbe.num_vis tunable to a value greater than 1 before loading the cxgbe(4) or cxl(4) driver. NB: The first VI on each port is the "main" interface (cxgbeX or cxlX). T4/T5 NICs provide a limited number of MAC addresses for each physical port. As a result, a maximum of six VIs can be configured on each port (including the "main" interface and the netmap interface when netmap is enabled). One user-visible result is that when netmap is enabled, packets received or transmitted via the netmap interface are no longer counted in the stats for the "main" interface, but are not accounted to the netmap interface. The netmap interfaces now also have a new-bus device and export various information sysctl nodes via dev.n(cxgbe|cxl).X. The cxgbetool 'clearstats' command clears the stats for all VIs on the specified port along with the port's stats. There is currently no way to clear the stats of an individual VI. 291685: Fix build for !TCP_OFFLOAD case. 291856: Fix RSS build. 297467: Remove #ifdef's from various structures used in the cxgbe/cxl driver. This provides a constant ABI and layout for these structures (especially struct adapter) avoiding some foot shooting. 302110: cxgbe(4): Merge netmap support from the ncxgbe/ncxl interfaces to the vcxgbe/vcxl interfaces and retire the 'n' interfaces. The main cxgbe/cxl interfaces and tunables related to them are not affected by any of this and will continue to operate as usual. The driver used to create an additional 'n' interface for every cxgbe/cxl interface if "device netmap" was in the kernel. The 'n' interface shared the wire with the main interface but was otherwise autonomous (with its own MAC address, etc.). It did not have normal tx/rx but had a specialized netmap-only data path. r291665 added another set of virtual interfaces (the 'v' interfaces) to the driver. These had normal tx/rx but no netmap support. This revision consolidates the features of both the interfaces into the 'v' interface which now has a normal data path, TOE support, and native netmap support. The 'v' interfaces need to be created explicitly with the hw.cxgbe.num_vis tunable. This means "device netmap" will not result in the automatic creation of any virtual interfaces. The following tunables can be used to override the default number of queues allocated for each 'v' interface. nofld* = 0 will disable TOE on the virtual interface and nnm* = 0 to will disable native netmap support. # number of normal NIC queues hw.cxgbe.ntxq_vi hw.cxgbe.nrxq_vi # number of TOE queues hw.cxgbe.nofldtxq_vi hw.cxgbe.nofldrxq_vi # number of netmap queues hw.cxgbe.nnmtxq_vi hw.cxgbe.nnmrxq_vi hw.cxgbe.nnm{t,r}xq{10,1}g tunables have been removed. --- tl;dr version --- The workflow for netmap on cxgbe starting with FreeBSD 11 is: 1) "device netmap" in the kernel config. 2) "hw.cxgbe.num_vis=2" in loader.conf. num_vis > 2 is ok too, you'll end up with multiple autonomous netmap-capable interfaces for every port. 3) "dmesg | grep vcxl | grep netmap" to verify that the interface has netmap queues. 4) Use any of the 'v' interfaces for netmap. pkt-gen -i vcxl... . One major improvement is that the netmap interface has a normal data path as expected. 5) Just ignore the cxl interfaces if you want to use netmap only. No need to bring them up. The vcxl interfaces are completely independent and everything should just work. - 302263: cxgbe(4): Do not bring up an interface when IFCAP_TOE is enabled on it. The interface's queues are functional after VI_INIT_DONE (which is short of interface-up) and that's all that's needed for t4_tom to communicate with the chip. Relnotes: yes Sponsored by: Chelsio Communications Modified: stable/10/share/man/man4/cxgbe.4 stable/10/sys/dev/cxgbe/adapter.h stable/10/sys/dev/cxgbe/common/t4_hw.c stable/10/sys/dev/cxgbe/iw_cxgbe/provider.c stable/10/sys/dev/cxgbe/offload.h stable/10/sys/dev/cxgbe/t4_main.c stable/10/sys/dev/cxgbe/t4_netmap.c stable/10/sys/dev/cxgbe/t4_sge.c stable/10/sys/dev/cxgbe/tom/t4_connect.c stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c
svn commit: r308153 - stable/10/sys/dev/cxgbe
Author: jhb Date: Mon Oct 31 22:03:44 2016 New Revision: 308153 URL: https://svnweb.freebsd.org/changeset/base/308153 Log: MFC 289401: cxgbe(4): support for the kernel RSS option. You need PCBGROUP and RSS in the kernel config to use this. Note: Since RSS is not present in 10.x this is mostly a no-op and is stubbed out by removing the #include of opt_rss.h. This is merged primarily to reduce conflicts in future merges, however it does add a couple of diagnostic messages related to RSS buckets vs RX queue counts. Discussed with: np Sponsored by: Chelsio Communications Modified: stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_main.c == --- stable/10/sys/dev/cxgbe/t4_main.c Mon Oct 31 21:57:43 2016 (r308152) +++ stable/10/sys/dev/cxgbe/t4_main.c Mon Oct 31 22:03:44 2016 (r308153) @@ -57,6 +57,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef RSS +#include +#endif #if defined(__i386__) || defined(__amd64__) #include #include @@ -3432,6 +3435,71 @@ adapter_full_uninit(struct adapter *sc) return (0); } +#ifdef RSS +#define SUPPORTED_RSS_HASHTYPES (RSS_HASHTYPE_RSS_IPV4 | \ +RSS_HASHTYPE_RSS_TCP_IPV4 | RSS_HASHTYPE_RSS_IPV6 | \ +RSS_HASHTYPE_RSS_TCP_IPV6 | RSS_HASHTYPE_RSS_UDP_IPV4 | \ +RSS_HASHTYPE_RSS_UDP_IPV6) + +/* Translates kernel hash types to hardware. */ +static int +hashconfig_to_hashen(int hashconfig) +{ + int hashen = 0; + + if (hashconfig & RSS_HASHTYPE_RSS_IPV4) + hashen |= F_FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN; + if (hashconfig & RSS_HASHTYPE_RSS_IPV6) + hashen |= F_FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN; + if (hashconfig & RSS_HASHTYPE_RSS_UDP_IPV4) { + hashen |= F_FW_RSS_VI_CONFIG_CMD_UDPEN | + F_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN; + } + if (hashconfig & RSS_HASHTYPE_RSS_UDP_IPV6) { + hashen |= F_FW_RSS_VI_CONFIG_CMD_UDPEN | + F_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN; + } + if (hashconfig & RSS_HASHTYPE_RSS_TCP_IPV4) + hashen |= F_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN; + if (hashconfig & RSS_HASHTYPE_RSS_TCP_IPV6) + hashen |= F_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN; + + return (hashen); +} + +/* Translates hardware hash types to kernel. */ +static int +hashen_to_hashconfig(int hashen) +{ + int hashconfig = 0; + + if (hashen & F_FW_RSS_VI_CONFIG_CMD_UDPEN) { + /* +* If UDP hashing was enabled it must have been enabled for +* either IPv4 or IPv6 (inclusive or). Enabling UDP without +* enabling any 4-tuple hash is nonsense configuration. +*/ + MPASS(hashen & (F_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN | + F_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN)); + + if (hashen & F_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN) + hashconfig |= RSS_HASHTYPE_RSS_UDP_IPV4; + if (hashen & F_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN) + hashconfig |= RSS_HASHTYPE_RSS_UDP_IPV6; + } + if (hashen & F_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN) + hashconfig |= RSS_HASHTYPE_RSS_TCP_IPV4; + if (hashen & F_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN) + hashconfig |= RSS_HASHTYPE_RSS_TCP_IPV6; + if (hashen & F_FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN) + hashconfig |= RSS_HASHTYPE_RSS_IPV4; + if (hashen & F_FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN) + hashconfig |= RSS_HASHTYPE_RSS_IPV6; + + return (hashconfig); +} +#endif + int port_full_init(struct port_info *pi) { @@ -3439,7 +3507,14 @@ port_full_init(struct port_info *pi) struct ifnet *ifp = pi->ifp; uint16_t *rss; struct sge_rxq *rxq; - int rc, i, j; + int rc, i, j, hashen; +#ifdef RSS + int nbuckets = rss_getnumbuckets(); + int hashconfig = rss_gethashconfig(); + int extra; + uint32_t raw_rss_key[RSS_KEYSIZE / sizeof(uint32_t)]; + uint32_t rss_key[RSS_KEYSIZE / sizeof(uint32_t)]; +#endif ASSERT_SYNCHRONIZED_OP(sc); KASSERT((pi->flags & PORT_INIT_DONE) == 0, @@ -3458,13 +3533,42 @@ port_full_init(struct port_info *pi) /* * Setup RSS for this port. Save a copy of the RSS table for later use. */ + if (pi->nrxq > pi->rss_size) { + if_printf(ifp, "nrxq (%d) > hw RSS table size (%d); " + "some queues will never receive traffic.\n", pi->nrxq, + pi->rss_size); + } else if (pi->rss_size % pi->nrxq) { + if_printf(ifp, "nrxq (%d), hw RSS table size (%d); " + "expect uneven traffic distribution.\n", pi->nrxq, + pi->rss_size); + }
svn commit: r308152 - in stable/10: contrib/libarchive contrib/libarchive/cat/test contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/libarchive/libarchive/test contrib/libarchive/t...
Author: mm Date: Mon Oct 31 21:57:43 2016 New Revision: 308152 URL: https://svnweb.freebsd.org/changeset/base/308152 Log: MFC r307861: Update libarchive to 3.2.2 Most of the post-3.2.1 fixes have already been merged. This update contains just the version bump and some fixes to the test framework. Modified: stable/10/contrib/libarchive/NEWS stable/10/contrib/libarchive/cat/test/main.c stable/10/contrib/libarchive/cat/test/test.h stable/10/contrib/libarchive/cpio/test/main.c stable/10/contrib/libarchive/cpio/test/test.h stable/10/contrib/libarchive/libarchive/archive.h stable/10/contrib/libarchive/libarchive/archive_entry.h stable/10/contrib/libarchive/libarchive/test/main.c stable/10/contrib/libarchive/libarchive/test/test.h stable/10/contrib/libarchive/libarchive/test/test_read_format_mtree_crash747.c stable/10/contrib/libarchive/libarchive/test/test_read_format_zip_high_compression.c stable/10/contrib/libarchive/libarchive/test/test_read_set_format.c stable/10/contrib/libarchive/libarchive/test/test_write_format_iso9660.c stable/10/contrib/libarchive/tar/test/main.c stable/10/contrib/libarchive/tar/test/test.h stable/10/contrib/libarchive/tar/test/test_option_b.c stable/10/contrib/libarchive/tar/test/test_symlink_dir.c stable/10/usr.bin/bsdcat/Makefile stable/10/usr.bin/cpio/Makefile stable/10/usr.bin/tar/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/libarchive/NEWS == --- stable/10/contrib/libarchive/NEWS Mon Oct 31 21:57:18 2016 (r308151) +++ stable/10/contrib/libarchive/NEWS Mon Oct 31 21:57:43 2016 (r308152) @@ -1,3 +1,6 @@ +Oct 23, 2016: libarchive 3.2.2 released +Security release + Jun 20, 2016: libarchive 3.2.1 released This fixes a handful of security and other critical issues with 3.2.0 Modified: stable/10/contrib/libarchive/cat/test/main.c == --- stable/10/contrib/libarchive/cat/test/main.cMon Oct 31 21:57:18 2016(r308151) +++ stable/10/contrib/libarchive/cat/test/main.cMon Oct 31 21:57:43 2016(r308152) @@ -129,6 +129,13 @@ # include #endif +mode_t umasked(mode_t expected_mode) +{ + mode_t mode = umask(0); + umask(mode); + return expected_mode & ~mode; +} + /* Path to working directory for current test */ const char *testworkdir; #ifdef PROGRAM @@ -1156,6 +1163,35 @@ assertion_file_contains_lines_any_order( return (0); } +/* Verify that a text file does not contains the specified strings */ +int +assertion_file_contains_no_invalid_strings(const char *file, int line, +const char *pathname, const char *strings[]) +{ + char *buff; + int i; + + buff = slurpfile(NULL, "%s", pathname); + if (buff == NULL) { + failure_start(file, line, "Can't read file: %s", pathname); + failure_finish(NULL); + return (0); + } + + for (i = 0; strings[i] != NULL; ++i) { + if (strstr(buff, strings[i]) != NULL) { + failure_start(file, line, "Invalid string in %s: %s", pathname, + strings[i]); + failure_finish(NULL); + free(buff); + return(0); + } + } + + free(buff); + return (0); +} + /* Test that two paths point to the same file. */ /* As a side-effect, asserts that both files exist. */ static int @@ -1293,6 +1329,11 @@ assertion_file_time(const char *file, in switch (type) { case 'a': filet_nsec = st.st_atimespec.tv_nsec; break; case 'b': filet = st.st_birthtime; + /* FreeBSD filesystems that don't support birthtime +* (e.g., UFS1) always return -1 here. */ + if (filet == -1) { + return (1); + } filet_nsec = st.st_birthtimespec.tv_nsec; break; case 'm': filet_nsec = st.st_mtimespec.tv_nsec; break; default: fprintf(stderr, "INTERNAL: Bad type %c for file time", type); @@ -1370,6 +1411,8 @@ assertion_file_mode(const char *file, in assertion_count(file, line); #if defined(_WIN32) && !defined(__CYGWIN__) failure_start(file, line, "assertFileMode not yet implemented for Windows"); + (void)mode; /* UNUSED */ + (void)r; /* UNUSED */ #else { struct stat st; @@ -1424,7 +1467,7 @@ assertion_file_nlinks(const char *file, assertion_count(file, line); r = lstat(pathname, ); if (r == 0 && (int)st.st_nlink == nlinks) - return (1); + return (1); failure_start(file, line, "File %s has %d links, expected %d", pathname, st.st_nlink, nlinks); failure_finish(NULL); @@ -1660,6
svn commit: r308151 - in stable/11: contrib/libarchive contrib/libarchive/cat/test contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/libarchive/libarchive/test contrib/libarchive/t...
Author: mm Date: Mon Oct 31 21:57:18 2016 New Revision: 308151 URL: https://svnweb.freebsd.org/changeset/base/308151 Log: MFC r307861: Update libarchive to 3.2.2 Most of the post-3.2.1 fixes have already been merged. This update contains just the version bump and some fixes to the test framework. Modified: stable/11/contrib/libarchive/NEWS stable/11/contrib/libarchive/cat/test/main.c stable/11/contrib/libarchive/cat/test/test.h stable/11/contrib/libarchive/cpio/test/main.c stable/11/contrib/libarchive/cpio/test/test.h stable/11/contrib/libarchive/libarchive/archive.h stable/11/contrib/libarchive/libarchive/archive_entry.h stable/11/contrib/libarchive/libarchive/test/main.c stable/11/contrib/libarchive/libarchive/test/test.h stable/11/contrib/libarchive/libarchive/test/test_read_format_mtree_crash747.c stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_high_compression.c stable/11/contrib/libarchive/libarchive/test/test_read_set_format.c stable/11/contrib/libarchive/libarchive/test/test_write_format_iso9660.c stable/11/contrib/libarchive/tar/test/main.c stable/11/contrib/libarchive/tar/test/test.h stable/11/contrib/libarchive/tar/test/test_option_b.c stable/11/contrib/libarchive/tar/test/test_symlink_dir.c stable/11/usr.bin/bsdcat/Makefile stable/11/usr.bin/cpio/Makefile stable/11/usr.bin/tar/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/libarchive/NEWS == --- stable/11/contrib/libarchive/NEWS Mon Oct 31 21:11:46 2016 (r308150) +++ stable/11/contrib/libarchive/NEWS Mon Oct 31 21:57:18 2016 (r308151) @@ -1,3 +1,6 @@ +Oct 23, 2016: libarchive 3.2.2 released +Security release + Jun 20, 2016: libarchive 3.2.1 released This fixes a handful of security and other critical issues with 3.2.0 Modified: stable/11/contrib/libarchive/cat/test/main.c == --- stable/11/contrib/libarchive/cat/test/main.cMon Oct 31 21:11:46 2016(r308150) +++ stable/11/contrib/libarchive/cat/test/main.cMon Oct 31 21:57:18 2016(r308151) @@ -129,6 +129,13 @@ # include #endif +mode_t umasked(mode_t expected_mode) +{ + mode_t mode = umask(0); + umask(mode); + return expected_mode & ~mode; +} + /* Path to working directory for current test */ const char *testworkdir; #ifdef PROGRAM @@ -1156,6 +1163,35 @@ assertion_file_contains_lines_any_order( return (0); } +/* Verify that a text file does not contains the specified strings */ +int +assertion_file_contains_no_invalid_strings(const char *file, int line, +const char *pathname, const char *strings[]) +{ + char *buff; + int i; + + buff = slurpfile(NULL, "%s", pathname); + if (buff == NULL) { + failure_start(file, line, "Can't read file: %s", pathname); + failure_finish(NULL); + return (0); + } + + for (i = 0; strings[i] != NULL; ++i) { + if (strstr(buff, strings[i]) != NULL) { + failure_start(file, line, "Invalid string in %s: %s", pathname, + strings[i]); + failure_finish(NULL); + free(buff); + return(0); + } + } + + free(buff); + return (0); +} + /* Test that two paths point to the same file. */ /* As a side-effect, asserts that both files exist. */ static int @@ -1293,6 +1329,11 @@ assertion_file_time(const char *file, in switch (type) { case 'a': filet_nsec = st.st_atimespec.tv_nsec; break; case 'b': filet = st.st_birthtime; + /* FreeBSD filesystems that don't support birthtime +* (e.g., UFS1) always return -1 here. */ + if (filet == -1) { + return (1); + } filet_nsec = st.st_birthtimespec.tv_nsec; break; case 'm': filet_nsec = st.st_mtimespec.tv_nsec; break; default: fprintf(stderr, "INTERNAL: Bad type %c for file time", type); @@ -1370,6 +1411,8 @@ assertion_file_mode(const char *file, in assertion_count(file, line); #if defined(_WIN32) && !defined(__CYGWIN__) failure_start(file, line, "assertFileMode not yet implemented for Windows"); + (void)mode; /* UNUSED */ + (void)r; /* UNUSED */ #else { struct stat st; @@ -1424,7 +1467,7 @@ assertion_file_nlinks(const char *file, assertion_count(file, line); r = lstat(pathname, ); if (r == 0 && (int)st.st_nlink == nlinks) - return (1); + return (1); failure_start(file, line, "File %s has %d links, expected %d", pathname, st.st_nlink, nlinks); failure_finish(NULL); @@ -1660,6
Re: svn commit: r306529 - head/sys/cam
Bezüglich Mark Johnston's Nachricht vom 30.09.2016 23:00 (localtime): > Author: markj > Date: Fri Sep 30 21:00:09 2016 > New Revision: 306529 > URL: https://svnweb.freebsd.org/changeset/base/306529 > > Log: > cam_periph_ccbwait could return while ccb in progress > > In cam_periph_runccb, cam_periph_ccbwait was using the value of the ccb > pinfo.index and status fields to determine whether the ccb was done, > but these fields are updated without a contending lock and could glitch > into states that would be erroneously interpreted as done. Instead, > have cam_periph_ccbwait look for the explicit result of the function > cam_periph_done. > > Submitted by: Ryan Libby> Reviewed by:mav > MFC after: 3 weeks > Sponsored by: Dell EMC Isilon Were there problems causing MFC delay or is it just slipped through? Thanks, -harry signature.asc Description: OpenPGP digital signature
svn commit: r308150 - in head: etc share/examples
Author: gjb Date: Mon Oct 31 21:11:46 2016 New Revision: 308150 URL: https://svnweb.freebsd.org/changeset/base/308150 Log: Fix packaging /usr/share/examples/etc. Reported by: woodsb02 MFC after:3 days X-MFC-With: r308148 Sponsored by: The FreeBSD Foundation Modified: head/etc/Makefile head/share/examples/Makefile Modified: head/etc/Makefile == --- head/etc/Makefile Mon Oct 31 20:43:43 2016(r308149) +++ head/etc/Makefile Mon Oct 31 21:11:46 2016(r308150) @@ -459,7 +459,7 @@ distrib-dirs: ${MTREES:N/*} distrib-clea .endif etc-examples-install: ${META_DEPS} - cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ + cd ${.CURDIR}; ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 \ ${BIN1} ${BIN2} nsmb.conf opieaccess \ ${DESTDIR}${SHAREDIR}/examples/etc Modified: head/share/examples/Makefile == --- head/share/examples/MakefileMon Oct 31 20:43:43 2016 (r308149) +++ head/share/examples/MakefileMon Oct 31 21:11:46 2016 (r308150) @@ -250,7 +250,7 @@ copies: symlinks: .for i in ${LDIRS} rm -rf ${DESTDIR}${BINDIR}/$i - ln -s ${.CURDIR}/$i ${DESTDIR}${BINDIR}/$i + ${INSTALL} ${TAG_ARGS} -l s ${.CURDIR}/$i ${DESTDIR}${BINDIR}/$i .endfor etc-examples: ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308149 - head/sys/ufs/ffs
Author: emaste Date: Mon Oct 31 20:43:43 2016 New Revision: 308149 URL: https://svnweb.freebsd.org/changeset/base/308149 Log: ANSIfy ffs_subr.c Also renumber license clause to avoid skipping #3 Modified: head/sys/ufs/ffs/ffs_subr.c Modified: head/sys/ufs/ffs/ffs_subr.c == --- head/sys/ufs/ffs/ffs_subr.c Mon Oct 31 20:31:56 2016(r308148) +++ head/sys/ufs/ffs/ffs_subr.c Mon Oct 31 20:43:43 2016(r308149) @@ -10,7 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in the *documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors *may be used to endorse or promote products derived from this software *without specific prior written permission. * @@ -61,11 +61,7 @@ __FBSDID("$FreeBSD$"); * remaining space in the directory. */ int -ffs_blkatoff(vp, offset, res, bpp) - struct vnode *vp; - off_t offset; - char **res; - struct buf **bpp; +ffs_blkatoff(struct vnode *vp, off_t offset, char **res, struct buf **bpp) { struct inode *ip; struct fs *fs; @@ -95,11 +91,7 @@ ffs_blkatoff(vp, offset, res, bpp) * to the incore copy. */ void -ffs_load_inode(bp, ip, fs, ino) - struct buf *bp; - struct inode *ip; - struct fs *fs; - ino_t ino; +ffs_load_inode(struct buf *bp, struct inode *ip, struct fs *fs, ino_t ino) { if (I_IS_UFS1(ip)) { @@ -131,11 +123,7 @@ ffs_load_inode(bp, ip, fs, ino) * of some frags. */ void -ffs_fragacct(fs, fragmap, fraglist, cnt) - struct fs *fs; - int fragmap; - int32_t fraglist[]; - int cnt; +ffs_fragacct(struct fs *fs, int fragmap, int32_t fraglist[], int cnt) { int inblk; int field, subfield; @@ -167,10 +155,7 @@ ffs_fragacct(fs, fragmap, fraglist, cnt) * check if a block is available */ int -ffs_isblock(fs, cp, h) - struct fs *fs; - unsigned char *cp; - ufs1_daddr_t h; +ffs_isblock(struct fs *fs, unsigned char *cp, ufs1_daddr_t h) { unsigned char mask; @@ -199,10 +184,7 @@ ffs_isblock(fs, cp, h) * check if a block is free */ int -ffs_isfreeblock(fs, cp, h) - struct fs *fs; - u_char *cp; - ufs1_daddr_t h; +ffs_isfreeblock(struct fs *fs, u_char *cp, ufs1_daddr_t h) { switch ((int)fs->fs_frag) { @@ -227,10 +209,7 @@ ffs_isfreeblock(fs, cp, h) * take a block out of the map */ void -ffs_clrblock(fs, cp, h) - struct fs *fs; - u_char *cp; - ufs1_daddr_t h; +ffs_clrblock(struct fs *fs, u_char *cp, ufs1_daddr_t h) { switch ((int)fs->fs_frag) { @@ -258,10 +237,7 @@ ffs_clrblock(fs, cp, h) * put a block into the map */ void -ffs_setblock(fs, cp, h) - struct fs *fs; - unsigned char *cp; - ufs1_daddr_t h; +ffs_setblock(struct fs *fs, unsigned char *cp, ufs1_daddr_t h) { switch ((int)fs->fs_frag) { @@ -292,11 +268,7 @@ ffs_setblock(fs, cp, h) * Cnt == 1 means free; cnt == -1 means allocating. */ void -ffs_clusteracct(fs, cgp, blkno, cnt) - struct fs *fs; - struct cg *cgp; - ufs1_daddr_t blkno; - int cnt; +ffs_clusteracct(struct fs *fs, struct cg *cgp, ufs1_daddr_t blkno, int cnt) { int32_t *sump; int32_t *lp; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308148 - head/usr.bin/calendar
Author: gjb Date: Mon Oct 31 20:31:56 2016 New Revision: 308148 URL: https://svnweb.freebsd.org/changeset/base/308148 Log: Fix packaging calendar(1) files. Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/calendar/Makefile Modified: head/usr.bin/calendar/Makefile == --- head/usr.bin/calendar/Makefile Mon Oct 31 19:02:42 2016 (r308147) +++ head/usr.bin/calendar/Makefile Mon Oct 31 20:31:56 2016 (r308148) @@ -15,20 +15,22 @@ FR_LINKS= fr_FR.ISO8859-15 TEXTMODE?= 444 beforeinstall: - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${TEXTMODE} \ + ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m ${TEXTMODE} \ ${.CURDIR}/calendars/calendar.* ${DESTDIR}${SHAREDIR}/calendar .for lang in ${INTER} - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${TEXTMODE} \ + ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m ${TEXTMODE} \ ${.CURDIR}/calendars/${lang}/calendar.* \ ${DESTDIR}${SHAREDIR}/calendar/${lang} .endfor .for link in ${DE_LINKS} rm -rf ${DESTDIR}${SHAREDIR}/calendar/${link} - ln -s de_DE.ISO8859-1 ${DESTDIR}${SHAREDIR}/calendar/${link} + ${INSTALL} ${TAG_ARGS} -l s de_DE.ISO8859-1 \ + ${DESTDIR}${SHAREDIR}/calendar/${link} .endfor .for link in ${FR_LINKS} rm -rf ${DESTDIR}${SHAREDIR}/calendar/${link} - ln -s fr_FR.ISO8859-1 ${DESTDIR}${SHAREDIR}/calendar/${link} + ${INSTALL} ${TAG_ARGS} -l s fr_FR.ISO8859-1 \ + ${DESTDIR}${SHAREDIR}/calendar/${link} .endfor .if ${MK_TESTS} != "no" ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308146 - stable/9/contrib/libc++/include
Author: dim Date: Mon Oct 31 18:45:01 2016 New Revision: 308146 URL: https://svnweb.freebsd.org/changeset/base/308146 Log: Merge r308143 from stable/10: Pull in r228705 from upstream libc++ trunk (by Eric Fiselier): [libcxx] Fix PR 22468 - std::functiondoes not accept non-void-returning functions Summary: The bug can be found here: https://llvm.org/bugs/show_bug.cgi?id=22468 `__invoke_void_return_wrapper` is needed to properly handle calling a function that returns a value but where the std::function return type is void. Without this '-Wsystem-headers' will cause `function::operator()(...)` to not compile. Reviewers: eugenis, K-ballo, mclow.lists Reviewed By: mclow.lists Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D7444 This should allow newer versions of the graphics/aseprite port to compile without modification. Direct commit to stable/10, since stable/11 and head already have this change. Reported by: y...@rawbw.com PR: 213773 Modified: stable/9/contrib/libc++/include/__functional_03 stable/9/contrib/libc++/include/__functional_base stable/9/contrib/libc++/include/__functional_base_03 stable/9/contrib/libc++/include/functional Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/libc++/ (props changed) Modified: stable/9/contrib/libc++/include/__functional_03 == --- stable/9/contrib/libc++/include/__functional_03 Mon Oct 31 18:38:58 2016(r308145) +++ stable/9/contrib/libc++/include/__functional_03 Mon Oct 31 18:45:01 2016(r308146) @@ -369,7 +369,8 @@ template::operator()() { -return __invoke(__f_.first()); +typedef __invoke_void_return_wrapper<_Rp> _Invoker; +return _Invoker::__call(__f_.first()); } #ifndef _LIBCPP_NO_RTTI @@ -452,7 +453,8 @@ template::operator()(_A0 __a0) { -return __invoke(__f_.first(), __a0); +typedef __invoke_void_return_wrapper<_Rp> _Invoker; +return _Invoker::__call(__f_.first(), __a0); } #ifndef _LIBCPP_NO_RTTI @@ -535,7 +537,8 @@ template::operator()(_A0 __a0, _A1 __a1) { -return __invoke(__f_.first(), __a0, __a1); +typedef __invoke_void_return_wrapper<_Rp> _Invoker; +return _Invoker::__call(__f_.first(), __a0, __a1); } #ifndef _LIBCPP_NO_RTTI @@ -618,7 +621,8 @@ template::operator()(_A0 __a0, _A1 __a1, _A2 __a2) { -return __invoke(__f_.first(), __a0, __a1, __a2); +typedef __invoke_void_return_wrapper<_Rp> _Invoker; +return _Invoker::__call(__f_.first(), __a0, __a1, __a2); } #ifndef _LIBCPP_NO_RTTI Modified: stable/9/contrib/libc++/include/__functional_base == --- stable/9/contrib/libc++/include/__functional_base Mon Oct 31 18:38:58 2016(r308145) +++ stable/9/contrib/libc++/include/__functional_base Mon Oct 31 18:45:01 2016(r308146) @@ -419,6 +419,26 @@ struct __invoke_return typedef decltype(__invoke(_VSTD::declval<_Tp>(), _VSTD::declval<_Args>()...)) type; }; +template +struct __invoke_void_return_wrapper +{ +template +static _Ret __call(_Args&&... __args) +{ +return __invoke(_VSTD::forward<_Args>(__args)...); +} +}; + +template <> +struct __invoke_void_return_wrapper +{ +template +static void __call(_Args&&... __args) +{ +__invoke(_VSTD::forward<_Args>(__args)...); +} +}; + template class _LIBCPP_TYPE_VIS_ONLY reference_wrapper : public __weak_result_type<_Tp> Modified: stable/9/contrib/libc++/include/__functional_base_03 == --- stable/9/contrib/libc++/include/__functional_base_03Mon Oct 31 18:38:58 2016(r308145) +++ stable/9/contrib/libc++/include/__functional_base_03Mon Oct 31 18:45:01 2016(r308146) @@ -995,6 +995,63 @@ struct __invoke_return2 _VSTD::declval<_A2>())) type; }; +template +struct __invoke_void_return_wrapper +{ +template +static _Ret __call(_Fn __f) +{ +return __invoke(__f); +} + +template +static _Ret __call(_Fn __f, _A0& __a0) +{ +return __invoke(__f, __a0); +} + +template +static _Ret __call(_Fn __f, _A0& __a0, _A1& __a1) +{ +return __invoke(__f, __a0, __a1); +} + +template +static _Ret __call(_Fn __f, _A0& __a0, _A1& __a1, _A2& __a2) +{ +return __invoke(__f, __a0, __a1, __a2); +} +}; + + +template <> +struct __invoke_void_return_wrapper +{ +template +static void __call(_Fn __f) +{ +__invoke(__f); +} + +template +static void __call(_Fn __f, _A0& __a0) +{ +__invoke(__f, __a0); +} + +template +
svn commit: r308145 - in head: contrib/netbsd-tests/lib/libc/stdio include lib/libc/stdio
Author: br Date: Mon Oct 31 18:38:58 2016 New Revision: 308145 URL: https://svnweb.freebsd.org/changeset/base/308145 Log: Detect integer overflow and limit the number of positional arguments in the string format. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Differential Revision:https://reviews.freebsd.org/D8286 Modified: head/contrib/netbsd-tests/lib/libc/stdio/t_printf.c head/include/limits.h head/lib/libc/stdio/printf-pos.c Modified: head/contrib/netbsd-tests/lib/libc/stdio/t_printf.c == --- head/contrib/netbsd-tests/lib/libc/stdio/t_printf.c Mon Oct 31 18:38:50 2016(r308144) +++ head/contrib/netbsd-tests/lib/libc/stdio/t_printf.c Mon Oct 31 18:38:58 2016(r308145) @@ -120,12 +120,6 @@ ATF_TC_BODY(snprintf_posarg_error, tc) { char s[16], fmt[32]; -#ifndef __NetBSD__ - atf_tc_expect_signal(SIGSEGV, - "some non-NetBSD platforms including FreeBSD don't validate " - "negative size; testcase blows up with SIGSEGV"); -#endif - snprintf(fmt, sizeof(fmt), "%%%zu$d", SIZE_MAX / sizeof(size_t)); ATF_CHECK(snprintf(s, sizeof(s), fmt, -23) == -1); Modified: head/include/limits.h == --- head/include/limits.h Mon Oct 31 18:38:50 2016(r308144) +++ head/include/limits.h Mon Oct 31 18:38:58 2016(r308145) @@ -120,7 +120,7 @@ #endif #if __XSI_VISIBLE || __POSIX_VISIBLE >= 200809 -#defineNL_ARGMAX 99 /* max # of position args for printf */ +#defineNL_ARGMAX 65536 /* max # of position args for printf */ #defineNL_MSGMAX 32767 #defineNL_SETMAX 255 #defineNL_TEXTMAX 2048 Modified: head/lib/libc/stdio/printf-pos.c == --- head/lib/libc/stdio/printf-pos.cMon Oct 31 18:38:50 2016 (r308144) +++ head/lib/libc/stdio/printf-pos.cMon Oct 31 18:38:58 2016 (r308145) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include +#include #include #include #include @@ -55,6 +56,12 @@ __FBSDID("$FreeBSD$"); #include "un-namespace.h" #include "printflocal.h" +#ifdef NL_ARGMAX +#defineMAX_POSARG NL_ARGMAX +#else +#defineMAX_POSARG 65536 +#endif + /* * Type ids for argument type table. */ @@ -70,9 +77,9 @@ enum typeid { struct typetable { enum typeid *table; /* table of types */ enum typeid stattable[STATIC_ARG_TBL_SIZE]; - int tablesize; /* current size of type table */ - int tablemax; /* largest used index in table */ - int nextarg;/* 1-based argument index */ + u_int tablesize;/* current size of type table */ + u_int tablemax; /* largest used index in table */ + u_int nextarg; /* 1-based argument index */ }; static int __grow_type_table(struct typetable *); @@ -84,7 +91,7 @@ static void build_arg_table (struct type static inline void inittypes(struct typetable *types) { - int n; + u_int n; types->table = types->stattable; types->tablesize = STATIC_ARG_TBL_SIZE; @@ -185,7 +192,7 @@ static inline int addaster(struct typetable *types, char **fmtp) { char *cp; - int n2; + u_int n2; n2 = 0; cp = *fmtp; @@ -194,7 +201,7 @@ addaster(struct typetable *types, char * cp++; } if (*cp == '$') { - int hold = types->nextarg; + u_int hold = types->nextarg; types->nextarg = n2; if (addtype(types, T_INT)) return (-1); @@ -211,7 +218,7 @@ static inline int addwaster(struct typetable *types, wchar_t **fmtp) { wchar_t *cp; - int n2; + u_int n2; n2 = 0; cp = *fmtp; @@ -220,7 +227,7 @@ addwaster(struct typetable *types, wchar cp++; } if (*cp == '$') { - int hold = types->nextarg; + u_int hold = types->nextarg; types->nextarg = n2; if (addtype(types, T_INT)) return (-1); @@ -245,7 +252,7 @@ __find_arguments (const char *fmt0, va_l { char *fmt; /* format string */ int ch; /* character from fmt */ - int n; /* handy integer (short term usage) */ + u_int n;/* handy integer (short term usage) */ int error; int flags; /* flags as above */ struct typetable types; /* table of types */ @@ -296,6 +303,11 @@ reswitch: switch (ch) { n = 0; do { n = 10 * n
svn commit: r308144 - head/sys/dev/usb/input
Author: hselasky Date: Mon Oct 31 18:38:50 2016 New Revision: 308144 URL: https://svnweb.freebsd.org/changeset/base/308144 Log: Make sure the virtual T-axis buttons gets cleared for USB mice which has less than 6 buttons. PR: 213919 MFC after:3 days Modified: head/sys/dev/usb/input/ums.c Modified: head/sys/dev/usb/input/ums.c == --- head/sys/dev/usb/input/ums.cMon Oct 31 18:37:44 2016 (r308143) +++ head/sys/dev/usb/input/ums.cMon Oct 31 18:38:50 2016 (r308144) @@ -295,8 +295,11 @@ ums_intr_callback(struct usb_xfer *xfer, } if ((info->sc_flags & UMS_FLAG_T_AXIS) && - (id == info->sc_iid_t)) + (id == info->sc_iid_t)) { dt -= hid_get_data(buf, len, >sc_loc_t); + /* T-axis is translated into button presses */ + buttons_found |= (1UL << 5) | (1UL << 6); + } for (i = 0; i < info->sc_buttons; i++) { uint32_t mask; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308143 - stable/10/contrib/libc++/include
Author: dim Date: Mon Oct 31 18:37:44 2016 New Revision: 308143 URL: https://svnweb.freebsd.org/changeset/base/308143 Log: Pull in r228705 from upstream libc++ trunk (by Eric Fiselier): [libcxx] Fix PR 22468 - std::functiondoes not accept non-void-returning functions Summary: The bug can be found here: https://llvm.org/bugs/show_bug.cgi?id=22468 `__invoke_void_return_wrapper` is needed to properly handle calling a function that returns a value but where the std::function return type is void. Without this '-Wsystem-headers' will cause `function::operator()(...)` to not compile. Reviewers: eugenis, K-ballo, mclow.lists Reviewed By: mclow.lists Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D7444 This should allow newer versions of the graphics/aseprite port to compile without modification. Direct commit to stable/10, since stable/11 and head already have this change. Reported by: y...@rawbw.com PR: 213773 Modified: stable/10/contrib/libc++/include/__functional_03 stable/10/contrib/libc++/include/__functional_base stable/10/contrib/libc++/include/__functional_base_03 stable/10/contrib/libc++/include/functional Modified: stable/10/contrib/libc++/include/__functional_03 == --- stable/10/contrib/libc++/include/__functional_03Mon Oct 31 18:37:05 2016(r308142) +++ stable/10/contrib/libc++/include/__functional_03Mon Oct 31 18:37:44 2016(r308143) @@ -369,7 +369,8 @@ template::operator()() { -return __invoke(__f_.first()); +typedef __invoke_void_return_wrapper<_Rp> _Invoker; +return _Invoker::__call(__f_.first()); } #ifndef _LIBCPP_NO_RTTI @@ -452,7 +453,8 @@ template::operator()(_A0 __a0) { -return __invoke(__f_.first(), __a0); +typedef __invoke_void_return_wrapper<_Rp> _Invoker; +return _Invoker::__call(__f_.first(), __a0); } #ifndef _LIBCPP_NO_RTTI @@ -535,7 +537,8 @@ template::operator()(_A0 __a0, _A1 __a1) { -return __invoke(__f_.first(), __a0, __a1); +typedef __invoke_void_return_wrapper<_Rp> _Invoker; +return _Invoker::__call(__f_.first(), __a0, __a1); } #ifndef _LIBCPP_NO_RTTI @@ -618,7 +621,8 @@ template::operator()(_A0 __a0, _A1 __a1, _A2 __a2) { -return __invoke(__f_.first(), __a0, __a1, __a2); +typedef __invoke_void_return_wrapper<_Rp> _Invoker; +return _Invoker::__call(__f_.first(), __a0, __a1, __a2); } #ifndef _LIBCPP_NO_RTTI Modified: stable/10/contrib/libc++/include/__functional_base == --- stable/10/contrib/libc++/include/__functional_base Mon Oct 31 18:37:05 2016(r308142) +++ stable/10/contrib/libc++/include/__functional_base Mon Oct 31 18:37:44 2016(r308143) @@ -419,6 +419,26 @@ struct __invoke_return typedef decltype(__invoke(_VSTD::declval<_Tp>(), _VSTD::declval<_Args>()...)) type; }; +template +struct __invoke_void_return_wrapper +{ +template +static _Ret __call(_Args&&... __args) +{ +return __invoke(_VSTD::forward<_Args>(__args)...); +} +}; + +template <> +struct __invoke_void_return_wrapper +{ +template +static void __call(_Args&&... __args) +{ +__invoke(_VSTD::forward<_Args>(__args)...); +} +}; + template class _LIBCPP_TYPE_VIS_ONLY reference_wrapper : public __weak_result_type<_Tp> Modified: stable/10/contrib/libc++/include/__functional_base_03 == --- stable/10/contrib/libc++/include/__functional_base_03 Mon Oct 31 18:37:05 2016(r308142) +++ stable/10/contrib/libc++/include/__functional_base_03 Mon Oct 31 18:37:44 2016(r308143) @@ -995,6 +995,63 @@ struct __invoke_return2 _VSTD::declval<_A2>())) type; }; +template +struct __invoke_void_return_wrapper +{ +template +static _Ret __call(_Fn __f) +{ +return __invoke(__f); +} + +template +static _Ret __call(_Fn __f, _A0& __a0) +{ +return __invoke(__f, __a0); +} + +template +static _Ret __call(_Fn __f, _A0& __a0, _A1& __a1) +{ +return __invoke(__f, __a0, __a1); +} + +template +static _Ret __call(_Fn __f, _A0& __a0, _A1& __a1, _A2& __a2) +{ +return __invoke(__f, __a0, __a1, __a2); +} +}; + + +template <> +struct __invoke_void_return_wrapper +{ +template +static void __call(_Fn __f) +{ +__invoke(__f); +} + +template +static void __call(_Fn __f, _A0& __a0) +{ +__invoke(__f, __a0); +} + +template +static void __call(_Fn __f, _A0& __a0, _A1& __a1) +{ +__invoke(__f, __a0, __a1); +} + +template +static void __call(_Fn __f, _A0& __a0,
svn commit: r308142 - head/sys/amd64/include
Author: jhb Date: Mon Oct 31 18:37:05 2016 New Revision: 308142 URL: https://svnweb.freebsd.org/changeset/base/308142 Log: Move declarations of invpcid_works and pmap_pcid_enabled to pmap.h. Previously these were only declared under #ifdef SMP in . However, these variables are defind in pmap.c unconditionally, and efirt.c references them unconditionally. This fixes non-SMP kernel builds. Discussed with: kib MFC after:1 week Modified: head/sys/amd64/include/pmap.h head/sys/amd64/include/smp.h Modified: head/sys/amd64/include/pmap.h == --- head/sys/amd64/include/pmap.h Mon Oct 31 18:29:16 2016 (r308141) +++ head/sys/amd64/include/pmap.h Mon Oct 31 18:37:05 2016 (r308142) @@ -382,6 +382,8 @@ extern vm_paddr_t dump_avail[]; extern vm_offset_t virtual_avail; extern vm_offset_t virtual_end; extern vm_paddr_t dmaplimit; +extern int pmap_pcid_enabled; +extern int invpcid_works; #definepmap_page_get_memattr(m)((vm_memattr_t)(m)->md.pat_mode) #definepmap_page_is_write_mapped(m)(((m)->aflags & PGA_WRITEABLE) != 0) Modified: head/sys/amd64/include/smp.h == --- head/sys/amd64/include/smp.hMon Oct 31 18:29:16 2016 (r308141) +++ head/sys/amd64/include/smp.hMon Oct 31 18:37:05 2016 (r308142) @@ -21,9 +21,6 @@ #include -extern int pmap_pcid_enabled; -extern int invpcid_works; - /* global symbols in mpboot.S */ extern charmptramp_start[]; extern charmptramp_end[]; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308141 - stable/10/share/misc
Author: bapt Date: Mon Oct 31 18:29:16 2016 New Revision: 308141 URL: https://svnweb.freebsd.org/changeset/base/308141 Log: MFC r307785: Import pci_vendors 2016.10.20 Modified: stable/10/share/misc/pci_vendors Directory Properties: stable/10/ (props changed) Modified: stable/10/share/misc/pci_vendors == --- stable/10/share/misc/pci_vendorsMon Oct 31 18:27:38 2016 (r308140) +++ stable/10/share/misc/pci_vendorsMon Oct 31 18:29:16 2016 (r308141) @@ -3,8 +3,8 @@ # # List of PCI ID's # -# Version: 2016.10.03 -# Date:2016-10-03 03:15:01 +# Version: 2016.10.20 +# Date:2016-10-20 03:15:02 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at http://pci-ids.ucw.cz/. @@ -245,8 +245,13 @@ 0013 53c875a 1000 1000 LSI53C875A PCI to Ultra SCSI Controller 0014 MegaRAID Tri-Mode SAS3516 + 1028 1fd4 PERC H745P MX 1d49 0602 ThinkSystem RAID 930-16i 4GB Flash PCIe 12Gb Adapter 0016 MegaRAID Tri-Mode SAS3508 + 1028 1fc9 PERC H840 Adapter + 1028 1fcb PERC H740P Adapter + 1028 1fcd PERC H740P Mini + 1028 1fcf PERC H740P Mini 1d49 0601 ThinkSystem RAID 930-8i 2GB Flash PCIe 12Gb Adapter 1d49 0603 ThinkSystem RAID 930-24i 4GB Flash PCIe 12Gb Adapter 1d49 0604 ThinkSystem RAID 930-8e 4GB Flash PCIe 12Gb Adapter @@ -376,6 +381,7 @@ 1028 1f4d PERC FD33xS 1028 1f4f PERC H730P Slim 1028 1f54 PERC FD33xD + 1028 1fd1 PERC H730P MX 17aa 1052 ThinkServer RAID 720i 17aa 1053 ThinkServer RAID 720ix 1d49 0600 ThinkSystem RAID 730-8i 1GB Cache PCIe 12Gb Adapter @@ -535,8 +541,11 @@ 0097 SAS3008 PCI-Express Fusion-MPT SAS-3 1000 3090 SAS9311-8i 1000 30e0 SAS9300-8i - 1028 1f45 12GB/s HBA internal + 1028 1f45 HBA330 Adapter 1028 1f46 12Gbps HBA + 1028 1f53 HBA330 Mini + 1028 1fd2 HBA330 MX + 1028 1fd3 HBA330 MMZ 00ab SAS3516 Fusion-MPT Tri-Mode RAID On Chip (ROC) 00ac SAS3416 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) 1d49 0201 ThinkSystem 9400-16i PCIe 12Gb HBA @@ -1588,7 +1597,7 @@ 1462 2938 Radeon R9 360 OEM 1462 3271 Radeon R9 360 OEM 1682 7360 Radeon R7 360 - 6660 Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330] + 6660 Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430] 1028 05ea Radeon HD 8670M 1028 06bf Radeon R5 M335 103c 1970 Radeon HD 8670M @@ -1596,6 +1605,7 @@ 103c 8136 Radeon R5 M330 17aa 3804 Radeon R5 M330 17aa 3809 Radeon R5 M330 + 17aa 381a Radeon R5 M430 17aa 390c Radeon R5 M330 6663 Sun PRO [Radeon HD 8570A/8570M] 1025 0846 Radeon HD 8570A @@ -2866,11 +2876,12 @@ 174b e180 Radeon HD 7350 17af 3015 Radeon HD 7350 68fe Cedar LE - 6900 Topaz XT [Radeon R7 M260/M265 / M340/M360] + 6900 Topaz XT [Radeon R7 M260/M265 / M340/M360 / M440/M445] 1025 1056 Radeon R7 M360 / R8 M365DX 1028 0640 Radeon R7 M260/M265 1028 0643 Radeon R7 M260/M265 1028 067f Radeon R7 M260 + 1028 0767 Radeon R7 M445 1028 130a Radeon R7 M260 103c 2263 Radeon R7 M260 103c 2269 Radeon R7 M260 @@ -2881,6 +2892,7 @@ 103c 80b5 Radeon R7 M360 103c 80b9 Radeon R7 M360 103c 811c Radeon R7 M340 + 103c 8226 Radeon R7 M440 10cf 1906 Radeon R7 M260 1170 9979 Radeon R7 M360 1179 f903 Radeon R7 M260 @@ -2892,6 +2904,7 @@ 17aa 5021 Radeon R7 M260 6901 Topaz PRO [Radeon R5 M255] 103c 1318 Radeon R6 M255DX + 6907 Meso XT [Radeon R5 M315] 6921 Amethyst XT [Radeon R9 M295X] 6929 Tonga XT GL [FirePro S7150] 692b Tonga PRO GL [FirePro W7100] @@ -3349,7 +3362,7 @@ 99a4 Trinity [Radeon HD 7400G] aa00 R600 HDMI Audio [Radeon HD 2900 GT/PRO/XT] aa01 RV635 HDMI Audio [Radeon HD 3650/3730/3750] - aa08 RV630 HDMI Audio [Radeon HD 2600 Series] + aa08 RV630 HDMI Audio [Radeon HD 2600 PRO/XT / HD 3610] aa10 RV610 HDMI Audio [Radeon HD 2350 PRO / 2400 PRO/XT / HD 3410] 174b aa10 Radeon HD 2400 PRO 18bc aa10 Radeon HD 2400 PRO @@ -3369,10
svn commit: r308140 - stable/11/share/misc
Author: bapt Date: Mon Oct 31 18:27:38 2016 New Revision: 308140 URL: https://svnweb.freebsd.org/changeset/base/308140 Log: MFC r307785: Import pci_vendors 2016.10.20 Modified: stable/11/share/misc/pci_vendors Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/pci_vendors == --- stable/11/share/misc/pci_vendorsMon Oct 31 18:20:12 2016 (r308139) +++ stable/11/share/misc/pci_vendorsMon Oct 31 18:27:38 2016 (r308140) @@ -3,8 +3,8 @@ # # List of PCI ID's # -# Version: 2016.10.03 -# Date:2016-10-03 03:15:01 +# Version: 2016.10.20 +# Date:2016-10-20 03:15:02 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at http://pci-ids.ucw.cz/. @@ -245,8 +245,13 @@ 0013 53c875a 1000 1000 LSI53C875A PCI to Ultra SCSI Controller 0014 MegaRAID Tri-Mode SAS3516 + 1028 1fd4 PERC H745P MX 1d49 0602 ThinkSystem RAID 930-16i 4GB Flash PCIe 12Gb Adapter 0016 MegaRAID Tri-Mode SAS3508 + 1028 1fc9 PERC H840 Adapter + 1028 1fcb PERC H740P Adapter + 1028 1fcd PERC H740P Mini + 1028 1fcf PERC H740P Mini 1d49 0601 ThinkSystem RAID 930-8i 2GB Flash PCIe 12Gb Adapter 1d49 0603 ThinkSystem RAID 930-24i 4GB Flash PCIe 12Gb Adapter 1d49 0604 ThinkSystem RAID 930-8e 4GB Flash PCIe 12Gb Adapter @@ -376,6 +381,7 @@ 1028 1f4d PERC FD33xS 1028 1f4f PERC H730P Slim 1028 1f54 PERC FD33xD + 1028 1fd1 PERC H730P MX 17aa 1052 ThinkServer RAID 720i 17aa 1053 ThinkServer RAID 720ix 1d49 0600 ThinkSystem RAID 730-8i 1GB Cache PCIe 12Gb Adapter @@ -535,8 +541,11 @@ 0097 SAS3008 PCI-Express Fusion-MPT SAS-3 1000 3090 SAS9311-8i 1000 30e0 SAS9300-8i - 1028 1f45 12GB/s HBA internal + 1028 1f45 HBA330 Adapter 1028 1f46 12Gbps HBA + 1028 1f53 HBA330 Mini + 1028 1fd2 HBA330 MX + 1028 1fd3 HBA330 MMZ 00ab SAS3516 Fusion-MPT Tri-Mode RAID On Chip (ROC) 00ac SAS3416 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) 1d49 0201 ThinkSystem 9400-16i PCIe 12Gb HBA @@ -1588,7 +1597,7 @@ 1462 2938 Radeon R9 360 OEM 1462 3271 Radeon R9 360 OEM 1682 7360 Radeon R7 360 - 6660 Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330] + 6660 Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430] 1028 05ea Radeon HD 8670M 1028 06bf Radeon R5 M335 103c 1970 Radeon HD 8670M @@ -1596,6 +1605,7 @@ 103c 8136 Radeon R5 M330 17aa 3804 Radeon R5 M330 17aa 3809 Radeon R5 M330 + 17aa 381a Radeon R5 M430 17aa 390c Radeon R5 M330 6663 Sun PRO [Radeon HD 8570A/8570M] 1025 0846 Radeon HD 8570A @@ -2866,11 +2876,12 @@ 174b e180 Radeon HD 7350 17af 3015 Radeon HD 7350 68fe Cedar LE - 6900 Topaz XT [Radeon R7 M260/M265 / M340/M360] + 6900 Topaz XT [Radeon R7 M260/M265 / M340/M360 / M440/M445] 1025 1056 Radeon R7 M360 / R8 M365DX 1028 0640 Radeon R7 M260/M265 1028 0643 Radeon R7 M260/M265 1028 067f Radeon R7 M260 + 1028 0767 Radeon R7 M445 1028 130a Radeon R7 M260 103c 2263 Radeon R7 M260 103c 2269 Radeon R7 M260 @@ -2881,6 +2892,7 @@ 103c 80b5 Radeon R7 M360 103c 80b9 Radeon R7 M360 103c 811c Radeon R7 M340 + 103c 8226 Radeon R7 M440 10cf 1906 Radeon R7 M260 1170 9979 Radeon R7 M360 1179 f903 Radeon R7 M260 @@ -2892,6 +2904,7 @@ 17aa 5021 Radeon R7 M260 6901 Topaz PRO [Radeon R5 M255] 103c 1318 Radeon R6 M255DX + 6907 Meso XT [Radeon R5 M315] 6921 Amethyst XT [Radeon R9 M295X] 6929 Tonga XT GL [FirePro S7150] 692b Tonga PRO GL [FirePro W7100] @@ -3349,7 +3362,7 @@ 99a4 Trinity [Radeon HD 7400G] aa00 R600 HDMI Audio [Radeon HD 2900 GT/PRO/XT] aa01 RV635 HDMI Audio [Radeon HD 3650/3730/3750] - aa08 RV630 HDMI Audio [Radeon HD 2600 Series] + aa08 RV630 HDMI Audio [Radeon HD 2600 PRO/XT / HD 3610] aa10 RV610 HDMI Audio [Radeon HD 2350 PRO / 2400 PRO/XT / HD 3410] 174b aa10 Radeon HD 2400 PRO 18bc aa10 Radeon HD 2400 PRO @@ -3369,10
svn commit: r308139 - in head: etc/mtree usr.sbin/cron/cron usr.sbin/cron/lib
Author: bapt Date: Mon Oct 31 18:20:12 2016 New Revision: 308139 URL: https://svnweb.freebsd.org/changeset/base/308139 Log: cron(8): add support for /etc/cron.d and /usr/local/etc/cron.d For automation tools it is way easier to maintain files in directories rather than modifying /etc/crontab. The files in those directories are in the same format as /etc/crontab Reviewed by: adrian MFC after:2 weeks Relnotes: yes Sponsored by: Gandi.net Differential Revision:https://reviews.freebsd.org/D8400 Modified: head/etc/mtree/BSD.root.dist head/usr.sbin/cron/cron/cron.8 head/usr.sbin/cron/cron/cron.h head/usr.sbin/cron/cron/database.c head/usr.sbin/cron/cron/pathnames.h head/usr.sbin/cron/lib/misc.c Modified: head/etc/mtree/BSD.root.dist == --- head/etc/mtree/BSD.root.distMon Oct 31 18:12:07 2016 (r308138) +++ head/etc/mtree/BSD.root.distMon Oct 31 18:20:12 2016 (r308139) @@ -32,6 +32,8 @@ .. casper .. +cron.d +.. defaults .. devd Modified: head/usr.sbin/cron/cron/cron.8 == --- head/usr.sbin/cron/cron/cron.8 Mon Oct 31 18:12:07 2016 (r308138) +++ head/usr.sbin/cron/cron/cron.8 Mon Oct 31 18:20:12 2016 (r308139) @@ -17,7 +17,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 21, 2016 +.Dd Octobre 31, 2016 .Dt CRON 8 .Os .Sh NAME @@ -53,7 +53,11 @@ The .Nm utility also searches for .Pa /etc/crontab -which is in a different format (see +and files in +.Pa /etc/cron.d +and +.Pa /usr/local/etc/cron.d +which are in a different format (see .Xr crontab 5 ) . .Pp The Modified: head/usr.sbin/cron/cron/cron.h == --- head/usr.sbin/cron/cron/cron.h Mon Oct 31 18:12:07 2016 (r308138) +++ head/usr.sbin/cron/cron/cron.h Mon Oct 31 18:20:12 2016 (r308139) @@ -218,7 +218,7 @@ voidset_cron_uid(void), unget_char(int, FILE *), free_entry(entry *), skip_comments(FILE *), - log_it(char *, int, char *, char *), + log_it(char *, int, char *, const char *), log_close(void); intjob_runqueue(void), Modified: head/usr.sbin/cron/cron/database.c == --- head/usr.sbin/cron/cron/database.c Mon Oct 31 18:12:07 2016 (r308138) +++ head/usr.sbin/cron/cron/database.c Mon Oct 31 18:20:12 2016 (r308139) @@ -45,9 +45,18 @@ load_database(old_db) DIR *dir; struct stat statbuf; struct stat syscron_stat; + time_t maxmtime; DIR_T *dp; cron_db new_db; user*u, *nu; + struct { + const char *name; + struct stat st; + } syscrontabs [] = { + { SYSCRONTABS }, + { LOCALSYSCRONTABS } + }; + int i; Debug(DLOAD, ("[%d] load_database()\n", getpid())) @@ -65,6 +74,16 @@ load_database(old_db) if (stat(SYSCRONTAB, _stat) < OK) syscron_stat.st_mtime = 0; + maxmtime = TMAX(statbuf.st_mtime, syscron_stat.st_mtime); + + for (i = 0; i < nitems(syscrontabs); i++) { + if (stat(syscrontabs[i].name, [i].st) != -1) { + maxmtime = TMAX(syscrontabs[i].st.st_mtime, maxmtime); + } else { + syscrontabs[i].st.st_mtime = 0; + } + } + /* if spooldir's mtime has not changed, we don't need to fiddle with * the database. * @@ -72,7 +91,7 @@ load_database(old_db) * so is guaranteed to be different than the stat() mtime the first * time this function is called. */ - if (old_db->mtime == TMAX(statbuf.st_mtime, syscron_stat.st_mtime)) { + if (old_db->mtime == maxmtime) { Debug(DLOAD, ("[%d] spool dir mtime unch, no load needed.\n", getpid())) return; @@ -83,7 +102,7 @@ load_database(old_db) * actually changed. Whatever is left in the old database when * we're done is chaff -- crontabs that disappeared. */ - new_db.mtime = TMAX(statbuf.st_mtime, syscron_stat.st_mtime); + new_db.mtime = maxmtime; new_db.head = new_db.tail = NULL; if (syscron_stat.st_mtime) { @@ -92,6 +111,29 @@ load_database(old_db) _db, old_db); } + for (i = 0; i < nitems(syscrontabs); i++) { + char tabname[MAXPATHLEN]; + if (syscrontabs[i].st.st_mtime == 0) + continue; +
svn commit: r308138 - stable/10/sys/dev/cxgbe
Author: jhb Date: Mon Oct 31 18:12:07 2016 New Revision: 308138 URL: https://svnweb.freebsd.org/changeset/base/308138 Log: MFC 282039: Don't use ifm_data. It was used only for self checking debug. Sponsored by: Chelsio Communications Modified: stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_main.c == --- stable/10/sys/dev/cxgbe/t4_main.c Mon Oct 31 16:55:14 2016 (r308137) +++ stable/10/sys/dev/cxgbe/t4_main.c Mon Oct 31 18:12:07 2016 (r308138) @@ -1525,9 +1525,6 @@ cxgbe_media_status(struct ifnet *ifp, st struct ifmedia *media = NULL; struct ifmedia_entry *cur; int speed = pi->link_cfg.speed; -#ifdef INVARIANTS - int data = (pi->port_type << 8) | pi->mod_type; -#endif if (ifp == pi->ifp) media = >media; @@ -1538,7 +1535,6 @@ cxgbe_media_status(struct ifnet *ifp, st MPASS(media != NULL); cur = media->ifm_cur; - MPASS(cur->ifm_data == data); ifmr->ifm_status = IFM_AVALID; if (!pi->link_cfg.link_ok) @@ -2838,30 +2834,29 @@ t4_set_desc(struct adapter *sc) static void build_medialist(struct port_info *pi, struct ifmedia *media) { - int data, m; + int m; PORT_LOCK(pi); ifmedia_removeall(media); m = IFM_ETHER | IFM_FDX; - data = (pi->port_type << 8) | pi->mod_type; switch(pi->port_type) { case FW_PORT_TYPE_BT_XFI: case FW_PORT_TYPE_BT_XAUI: - ifmedia_add(media, m | IFM_10G_T, data, NULL); + ifmedia_add(media, m | IFM_10G_T, 0, NULL); /* fall through */ case FW_PORT_TYPE_BT_SGMII: - ifmedia_add(media, m | IFM_1000_T, data, NULL); - ifmedia_add(media, m | IFM_100_TX, data, NULL); - ifmedia_add(media, IFM_ETHER | IFM_AUTO, data, NULL); + ifmedia_add(media, m | IFM_1000_T, 0, NULL); + ifmedia_add(media, m | IFM_100_TX, 0, NULL); + ifmedia_add(media, IFM_ETHER | IFM_AUTO, 0, NULL); ifmedia_set(media, IFM_ETHER | IFM_AUTO); break; case FW_PORT_TYPE_CX4: - ifmedia_add(media, m | IFM_10G_CX4, data, NULL); + ifmedia_add(media, m | IFM_10G_CX4, 0, NULL); ifmedia_set(media, m | IFM_10G_CX4); break; @@ -2872,29 +2867,29 @@ build_medialist(struct port_info *pi, st switch (pi->mod_type) { case FW_PORT_MOD_TYPE_LR: - ifmedia_add(media, m | IFM_10G_LR, data, NULL); + ifmedia_add(media, m | IFM_10G_LR, 0, NULL); ifmedia_set(media, m | IFM_10G_LR); break; case FW_PORT_MOD_TYPE_SR: - ifmedia_add(media, m | IFM_10G_SR, data, NULL); + ifmedia_add(media, m | IFM_10G_SR, 0, NULL); ifmedia_set(media, m | IFM_10G_SR); break; case FW_PORT_MOD_TYPE_LRM: - ifmedia_add(media, m | IFM_10G_LRM, data, NULL); + ifmedia_add(media, m | IFM_10G_LRM, 0, NULL); ifmedia_set(media, m | IFM_10G_LRM); break; case FW_PORT_MOD_TYPE_TWINAX_PASSIVE: case FW_PORT_MOD_TYPE_TWINAX_ACTIVE: - ifmedia_add(media, m | IFM_10G_TWINAX, data, NULL); + ifmedia_add(media, m | IFM_10G_TWINAX, 0, NULL); ifmedia_set(media, m | IFM_10G_TWINAX); break; case FW_PORT_MOD_TYPE_NONE: m &= ~IFM_FDX; - ifmedia_add(media, m | IFM_NONE, data, NULL); + ifmedia_add(media, m | IFM_NONE, 0, NULL); ifmedia_set(media, m | IFM_NONE); break; @@ -2904,7 +2899,7 @@ build_medialist(struct port_info *pi, st device_printf(pi->dev, "unknown port_type (%d), mod_type (%d)\n", pi->port_type, pi->mod_type); - ifmedia_add(media, m | IFM_UNKNOWN, data, NULL); + ifmedia_add(media, m | IFM_UNKNOWN, 0, NULL); ifmedia_set(media, m | IFM_UNKNOWN); break; } @@ -2914,24 +2909,24 @@ build_medialist(struct port_info *pi, st switch (pi->mod_type) { case FW_PORT_MOD_TYPE_LR: - ifmedia_add(media, m | IFM_40G_LR4, data, NULL); + ifmedia_add(media, m | IFM_40G_LR4, 0, NULL); ifmedia_set(media, m | IFM_40G_LR4); break;
svn commit: r308137 - in head: sbin/geom/class/eli sys/geom/eli sys/modules/geom
Author: br Date: Mon Oct 31 16:55:14 2016 New Revision: 308137 URL: https://svnweb.freebsd.org/changeset/base/308137 Log: Fix alignment issues on MIPS: align the pointers properly. All the 5520 GEOM_ELI tests passed successfully on MIPS64EB. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Differential Revision:https://reviews.freebsd.org/D7905 Modified: head/sbin/geom/class/eli/geom_eli.c head/sys/geom/eli/g_eli.h head/sys/geom/eli/g_eli_integrity.c head/sys/modules/geom/Makefile Modified: head/sbin/geom/class/eli/geom_eli.c == --- head/sbin/geom/class/eli/geom_eli.c Mon Oct 31 16:48:16 2016 (r308136) +++ head/sbin/geom/class/eli/geom_eli.c Mon Oct 31 16:55:14 2016 (r308137) @@ -666,7 +666,7 @@ static void eli_init(struct gctl_req *req) { struct g_eli_metadata md; - unsigned char sector[sizeof(struct g_eli_metadata)]; + unsigned char sector[sizeof(struct g_eli_metadata)] __aligned(4); unsigned char key[G_ELI_USERKEYLEN]; char backfile[MAXPATHLEN]; const char *str, *prov; Modified: head/sys/geom/eli/g_eli.h == --- head/sys/geom/eli/g_eli.h Mon Oct 31 16:48:16 2016(r308136) +++ head/sys/geom/eli/g_eli.h Mon Oct 31 16:55:14 2016(r308137) @@ -289,6 +289,7 @@ eli_metadata_encode_v1v2v3v4v5v6v7(struc static __inline void eli_metadata_encode(struct g_eli_metadata *md, u_char *data) { + uint32_t hash[4]; MD5_CTX ctx; u_char *p; @@ -320,12 +321,14 @@ eli_metadata_encode(struct g_eli_metadat } MD5Init(); MD5Update(, data, p - data); - MD5Final(md->md_hash, ); + MD5Final((void *)hash, ); + bcopy(hash, md->md_hash, sizeof(md->md_hash)); bcopy(md->md_hash, p, sizeof(md->md_hash)); } static __inline int eli_metadata_decode_v0(const u_char *data, struct g_eli_metadata *md) { + uint32_t hash[4]; MD5_CTX ctx; const u_char *p; @@ -341,7 +344,8 @@ eli_metadata_decode_v0(const u_char *dat bcopy(p, md->md_mkeys, sizeof(md->md_mkeys)); p += sizeof(md->md_mkeys); MD5Init(); MD5Update(, data, p - data); - MD5Final(md->md_hash, ); + MD5Final((void *)hash, ); + bcopy(hash, md->md_hash, sizeof(md->md_hash)); if (bcmp(md->md_hash, p, 16) != 0) return (EINVAL); return (0); @@ -350,6 +354,7 @@ eli_metadata_decode_v0(const u_char *dat static __inline int eli_metadata_decode_v1v2v3v4v5v6v7(const u_char *data, struct g_eli_metadata *md) { + uint32_t hash[4]; MD5_CTX ctx; const u_char *p; @@ -366,7 +371,8 @@ eli_metadata_decode_v1v2v3v4v5v6v7(const bcopy(p, md->md_mkeys, sizeof(md->md_mkeys)); p += sizeof(md->md_mkeys); MD5Init(); MD5Update(, data, p - data); - MD5Final(md->md_hash, ); + MD5Final((void *)hash, ); + bcopy(hash, md->md_hash, sizeof(md->md_hash)); if (bcmp(md->md_hash, p, 16) != 0) return (EINVAL); return (0); Modified: head/sys/geom/eli/g_eli_integrity.c == --- head/sys/geom/eli/g_eli_integrity.c Mon Oct 31 16:48:16 2016 (r308136) +++ head/sys/geom/eli/g_eli_integrity.c Mon Oct 31 16:55:14 2016 (r308137) @@ -444,6 +444,7 @@ g_eli_auth_run(struct g_eli_worker *wr, size += sizeof(*crde) * nsec; size += sizeof(*crda) * nsec; size += G_ELI_AUTH_SECKEYLEN * nsec; + size += sizeof(uintptr_t); /* Space for alignment. */ data = malloc(size, M_ELI, M_WAITOK); bp->bio_driver2 = data; p = data + encr_secsize * nsec; @@ -451,6 +452,10 @@ g_eli_auth_run(struct g_eli_worker *wr, bp->bio_inbed = 0; bp->bio_children = nsec; +#if defined(__mips_n64) || defined(__mips_o64) + p = (char *)roundup((uintptr_t)p, sizeof(uintptr_t)); +#endif + for (i = 1; i <= nsec; i++, dstoff += encr_secsize) { crp = (struct cryptop *)p; p += sizeof(*crp); crde = (struct cryptodesc *)p; p += sizeof(*crde); Modified: head/sys/modules/geom/Makefile == --- head/sys/modules/geom/Makefile Mon Oct 31 16:48:16 2016 (r308136) +++ head/sys/modules/geom/Makefile Mon Oct 31 16:55:14 2016 (r308137) @@ -6,6 +6,7 @@ SYSDIR?=${.CURDIR}/../.. SUBDIR=geom_bde \ geom_cache \ geom_concat \ + geom_eli \ geom_gate \ geom_journal \ geom_label \ @@ -29,9 +30,4 @@ SUBDIR= geom_bde \ SUBDIR+= geom_ccd .endif -# Alignment issues in g_eli_auth_run() on MIPS64 causes kernel panic -.if ${MACHINE_ARCH} !=
svn commit: r308136 - stable/10/sys/dev/netmap
Author: sbruno Date: Mon Oct 31 16:48:16 2016 New Revision: 308136 URL: https://svnweb.freebsd.org/changeset/base/308136 Log: MFC r308038: The buffer address is always overwritten in the extended descriptor format, we have to refresh it ... always. This fixes problems reported in NetMap with em(4) devices after conversion to extended descriptor format in svn r293331. Modified: stable/10/sys/dev/netmap/if_em_netmap.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/netmap/if_em_netmap.h == --- stable/10/sys/dev/netmap/if_em_netmap.h Mon Oct 31 16:44:31 2016 (r308135) +++ stable/10/sys/dev/netmap/if_em_netmap.h Mon Oct 31 16:48:16 2016 (r308136) @@ -279,9 +279,9 @@ em_netmap_rxsync(struct netmap_kring *kr if (addr == NETMAP_BUF_BASE(na)) /* bad buf */ goto ring_reset; + curr->read.buffer_addr = htole64(paddr); if (slot->flags & NS_BUF_CHANGED) { /* buffer has changed, reload map */ - curr->read.buffer_addr = htole64(paddr); netmap_reload_map(na, rxr->rxtag, rxbuf->map, addr); slot->flags &= ~NS_BUF_CHANGED; } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308135 - in stable: 10/release/doc/share/xml 11/release/doc/share/xml 9/release/doc/share/xml
Author: gjb Date: Mon Oct 31 16:44:31 2016 New Revision: 308135 URL: https://svnweb.freebsd.org/changeset/base/308135 Log: Document EN-16:17-18, SA-16:26-32 Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/share/xml/errata.xml stable/10/release/doc/share/xml/security.xml Changes in other areas also in this revision: Modified: stable/11/release/doc/share/xml/errata.xml stable/11/release/doc/share/xml/security.xml stable/9/release/doc/share/xml/security.xml Modified: stable/10/release/doc/share/xml/errata.xml == --- stable/10/release/doc/share/xml/errata.xml Mon Oct 31 16:06:57 2016 (r308134) +++ stable/10/release/doc/share/xml/errata.xml Mon Oct 31 16:44:31 2016 (r308135) @@ -104,6 +104,13 @@ Fix SCSI INQUIRY checks and error handling + + + FreeBSD-EN-16:17.vm + 25October2016 + Several virtual memory issues + Modified: stable/10/release/doc/share/xml/security.xml == --- stable/10/release/doc/share/xml/security.xmlMon Oct 31 16:06:57 2016(r308134) +++ stable/10/release/doc/share/xml/security.xmlMon Oct 31 16:44:31 2016(r308135) @@ -95,6 +95,42 @@ 25July2016 heap overflow vulnerability + + + FreeBSD-SA-16:26.openssl + 23September2016 + Multiple vulnerabilities + + + + FreeBSD-SA-16:27.openssl + 26September2016 + Regression in OpenSSL + suite + + + + FreeBSD-SA-16:29.bspatch + 10October2016 + Heap overflow vulnerability + + + + FreeBSD-SA-16:30.portsnap + 10October2016 + Multiple vulnerabilities + + + + FreeBSD-SA-16:31.libarchive + 10October2016 + Multiple vulnerabilities + ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308135 - in stable: 10/release/doc/share/xml 11/release/doc/share/xml 9/release/doc/share/xml
Author: gjb Date: Mon Oct 31 16:44:31 2016 New Revision: 308135 URL: https://svnweb.freebsd.org/changeset/base/308135 Log: Document EN-16:17-18, SA-16:26-32 Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/share/xml/errata.xml stable/11/release/doc/share/xml/security.xml Changes in other areas also in this revision: Modified: stable/10/release/doc/share/xml/errata.xml stable/10/release/doc/share/xml/security.xml stable/9/release/doc/share/xml/security.xml Modified: stable/11/release/doc/share/xml/errata.xml == --- stable/11/release/doc/share/xml/errata.xml Mon Oct 31 16:06:57 2016 (r308134) +++ stable/11/release/doc/share/xml/errata.xml Mon Oct 31 16:44:31 2016 (r308135) @@ -19,9 +19,10 @@ - No errata notices. - - + FreeBSD-EN-16:18.loader + 25October2016 + Loader may hang during boot Modified: stable/11/release/doc/share/xml/security.xml == --- stable/11/release/doc/share/xml/security.xmlMon Oct 31 16:06:57 2016(r308134) +++ stable/11/release/doc/share/xml/security.xmlMon Oct 31 16:44:31 2016(r308135) @@ -19,9 +19,10 @@ - No advisories. - - + FreeBSD-SA-16:32.bhyve + 25October2016 + Privilege escalation vulnerability ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308135 - in stable: 10/release/doc/share/xml 11/release/doc/share/xml 9/release/doc/share/xml
Author: gjb Date: Mon Oct 31 16:44:31 2016 New Revision: 308135 URL: https://svnweb.freebsd.org/changeset/base/308135 Log: Document EN-16:17-18, SA-16:26-32 Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/share/xml/security.xml Changes in other areas also in this revision: Modified: stable/10/release/doc/share/xml/errata.xml stable/10/release/doc/share/xml/security.xml stable/11/release/doc/share/xml/errata.xml stable/11/release/doc/share/xml/security.xml Modified: stable/9/release/doc/share/xml/security.xml == --- stable/9/release/doc/share/xml/security.xml Mon Oct 31 16:06:57 2016 (r308134) +++ stable/9/release/doc/share/xml/security.xml Mon Oct 31 16:44:31 2016 (r308135) @@ -452,6 +452,50 @@ 25July2016 heap overflow vulnerability + + + FreeBSD-SA-16:26.openssl + 23September2016 + Multiple vulnerabilities + + + + FreeBSD-SA-16:27.openssl + 26September2016 + Regression in OpenSSL + suite + + + + FreeBSD-SA-16:28.bind + 10October2016 + BIND denial of + service + + + + FreeBSD-SA-16:29.bspatch + 10October2016 + Heap overflow vulnerability + + + + FreeBSD-SA-16:30.portsnap + 10October2016 + Multiple vulnerabilities + + + + FreeBSD-SA-16:31.libarchive + 10October2016 + Multiple vulnerabilities + ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308134 - head/usr.sbin/ctld
Author: mav Date: Mon Oct 31 16:06:57 2016 New Revision: 308134 URL: https://svnweb.freebsd.org/changeset/base/308134 Log: There appeared to be even more copy/pastes. :) Submitted by: Dmitry LuhtionovMFC after:2 weeks Modified: head/usr.sbin/ctld/ctld.c Modified: head/usr.sbin/ctld/ctld.c == --- head/usr.sbin/ctld/ctld.c Mon Oct 31 16:01:22 2016(r308133) +++ head/usr.sbin/ctld/ctld.c Mon Oct 31 16:06:57 2016(r308134) @@ -227,7 +227,7 @@ auth_check_secret_length(struct auth *au else log_warnx("mutual secret for user \"%s\", " "target \"%s\", is too short; it should be " - "at least 16 characters long", + "at least 12 characters long", auth->a_user, auth->a_auth_group->ag_target->t_name); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308133 - head/usr.sbin/ctld
Author: mav Date: Mon Oct 31 16:01:22 2016 New Revision: 308133 URL: https://svnweb.freebsd.org/changeset/base/308133 Log: Fix wrong copy/paste in error message. Submitted by: Dmitry LuhtionovMFC after:2 weeks Modified: head/usr.sbin/ctld/ctld.c Modified: head/usr.sbin/ctld/ctld.c == --- head/usr.sbin/ctld/ctld.c Mon Oct 31 15:49:41 2016(r308132) +++ head/usr.sbin/ctld/ctld.c Mon Oct 31 16:01:22 2016(r308133) @@ -198,7 +198,7 @@ auth_check_secret_length(struct auth *au auth->a_auth_group->ag_name); else log_warnx("secret for user \"%s\", target \"%s\", " - "is too short; it should be at least 16 characters " + "is too short; it should be at least 12 characters " "long", auth->a_user, auth->a_auth_group->ag_target->t_name); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308132 - head/sys/mips/mips
Author: br Date: Mon Oct 31 15:49:41 2016 New Revision: 308132 URL: https://svnweb.freebsd.org/changeset/base/308132 Log: Use correct signal number for floating point exceptions. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Modified: head/sys/mips/mips/trap.c Modified: head/sys/mips/mips/trap.c == --- head/sys/mips/mips/trap.c Mon Oct 31 15:46:06 2016(r308131) +++ head/sys/mips/mips/trap.c Mon Oct 31 15:49:41 2016(r308132) @@ -1033,7 +1033,7 @@ dofault: case T_FPE + T_USER: if (!emulate_fp) { - i = SIGILL; + i = SIGFPE; addr = trapframe->pc; break; } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308131 - stable/11/sys/dev/netmap
Author: sbruno Date: Mon Oct 31 15:46:06 2016 New Revision: 308131 URL: https://svnweb.freebsd.org/changeset/base/308131 Log: MFC r308038: The buffer address is always overwritten in the extended descriptor format, we have to refresh it ... always. This fixes problems reported in NetMap with em(4) devices after conversion to extended descriptor format in svn r293331. Modified: stable/11/sys/dev/netmap/if_em_netmap.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/netmap/if_em_netmap.h == --- stable/11/sys/dev/netmap/if_em_netmap.h Mon Oct 31 15:33:58 2016 (r308130) +++ stable/11/sys/dev/netmap/if_em_netmap.h Mon Oct 31 15:46:06 2016 (r308131) @@ -277,9 +277,9 @@ em_netmap_rxsync(struct netmap_kring *kr if (addr == NETMAP_BUF_BASE(na)) /* bad buf */ goto ring_reset; + curr->read.buffer_addr = htole64(paddr); if (slot->flags & NS_BUF_CHANGED) { /* buffer has changed, reload map */ - curr->read.buffer_addr = htole64(paddr); netmap_reload_map(na, rxr->rxtag, rxbuf->map, addr); slot->flags &= ~NS_BUF_CHANGED; } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308130 - in head: . gnu/lib/libgcc gnu/usr.bin/binutils gnu/usr.bin/binutils/ld gnu/usr.bin/binutils/libbfd gnu/usr.bin/cc gnu/usr.bin/gdb gnu/usr.bin/gdb/libgdb lib/libc lib/libc/mips...
Author: br Date: Mon Oct 31 15:33:58 2016 New Revision: 308130 URL: https://svnweb.freebsd.org/changeset/base/308130 Log: Add full softfloat and hardfloat support for MIPS. This adds new target architectures for hardfloat: mipselhf mipshf mips64elhf mips64hf. Tested in QEMU only. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Differential Revision:https://reviews.freebsd.org/D8376 Modified: head/Makefile head/Makefile.inc1 head/gnu/lib/libgcc/Makefile head/gnu/usr.bin/binutils/Makefile.inc0 head/gnu/usr.bin/binutils/ld/Makefile.mips head/gnu/usr.bin/binutils/libbfd/Makefile.mips head/gnu/usr.bin/cc/Makefile.inc head/gnu/usr.bin/cc/Makefile.tgt head/gnu/usr.bin/gdb/Makefile.inc head/gnu/usr.bin/gdb/libgdb/Makefile head/lib/libc/Makefile head/lib/libc/mips/Makefile.inc head/lib/libc/mips/Symbol.map head/lib/libc/mips/gen/Makefile.inc head/lib/libc/mips/gen/flt_rounds.c head/lib/msun/mips/Makefile.inc head/lib/msun/mips/Symbol.map head/lib/msun/mips/fenv.c head/lib/msun/mips/fenv.h head/share/man/man7/arch.7 head/share/mk/bsd.cpu.mk head/share/mk/bsd.endian.mk head/share/mk/sys.mk head/sys/boot/Makefile.ficl head/sys/boot/common/Makefile.inc head/sys/boot/mips/uboot/Makefile head/sys/conf/kern.mk head/sys/mips/include/float.h head/sys/mips/mips/exception.S head/sys/mips/mips/locore.S head/sys/mips/mips/swtch.S head/sys/mips/mips/trap.c Modified: head/Makefile == --- head/Makefile Mon Oct 31 15:11:55 2016(r308129) +++ head/Makefile Mon Oct 31 15:33:58 2016(r308130) @@ -239,7 +239,7 @@ _MAKE+= MK_META_MODE=no _TARGET_ARCH= ${TARGET:S/pc98/i386/:S/arm64/aarch64/} .elif !defined(TARGET) && defined(TARGET_ARCH) && \ ${TARGET_ARCH} != ${MACHINE_ARCH} -_TARGET= ${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/aarch64/arm64/:C/powerpc64/powerpc/:C/powerpcspe/powerpc/:C/riscv64/riscv/} +_TARGET= ${TARGET_ARCH:C/mips(n32|64)?(el)?(hf)?/mips/:C/arm(v6)?(eb)?/arm/:C/aarch64/arm64/:C/powerpc64/powerpc/:C/powerpcspe/powerpc/:C/riscv64/riscv/} .endif .if defined(TARGET) && !defined(_TARGET) _TARGET=${TARGET} @@ -421,7 +421,7 @@ TARGETS?=amd64 arm arm64 i386 mips pc98 _UNIVERSE_TARGETS= ${TARGETS} TARGET_ARCHES_arm?=arm armeb armv6 TARGET_ARCHES_arm64?= aarch64 -TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 +TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 mipselhf mipshf mips64elhf mips64hf TARGET_ARCHES_powerpc?=powerpc powerpc64 powerpcspe TARGET_ARCHES_pc98?= i386 .for target in ${TARGETS} Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Mon Oct 31 15:11:55 2016(r308129) +++ head/Makefile.inc1 Mon Oct 31 15:33:58 2016(r308130) @@ -356,6 +356,10 @@ KNOWN_ARCHES?= aarch64/arm64 \ mipsn32el/mips \ mips64/mips \ mipsn32/mips \ + mipshf/mips \ + mipselhf/mips \ + mips64elhf/mips \ + mips64hf/mips \ powerpc \ powerpc64/powerpc \ powerpcspe/powerpc \ Modified: head/gnu/lib/libgcc/Makefile == --- head/gnu/lib/libgcc/MakefileMon Oct 31 15:11:55 2016 (r308129) +++ head/gnu/lib/libgcc/MakefileMon Oct 31 15:33:58 2016 (r308130) @@ -165,7 +165,7 @@ LIBADD+=compiler_rt .if ${TARGET_CPUARCH} == mips LIB2FUNCS_EXTRA = floatunsidf.c floatunsisf.c # ABIs other than o32 need this -.if ${TARGET_ARCH} != "mips" && ${TARGET_ARCH} != "mipsel" +.if ${TARGET_ARCH:Mmips64*} != "" || ${TARGET_ARCH:Mmipsn32*} != "" LIB2FUNCS_EXTRA+= floatdidf.c fixunsdfsi.c LIB2FUNCS_EXTRA+= floatdisf.c floatundidf.c LIB2FUNCS_EXTRA+= fixsfdi.c floatundisf.c Modified: head/gnu/usr.bin/binutils/Makefile.inc0 == --- head/gnu/usr.bin/binutils/Makefile.inc0 Mon Oct 31 15:11:55 2016 (r308129) +++ head/gnu/usr.bin/binutils/Makefile.inc0 Mon Oct 31 15:33:58 2016 (r308130) @@ -7,7 +7,7 @@ VERSION= "2.17.50 [FreeBSD] 2007-07-03" .if defined(TARGET_ARCH) -TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc(64|spe)/powerpc/} +TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?(hf)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc(64|spe)/powerpc/} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif @@ -17,7 +17,7 @@ TARGET_OS?= freebsd BINUTILS_ARCH=${TARGET_ARCH:C/amd64/x86_64/} TARGET_TUPLE?= ${BINUTILS_ARCH}-${TARGET_VENDOR}-${TARGET_OS} .if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" || \ - (${TARGET_CPUARCH} == "mips" && ${TARGET_ARCH:Mmips*el}
svn commit: r308129 - head/lib/libstand
Author: bapt Date: Mon Oct 31 15:11:55 2016 New Revision: 308129 URL: https://svnweb.freebsd.org/changeset/base/308129 Log: When issuing a PXE dhcp request, always issue a param request (DHCP option 55) with all dhcp parameters we might be interested in. Some DHCP server like the new kea (by ISC) expect it. This makes pxeboot functional with ISC kea. Submitted by: Vincent LegoutMFC after:1 month Sponsored by: Gandi.net Modified: head/lib/libstand/bootp.c Modified: head/lib/libstand/bootp.c == --- head/lib/libstand/bootp.c Mon Oct 31 13:12:58 2016(r308128) +++ head/lib/libstand/bootp.c Mon Oct 31 15:11:55 2016(r308129) @@ -148,7 +148,17 @@ bootp(sock, flag) bp->bp_vend[7] = TAG_CLASSID; bp->bp_vend[8] = 9; bcopy("PXEClient", >bp_vend[9], 9); - bp->bp_vend[18] = TAG_END; + bp->bp_vend[18] = TAG_PARAM_REQ; + bp->bp_vend[19] = 8; + bp->bp_vend[20] = TAG_ROOTPATH; + bp->bp_vend[21] = TAG_TFTP_SERVER; + bp->bp_vend[22] = TAG_HOSTNAME; + bp->bp_vend[23] = TAG_SWAPSERVER; + bp->bp_vend[24] = TAG_GATEWAY; + bp->bp_vend[25] = TAG_SUBNET_MASK; + bp->bp_vend[26] = TAG_INTF_MTU; + bp->bp_vend[27] = TAG_SERVERID; + bp->bp_vend[28] = TAG_END; } else bp->bp_vend[7] = TAG_END; #else ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308128 - in head/sys: conf dev/xen/gntdev xen
Author: royger Date: Mon Oct 31 13:12:58 2016 New Revision: 308128 URL: https://svnweb.freebsd.org/changeset/base/308128 Log: xen: add a grant-table user-space device A grant-table user-space device will allow user-space applications to map and share grants (Xen way to share memory) among Xen domains. This grant table user-space device has been tested with the QEMU Qdisk Xen backed. Submitted by: jaggi Reviewed by: royger Differential review: https://reviews.freebsd.org/D7293 Added: head/sys/dev/xen/gntdev/ head/sys/dev/xen/gntdev/gntdev.c (contents, props changed) head/sys/xen/gntdev.h (contents, props changed) Modified: head/sys/conf/files Modified: head/sys/conf/files == --- head/sys/conf/files Mon Oct 31 13:00:53 2016(r308127) +++ head/sys/conf/files Mon Oct 31 13:12:58 2016(r308128) @@ -3183,6 +3183,7 @@ dev/xen/xenstore/xenstore_dev.c optional dev/xen/xenstore/xenstored_dev.c optional xenhvm dev/xen/evtchn/evtchn_dev.coptional xenhvm dev/xen/privcmd/privcmd.c optional xenhvm +dev/xen/gntdev/gntdev.coptional xenhvm dev/xen/debug/debug.c optional xenhvm dev/xl/if_xl.c optional xl pci dev/xl/xlphy.c optional xl pci Added: head/sys/dev/xen/gntdev/gntdev.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/xen/gntdev/gntdev.cMon Oct 31 13:12:58 2016 (r308128) @@ -0,0 +1,1275 @@ +/*- + * Copyright (c) 2016 Akshay Jaggi+ * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * gntdev.c + * + * Interface to /dev/xen/gntdev. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include + +MALLOC_DEFINE(M_GNTDEV, "gntdev", "Xen grant-table user-space device"); + +#define MAX_OFFSET_COUNT ((0xull >> PAGE_SHIFT) + 1) + +static d_open_t gntdev_open; +static d_ioctl_t gntdev_ioctl; +static d_mmap_single_t gntdev_mmap_single; + +static struct cdevsw gntdev_devsw = { + .d_version = D_VERSION, + .d_open = gntdev_open, + .d_ioctl = gntdev_ioctl, + .d_mmap_single = gntdev_mmap_single, + .d_name = "gntdev", +}; + +static device_t gntdev_dev = NULL; + +struct gntdev_gref; +struct gntdev_gmap; +STAILQ_HEAD(gref_list_head, gntdev_gref); +STAILQ_HEAD(gmap_list_head, gntdev_gmap); +RB_HEAD(gref_tree_head, gntdev_gref); +RB_HEAD(gmap_tree_head, gntdev_gmap); + +struct file_offset_struct { + RB_ENTRY(file_offset_struct)next; + uint64_tfile_offset; + uint64_tcount; +}; + +static int +offset_cmp(struct file_offset_struct *f1, struct file_offset_struct *f2) +{ + return (f1->file_offset - f2->file_offset); +} + +RB_HEAD(file_offset_head, file_offset_struct); +RB_GENERATE_STATIC(file_offset_head, file_offset_struct, next, offset_cmp); + +struct per_user_data { + struct mtx user_data_lock; + struct gref_tree_head gref_tree; + struct gmap_tree_head gmap_tree; + struct file_offset_head file_offset; +}; + +/* + * Get offset into the file
svn commit: r308127 - in head/sys: x86/xen xen
Author: royger Date: Mon Oct 31 13:00:53 2016 New Revision: 308127 URL: https://svnweb.freebsd.org/changeset/base/308127 Log: xen/intr: add reference counts to event channels Add a reference count to xenisrc. This is required for implementation of unmap-notifications in the grant table userspace device (gntdev). We need to hold a reference to the event channel port, in case the user deallocates the port before we send the notification. Submitted by: jaggi Reviewed by: royger Differential review: https://reviews.freebsd.org/D7429 Modified: head/sys/x86/xen/xen_intr.c head/sys/xen/xen_intr.h Modified: head/sys/x86/xen/xen_intr.c == --- head/sys/x86/xen/xen_intr.c Mon Oct 31 11:31:11 2016(r308126) +++ head/sys/x86/xen/xen_intr.c Mon Oct 31 13:00:53 2016(r308127) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -128,6 +129,7 @@ struct xenisrc { u_int xi_activehi:1; u_int xi_edgetrigger:1; u_int xi_masked:1; + volatile u_int xi_refcount; }; static voidxen_intr_suspend(struct pic *); @@ -343,10 +345,8 @@ xen_intr_release_isrc(struct xenisrc *is { mtx_lock(_intr_isrc_lock); - if (isrc->xi_intsrc.is_handlers != 0) { - mtx_unlock(_intr_isrc_lock); - return (EBUSY); - } + KASSERT(isrc->xi_intsrc.is_handlers == 0, + ("Release called, but xenisrc still in use")); evtchn_mask_port(isrc->xi_port); evtchn_clear_port(isrc->xi_port); @@ -417,6 +417,7 @@ xen_intr_bind_isrc(struct xenisrc **isrc } isrc->xi_port = local_port; xen_intr_port_to_isrc[local_port] = isrc; + refcount_init(>xi_refcount, 1); mtx_unlock(_intr_isrc_lock); /* Assign the opaque handler (the event channel port) */ @@ -1508,6 +1509,13 @@ xen_intr_unbind(xen_intr_handle_t *port_ if (isrc == NULL) return; + mtx_lock(_intr_isrc_lock); + if (refcount_release(>xi_refcount) == 0) { + mtx_unlock(_intr_isrc_lock); + return; + } + mtx_unlock(_intr_isrc_lock); + if (isrc->xi_cookie != NULL) intr_remove_handler(isrc->xi_cookie); xen_intr_release_isrc(isrc); @@ -1563,6 +1571,31 @@ xen_intr_add_handler(device_t dev, drive return (error); } +int +xen_intr_get_evtchn_from_port(evtchn_port_t port, xen_intr_handle_t *handlep) +{ + + if (!is_valid_evtchn(port) || port >= NR_EVENT_CHANNELS) + return (EINVAL); + + if (handlep == NULL) { + return (EINVAL); + } + + mtx_lock(_intr_isrc_lock); + if (xen_intr_port_to_isrc[port] == NULL) { + mtx_unlock(_intr_isrc_lock); + return (EINVAL); + } + refcount_acquire(_intr_port_to_isrc[port]->xi_refcount); + mtx_unlock(_intr_isrc_lock); + + /* Assign the opaque handler (the event channel port) */ + *handlep = _intr_port_to_isrc[port]->xi_vector; + + return (0); +} + #ifdef DDB static const char * xen_intr_print_type(enum evtchn_type type) Modified: head/sys/xen/xen_intr.h == --- head/sys/xen/xen_intr.h Mon Oct 31 11:31:11 2016(r308126) +++ head/sys/xen/xen_intr.h Mon Oct 31 13:00:53 2016(r308127) @@ -263,4 +263,16 @@ int xen_intr_add_handler(device_t dev, d driver_intr_t handler, void *arg, enum intr_type flags, xen_intr_handle_t handle); +/** + * Get a reference to an event channel port + * + * \param port Event channel port to which we get a reference. + * \param handlep Pointer to an opaque handle used to manage this + * registration. + * + * \returns 0 on success, otherwise an errno. + */ +int xen_intr_get_evtchn_from_port(evtchn_port_t port, + xen_intr_handle_t *handlep); + #endif /* _XEN_INTR_H_ */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308126 - head/sys/dev/xen/netfront
Author: royger Date: Mon Oct 31 11:31:11 2016 New Revision: 308126 URL: https://svnweb.freebsd.org/changeset/base/308126 Log: xen/netfront: fix statistics Fix the statistics used by netfront. Reported by:trond.endres...@ximalas.info Submitted by: ae Reviewed by:royger, Wei LiuMFC after:4 weeks PR: 213439 Modified: head/sys/dev/xen/netfront/netfront.c Modified: head/sys/dev/xen/netfront/netfront.c == --- head/sys/dev/xen/netfront/netfront.cMon Oct 31 11:30:01 2016 (r308125) +++ head/sys/dev/xen/netfront/netfront.cMon Oct 31 11:31:11 2016 (r308126) @@ -156,21 +156,6 @@ static int xn_get_responses(struct netfr #define virt_to_mfn(x) (vtophys(x) >> PAGE_SHIFT) #define INVALID_P2M_ENTRY (~0UL) - -struct xn_rx_stats -{ - u_long rx_packets; /* total packets received */ - u_long rx_bytes; /* total bytes received */ - u_long rx_errors; /* bad packets received */ -}; - -struct xn_tx_stats -{ - u_long tx_packets; /* total packets transmitted*/ - u_long tx_bytes; /* total bytes transmitted */ - u_long tx_errors; /* packet transmit problems */ -}; - #define XN_QUEUE_NAME_LEN 8 /* xn{t,r}x_%u, allow for two digits */ struct netfront_rxq { struct netfront_info*info; @@ -190,8 +175,6 @@ struct netfront_rxq { struct lro_ctrl lro; struct callout rx_refill; - - struct xn_rx_stats stats; }; struct netfront_txq { @@ -215,8 +198,6 @@ struct netfront_txq { struct task defrtask; boolfull; - - struct xn_tx_stats stats; }; struct netfront_info { @@ -1191,7 +1172,7 @@ xn_rxeof(struct netfront_rxq *rxq) if (__predict_false(err)) { if (m) (void )mbufq_enqueue(_errq, m); - rxq->stats.rx_errors++; + if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1); continue; } @@ -1216,9 +1197,6 @@ xn_rxeof(struct netfront_rxq *rxq) m->m_pkthdr.csum_flags |= CSUM_TSO; } - rxq->stats.rx_packets++; - rxq->stats.rx_bytes += m->m_pkthdr.len; - (void )mbufq_enqueue(_rxq, m); rxq->ring.rsp_cons = i; } @@ -1304,12 +1282,6 @@ xn_txeof(struct netfront_txq *txq) "trying to free it again!")); M_ASSERTVALID(m); - /* -* Increment packet count if this is the last -* mbuf of the chain. -*/ - if (!m->m_next) - if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); if (__predict_false(gnttab_query_foreign_access( txq->grant_ref[id]) != 0)) { panic("%s: grant id %u still in use by the " @@ -1701,10 +1673,12 @@ xn_assemble_tx_request(struct netfront_t } BPF_MTAP(ifp, m_head); - xn_txeof(txq); + if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); + if_inc_counter(ifp, IFCOUNTER_OBYTES, m_head->m_pkthdr.len); + if (m_head->m_flags & M_MCAST) + if_inc_counter(ifp, IFCOUNTER_OMCASTS, 1); - txq->stats.tx_bytes += m_head->m_pkthdr.len; - txq->stats.tx_packets++; + xn_txeof(txq); return (0); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308125 - head/sys/boot/efi/loader
Author: manu Date: Mon Oct 31 11:30:01 2016 New Revision: 308125 URL: https://svnweb.freebsd.org/changeset/base/308125 Log: In loader.efi, instead of exiting directly, try to fallback on the first EFI device if we can't find the one from which the image was loaded. Reviewed by: allanjude,imp,jhb MFC after:1 week Differential Revision:https://reviews.freebsd.org/D6780 Modified: head/sys/boot/efi/loader/main.c Modified: head/sys/boot/efi/loader/main.c == --- head/sys/boot/efi/loader/main.c Mon Oct 31 11:13:36 2016 (r308124) +++ head/sys/boot/efi/loader/main.c Mon Oct 31 11:30:01 2016 (r308125) @@ -237,6 +237,11 @@ find_currdev(EFI_LOADED_IMAGE *img, stru } } + /* Try to fallback on first device */ + if (devsw[0] != NULL) { + *dev = devsw[0]; + return (0); + } return (ENOENT); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308124 - head/sys/boot/efi
Author: andrew Date: Mon Oct 31 11:13:36 2016 New Revision: 308124 URL: https://svnweb.freebsd.org/changeset/base/308124 Log: On arm64 build the efi loader with -fPIC. Without this clang 3.9 will generate relocation in the self relocation code. MFC after:1 week Sponsored by: ABT Systems Ltd Modified: head/sys/boot/efi/Makefile.inc Modified: head/sys/boot/efi/Makefile.inc == --- head/sys/boot/efi/Makefile.inc Mon Oct 31 07:21:37 2016 (r308123) +++ head/sys/boot/efi/Makefile.inc Mon Oct 31 11:13:36 2016 (r308124) @@ -20,6 +20,7 @@ CFLAGS+= -mno-aes .if ${MACHINE_CPUARCH} == "aarch64" CFLAGS+= -fshort-wchar +CFLAGS+= -fPIC .endif .include "../Makefile.inc" ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308123 - stable/10/sys/cam/scsi
Author: mav Date: Mon Oct 31 07:21:37 2016 New Revision: 308123 URL: https://svnweb.freebsd.org/changeset/base/308123 Log: MFC r307523: Make pass driver better support CAM_CDB_POINTER flag. Previously pass driver just ignored the flag, making random kernel code access user-space pointer, sometime causing crashes even for correctly written applications if user-level context was switched or swapped out. This patch tries to copyin the CDB into kernel space to avoid it. Modified: stable/10/sys/cam/scsi/scsi_pass.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_pass.c == --- stable/10/sys/cam/scsi/scsi_pass.c Mon Oct 31 07:21:07 2016 (r308122) +++ stable/10/sys/cam/scsi/scsi_pass.c Mon Oct 31 07:21:37 2016 (r308123) @@ -1881,6 +1881,18 @@ passdoioctl(struct cdev *dev, u_long cmd break; } + if (ccb->ccb_h.flags & CAM_CDB_POINTER) { + if (ccb->csio.cdb_len > IOCDBLEN) { + error = EINVAL; + break; + } + error = copyin(ccb->csio.cdb_io.cdb_ptr, + ccb->csio.cdb_io.cdb_bytes, ccb->csio.cdb_len); + if (error) + break; + ccb->ccb_h.flags &= ~CAM_CDB_POINTER; + } + /* * Some CCB types, like scan bus and scan lun can only go * through the transport layer device. @@ -2148,6 +2160,7 @@ passsendccb(struct cam_periph *periph, u { struct pass_softc *softc; struct cam_periph_map_info mapinfo; + uint8_t *cmd; xpt_opcode fc; int error; @@ -2159,6 +2172,14 @@ passsendccb(struct cam_periph *periph, u */ xpt_merge_ccb(ccb, inccb); + if (ccb->ccb_h.flags & CAM_CDB_POINTER) { + cmd = __builtin_alloca(ccb->csio.cdb_len); + error = copyin(ccb->csio.cdb_io.cdb_ptr, cmd, ccb->csio.cdb_len); + if (error) + return (error); + ccb->csio.cdb_io.cdb_ptr = cmd; + } + /* */ ccb->ccb_h.cbfcnp = passdone; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308122 - stable/11/sys/cam/scsi
Author: mav Date: Mon Oct 31 07:21:07 2016 New Revision: 308122 URL: https://svnweb.freebsd.org/changeset/base/308122 Log: MFC r307523: Make pass driver better support CAM_CDB_POINTER flag. Previously pass driver just ignored the flag, making random kernel code access user-space pointer, sometime causing crashes even for correctly written applications if user-level context was switched or swapped out. This patch tries to copyin the CDB into kernel space to avoid it. Modified: stable/11/sys/cam/scsi/scsi_pass.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/scsi/scsi_pass.c == --- stable/11/sys/cam/scsi/scsi_pass.c Mon Oct 31 05:58:11 2016 (r308121) +++ stable/11/sys/cam/scsi/scsi_pass.c Mon Oct 31 07:21:07 2016 (r308122) @@ -1876,6 +1876,18 @@ passdoioctl(struct cdev *dev, u_long cmd break; } + if (ccb->ccb_h.flags & CAM_CDB_POINTER) { + if (ccb->csio.cdb_len > IOCDBLEN) { + error = EINVAL; + break; + } + error = copyin(ccb->csio.cdb_io.cdb_ptr, + ccb->csio.cdb_io.cdb_bytes, ccb->csio.cdb_len); + if (error) + break; + ccb->ccb_h.flags &= ~CAM_CDB_POINTER; + } + /* * Some CCB types, like scan bus and scan lun can only go * through the transport layer device. @@ -2143,6 +2155,7 @@ passsendccb(struct cam_periph *periph, u { struct pass_softc *softc; struct cam_periph_map_info mapinfo; + uint8_t *cmd; xpt_opcode fc; int error; @@ -2154,6 +2167,14 @@ passsendccb(struct cam_periph *periph, u */ xpt_merge_ccb(ccb, inccb); + if (ccb->ccb_h.flags & CAM_CDB_POINTER) { + cmd = __builtin_alloca(ccb->csio.cdb_len); + error = copyin(ccb->csio.cdb_io.cdb_ptr, cmd, ccb->csio.cdb_len); + if (error) + return (error); + ccb->csio.cdb_io.cdb_ptr = cmd; + } + /* */ ccb->ccb_h.cbfcnp = passdone; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"