svn commit: r305277 - head/sys/net
Author: sephe Date: Fri Sep 2 05:49:38 2016 New Revision: 305277 URL: https://svnweb.freebsd.org/changeset/base/305277 Log: net/rndis: Add comment for rndis_comp_hdr Reviewed by: hps MFC after:1 week Sponsored by: Microsoft Differential Revision:https://reviews.freebsd.org/D7738 Modified: head/sys/net/rndis.h Modified: head/sys/net/rndis.h == --- head/sys/net/rndis.hFri Sep 2 05:30:38 2016(r305276) +++ head/sys/net/rndis.hFri Sep 2 05:49:38 2016(r305277) @@ -147,6 +147,12 @@ struct rndis_pktinfo { /* * RNDIS control messages */ + +/* + * Common header for RNDIS completion messages. + * + * NOTE: It does not apply to REMOTE_NDIS_RESET_CMPLT. + */ struct rndis_comp_hdr { uint32_t rm_type; uint32_t rm_len; ___ 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: r305276 - head/sys/dev/hyperv/netvsc
Author: sephe Date: Fri Sep 2 05:30:38 2016 New Revision: 305276 URL: https://svnweb.freebsd.org/changeset/base/305276 Log: hyperv/hn: Use the per-packet-info types defined by net/rndis.h MFC after:1 week Sponsored by: Microsoft Differential Revision:https://reviews.freebsd.org/D7737 Modified: head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Modified: head/sys/dev/hyperv/netvsc/hv_rndis_filter.c == --- head/sys/dev/hyperv/netvsc/hv_rndis_filter.cFri Sep 2 04:27:02 2016(r305275) +++ head/sys/dev/hyperv/netvsc/hv_rndis_filter.cFri Sep 2 05:30:38 2016(r305276) @@ -191,28 +191,28 @@ hv_rf_find_recvinfo(const rndis_packet * data = pi->rm_data; switch (pi->rm_type) { - case ieee_8021q_info: + case NDIS_PKTINFO_TYPE_VLAN: if (__predict_false(dlen < NDIS_VLAN_INFO_SIZE)) return (EINVAL); info->vlan_info = *((const uint32_t *)data); mask |= HV_RF_RECVINFO_VLAN; break; - case tcpip_chksum_info: + case NDIS_PKTINFO_TYPE_CSUM: if (__predict_false(dlen < NDIS_RXCSUM_INFO_SIZE)) return (EINVAL); info->csum_info = *((const uint32_t *)data); mask |= HV_RF_RECVINFO_CSUM; break; - case nbl_hash_value: + case HN_NDIS_PKTINFO_TYPE_HASHVAL: if (__predict_false(dlen < HN_NDIS_HASH_VALUE_SIZE)) return (EINVAL); info->hash_value = *((const uint32_t *)data); mask |= HV_RF_RECVINFO_HASHVAL; break; - case nbl_hash_info: + case HN_NDIS_PKTINFO_TYPE_HASHINF: if (__predict_false(dlen < HN_NDIS_HASH_INFO_SIZE)) return (EINVAL); info->hash_info = *((const uint32_t *)data); ___ 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: r305275 - stable/10/usr.bin/tar/tests
Author: ngie Date: Fri Sep 2 04:27:02 2016 New Revision: 305275 URL: https://svnweb.freebsd.org/changeset/base/305275 Log: MFstable/11 r304951: MFC r303804: Fix building usr.bin/tar/tests with PIE symbol building enabled by removing CFLAGS+= -static `CFLAGS+= -static` was a carryover from pre-r289195 with usr.bin/tar/test/Makefile that should have been specified in LDFLAGS There doesn't seem to be an apparent need for static compilation of the test binaries. Obtained-from:opBSD (418a491eed20d2603ddd1f1bd92c2c0d95094002) Modified: stable/10/usr.bin/tar/tests/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/tar/tests/Makefile == --- stable/10/usr.bin/tar/tests/MakefileFri Sep 2 04:23:26 2016 (r305274) +++ stable/10/usr.bin/tar/tests/MakefileFri Sep 2 04:27:02 2016 (r305275) @@ -10,7 +10,6 @@ ATF_TESTS_SH+=functional_test BINDIR=${TESTSDIR} CFLAGS+= -DPLATFORM_CONFIG_H=\"${SRCTOP}/lib/libarchive/config_freebsd.h\" -CFLAGS+= -static CFLAGS+= -I${SRCTOP}/lib/libarchive -I${.OBJDIR} CFLAGS+= -I${LIBARCHIVEDIR}/tar -I${LIBARCHIVEDIR}/test_utils ___ 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: r305274 - stable/10/sys/modules/zfs
Author: ngie Date: Fri Sep 2 04:23:26 2016 New Revision: 305274 URL: https://svnweb.freebsd.org/changeset/base/305274 Log: MFC r286321: r286321 (by lwhsu): Fix `make depend` in sys/modules Modified: stable/10/sys/modules/zfs/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/modules/zfs/Makefile == --- stable/10/sys/modules/zfs/Makefile Fri Sep 2 04:21:40 2016 (r305273) +++ stable/10/sys/modules/zfs/Makefile Fri Sep 2 04:23:26 2016 (r305274) @@ -2,7 +2,7 @@ KMOD= zfs -SRCS= bus_if.h device_if.h vnode_if.h +SRCS= bus_if.h device_if.h vnode_if.h opt_kstack_pages.h .if !defined(KERNBUILDDIR) SRCS+= opt_kdtrace.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: r305273 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: ngie Date: Fri Sep 2 04:21:40 2016 New Revision: 305273 URL: https://svnweb.freebsd.org/changeset/base/305273 Log: MFstable/11 r305271: MFC r303576: Conditionalize code which defines sysctls per _KERNEL #ifdef guard This resolves several issues when compiling libzpool (userspace library), i.e. -Wimplicit-function-declaration and -Wmissing-declarations issues. Tested with: clang 3.8.1, gcc 4.2.1, gcc 5.3.0 Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c == --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c Fri Sep 2 04:12:36 2016(r305272) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c Fri Sep 2 04:21:40 2016(r305273) @@ -58,9 +58,11 @@ typedef struct mirror_map { static int vdev_mirror_shift = 21; +#ifdef _KERNEL SYSCTL_DECL(_vfs_zfs_vdev); static SYSCTL_NODE(_vfs_zfs_vdev, OID_AUTO, mirror, CTLFLAG_RD, 0, "ZFS VDEV Mirror"); +#endif /* * The load configuration settings below are tuned by default for @@ -74,34 +76,44 @@ static SYSCTL_NODE(_vfs_zfs_vdev, OID_AU /* Rotating media load calculation configuration. */ static int rotating_inc = 0; +#ifdef _KERNEL TUNABLE_INT("vfs.zfs.vdev.mirror.rotating_inc", _inc); SYSCTL_INT(_vfs_zfs_vdev_mirror, OID_AUTO, rotating_inc, CTLFLAG_RW, _inc, 0, "Rotating media load increment for non-seeking I/O's"); +#endif static int rotating_seek_inc = 5; +#ifdef _KERNEL TUNABLE_INT("vfs.zfs.vdev.mirror.rotating_seek_inc", _seek_inc); SYSCTL_INT(_vfs_zfs_vdev_mirror, OID_AUTO, rotating_seek_inc, CTLFLAG_RW, _seek_inc, 0, "Rotating media load increment for seeking I/O's"); +#endif static int rotating_seek_offset = 1 * 1024 * 1024; +#ifdef _KERNEL TUNABLE_INT("vfs.zfs.vdev.mirror.rotating_seek_offset", _seek_offset); SYSCTL_INT(_vfs_zfs_vdev_mirror, OID_AUTO, rotating_seek_offset, CTLFLAG_RW, _seek_offset, 0, "Offset in bytes from the last I/O which " "triggers a reduced rotating media seek increment"); +#endif /* Non-rotating media load calculation configuration. */ static int non_rotating_inc = 0; +#ifdef _KERNEL TUNABLE_INT("vfs.zfs.vdev.mirror.non_rotating_inc", _rotating_inc); SYSCTL_INT(_vfs_zfs_vdev_mirror, OID_AUTO, non_rotating_inc, CTLFLAG_RW, _rotating_inc, 0, "Non-rotating media load increment for non-seeking I/O's"); +#endif static int non_rotating_seek_inc = 1; +#ifdef _KERNEL TUNABLE_INT("vfs.zfs.vdev.mirror.non_rotating_seek_inc", _rotating_seek_inc); SYSCTL_INT(_vfs_zfs_vdev_mirror, OID_AUTO, non_rotating_seek_inc, CTLFLAG_RW, _rotating_seek_inc, 0, "Non-rotating media load increment for seeking I/O's"); +#endif static inline size_t Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c == --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Fri Sep 2 04:12:36 2016(r305272) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Fri Sep 2 04:21:40 2016(r305273) @@ -176,6 +176,7 @@ int zfs_vdev_read_gap_limit = 32 << 10; int zfs_vdev_write_gap_limit = 4 << 10; #ifdef __FreeBSD__ +#ifdef _KERNEL SYSCTL_DECL(_vfs_zfs_vdev); TUNABLE_INT("vfs.zfs.vdev.async_write_active_min_dirty_percent", @@ -283,6 +284,7 @@ sysctl_zfs_async_write_active_max_dirty_ return (0); } #endif +#endif int vdev_queue_offset_compare(const void *x1, const void *x2) ___ 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: r305272 - stable/10/lib/libc/tests/resolv
Author: ngie Date: Fri Sep 2 04:12:36 2016 New Revision: 305272 URL: https://svnweb.freebsd.org/changeset/base/305272 Log: MFstable/11 r304950: MFC r304033: Increase timeout from 10 minutes to 20 minutes for all tests On particular slow networks, it can (on average) take longer to resolve hosts to IP* addresses. 20 minutes seemed reasonable for my work network This will be solved in a more meaningful way (if possible) using concurrency in the near future Modified: stable/10/lib/libc/tests/resolv/resolv_test.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/tests/resolv/resolv_test.c == --- stable/10/lib/libc/tests/resolv/resolv_test.c Fri Sep 2 04:06:44 2016(r305271) +++ stable/10/lib/libc/tests/resolv/resolv_test.c Fri Sep 2 04:12:36 2016(r305272) @@ -291,7 +291,7 @@ do { \ ATF_TC(getaddrinfo_test); ATF_TC_HEAD(getaddrinfo_test, tc) { - atf_tc_set_md_var(tc, "timeout", "450"); + atf_tc_set_md_var(tc, "timeout", "1200"); } ATF_TC_BODY(getaddrinfo_test, tc) { @@ -301,7 +301,7 @@ ATF_TC_BODY(getaddrinfo_test, tc) ATF_TC(gethostby_test); ATF_TC_HEAD(gethostby_test, tc) { - atf_tc_set_md_var(tc, "timeout", "450"); + atf_tc_set_md_var(tc, "timeout", "1200"); } ATF_TC_BODY(gethostby_test, tc) { @@ -312,7 +312,7 @@ ATF_TC_BODY(gethostby_test, tc) ATF_TC(getipnodeby_test); ATF_TC_HEAD(getipnodeby_test, tc) { - atf_tc_set_md_var(tc, "timeout", "450"); + atf_tc_set_md_var(tc, "timeout", "1200"); } ATF_TC_BODY(getipnodeby_test, tc) { ___ 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: r305271 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: ngie Date: Fri Sep 2 04:06:44 2016 New Revision: 305271 URL: https://svnweb.freebsd.org/changeset/base/305271 Log: MFC r303576: Conditionalize code which defines sysctls per _KERNEL #ifdef guard This resolves several issues when compiling libzpool (userspace library), i.e. -Wimplicit-function-declaration and -Wmissing-declarations issues. Tested with: clang 3.8.1, gcc 4.2.1, gcc 5.3.0 Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c == --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c Fri Sep 2 03:19:55 2016(r305270) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c Fri Sep 2 04:06:44 2016(r305271) @@ -58,9 +58,11 @@ typedef struct mirror_map { static int vdev_mirror_shift = 21; +#ifdef _KERNEL SYSCTL_DECL(_vfs_zfs_vdev); static SYSCTL_NODE(_vfs_zfs_vdev, OID_AUTO, mirror, CTLFLAG_RD, 0, "ZFS VDEV Mirror"); +#endif /* * The load configuration settings below are tuned by default for @@ -74,28 +76,38 @@ static SYSCTL_NODE(_vfs_zfs_vdev, OID_AU /* Rotating media load calculation configuration. */ static int rotating_inc = 0; +#ifdef _KERNEL SYSCTL_INT(_vfs_zfs_vdev_mirror, OID_AUTO, rotating_inc, CTLFLAG_RWTUN, _inc, 0, "Rotating media load increment for non-seeking I/O's"); +#endif static int rotating_seek_inc = 5; +#ifdef _KERNEL SYSCTL_INT(_vfs_zfs_vdev_mirror, OID_AUTO, rotating_seek_inc, CTLFLAG_RWTUN, _seek_inc, 0, "Rotating media load increment for seeking I/O's"); +#endif static int rotating_seek_offset = 1 * 1024 * 1024; +#ifdef _KERNEL SYSCTL_INT(_vfs_zfs_vdev_mirror, OID_AUTO, rotating_seek_offset, CTLFLAG_RWTUN, _seek_offset, 0, "Offset in bytes from the last I/O which " "triggers a reduced rotating media seek increment"); +#endif /* Non-rotating media load calculation configuration. */ static int non_rotating_inc = 0; +#ifdef _KERNEL SYSCTL_INT(_vfs_zfs_vdev_mirror, OID_AUTO, non_rotating_inc, CTLFLAG_RWTUN, _rotating_inc, 0, "Non-rotating media load increment for non-seeking I/O's"); +#endif static int non_rotating_seek_inc = 1; +#ifdef _KERNEL SYSCTL_INT(_vfs_zfs_vdev_mirror, OID_AUTO, non_rotating_seek_inc, CTLFLAG_RWTUN, _rotating_seek_inc, 0, "Non-rotating media load increment for seeking I/O's"); +#endif static inline size_t Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c == --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Fri Sep 2 03:19:55 2016(r305270) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Fri Sep 2 04:06:44 2016(r305271) @@ -176,6 +176,7 @@ int zfs_vdev_read_gap_limit = 32 << 10; int zfs_vdev_write_gap_limit = 4 << 10; #ifdef __FreeBSD__ +#ifdef _KERNEL SYSCTL_DECL(_vfs_zfs_vdev); static int sysctl_zfs_async_write_active_min_dirty_percent(SYSCTL_HANDLER_ARGS); @@ -271,6 +272,7 @@ sysctl_zfs_async_write_active_max_dirty_ return (0); } #endif +#endif int vdev_queue_offset_compare(const void *x1, const void *x2) ___ 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: r305270 - head/sys/dev/hyperv/netvsc
Author: sephe Date: Fri Sep 2 03:19:55 2016 New Revision: 305270 URL: https://svnweb.freebsd.org/changeset/base/305270 Log: hyperv/hn: Simplify RX hash related bits. MFC after:1 week Sponsored by: Microsoft Differential Revision:https://reviews.freebsd.org/D7736 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c head/sys/dev/hyperv/netvsc/hv_rndis_filter.c head/sys/dev/hyperv/netvsc/if_hnreg.h head/sys/dev/hyperv/netvsc/if_hnvar.h Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c == --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Sep 2 03:15:54 2016(r305269) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Sep 2 03:19:55 2016(r305270) @@ -1289,7 +1289,7 @@ netvsc_recv(struct hn_rx_ring *rxr, cons struct ifnet *ifp = rxr->hn_ifp; struct mbuf *m_new; int size, do_lro = 0, do_csum = 1; - int hash_type = M_HASHTYPE_OPAQUE_HASH; + int hash_type; if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) return (0); @@ -1421,13 +1421,13 @@ skip: m_new->m_flags |= M_VLANTAG; } - if (info->hash_info != NULL && info->hash_value != NULL) { + if (info->hash_info != HN_NDIS_HASH_INFO_INVALID) { rxr->hn_rss_pkts++; - m_new->m_pkthdr.flowid = info->hash_value->hash_value; - if ((info->hash_info->hash_info & NDIS_HASH_FUNCTION_MASK) == + m_new->m_pkthdr.flowid = info->hash_value; + hash_type = M_HASHTYPE_OPAQUE_HASH; + if ((info->hash_info & NDIS_HASH_FUNCTION_MASK) == NDIS_HASH_FUNCTION_TOEPLITZ) { - uint32_t type = - (info->hash_info->hash_info & NDIS_HASH_TYPE_MASK); + uint32_t type = (info->hash_info & NDIS_HASH_TYPE_MASK); switch (type) { case NDIS_HASH_IPV4: @@ -1456,12 +1456,8 @@ skip: } } } else { - if (info->hash_value != NULL) { - m_new->m_pkthdr.flowid = info->hash_value->hash_value; - } else { - m_new->m_pkthdr.flowid = rxr->hn_rx_idx; - hash_type = M_HASHTYPE_OPAQUE; - } + m_new->m_pkthdr.flowid = rxr->hn_rx_idx; + hash_type = M_HASHTYPE_OPAQUE; } M_HASHTYPE_SET(m_new, hash_type); Modified: head/sys/dev/hyperv/netvsc/hv_rndis_filter.c == --- head/sys/dev/hyperv/netvsc/hv_rndis_filter.cFri Sep 2 03:15:54 2016(r305269) +++ head/sys/dev/hyperv/netvsc/hv_rndis_filter.cFri Sep 2 03:19:55 2016(r305270) @@ -158,8 +158,7 @@ hv_rf_find_recvinfo(const rndis_packet * info->vlan_info = HN_NDIS_VLAN_INFO_INVALID; info->csum_info = HN_NDIS_RXCSUM_INFO_INVALID; - info->hash_info = NULL; - info->hash_value = NULL; + info->hash_info = HN_NDIS_HASH_INFO_INVALID; if (rpkt->per_pkt_info_offset == 0) return (0); @@ -207,18 +206,16 @@ hv_rf_find_recvinfo(const rndis_packet * break; case nbl_hash_value: - if (__predict_false(dlen < - sizeof(struct rndis_hash_value))) + if (__predict_false(dlen < HN_NDIS_HASH_VALUE_SIZE)) return (EINVAL); - info->hash_value = data; + info->hash_value = *((const uint32_t *)data); mask |= HV_RF_RECVINFO_HASHVAL; break; case nbl_hash_info: - if (__predict_false(dlen < - sizeof(struct rndis_hash_info))) + if (__predict_false(dlen < HN_NDIS_HASH_INFO_SIZE)) return (EINVAL); - info->hash_info = data; + info->hash_info = *((const uint32_t *)data); mask |= HV_RF_RECVINFO_HASHINF; break; @@ -234,6 +231,13 @@ next: pi = (const struct rndis_pktinfo *) ((const uint8_t *)pi + pi->rm_size); } + + /* +* Final fixup. +* - If there is no hash value, invalidate the hash info. +*/ + if ((mask & HV_RF_RECVINFO_HASHVAL) == 0) + info->hash_info = HN_NDIS_HASH_INFO_INVALID; return (0); } Modified: head/sys/dev/hyperv/netvsc/if_hnreg.h == --- head/sys/dev/hyperv/netvsc/if_hnreg.h Fri Sep 2 03:15:54 2016 (r305269) +++
svn commit: r305269 - in head/usr.sbin/cron: cron crontab
Author: emaste Date: Fri Sep 2 03:15:54 2016 New Revision: 305269 URL: https://svnweb.freebsd.org/changeset/base/305269 Log: cron: use existing maximum username constant MAXLOGNAME Previously cron had its own maximum username length limit, which was smaller than the system's MAXLOGNAME. This could lead to crontab -u updating the wrong user's crontab (if the name was truncated, and matched another user). PR: 212305 Reported by: Andrii Kuzik Reviewed by: allanjude, jilles MFC after:3 days Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D7747 Modified: head/usr.sbin/cron/cron/cron.h head/usr.sbin/cron/crontab/crontab.c Modified: head/usr.sbin/cron/cron/cron.h == --- head/usr.sbin/cron/cron/cron.h Fri Sep 2 03:10:30 2016 (r305268) +++ head/usr.sbin/cron/cron/cron.h Fri Sep 2 03:15:54 2016 (r305269) @@ -73,7 +73,6 @@ #defineMAX_COMMAND 1000/* max length of internally generated cmd */ #defineMAX_ENVSTR 1000/* max length of envvar=value\0 strings */ #defineMAX_TEMPSTR 100 /* obvious */ -#defineMAX_UNAME 20 /* max length of username, should be overkill */ #defineROOT_UID0 /* don't change this, it really must be root */ #defineROOT_USER "root" /* ditto */ #defineSYS_NAME"*system*" /* magic owner name for system crontab */ Modified: head/usr.sbin/cron/crontab/crontab.c == --- head/usr.sbin/cron/crontab/crontab.cFri Sep 2 03:10:30 2016 (r305268) +++ head/usr.sbin/cron/crontab/crontab.cFri Sep 2 03:15:54 2016 (r305269) @@ -28,6 +28,7 @@ static const char rcsid[] = #defineMAIN_PROGRAM +#include #include "cron.h" #include #include @@ -57,7 +58,7 @@ static char *Options[] = { "???", "list" static PID_T Pid; -static charUser[MAX_UNAME], RealUser[MAX_UNAME]; +static charUser[MAXLOGNAME], RealUser[MAXLOGNAME]; static charFilename[MAX_FNAME]; static FILE*NewCrontab; static int CheckErrorCount; ___ 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: r305268 - head/sys/dev/hyperv/netvsc
Author: sephe Date: Fri Sep 2 03:10:30 2016 New Revision: 305268 URL: https://svnweb.freebsd.org/changeset/base/305268 Log: hyperv/hn: Rework RXCSUM related bits MFC after:1 week Sponsored by: Microsoft Differential Revision:https://reviews.freebsd.org/D7735 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c head/sys/dev/hyperv/netvsc/hv_rndis_filter.c head/sys/dev/hyperv/netvsc/if_hnvar.h head/sys/dev/hyperv/netvsc/ndis.h Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c == --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Sep 2 01:41:57 2016(r305267) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Sep 2 03:10:30 2016(r305268) @@ -1335,28 +1335,29 @@ netvsc_recv(struct hn_rx_ring *rxr, cons do_csum = 0; /* receive side checksum offload */ - if (info->csum_info != NULL) { + if (info->csum_info != HN_NDIS_RXCSUM_INFO_INVALID) { /* IP csum offload */ - if (info->csum_info->receive.ip_csum_succeeded && do_csum) { + if ((info->csum_info & NDIS_RXCSUM_INFO_IPCS_OK) && do_csum) { m_new->m_pkthdr.csum_flags |= (CSUM_IP_CHECKED | CSUM_IP_VALID); rxr->hn_csum_ip++; } /* TCP/UDP csum offload */ - if ((info->csum_info->receive.tcp_csum_succeeded || -info->csum_info->receive.udp_csum_succeeded) && do_csum) { + if ((info->csum_info & (NDIS_RXCSUM_INFO_UDPCS_OK | +NDIS_RXCSUM_INFO_TCPCS_OK)) && do_csum) { m_new->m_pkthdr.csum_flags |= (CSUM_DATA_VALID | CSUM_PSEUDO_HDR); m_new->m_pkthdr.csum_data = 0x; - if (info->csum_info->receive.tcp_csum_succeeded) + if (info->csum_info & NDIS_RXCSUM_INFO_TCPCS_OK) rxr->hn_csum_tcp++; else rxr->hn_csum_udp++; } - if (info->csum_info->receive.ip_csum_succeeded && - info->csum_info->receive.tcp_csum_succeeded) + if ((info->csum_info & +(NDIS_RXCSUM_INFO_TCPCS_OK | NDIS_RXCSUM_INFO_IPCS_OK)) == + (NDIS_RXCSUM_INFO_TCPCS_OK | NDIS_RXCSUM_INFO_IPCS_OK)) do_lro = 1; } else { const struct ether_header *eh; Modified: head/sys/dev/hyperv/netvsc/hv_rndis_filter.c == --- head/sys/dev/hyperv/netvsc/hv_rndis_filter.cFri Sep 2 01:41:57 2016(r305267) +++ head/sys/dev/hyperv/netvsc/hv_rndis_filter.cFri Sep 2 03:10:30 2016(r305268) @@ -157,7 +157,7 @@ hv_rf_find_recvinfo(const rndis_packet * uint32_t mask = 0, len; info->vlan_info = HN_NDIS_VLAN_INFO_INVALID; - info->csum_info = NULL; + info->csum_info = HN_NDIS_RXCSUM_INFO_INVALID; info->hash_info = NULL; info->hash_value = NULL; @@ -200,10 +200,9 @@ hv_rf_find_recvinfo(const rndis_packet * break; case tcpip_chksum_info: - if (__predict_false(dlen < - sizeof(rndis_tcp_ip_csum_info))) + if (__predict_false(dlen < NDIS_RXCSUM_INFO_SIZE)) return (EINVAL); - info->csum_info = data; + info->csum_info = *((const uint32_t *)data); mask |= HV_RF_RECVINFO_CSUM; break; Modified: head/sys/dev/hyperv/netvsc/if_hnvar.h == --- head/sys/dev/hyperv/netvsc/if_hnvar.h Fri Sep 2 01:41:57 2016 (r305267) +++ head/sys/dev/hyperv/netvsc/if_hnvar.h Fri Sep 2 03:10:30 2016 (r305268) @@ -56,10 +56,11 @@ struct ndis_8021q_info_; struct rndis_tcp_ip_csum_info_; #define HN_NDIS_VLAN_INFO_INVALID 0x +#define HN_NDIS_RXCSUM_INFO_INVALID0 struct hn_recvinfo { uint32_tvlan_info; - const struct rndis_tcp_ip_csum_info_ *csum_info; + uint32_tcsum_info; const struct rndis_hash_info*hash_info; const struct rndis_hash_value *hash_value; }; Modified: head/sys/dev/hyperv/netvsc/ndis.h == --- head/sys/dev/hyperv/netvsc/ndis.h Fri Sep 2 01:41:57 2016 (r305267) +++ head/sys/dev/hyperv/netvsc/ndis.h Fri Sep 2 03:10:30 2016 (r305268) @@ -219,4 +219,16 @@ struct ndis_rssprm_toeplitz { #define
Re: svn commit: r305245 - in head: . release/doc/en_US.ISO8859-1/hardware
> On Sep 1, 2016, at 14:50, John Baldwinwrote: > >> On Thursday, September 01, 2016 09:16:29 PM John Baldwin wrote: >> Author: jhb >> Date: Thu Sep 1 21:16:29 2016 >> New Revision: 305245 >> URL: https://svnweb.freebsd.org/changeset/base/305245 >> >> Log: >> Remove the digi(4) manpage and digi from the release notes. > > We still list sio(4) in the release notes even though its disconnected from > the build. (Which means we've been listing it in releases since 8.0 even > though it doesn't compile and isn't shipped.) We should probably make sure > we aren't listing any other disconnected drivers in the hardware notes. sio(4) has some gems in it that should be forward ported to uart(4). After that, I vote for killing off sio(4). Thanks, -Garrett ___ 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: r305267 - releng/11.0/sys/kern
Author: nwhitehorn Date: Fri Sep 2 01:41:57 2016 New Revision: 305267 URL: https://svnweb.freebsd.org/changeset/base/305267 Log: MFS11 r305250: MFC r305108,305109: Refix operation on sparse CPU mappings as in r302372, temporarily broken by r304716. PR: kern/210106 Approved by: re (gjb) Modified: releng/11.0/sys/kern/subr_gtaskqueue.c Directory Properties: releng/11.0/ (props changed) Modified: releng/11.0/sys/kern/subr_gtaskqueue.c == --- releng/11.0/sys/kern/subr_gtaskqueue.c Fri Sep 2 00:45:43 2016 (r305266) +++ releng/11.0/sys/kern/subr_gtaskqueue.c Fri Sep 2 01:41:57 2016 (r305267) @@ -742,7 +742,7 @@ _taskqgroup_adjust(struct taskqgroup *qg LIST_HEAD(, grouptask) gtask_head = LIST_HEAD_INITIALIZER(NULL); cpuset_t mask; struct grouptask *gtask; - int i, old_cnt, qid; + int i, k, old_cnt, qid, cpu; mtx_assert(>tqg_lock, MA_OWNED); @@ -806,8 +806,11 @@ _taskqgroup_adjust(struct taskqgroup *qg /* * Set new CPU and IRQ affinity */ + cpu = CPU_FIRST(); for (i = 0; i < cnt; i++) { - qgroup->tqg_queue[i].tgc_cpu = i * qgroup->tqg_stride; + qgroup->tqg_queue[i].tgc_cpu = cpu; + for (k = 0; k < qgroup->tqg_stride; k++) + cpu = CPU_NEXT(cpu); CPU_ZERO(); CPU_SET(qgroup->tqg_queue[i].tgc_cpu, ); LIST_FOREACH(gtask, >tqg_queue[i].tgc_tasks, gt_list) { ___ 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: r305266 - releng/11.0/sys/boot/powerpc/boot1.chrp
Author: nwhitehorn Date: Fri Sep 2 00:45:43 2016 New Revision: 305266 URL: https://svnweb.freebsd.org/changeset/base/305266 Log: MFS11 r305249: MFC r305036: Some versions of SLOF do not append the partition number to the boot device argument to the stage-1 bootloader. In such cases, boot1 would only try to read the entire device rather than checking for partitions. Instead of panic'ing, fall back to reading the partitions as normal in such situations. This was preventing boot of installed systems on some versions of PowerKVM. PR: kern/211599 Approved by: re (gjb) Modified: releng/11.0/sys/boot/powerpc/boot1.chrp/boot1.c Directory Properties: releng/11.0/ (props changed) Modified: releng/11.0/sys/boot/powerpc/boot1.chrp/boot1.c == --- releng/11.0/sys/boot/powerpc/boot1.chrp/boot1.c Fri Sep 2 00:43:03 2016(r305265) +++ releng/11.0/sys/boot/powerpc/boot1.chrp/boot1.c Fri Sep 2 00:45:43 2016(r305266) @@ -137,7 +137,9 @@ ofw_init(void *vpd, int res, int (*openf p = bootpath; while (*p != '\0') { + /* Truncate partition ID */ if (*p == ':') { + ofw_close(bootdev); *(++p) = '\0'; break; } @@ -419,31 +421,40 @@ main(int ac, char **av) memcpy(bootpath_full,bootpath,len+1); - if (bootpath_full[len-1] == ':') { - for (i = 0; i < 16; i++) { - if (i < 10) { - bootpath_full[len] = i + '0'; - bootpath_full[len+1] = '\0'; - } else { - bootpath_full[len] = '1'; - bootpath_full[len+1] = i - 10 + '0'; - bootpath_full[len+2] = '\0'; - } - - if (domount(bootpath_full,1) >= 0) - break; - - if (bootdev > 0) - ofw_close(bootdev); + if (bootpath_full[len-1] != ':') { + /* First try full volume */ + if (domount(bootpath_full,1) == 0) + goto out; + + /* Add a : so that we try partitions if that fails */ + if (bootdev > 0) + ofw_close(bootdev); + bootpath_full[len] = ':'; + len += 1; + } + + /* Loop through first 16 partitions to find a UFS one */ + for (i = 0; i < 16; i++) { + if (i < 10) { + bootpath_full[len] = i + '0'; + bootpath_full[len+1] = '\0'; + } else { + bootpath_full[len] = '1'; + bootpath_full[len+1] = i - 10 + '0'; + bootpath_full[len+2] = '\0'; } + + if (domount(bootpath_full,1) >= 0) + break; - if (i >= 16) - panic("domount"); - } else { - if (domount(bootpath_full,0) == -1) - panic("domount"); + if (bootdev > 0) + ofw_close(bootdev); } + if (i >= 16) + panic("domount"); + +out: printf(" Boot volume: %s\n",bootpath_full); ofw_setprop(chosenh, "bootargs", bootpath_full, len+2); load(path); ___ 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: r305265 - head/share/timedef
Author: kevlo Date: Fri Sep 2 00:43:03 2016 New Revision: 305265 URL: https://svnweb.freebsd.org/changeset/base/305265 Log: Revert r304192 to fix short month names and replace %b with %_m in date_fmt for Chinese locales. As mentioned in the commit message of r289041, nl_langinfo(ABMON_*) only returned numbers when using a Chinese locale, this causes problems in applications that put the short month name and the day of the month together. Spotted by: Ting-Wei Lan Modified: head/share/timedef/zh_CN.GB2312.src head/share/timedef/zh_CN.GBK.src head/share/timedef/zh_CN.UTF-8.src head/share/timedef/zh_CN.eucCN.src head/share/timedef/zh_TW.Big5.src head/share/timedef/zh_TW.UTF-8.src Modified: head/share/timedef/zh_CN.GB2312.src == --- head/share/timedef/zh_CN.GB2312.src Fri Sep 2 00:27:27 2016 (r305264) +++ head/share/timedef/zh_CN.GB2312.src Fri Sep 2 00:43:03 2016 (r305265) @@ -4,18 +4,18 @@ # - # # Short month names - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 -10 -11 -12 +!!#1TB +!!#2TB +!!#3TB +!!#4TB +!!#5TB +!!#6TB +!!#7TB +!!#8TB +!!#9TB +#1#0TB +#1#1TB +#1#2TB # # Long month names (as in a date) һ�� @@ -63,7 +63,7 @@ # # date_fmt -%Y��%b��%e�� %A %X %Z +%Y��%_m��%e�� %A %X %Z # # Long month names (without case ending) һ�� Modified: head/share/timedef/zh_CN.GBK.src == --- head/share/timedef/zh_CN.GBK.srcFri Sep 2 00:27:27 2016 (r305264) +++ head/share/timedef/zh_CN.GBK.srcFri Sep 2 00:43:03 2016 (r305265) @@ -4,18 +4,18 @@ # - # # Short month names - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 -10 -11 -12 + 1�� + 2�� + 3�� + 4�� + 5�� + 6�� + 7�� + 8�� + 9�� +10�� +11�� +12�� # # Long month names (as in a date) һ�� @@ -63,7 +63,7 @@ # # date_fmt -%Y��%b��%e�� %A %X %Z +%Y��%_m��%e�� %A %X %Z # # Long month names (without case ending) һ�� Modified: head/share/timedef/zh_CN.UTF-8.src == Binary file (source and/or target). No diff available. Modified: head/share/timedef/zh_CN.eucCN.src == --- head/share/timedef/zh_CN.eucCN.src Fri Sep 2 00:27:27 2016 (r305264) +++ head/share/timedef/zh_CN.eucCN.src Fri Sep 2 00:43:03 2016 (r305265) @@ -4,18 +4,18 @@ # - # # Short month names - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 -10 -11 -12 +�� +�� +�� +�� +�� +�� +�� +�� +�� +�� +�� +�� # # Long month names (as in a date) һ�� @@ -63,7 +63,7 @@ # # date_fmt -%Y��%b��%e�� %A %X %Z +%Y��%_m��%e�� %A %X %Z # # Long month names (without case ending) һ�� Modified: head/share/timedef/zh_TW.Big5.src == --- head/share/timedef/zh_TW.Big5.src Fri Sep 2 00:27:27 2016 (r305264) +++ head/share/timedef/zh_TW.Big5.src Fri Sep 2 00:43:03 2016 (r305265) @@ -4,18 +4,18 @@ # - # # Short month names - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 -10 -11 -12 +�@ +�@ +�@ +�@ +�@ +�@ +�@ +�@ +�@ +�� +�� +�� # # Long month names (as in a date) 1�� @@ -63,7 +63,7 @@ �U�� # # date_fmt -%Y�~%b��%e�� %A %X %Z +%Y�~%_m��%e�� %A %X %Z # # Long month names (without case ending) 1�� Modified: head/share/timedef/zh_TW.UTF-8.src == --- head/share/timedef/zh_TW.UTF-8.src Fri Sep 2 00:27:27 2016 (r305264) +++ head/share/timedef/zh_TW.UTF-8.src Fri Sep 2 00:43:03 2016 (r305265) @@ -4,18 +4,18 @@ # - # # Short month names - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 -10 -11 -12 + 1月 + 2月 + 3月 + 4月 + 5月 + 6月 + 7月 + 8月 + 9月 +10月 +11月 +12月 # # Long month names (as in a date) 1月 @@ -63,7 +63,7 @@ 下午 # # date_fmt -%Y年%b月%e日 %A %X %Z +%Y年%_m月%e日 %A %X %Z # # Long month names (without case ending) 1月 ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r305264 - head/tools/tools/locale/tools
Author: kevlo Date: Fri Sep 2 00:27:27 2016 New Revision: 305264 URL: https://svnweb.freebsd.org/changeset/base/305264 Log: Replace %m with %_m in date_fmt for Chinese locales. This is a fix for the problem mentioned in the PR. PR: 199441 Modified: head/tools/tools/locale/tools/cldr2def.pl Modified: head/tools/tools/locale/tools/cldr2def.pl == --- head/tools/tools/locale/tools/cldr2def.pl Fri Sep 2 00:21:24 2016 (r305263) +++ head/tools/tools/locale/tools/cldr2def.pl Fri Sep 2 00:27:27 2016 (r305264) @@ -243,7 +243,10 @@ sub callback_dtformat { if ($nl eq 'ja_JP') { $s =~ s/(> )(%H)/$1%A $2/; - } elsif ($nl eq 'ko_KR' || $nl eq 'zh_TW') { + } elsif ($nl eq 'ko_KR' || $nl eq 'zh_CN' || $nl eq 'zh_TW') { + if ($nl ne 'ko_KR') { + $s =~ s/%m/%_m/; + } $s =~ s/(> )(%p)/$1%A $2/; } $s =~ s/\.,/\./; ___ 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: r305263 - head/sys/dev/cxgbe/cxgbei
Author: np Date: Fri Sep 2 00:21:24 2016 New Revision: 305263 URL: https://svnweb.freebsd.org/changeset/base/305263 Log: cxgbe/cxgbei: Provide a knob to set the DDP threshold for iSCSI transfers. The Initiator and Target both perform zero copy receive for transfers greater than or equal to this threshold. Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/cxgbei/cxgbei.c Modified: head/sys/dev/cxgbe/cxgbei/cxgbei.c == --- head/sys/dev/cxgbe/cxgbei/cxgbei.c Fri Sep 2 00:16:19 2016 (r305262) +++ head/sys/dev/cxgbe/cxgbei/cxgbei.c Fri Sep 2 00:21:24 2016 (r305263) @@ -192,9 +192,7 @@ cxgbei_init(struct adapter *sc, struct c read_pdu_limits(sc, >max_tx_pdu_len, >max_rx_pdu_len); - ci->ddp_threshold = 2048; pr = >pr; - r = t4_read_reg(sc, A_ULP_RX_ISCSI_PSZ); rc = t4_init_ppod_region(pr, >vres.iscsi, r, "iSCSI page pods"); if (rc != 0) { @@ -249,6 +247,10 @@ cxgbei_init(struct adapter *sc, struct c CTLFLAG_RD, >fl_pdus, "# of PDUs with data delivered in freelist"); + ci->ddp_threshold = 2048; + SYSCTL_ADD_UINT(>ctx, children, OID_AUTO, "ddp_threshold", + CTLFLAG_RW, >ddp_threshold, 0, "Rx zero copy threshold"); + 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: r305262 - head/lib/libc/gen
Author: brooks Date: Fri Sep 2 00:16:19 2016 New Revision: 305262 URL: https://svnweb.freebsd.org/changeset/base/305262 Log: Initialize lists of signals using C99 designators Reviewed by: jilles Sponsored by: DARPA, AFRL Differential Revision:https://reviews.freebsd.org/D7601 Modified: head/lib/libc/gen/siglist.c Modified: head/lib/libc/gen/siglist.c == --- head/lib/libc/gen/siglist.c Fri Sep 2 00:14:28 2016(r305261) +++ head/lib/libc/gen/siglist.c Fri Sep 2 00:16:19 2016(r305262) @@ -36,72 +36,72 @@ __FBSDID("$FreeBSD$"); #include const char *const sys_signame[NSIG] = { - "Signal 0", - "HUP", /* SIGHUP */ - "INT", /* SIGINT */ - "QUIT", /* SIGQUIT */ - "ILL", /* SIGILL */ - "TRAP", /* SIGTRAP */ - "ABRT", /* SIGABRT */ - "EMT", /* SIGEMT */ - "FPE", /* SIGFPE */ - "KILL", /* SIGKILL */ - "BUS", /* SIGBUS */ - "SEGV", /* SIGSEGV */ - "SYS", /* SIGSYS */ - "PIPE", /* SIGPIPE */ - "ALRM", /* SIGALRM */ - "TERM", /* SIGTERM */ - "URG", /* SIGURG */ - "STOP", /* SIGSTOP */ - "TSTP", /* SIGTSTP */ - "CONT", /* SIGCONT */ - "CHLD", /* SIGCHLD */ - "TTIN", /* SIGTTIN */ - "TTOU", /* SIGTTOU */ - "IO", /* SIGIO */ - "XCPU", /* SIGXCPU */ - "XFSZ", /* SIGXFSZ */ - "VTALRM", /* SIGVTALRM */ - "PROF", /* SIGPROF */ - "WINCH",/* SIGWINCH */ - "INFO", /* SIGINFO */ - "USR1", /* SIGUSR1 */ - "USR2" /* SIGUSR2 */ + [0] = "Signal 0", + [SIGHUP] = "HUP", + [SIGINT] = "INT", + [SIGQUIT] = "QUIT", + [SIGILL] = "ILL", + [SIGTRAP] = "TRAP", + [SIGABRT] = "ABRT", + [SIGEMT] = "EMT", + [SIGFPE] = "FPE", + [SIGKILL] = "KILL", + [SIGBUS] = "BUS", + [SIGSEGV] = "SEGV", + [SIGSYS] = "SYS", + [SIGPIPE] = "PIPE", + [SIGALRM] = "ALRM", + [SIGTERM] = "TERM", + [SIGURG] = "URG", + [SIGSTOP] = "STOP", + [SIGTSTP] = "TSTP", + [SIGCONT] = "CONT", + [SIGCHLD] = "CHLD", + [SIGTTIN] = "TTIN", + [SIGTTOU] = "TTOU", + [SIGIO] = "IO", + [SIGXCPU] = "XCPU", + [SIGXFSZ] = "XFSZ", + [SIGVTALRM] = "VTALRM", + [SIGPROF] = "PROF", + [SIGWINCH] ="WINCH", + [SIGINFO] = "INFO", + [SIGUSR1] = "USR1", + [SIGUSR2] = "USR2", }; const char *const sys_siglist[NSIG] = { - "Signal 0", - "Hangup", /* SIGHUP */ - "Interrupt",/* SIGINT */ - "Quit", /* SIGQUIT */ - "Illegal instruction", /* SIGILL */ - "Trace/BPT trap", /* SIGTRAP */ - "Abort trap", /* SIGABRT */ - "EMT trap", /* SIGEMT */ - "Floating point exception", /* SIGFPE */ - "Killed", /* SIGKILL */ - "Bus error",/* SIGBUS */ - "Segmentation fault", /* SIGSEGV */ - "Bad system call", /* SIGSYS */ - "Broken pipe", /* SIGPIPE */ - "Alarm clock", /* SIGALRM */ - "Terminated", /* SIGTERM */ - "Urgent I/O condition", /* SIGURG */ - "Suspended (signal)", /* SIGSTOP */ - "Suspended",/* SIGTSTP */ - "Continued",/* SIGCONT */ - "Child exited", /* SIGCHLD */ - "Stopped (tty input)", /* SIGTTIN */ - "Stopped (tty output)", /* SIGTTOU */ - "I/O possible", /* SIGIO */ - "Cputime limit exceeded", /* SIGXCPU */ - "Filesize limit exceeded", /* SIGXFSZ */ - "Virtual timer expired",/* SIGVTALRM */ - "Profiling timer expired", /* SIGPROF */ - "Window size changes", /* SIGWINCH */ -
svn commit: r305261 - in stable/10/sys: kern sys
Author: markj Date: Fri Sep 2 00:14:28 2016 New Revision: 305261 URL: https://svnweb.freebsd.org/changeset/base/305261 Log: MFC r285522: Fix cleanup race between unp_dispose and unp_gc. This change modifies the original commit to avoid changing the domain_dispose KPI. Tested by:Oliver Pinter Modified: stable/10/sys/kern/uipc_socket.c stable/10/sys/kern/uipc_usrreq.c stable/10/sys/sys/domain.h stable/10/sys/sys/unpcb.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/uipc_socket.c == --- stable/10/sys/kern/uipc_socket.cThu Sep 1 23:58:36 2016 (r305260) +++ stable/10/sys/kern/uipc_socket.cFri Sep 2 00:14:28 2016 (r305261) @@ -741,8 +741,12 @@ sofree(struct socket *so) ACCEPT_UNLOCK(); VNET_SO_ASSERT(so); - if (pr->pr_flags & PR_RIGHTS && pr->pr_domain->dom_dispose != NULL) - (*pr->pr_domain->dom_dispose)(so->so_rcv.sb_mb); + if (pr->pr_flags & PR_RIGHTS && pr->pr_domain->dom_dispose != NULL) { + if (pr->pr_domain->dom_family == AF_LOCAL) + unp_dispose_so(so); + else + (*pr->pr_domain->dom_dispose)(so->so_rcv.sb_mb); + } if (pr->pr_usrreqs->pru_detach != NULL) (*pr->pr_usrreqs->pru_detach)(so); @@ -2290,7 +2294,7 @@ sorflush(struct socket *so) { struct sockbuf *sb = >so_rcv; struct protosw *pr = so->so_proto; - struct sockbuf asb; + struct socket aso; VNET_SO_ASSERT(so); @@ -2315,8 +2319,9 @@ sorflush(struct socket *so) * and mutex data unchanged. */ SOCKBUF_LOCK(sb); - bzero(, offsetof(struct sockbuf, sb_startzero)); - bcopy(>sb_startzero, _startzero, + bzero(, sizeof(aso)); + aso.so_pcb = so->so_pcb; + bcopy(>sb_startzero, _rcv.sb_startzero, sizeof(*sb) - offsetof(struct sockbuf, sb_startzero)); bzero(>sb_startzero, sizeof(*sb) - offsetof(struct sockbuf, sb_startzero)); @@ -2324,12 +2329,16 @@ sorflush(struct socket *so) sbunlock(sb); /* -* Dispose of special rights and flush the socket buffer. Don't call -* any unsafe routines (that rely on locks being initialized) on asb. +* Dispose of special rights and flush the copied socket. Don't call +* any unsafe routines (that rely on locks being initialized) on aso. */ - if (pr->pr_flags & PR_RIGHTS && pr->pr_domain->dom_dispose != NULL) - (*pr->pr_domain->dom_dispose)(asb.sb_mb); - sbrelease_internal(, so); + if (pr->pr_flags & PR_RIGHTS && pr->pr_domain->dom_dispose != NULL) { + if (pr->pr_domain->dom_family == AF_LOCAL) + unp_dispose_so(); + else + (*pr->pr_domain->dom_dispose)(aso.so_rcv.sb_mb); + } + sbrelease_internal(_rcv, so); } /* Modified: stable/10/sys/kern/uipc_usrreq.c == --- stable/10/sys/kern/uipc_usrreq.cThu Sep 1 23:58:36 2016 (r305260) +++ stable/10/sys/kern/uipc_usrreq.cFri Sep 2 00:14:28 2016 (r305261) @@ -2200,15 +2200,19 @@ unp_gc_process(struct unpcb *unp) * Mark all sockets we reference with RIGHTS. */ so = unp->unp_socket; - SOCKBUF_LOCK(>so_rcv); - unp_scan(so->so_rcv.sb_mb, unp_accessable); - SOCKBUF_UNLOCK(>so_rcv); + if ((unp->unp_gcflag & UNPGC_IGNORE_RIGHTS) == 0) { + SOCKBUF_LOCK(>so_rcv); + unp_scan(so->so_rcv.sb_mb, unp_accessable); + SOCKBUF_UNLOCK(>so_rcv); + } /* * Mark all sockets in our accept queue. */ ACCEPT_LOCK(); TAILQ_FOREACH(soa, >so_comp, so_list) { + if ((sotounpcb(soa)->unp_gcflag & UNPGC_IGNORE_RIGHTS) != 0) + continue; SOCKBUF_LOCK(>so_rcv); unp_scan(soa->so_rcv.sb_mb, unp_accessable); SOCKBUF_UNLOCK(>so_rcv); @@ -2238,11 +2242,13 @@ unp_gc(__unused void *arg, int pending) unp_taskcount++; UNP_LIST_LOCK(); /* -* First clear all gc flags from previous runs. +* First clear all gc flags from previous runs, apart from +* UNPGC_IGNORE_RIGHTS. */ for (head = heads; *head != NULL; head++) LIST_FOREACH(unp, *head, unp_link) - unp->unp_gcflag = 0; + unp->unp_gcflag = + (unp->unp_gcflag & UNPGC_IGNORE_RIGHTS); /* * Scan marking all reachable sockets with UNPGC_REF. Once a socket @@ -2319,6 +2325,21 @@ unp_dispose(struct mbuf *m) unp_scan(m, unp_freerights); } +/* + * Synchronize against unp_gc, which
svn commit: r305260 - head/sys/dev/cxgbe/cxgbei
Author: np Date: Thu Sep 1 23:58:36 2016 New Revision: 305260 URL: https://svnweb.freebsd.org/changeset/base/305260 Log: cxgbe/cxgbei: Count various events related to iSCSI operation and make these counters available in the sysctl MIB. Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/cxgbei/cxgbei.c head/sys/dev/cxgbe/cxgbei/cxgbei.h head/sys/dev/cxgbe/cxgbei/icl_cxgbei.c Modified: head/sys/dev/cxgbe/cxgbei/cxgbei.c == --- head/sys/dev/cxgbe/cxgbei/cxgbei.c Thu Sep 1 23:56:02 2016 (r305259) +++ head/sys/dev/cxgbe/cxgbei/cxgbei.c Thu Sep 1 23:58:36 2016 (r305260) @@ -101,6 +101,50 @@ void icl_cxgbei_new_pdu_set_conn(struct void icl_cxgbei_conn_pdu_free(struct icl_conn *, struct icl_pdu *); static void +free_ci_counters(struct cxgbei_data *ci) +{ + +#define FREE_CI_COUNTER(x) do { \ + if (ci->x != NULL) { \ + counter_u64_free(ci->x); \ + ci->x = NULL; \ + } \ +} while (0) + + FREE_CI_COUNTER(ddp_setup_ok); + FREE_CI_COUNTER(ddp_setup_error); + FREE_CI_COUNTER(ddp_bytes); + FREE_CI_COUNTER(ddp_pdus); + FREE_CI_COUNTER(fl_bytes); + FREE_CI_COUNTER(fl_pdus); +#undef FREE_CI_COUNTER +} + +static int +alloc_ci_counters(struct cxgbei_data *ci) +{ + +#define ALLOC_CI_COUNTER(x) do { \ + ci->x = counter_u64_alloc(M_WAITOK); \ + if (ci->x == NULL) \ + goto fail; \ +} while (0) + + ALLOC_CI_COUNTER(ddp_setup_ok); + ALLOC_CI_COUNTER(ddp_setup_error); + ALLOC_CI_COUNTER(ddp_bytes); + ALLOC_CI_COUNTER(ddp_pdus); + ALLOC_CI_COUNTER(fl_bytes); + ALLOC_CI_COUNTER(fl_pdus); +#undef ALLOC_CI_COUNTER + + return (0); +fail: + free_ci_counters(ci); + return (ENOMEM); +} + +static void read_pdu_limits(struct adapter *sc, uint32_t *max_tx_pdu_len, uint32_t *max_rx_pdu_len) { @@ -133,6 +177,8 @@ read_pdu_limits(struct adapter *sc, uint static int cxgbei_init(struct adapter *sc, struct cxgbei_data *ci) { + struct sysctl_oid *oid; + struct sysctl_oid_list *children; struct ppod_region *pr; uint32_t r; int rc; @@ -140,6 +186,10 @@ cxgbei_init(struct adapter *sc, struct c MPASS(sc->vres.iscsi.size > 0); MPASS(ci != NULL); + rc = alloc_ci_counters(ci); + if (rc != 0) + return (rc); + read_pdu_limits(sc, >max_tx_pdu_len, >max_rx_pdu_len); ci->ddp_threshold = 2048; @@ -151,6 +201,7 @@ cxgbei_init(struct adapter *sc, struct c device_printf(sc->dev, "%s: failed to initialize the iSCSI page pod region: %u.\n", __func__, rc); + free_ci_counters(ci); return (rc); } @@ -169,6 +220,35 @@ cxgbei_init(struct adapter *sc, struct c V_ISCSITAGMASK(M_ISCSITAGMASK), pr->pr_tag_mask); } + sysctl_ctx_init(>ctx); + oid = device_get_sysctl_tree(sc->dev); /* dev.t5nex.X */ + children = SYSCTL_CHILDREN(oid); + + oid = SYSCTL_ADD_NODE(>ctx, children, OID_AUTO, "iscsi", CTLFLAG_RD, + NULL, "iSCSI ULP statistics"); + children = SYSCTL_CHILDREN(oid); + + SYSCTL_ADD_COUNTER_U64(>ctx, children, OID_AUTO, "ddp_setup_ok", + CTLFLAG_RD, >ddp_setup_ok, + "# of times DDP buffer was setup successfully."); + + SYSCTL_ADD_COUNTER_U64(>ctx, children, OID_AUTO, "ddp_setup_error", + CTLFLAG_RD, >ddp_setup_error, + "# of times DDP buffer setup failed."); + + SYSCTL_ADD_COUNTER_U64(>ctx, children, OID_AUTO, "ddp_bytes", + CTLFLAG_RD, >ddp_bytes, "# of bytes placed directly"); + + SYSCTL_ADD_COUNTER_U64(>ctx, children, OID_AUTO, "ddp_pdus", + CTLFLAG_RD, >ddp_pdus, "# of PDUs with data placed directly."); + + SYSCTL_ADD_COUNTER_U64(>ctx, children, OID_AUTO, "fl_bytes", + CTLFLAG_RD, >fl_bytes, "# of data bytes delivered in freelist"); + + SYSCTL_ADD_COUNTER_U64(>ctx, children, OID_AUTO, "fl_pdus", + CTLFLAG_RD, >fl_pdus, + "# of PDUs with data delivered in freelist"); + return (0); } @@ -213,6 +293,7 @@ static int do_rx_iscsi_data(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) { struct adapter *sc = iq->adapter; + struct cxgbei_data *ci = sc->iscsi_ulp_softc; struct cpl_iscsi_data *cpl = mtod(m, struct cpl_iscsi_data *); u_int tid = GET_TID(cpl); struct toepcb *toep = lookup_tid(sc, tid); @@ -232,6 +313,8 @@ do_rx_iscsi_data(struct sge_iq *iq, cons icp->icp_flags |= ICPF_RX_FLBUF; icp->ip.ip_data_mbuf = m; + counter_u64_add(ci->fl_pdus, 1); + counter_u64_add(ci->fl_bytes, m->m_pkthdr.len); #if 0 CTR3(KTR_CXGBE, "%s: tid %u, cpl->len %u", __func__, tid, @@ -245,6 +328,7 @@ static int
Re: svn commit: r305245 - in head: . release/doc/en_US.ISO8859-1/hardware
On Thursday, September 01, 2016 09:16:29 PM John Baldwin wrote: > Author: jhb > Date: Thu Sep 1 21:16:29 2016 > New Revision: 305245 > URL: https://svnweb.freebsd.org/changeset/base/305245 > > Log: > Remove the digi(4) manpage and digi from the release notes. We still list sio(4) in the release notes even though its disconnected from the build. (Which means we've been listing it in releases since 8.0 even though it doesn't compile and isn't shipped.) We should probably make sure we aren't listing any other disconnected drivers in the hardware notes. -- John Baldwin ___ 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: r305259 - head/sys/dev/ioat
Author: cem Date: Thu Sep 1 23:56:02 2016 New Revision: 305259 URL: https://svnweb.freebsd.org/changeset/base/305259 Log: ioat(4): Despam relatively common hardware reset messages Reported by: ngie@ Modified: head/sys/dev/ioat/ioat.c Modified: head/sys/dev/ioat/ioat.c == --- head/sys/dev/ioat/ioat.cThu Sep 1 23:52:25 2016(r305258) +++ head/sys/dev/ioat/ioat.cThu Sep 1 23:56:02 2016(r305259) @@ -750,13 +750,13 @@ out: * Fatal programming error on this DMA channel. Flush any outstanding * work with error status and restart the engine. */ - ioat_log_message(0, "Channel halted due to fatal programming error\n"); mtx_lock(>submit_lock); mtx_lock(>cleanup_lock); ioat->quiescing = TRUE; chanerr = ioat_read_4(ioat, IOAT_CHANERR_OFFSET); - ioat_halted_debug(ioat, chanerr); + if (1 <= g_ioat_debug_level) + ioat_halted_debug(ioat, chanerr); ioat->stats.last_halt_chanerr = chanerr; while (ioat_get_active(ioat) > 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: r305257 - head/share/mk
Author: bdrewery Date: Thu Sep 1 23:52:20 2016 New Revision: 305257 URL: https://svnweb.freebsd.org/changeset/base/305257 Log: DIRDEPS_BUILD: Include crunched object meta files for gendirdeps. MFC after:2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.crunchgen.mk Modified: head/share/mk/bsd.crunchgen.mk == --- head/share/mk/bsd.crunchgen.mk Thu Sep 1 23:22:31 2016 (r305256) +++ head/share/mk/bsd.crunchgen.mk Thu Sep 1 23:52:20 2016 (r305257) @@ -169,4 +169,5 @@ clean: fi META_XTRAS+= ${find ${CRUNCHOBJS}${SRCTOP} -name '*.meta' 2>/dev/null || true:L:sh} +META_XTRAS+= ${echo ${CRUNCHOBJS}/*.lo.meta 2>/dev/null || true:L:sh} META_XTRAS+= ${PROG}.meta ___ 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: r305258 - in head: rescue/rescue targets/pseudo/hosttools tools/bsdbox
Author: bdrewery Date: Thu Sep 1 23:52:25 2016 New Revision: 305258 URL: https://svnweb.freebsd.org/changeset/base/305258 Log: DIRDEPS_BUILD: Build crunchide for the host. MFC after:2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/rescue/rescue/Makefile.depend head/targets/pseudo/hosttools/Makefile.depend.host head/tools/bsdbox/Makefile.depend Modified: head/rescue/rescue/Makefile.depend == --- head/rescue/rescue/Makefile.depend Thu Sep 1 23:52:20 2016 (r305257) +++ head/rescue/rescue/Makefile.depend Thu Sep 1 23:52:25 2016 (r305258) @@ -52,6 +52,7 @@ DIRDEPS = \ usr.bin/lex/lib \ usr.bin/yacc.host \ usr.sbin/crunch/crunchgen.host \ + usr.sbin/crunch/crunchide.host \ .include Modified: head/targets/pseudo/hosttools/Makefile.depend.host == --- head/targets/pseudo/hosttools/Makefile.depend.host Thu Sep 1 23:52:20 2016(r305257) +++ head/targets/pseudo/hosttools/Makefile.depend.host Thu Sep 1 23:52:25 2016(r305258) @@ -18,7 +18,9 @@ DIRDEPS = \ usr.bin/xlint/xlint \ usr.bin/yacc \ usr.sbin/config \ - usr.sbin/crunch/crunchgen.host \ + usr.sbin/crunch/crunchgen \ + usr.sbin/crunch/crunchide \ + .if ${MK_KERBEROS} != "no" DIRDEPS+= \ Modified: head/tools/bsdbox/Makefile.depend == --- head/tools/bsdbox/Makefile.depend Thu Sep 1 23:52:20 2016 (r305257) +++ head/tools/bsdbox/Makefile.depend Thu Sep 1 23:52:25 2016 (r305258) @@ -47,6 +47,9 @@ DIRDEPS = \ secure/lib/libcrypto \ secure/lib/libssl \ usr.bin/lex/lib \ + usr.bin/yacc.host \ + usr.sbin/crunch/crunchgen.host \ + usr.sbin/crunch/crunchide.host \ .include ___ 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: r305256 - in head: . sys/sys
Author: bdrewery Date: Thu Sep 1 23:22:31 2016 New Revision: 305256 URL: https://svnweb.freebsd.org/changeset/base/305256 Log: Bump __FreeBSD_version for crunchgen META_MODE fix in r305254. MFC after:2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 head/sys/sys/param.h Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Thu Sep 1 23:21:12 2016(r305255) +++ head/Makefile.inc1 Thu Sep 1 23:22:31 2016(r305256) @@ -1628,8 +1628,10 @@ _crunchide= usr.sbin/crunch/crunchide # r285986 crunchen: use STRIPBIN rather than STRIP # 1100113: Support MK_AUTO_OBJ +# 126: META_MODE fixes .if ${BOOTSTRAPPING} < 1100078 || \ -(${MK_AUTO_OBJ} == "yes" && ${BOOTSTRAPPING} < 1100114) +(${MK_AUTO_OBJ} == "yes" && ${BOOTSTRAPPING} < 1100114) || \ +(${MK_META_MODE} == "yes" && ${BOOTSTRAPPING} < 126) _crunchgen=usr.sbin/crunch/crunchgen .endif Modified: head/sys/sys/param.h == --- head/sys/sys/param.hThu Sep 1 23:21:12 2016(r305255) +++ head/sys/sys/param.hThu Sep 1 23:22:31 2016(r305256) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 125 /* Master, propagated to newvers */ +#define __FreeBSD_version 126 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, ___ 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: r305253 - head/share/mk
Author: bdrewery Date: Thu Sep 1 23:20:54 2016 New Revision: 305253 URL: https://svnweb.freebsd.org/changeset/base/305253 Log: META_MODE: Don't expect .meta files for side-effect generated files. This is similar to r301285. MFC after:1 week Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.crunchgen.mk Modified: head/share/mk/bsd.crunchgen.mk == --- head/share/mk/bsd.crunchgen.mk Thu Sep 1 22:58:53 2016 (r305252) +++ head/share/mk/bsd.crunchgen.mk Thu Sep 1 23:20:54 2016 (r305253) @@ -112,6 +112,7 @@ CRUNCHENV+= MK_TESTS=no \ _RECURSING_CRUNCH=1 .ORDER: ${OUTPUTS} objs ${OUTPUTS:[1]}: .META +${OUTPUTS:[2..-1]}: .NOMETA ${OUTPUTS}: ${CONF} MAKE=${MAKE} ${CRUNCHENV:NMK_AUTO_OBJ=*} MAKEOBJDIRPREFIX=${CRUNCHOBJS} \ MK_AUTO_OBJ=${MK_AUTO_OBJ} \ ___ 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: r305254 - in head: share/mk usr.sbin/crunch/crunchgen
Author: bdrewery Date: Thu Sep 1 23:21:08 2016 New Revision: 305254 URL: https://svnweb.freebsd.org/changeset/base/305254 Log: META_MODE/DIRDEPS_BUILD: Fix various issues with crunch builds. - DIRDEPS_BUILD: Fix crunchgen builds losing their library dependencies on a nop-rebuild. - META_MODE: Fix not rebuilding various crunch.mk targets if their .meta files warrant a rebuild. They were lacking .meta files previously. This adds .NOMETA to the crunch objects being used since they are already built. Bmake was forcing a rebuild on them since their .meta files were not in the expected place; there is no reason to rebuild them. MFC after:2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.crunchgen.mk head/usr.sbin/crunch/crunchgen/crunchgen.c Modified: head/share/mk/bsd.crunchgen.mk == --- head/share/mk/bsd.crunchgen.mk Thu Sep 1 23:20:54 2016 (r305253) +++ head/share/mk/bsd.crunchgen.mk Thu Sep 1 23:21:08 2016 (r305254) @@ -123,11 +123,13 @@ ${OUTPUTS}: ${CONF} # These 2 targets cannot use .MAKE since they depend on the generated # ${OUTMK} above. -${PROG}: ${OUTPUTS} objs .META +${PROG}: ${OUTPUTS} objs .NOMETA .PHONY ${CRUNCHENV} \ CC="${CC} ${CFLAGS} ${LDFLAGS}" \ CXX="${CXX} ${CXXFLAGS} ${LDFLAGS}" \ - ${MAKE} .MAKE.MODE=normal -f ${OUTMK} exe + ${MAKE} .MAKE.MODE="${.MAKE.MODE} curdirOk=yes" \ + .MAKE.META.IGNORE_PATHS="${.MAKE.META.IGNORE_PATHS}" \ + -f ${OUTMK} exe objs: ${OUTMK} .META ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} \ @@ -167,3 +169,4 @@ clean: fi META_XTRAS+= ${find ${CRUNCHOBJS}${SRCTOP} -name '*.meta' 2>/dev/null || true:L:sh} +META_XTRAS+= ${PROG}.meta Modified: head/usr.sbin/crunch/crunchgen/crunchgen.c == --- head/usr.sbin/crunch/crunchgen/crunchgen.c Thu Sep 1 23:20:54 2016 (r305253) +++ head/usr.sbin/crunch/crunchgen/crunchgen.c Thu Sep 1 23:21:08 2016 (r305254) @@ -1064,6 +1064,7 @@ prog_makefile_rules(FILE *outmk, prog_t } fprintf(outmk, "\n"); } + fprintf(outmk, "$(%s_OBJPATHS): .NOMETA\n", p->ident); if (p->srcdir && p->objs) { fprintf(outmk, "%s_SRCDIR=%s\n", p->ident, p->srcdir); ___ 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: r305255 - head/targets/pseudo/bootstrap-tools
Author: bdrewery Date: Thu Sep 1 23:21:12 2016 New Revision: 305255 URL: https://svnweb.freebsd.org/changeset/base/305255 Log: DIRDEPS_BUILD: Fix 'make bootstrap-tools' not using the proper tblgen binaries. This was an incomplete item from r291561. The host {clang,llvm}-tblgen binaries were used, rather than the ones built into the host stagedir by normal Makefile.depend dependencies on tblgen. MFC after:1 week Sponsored by: EMC / Isilon Storage Division Modified: head/targets/pseudo/bootstrap-tools/Makefile Modified: head/targets/pseudo/bootstrap-tools/Makefile == --- head/targets/pseudo/bootstrap-tools/MakefileThu Sep 1 23:21:08 2016(r305254) +++ head/targets/pseudo/bootstrap-tools/MakefileThu Sep 1 23:21:12 2016(r305255) @@ -78,6 +78,8 @@ BSTCENV= \ BSTCARGS= \ ${BSARGS:NDESTDIR=*:NOBJTOP=*:NOBJROOT=*:NMK_CROSS_COMPILER=*:NMK_CLANG=*:NMK_GCC=*} \ BUILD_DIRDEPS=yes \ + LLVM_TBLGEN=${TOOLSDIR}/usr/bin/llvm-tblgen \ + CLANG_TBLGEN=${TOOLSDIR}/usr/bin/clang-tblgen \ -DWITH_STAGING \ -DWITH_TOOLSDIR ___ 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: r305251 - head/sys/dev/cxgbe/cxgbei
Author: np Date: Thu Sep 1 22:40:55 2016 New Revision: 305251 URL: https://svnweb.freebsd.org/changeset/base/305251 Log: cxgbe/cxgbei: Minor changes in the iSCSI CPL handlers. - Use m_copydata instead of bcopy. - Add new assertions. - Log some more information. Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/cxgbei/cxgbei.c Modified: head/sys/dev/cxgbe/cxgbei/cxgbei.c == --- head/sys/dev/cxgbe/cxgbei/cxgbei.c Thu Sep 1 22:27:47 2016 (r305250) +++ head/sys/dev/cxgbe/cxgbei/cxgbei.c Thu Sep 1 22:40:55 2016 (r305251) @@ -181,15 +181,18 @@ do_rx_iscsi_hdr(struct sge_iq *iq, const struct toepcb *toep = lookup_tid(sc, tid); struct icl_pdu *ip; struct icl_cxgbei_pdu *icp; + uint16_t len_ddp = be16toh(cpl->pdu_len_ddp); + uint16_t len = be16toh(cpl->len); M_ASSERTPKTHDR(m); + MPASS(m->m_pkthdr.len == len + sizeof(*cpl)); ip = icl_cxgbei_new_pdu(M_NOWAIT); if (ip == NULL) CXGBE_UNIMPLEMENTED("PDU allocation failure"); + m_copydata(m, sizeof(*cpl), ISCSI_BHS_SIZE, (caddr_t)ip->ip_bhs); + ip->ip_data_len = G_ISCSI_PDU_LEN(len_ddp) - len; icp = ip_to_icp(ip); - bcopy(mtod(m, caddr_t) + sizeof(*cpl), icp->ip.ip_bhs, sizeof(struct - iscsi_bhs)); icp->icp_seq = ntohl(cpl->seq); icp->icp_flags = ICPF_RX_HDR; @@ -198,8 +201,8 @@ do_rx_iscsi_hdr(struct sge_iq *iq, const toep->ulpcb2 = icp; #if 0 - CTR4(KTR_CXGBE, "%s: tid %u, cpl->len hlen %u, m->m_len hlen %u", - __func__, tid, ntohs(cpl->len), m->m_len); + CTR5(KTR_CXGBE, "%s: tid %u, cpl->len %u, pdu_len_ddp 0x%04x, icp %p", + __func__, tid, len, len_ddp, icp); #endif m_freem(m); @@ -216,22 +219,23 @@ do_rx_iscsi_data(struct sge_iq *iq, cons struct icl_cxgbei_pdu *icp = toep->ulpcb2; M_ASSERTPKTHDR(m); + MPASS(m->m_pkthdr.len == be16toh(cpl->len) + sizeof(*cpl)); /* Must already have received the header (but not the data). */ MPASS(icp != NULL); MPASS(icp->icp_flags == ICPF_RX_HDR); MPASS(icp->ip.ip_data_mbuf == NULL); - MPASS(icp->ip.ip_data_len == 0); + m_adj(m, sizeof(*cpl)); + MPASS(icp->ip.ip_data_len == m->m_pkthdr.len); icp->icp_flags |= ICPF_RX_FLBUF; icp->ip.ip_data_mbuf = m; - icp->ip.ip_data_len = m->m_pkthdr.len; #if 0 - CTR4(KTR_CXGBE, "%s: tid %u, cpl->len dlen %u, m->m_len dlen %u", - __func__, tid, ntohs(cpl->len), m->m_len); + CTR3(KTR_CXGBE, "%s: tid %u, cpl->len %u", __func__, tid, + be16toh(cpl->len)); #endif return (0); @@ -259,20 +263,30 @@ do_rx_iscsi_ddp(struct sge_iq *iq, const /* Must already be assembling a PDU. */ MPASS(icp != NULL); MPASS(icp->icp_flags & ICPF_RX_HDR);/* Data is optional. */ - ip = >ip; + MPASS((icp->icp_flags & ICPF_RX_STATUS) == 0); + + pdu_len = be16toh(cpl->len);/* includes everything. */ + val = be32toh(cpl->ddpvld); + +#if 0 + CTR4(KTR_CXGBE, + "%s: tid %u, cpl->len %u, ddpvld 0x%08x, icp_flags 0x%08x", + __func__, tid, pdu_len, val, icp->icp_flags); +#endif + icp->icp_flags |= ICPF_RX_STATUS; - val = ntohl(cpl->ddpvld); + ip = >ip; if (val & F_DDP_PADDING_ERR) icp->icp_flags |= ICPF_PAD_ERR; if (val & F_DDP_HDRCRC_ERR) icp->icp_flags |= ICPF_HCRC_ERR; if (val & F_DDP_DATACRC_ERR) icp->icp_flags |= ICPF_DCRC_ERR; - if (ip->ip_data_mbuf == NULL) { - /* XXXNP: what should ip->ip_data_len be, and why? */ + if (val & F_DDP_PDU && ip->ip_data_mbuf == NULL) { + MPASS((icp->icp_flags & ICPF_RX_FLBUF) == 0); + MPASS(ip->ip_data_len > 0); icp->icp_flags |= ICPF_RX_DDP; } - pdu_len = ntohs(cpl->len); /* includes everything. */ INP_WLOCK(inp); if (__predict_false(inp->inp_flags & (INP_DROPPED | INP_TIMEWAIT))) { @@ -358,11 +372,6 @@ do_rx_iscsi_ddp(struct sge_iq *iq, const m_freem(m); } -#if 0 - CTR4(KTR_CXGBE, "%s: tid %u, pdu_len %u, pdu_flags 0x%x", - __func__, tid, pdu_len, icp->icp_flags); -#endif - STAILQ_INSERT_TAIL(>rcvd_pdus, ip, ip_next); if ((icc->rx_flags & RXF_ACTIVE) == 0) { struct cxgbei_worker_thread_softc *cwt = _softc[icc->cwt]; ___ 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: r305250 - stable/11/sys/kern
Author: nwhitehorn Date: Thu Sep 1 22:27:47 2016 New Revision: 305250 URL: https://svnweb.freebsd.org/changeset/base/305250 Log: MFC r305108,305109: Refix operation on sparse CPU mappings as in r302372, temporarily broken by r304716. PR: kern/210106 Modified: stable/11/sys/kern/subr_gtaskqueue.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/subr_gtaskqueue.c == --- stable/11/sys/kern/subr_gtaskqueue.cThu Sep 1 22:24:30 2016 (r305249) +++ stable/11/sys/kern/subr_gtaskqueue.cThu Sep 1 22:27:47 2016 (r305250) @@ -742,7 +742,7 @@ _taskqgroup_adjust(struct taskqgroup *qg LIST_HEAD(, grouptask) gtask_head = LIST_HEAD_INITIALIZER(NULL); cpuset_t mask; struct grouptask *gtask; - int i, old_cnt, qid; + int i, k, old_cnt, qid, cpu; mtx_assert(>tqg_lock, MA_OWNED); @@ -806,8 +806,11 @@ _taskqgroup_adjust(struct taskqgroup *qg /* * Set new CPU and IRQ affinity */ + cpu = CPU_FIRST(); for (i = 0; i < cnt; i++) { - qgroup->tqg_queue[i].tgc_cpu = i * qgroup->tqg_stride; + qgroup->tqg_queue[i].tgc_cpu = cpu; + for (k = 0; k < qgroup->tqg_stride; k++) + cpu = CPU_NEXT(cpu); CPU_ZERO(); CPU_SET(qgroup->tqg_queue[i].tgc_cpu, ); LIST_FOREACH(gtask, >tqg_queue[i].tgc_tasks, gt_list) { ___ 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: r305249 - stable/11/sys/boot/powerpc/boot1.chrp
Author: nwhitehorn Date: Thu Sep 1 22:24:30 2016 New Revision: 305249 URL: https://svnweb.freebsd.org/changeset/base/305249 Log: MFC r305036: Some versions of SLOF do not append the partition number to the boot device argument to the stage-1 bootloader. In such cases, boot1 would only try to read the entire device rather than checking for partitions. Instead of panic'ing, fall back to reading the partitions as normal in such situations. This was preventing boot of installed systems on some versions of PowerKVM. PR: kern/211599 Modified: stable/11/sys/boot/powerpc/boot1.chrp/boot1.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/boot/powerpc/boot1.chrp/boot1.c == --- stable/11/sys/boot/powerpc/boot1.chrp/boot1.c Thu Sep 1 21:30:12 2016(r305248) +++ stable/11/sys/boot/powerpc/boot1.chrp/boot1.c Thu Sep 1 22:24:30 2016(r305249) @@ -137,7 +137,9 @@ ofw_init(void *vpd, int res, int (*openf p = bootpath; while (*p != '\0') { + /* Truncate partition ID */ if (*p == ':') { + ofw_close(bootdev); *(++p) = '\0'; break; } @@ -419,31 +421,40 @@ main(int ac, char **av) memcpy(bootpath_full,bootpath,len+1); - if (bootpath_full[len-1] == ':') { - for (i = 0; i < 16; i++) { - if (i < 10) { - bootpath_full[len] = i + '0'; - bootpath_full[len+1] = '\0'; - } else { - bootpath_full[len] = '1'; - bootpath_full[len+1] = i - 10 + '0'; - bootpath_full[len+2] = '\0'; - } - - if (domount(bootpath_full,1) >= 0) - break; - - if (bootdev > 0) - ofw_close(bootdev); + if (bootpath_full[len-1] != ':') { + /* First try full volume */ + if (domount(bootpath_full,1) == 0) + goto out; + + /* Add a : so that we try partitions if that fails */ + if (bootdev > 0) + ofw_close(bootdev); + bootpath_full[len] = ':'; + len += 1; + } + + /* Loop through first 16 partitions to find a UFS one */ + for (i = 0; i < 16; i++) { + if (i < 10) { + bootpath_full[len] = i + '0'; + bootpath_full[len+1] = '\0'; + } else { + bootpath_full[len] = '1'; + bootpath_full[len+1] = i - 10 + '0'; + bootpath_full[len+2] = '\0'; } + + if (domount(bootpath_full,1) >= 0) + break; - if (i >= 16) - panic("domount"); - } else { - if (domount(bootpath_full,0) == -1) - panic("domount"); + if (bootdev > 0) + ofw_close(bootdev); } + if (i >= 16) + panic("domount"); + +out: printf(" Boot volume: %s\n",bootpath_full); ofw_setprop(chosenh, "bootargs", bootpath_full, len+2); load(path); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r305170 - head/lib/atf/libatf-c
On Thu, Sep 01, 2016 at 11:43:48AM -0700, Ngie Cooper (yaneurabeya) wrote: > > > On Sep 1, 2016, at 09:54, Brooks Daviswrote: > > > I've run into to some problems with them on CheriBSD because the > > external compiler isn't available on the test target, but isn't listed > > as a dependency. These tests should declare a dependency on CC, etc > > as appropriate and be skipped if it isn't there. I'm not actually > > convinced this shouldn't just use cc, cpp, and c++. (That would be > > wrong for CheriBSD, but closer to right for current cases in FreeBSD). > > Agreed. I???ll add the necessary required.progs metadata soon. Thanks. That will be helpful. -- Brooks signature.asc Description: PGP signature
svn commit: r305248 - head/share/man/man9
Author: jhb Date: Thu Sep 1 21:30:12 2016 New Revision: 305248 URL: https://svnweb.freebsd.org/changeset/base/305248 Log: Remove warning about pci_addr_t being different sizes. pci_addr_t has always been 64-bits since r163805. MFC after:1 week Modified: head/share/man/man9/pci.9 Modified: head/share/man/man9/pci.9 == --- head/share/man/man9/pci.9 Thu Sep 1 21:20:07 2016(r305247) +++ head/share/man/man9/pci.9 Thu Sep 1 21:30:12 2016(r305248) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 3, 2016 +.Dd September 1, 2016 .Dt PCI 9 .Os .Sh NAME @@ -910,11 +910,6 @@ with one in the new distribution. The .Fn pci_remap_msix function will fail if this condition is not met. -.Sh IMPLEMENTATION NOTES -The -.Vt pci_addr_t -type varies according to the size of the PCI bus address -space on the target architecture. .Sh SEE ALSO .Xr pci 4 , .Xr pciconf 8 , ___ 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: r305247 - head/sys/arm/allwinner/clk
Author: jmcneill Date: Thu Sep 1 21:20:07 2016 New Revision: 305247 URL: https://svnweb.freebsd.org/changeset/base/305247 Log: Add support for changing A23 PLL1 frequency. Modified: head/sys/arm/allwinner/clk/aw_pll.c Modified: head/sys/arm/allwinner/clk/aw_pll.c == --- head/sys/arm/allwinner/clk/aw_pll.c Thu Sep 1 21:19:11 2016 (r305246) +++ head/sys/arm/allwinner/clk/aw_pll.c Thu Sep 1 21:20:07 2016 (r305247) @@ -110,14 +110,14 @@ __FBSDID("$FreeBSD$"); #defineA13_PLL2_PRE_DIV(0x1f << 0) #defineA13_PLL2_PRE_DIV_SHIFT 0 +#defineA23_PLL1_FACTOR_P (0x3 << 16) +#defineA23_PLL1_FACTOR_P_SHIFT 16 #defineA23_PLL1_FACTOR_N (0x1f << 8) #defineA23_PLL1_FACTOR_N_SHIFT 8 #defineA23_PLL1_FACTOR_K (0x3 << 4) #defineA23_PLL1_FACTOR_K_SHIFT 4 #defineA23_PLL1_FACTOR_M (0x3 << 0) #defineA23_PLL1_FACTOR_M_SHIFT 0 -#defineA23_PLL1_FACTOR_P (0x3 << 16) -#defineA23_PLL1_FACTOR_P_SHIFT 16 #defineA31_PLL1_LOCK (1 << 28) #defineA31_PLL1_CPU_SIGMA_DELTA_EN (1 << 24) @@ -171,6 +171,24 @@ __FBSDID("$FreeBSD$"); #defineCLKID_A31_PLL6 0 #defineCLKID_A31_PLL6_X2 1 +struct aw_pll_factor { + unsigned intn; + unsigned intk; + unsigned intm; + unsigned intp; + uint64_tfreq; +}; +#definePLLFACTOR(_n, _k, _m, _p, _freq)\ + { .n = (_n), .k = (_k), .m = (_m), .p = (_p), .freq = (_freq) } + +static struct aw_pll_factor aw_a23_pll1_factors[] = { + PLLFACTOR(16, 0, 0, 0, 40800), + PLLFACTOR(26, 0, 0, 0, 64800), + PLLFACTOR(16, 1, 0, 0, 81600), + PLLFACTOR(20, 1, 0, 0, 100800), + PLLFACTOR(24, 1, 0, 0, 12), +}; + enum aw_pll_type { AWPLL_A10_PLL1 = 1, AWPLL_A10_PLL2, @@ -557,6 +575,39 @@ a13_pll2_set_freq(struct aw_pll_sc *sc, } static int +a23_pll1_set_freq(struct aw_pll_sc *sc, uint64_t fin, uint64_t *fout, +int flags) +{ + struct aw_pll_factor *f; + uint32_t val; + int n; + + f = NULL; + for (n = 0; n < nitems(aw_a23_pll1_factors); n++) { + if (aw_a23_pll1_factors[n].freq == *fout) { + f = _a23_pll1_factors[n]; + break; + } + } + if (f == NULL) + return (EINVAL); + + DEVICE_LOCK(sc); + PLL_READ(sc, ); + val &= ~(A23_PLL1_FACTOR_N|A23_PLL1_FACTOR_K|A23_PLL1_FACTOR_M| +A23_PLL1_FACTOR_P); + val |= (f->n << A23_PLL1_FACTOR_N_SHIFT); + val |= (f->k << A23_PLL1_FACTOR_K_SHIFT); + val |= (f->m << A23_PLL1_FACTOR_M_SHIFT); + val |= (f->p << A23_PLL1_FACTOR_P_SHIFT); + PLL_WRITE(sc, val); + DEVICE_UNLOCK(sc); + + return (0); + +} + +static int a23_pll1_recalc(struct aw_pll_sc *sc, uint64_t *freq) { uint32_t val, m, n, k, p; @@ -719,7 +770,7 @@ static struct aw_pll_funcs aw_pll_func[] PLL(AWPLL_A10_PLL5, a10_pll5_recalc, NULL, NULL), PLL(AWPLL_A10_PLL6, a10_pll6_recalc, a10_pll6_set_freq, a10_pll6_init), PLL(AWPLL_A13_PLL2, a13_pll2_recalc, a13_pll2_set_freq, NULL), - PLL(AWPLL_A23_PLL1, a23_pll1_recalc, NULL, NULL), + PLL(AWPLL_A23_PLL1, a23_pll1_recalc, a23_pll1_set_freq, NULL), PLL(AWPLL_A31_PLL1, a31_pll1_recalc, NULL, NULL), PLL(AWPLL_A31_PLL6, a31_pll6_recalc, NULL, a31_pll6_init), PLL(AWPLL_A80_PLL4, a80_pll4_recalc, NULL, NULL), ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r305246 - head/sys/arm/allwinner
Author: jmcneill Date: Thu Sep 1 21:19:11 2016 New Revision: 305246 URL: https://svnweb.freebsd.org/changeset/base/305246 Log: Add support for setting DCDC2 voltage. Modified: head/sys/arm/allwinner/axp81x.c Modified: head/sys/arm/allwinner/axp81x.c == --- head/sys/arm/allwinner/axp81x.c Thu Sep 1 21:16:29 2016 (r305245) +++ head/sys/arm/allwinner/axp81x.c Thu Sep 1 21:19:11 2016 (r305246) @@ -61,8 +61,13 @@ __FBSDID("$FreeBSD$"); MALLOC_DEFINE(M_AXP81X_REG, "AXP81x regulator", "AXP81x power regulator"); #defineAXP_ICTYPE 0x03 +#defineAXP_POWERCTL1 0x10 +#define AXP_POWERCTL1_DCDC2(1 << 1) #defineAXP_POWERCTL2 0x12 #define AXP_POWERCTL2_DC1SW(1 << 7) +#defineAXP_VOLTCTL_DCDC2 0x21 +#define AXP_VOLTCTL_STATUS (1 << 7) +#define AXP_VOLTCTL_MASK 0x7f #defineAXP_POWERBAT0x32 #define AXP_POWERBAT_SHUTDOWN (1 << 7) #defineAXP_IRQEN1 0x40 @@ -109,10 +114,18 @@ struct axp81x_regdef { char*supply_name; uint8_t enable_reg; uint8_t enable_mask; + uint8_t voltage_reg; + int voltage_min; + int voltage_max; + int voltage_step1; + int voltage_nstep1; + int voltage_step2; + int voltage_nstep2; }; enum axp81x_reg_id { - AXP81X_REG_ID_DC1SW + AXP81X_REG_ID_DC1SW, + AXP81X_REG_ID_DCDC2, }; static struct axp81x_regdef axp81x_regdefs[] = { @@ -122,6 +135,19 @@ static struct axp81x_regdef axp81x_regde .enable_reg = AXP_POWERCTL2, .enable_mask = AXP_POWERCTL2_DC1SW, }, + { + .id = AXP81X_REG_ID_DCDC2, + .name = "dcdc2", + .enable_reg = AXP_POWERCTL1, + .enable_mask = AXP_POWERCTL1_DCDC2, + .voltage_reg = AXP_VOLTCTL_DCDC2, + .voltage_min = 500, + .voltage_max = 1300, + .voltage_step1 = 10, + .voltage_nstep1 = 70, + .voltage_step2 = 20, + .voltage_nstep2 = 5, + }, }; struct axp81x_softc; @@ -218,17 +244,82 @@ axp81x_regnode_enable(struct regnode *re return (0); } +static void +axp81x_regnode_reg_to_voltage(struct axp81x_reg_sc *sc, uint8_t val, int *uv) +{ + if (val < sc->def->voltage_nstep1) + *uv = sc->def->voltage_min + val * sc->def->voltage_step1; + else + *uv = sc->def->voltage_min + + (sc->def->voltage_nstep1 * sc->def->voltage_step1) + + ((val - sc->def->voltage_nstep1) * sc->def->voltage_step2); + *uv *= 1000; +} + +static int +axp81x_regnode_voltage_to_reg(struct axp81x_reg_sc *sc, int min_uvolt, +int max_uvolt, uint8_t *val) +{ + uint8_t nval; + int nstep, uvolt; + + nval = 0; + uvolt = sc->def->voltage_min * 1000; + + for (nstep = 0; nstep < sc->def->voltage_nstep1 && uvolt < min_uvolt; +nstep++) { + ++nval; + uvolt += (sc->def->voltage_step1 * 1000); + } + for (nstep = 0; nstep < sc->def->voltage_nstep2 && uvolt < min_uvolt; +nstep++) { + ++nval; + uvolt += (sc->def->voltage_step2 * 1000); + } + if (uvolt > max_uvolt) + return (EINVAL); + + *val = nval; + return (0); +} + static int axp81x_regnode_set_voltage(struct regnode *regnode, int min_uvolt, int max_uvolt, int *udelay) { - return (ENXIO); + struct axp81x_reg_sc *sc; + uint8_t val; + + sc = regnode_get_softc(regnode); + + if (!sc->def->voltage_step1 || !sc->def->voltage_step2) + return (ENXIO); + + if (axp81x_regnode_voltage_to_reg(sc, min_uvolt, max_uvolt, ) != 0) + return (ERANGE); + + axp81x_write(sc->base_dev, sc->def->voltage_reg, val); + + *udelay = 0; + + return (0); } static int axp81x_regnode_get_voltage(struct regnode *regnode, int *uvolt) { - return (ENXIO); + struct axp81x_reg_sc *sc; + uint8_t val; + + sc = regnode_get_softc(regnode); + + if (!sc->def->voltage_step1 || !sc->def->voltage_step2) + return (ENXIO); + + axp81x_read(sc->base_dev, sc->def->voltage_reg, , 1); + axp81x_regnode_reg_to_voltage(sc, val & AXP_VOLTCTL_MASK, uvolt); + + return (0); } static regnode_method_t axp81x_regnode_methods[] = { @@ -519,6 +610,10 @@ axp81x_reg_attach(device_t dev, phandle_ memset(, 0, sizeof(initdef)); regulator_parse_ofw_stdparam(dev, node, ); + if
svn commit: r305245 - in head: . release/doc/en_US.ISO8859-1/hardware
Author: jhb Date: Thu Sep 1 21:16:29 2016 New Revision: 305245 URL: https://svnweb.freebsd.org/changeset/base/305245 Log: Remove the digi(4) manpage and digi from the release notes. Modified: head/ObsoleteFiles.inc head/release/doc/en_US.ISO8859-1/hardware/article.xml Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Thu Sep 1 21:15:37 2016(r305244) +++ head/ObsoleteFiles.inc Thu Sep 1 21:16:29 2016(r305245) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20160901: Remove digi(4) +OLD_FILES+=usr/share/man/man4/digi.4.gz # 20160819: Remove ie(4) OLD_FILES+=usr/share/man/man4/i386/ie.4.gz # 20160819: Remove spic(4) Modified: head/release/doc/en_US.ISO8859-1/hardware/article.xml == --- head/release/doc/en_US.ISO8859-1/hardware/article.xml Thu Sep 1 21:15:37 2016(r305244) +++ head/release/doc/en_US.ISO8859-1/hardware/article.xml Thu Sep 1 21:16:29 2016(r305245) @@ -1098,9 +1098,6 @@ [] STB 4 port card using shared IRQ - [] DigiBoard intelligent serial cards (digi - driver) - [, ] PCI-Based multi-port serial boards ( driver) ___ 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: r305244 - head/targets/pseudo/hosttools
Author: bdrewery Date: Thu Sep 1 21:15:37 2016 New Revision: 305244 URL: https://svnweb.freebsd.org/changeset/base/305244 Log: DIRDEPS_BUILD: Add missing crunchgen host tool. MFC after:3 days Sponsored by: EMC / Isilon Storage Division Modified: head/targets/pseudo/hosttools/Makefile.depend.host Modified: head/targets/pseudo/hosttools/Makefile.depend.host == --- head/targets/pseudo/hosttools/Makefile.depend.host Thu Sep 1 21:03:27 2016(r305243) +++ head/targets/pseudo/hosttools/Makefile.depend.host Thu Sep 1 21:15:37 2016(r305244) @@ -18,6 +18,7 @@ DIRDEPS = \ usr.bin/xlint/xlint \ usr.bin/yacc \ usr.sbin/config \ + usr.sbin/crunch/crunchgen.host \ .if ${MK_KERBEROS} != "no" DIRDEPS+= \ ___ 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: r305241 - head/lib/libc/stdio
Author: ache Date: Thu Sep 1 20:45:04 2016 New Revision: 305241 URL: https://svnweb.freebsd.org/changeset/base/305241 Log: fgetwc(3) may set both __SEOF and __SERR at once (in case of incomplete sequence near EOF), so we can't just check for (wc == WEOF && !__sfeof(fp)) and must relay on __sferror(fp) with __SERR clearing/restoring. MFC after: 7 days Modified: head/lib/libc/stdio/fgetwln.c Modified: head/lib/libc/stdio/fgetwln.c == --- head/lib/libc/stdio/fgetwln.c Thu Sep 1 20:43:01 2016 (r305240) +++ head/lib/libc/stdio/fgetwln.c Thu Sep 1 20:45:04 2016 (r305241) @@ -47,11 +47,16 @@ fgetwln_l(FILE * __restrict fp, size_t * { wint_t wc; size_t len; + int savserr; + FIX_LOCALE(locale); FLOCKFILE(fp); ORIENT(fp, 1); + savserr = fp->_flags & __SERR; + fp->_flags &= ~__SERR; + len = 0; while ((wc = __fgetwc(fp, locale)) != WEOF) { #defineGROW512 @@ -64,7 +69,12 @@ fgetwln_l(FILE * __restrict fp, size_t * if (wc == L'\n') break; } - if (len == 0 || (wc == WEOF && !__sfeof(fp))) + /* fgetwc(3) may set both __SEOF and __SERR at once. */ + if (__sferror(fp)) + goto error; + + fp->_flags |= savserr; + if (len == 0) goto error; FUNLOCKFILE(fp); ___ 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: r305240 - in head/sys: dev/cxgbe dev/cxgbe/cxgbei modules/cxgbe/cxgbei
Author: np Date: Thu Sep 1 20:43:01 2016 New Revision: 305240 URL: https://svnweb.freebsd.org/changeset/base/305240 Log: cxgbe/cxgbei: Retire all DDP related code from cxgbei and switch to routines available in t4_tom to manage the iSCSI DDP page pod region. This adds the ability to use multiple DDP page sizes to the iSCSI driver, among other improvements. Sponsored by: Chelsio Communications Deleted: head/sys/dev/cxgbe/cxgbei/cxgbei_ulp2_ddp.c head/sys/dev/cxgbe/cxgbei/cxgbei_ulp2_ddp.h Modified: head/sys/dev/cxgbe/cxgbei/cxgbei.c head/sys/dev/cxgbe/cxgbei/cxgbei.h head/sys/dev/cxgbe/cxgbei/icl_cxgbei.c head/sys/dev/cxgbe/offload.h head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_sge.c head/sys/modules/cxgbe/cxgbei/Makefile Modified: head/sys/dev/cxgbe/cxgbei/cxgbei.c == --- head/sys/dev/cxgbe/cxgbei/cxgbei.c Thu Sep 1 20:38:59 2016 (r305239) +++ head/sys/dev/cxgbe/cxgbei/cxgbei.c Thu Sep 1 20:43:01 2016 (r305240) @@ -90,7 +90,6 @@ __FBSDID("$FreeBSD$"); #include "common/t4_regs.h" /* for PCIE_MEM_ACCESS */ #include "tom/t4_tom.h" #include "cxgbei.h" -#include "cxgbei_ulp2_ddp.h" static int worker_thread_count; static struct cxgbei_worker_thread_softc *cwt_softc; @@ -101,376 +100,6 @@ struct icl_pdu *icl_cxgbei_new_pdu(int); void icl_cxgbei_new_pdu_set_conn(struct icl_pdu *, struct icl_conn *); void icl_cxgbei_conn_pdu_free(struct icl_conn *, struct icl_pdu *); -/* - * Direct Data Placement - - * Directly place the iSCSI Data-In or Data-Out PDU's payload into pre-posted - * final destination host-memory buffers based on the Initiator Task Tag (ITT) - * in Data-In or Target Task Tag (TTT) in Data-Out PDUs. - * The host memory address is programmed into h/w in the format of pagepod - * entries. - * The location of the pagepod entry is encoded into ddp tag which is used as - * the base for ITT/TTT. - */ - -/* - * functions to program the pagepod in h/w - */ -static void inline -ppod_set(struct pagepod *ppod, - struct cxgbei_ulp2_pagepod_hdr *hdr, - struct cxgbei_ulp2_gather_list *gl, - unsigned int pidx) -{ - int i; - - memcpy(ppod, hdr, sizeof(*hdr)); - - for (i = 0; i < (PPOD_PAGES + 1); i++, pidx++) { - ppod->addr[i] = pidx < gl->nelem ? - cpu_to_be64(gl->dma_sg[pidx].phys_addr) : 0ULL; - } -} - -static void inline -ppod_clear(struct pagepod *ppod) -{ - memset(ppod, 0, sizeof(*ppod)); -} - -static inline void -ulp_mem_io_set_hdr(struct adapter *sc, int tid, struct ulp_mem_io *req, - unsigned int wr_len, unsigned int dlen, - unsigned int pm_addr) -{ - struct ulptx_idata *idata = (struct ulptx_idata *)(req + 1); - - INIT_ULPTX_WR(req, wr_len, 0, 0); - req->cmd = cpu_to_be32(V_ULPTX_CMD(ULP_TX_MEM_WRITE) | - V_ULP_MEMIO_ORDER(is_t4(sc)) | - V_T5_ULP_MEMIO_IMM(is_t5(sc))); - req->dlen = htonl(V_ULP_MEMIO_DATA_LEN(dlen >> 5)); - req->len16 = htonl(DIV_ROUND_UP(wr_len - sizeof(req->wr), 16) - | V_FW_WR_FLOWID(tid)); - req->lock_addr = htonl(V_ULP_MEMIO_ADDR(pm_addr >> 5)); - - idata->cmd_more = htonl(V_ULPTX_CMD(ULP_TX_SC_IMM)); - idata->len = htonl(dlen); -} - -#define ULPMEM_IDATA_MAX_NPPODS 1 /* 256/PPOD_SIZE */ -#define PCIE_MEMWIN_MAX_NPPODS 16 /* 1024/PPOD_SIZE */ - -static int -ppod_write_idata(struct cxgbei_data *ci, - struct cxgbei_ulp2_pagepod_hdr *hdr, - unsigned int idx, unsigned int npods, - struct cxgbei_ulp2_gather_list *gl, - unsigned int gl_pidx, struct toepcb *toep) -{ - u_int dlen = PPOD_SIZE * npods; - u_int pm_addr = idx * PPOD_SIZE + ci->llimit; - u_int wr_len = roundup(sizeof(struct ulp_mem_io) + - sizeof(struct ulptx_idata) + dlen, 16); - struct ulp_mem_io *req; - struct ulptx_idata *idata; - struct pagepod *ppod; - u_int i; - struct wrqe *wr; - struct adapter *sc = toep->vi->pi->adapter; - - wr = alloc_wrqe(wr_len, toep->ctrlq); - if (wr == NULL) { - CXGBE_UNIMPLEMENTED("ppod_write_idata: alloc_wrqe failure"); - return (ENOMEM); - } - - req = wrtod(wr); - memset(req, 0, wr_len); - ulp_mem_io_set_hdr(sc, toep->tid, req, wr_len, dlen, pm_addr); - idata = (struct ulptx_idata *)(req + 1); - - ppod = (struct pagepod *)(idata + 1); - for (i = 0; i < npods; i++, ppod++, gl_pidx += PPOD_PAGES) { - if (!hdr) /* clear the pagepod */ - ppod_clear(ppod); - else /* set the pagepod */ - ppod_set(ppod, hdr, gl, gl_pidx); - } - - t4_wrq_tx(sc, wr); - return 0; -} - -int
Re: svn commit: r305178 - head/sys/boot/i386/libi386
> On 1. sept 2016, at 21:28, John Baldwinwrote: > > On Thursday, September 01, 2016 06:35:13 AM Toomas Soome wrote: >> Author: tsoome >> Date: Thu Sep 1 06:35:13 2016 >> New Revision: 305178 >> URL: https://svnweb.freebsd.org/changeset/base/305178 >> >> Log: >> bd_int13probe() should check extended info if sector info is bad >> >> In some Dell systems and usb stick combinations, it is found that >> int13 AH=08 is reporting back bad sector information, preventing the >> boot. >> >> This update is allowing bd_int13probe() to use extended info call to >> build disk properties. >> >> It also can happen the total sectors count from extended info may be >> wrong, in such case, the CHS data is used to calculate total sectors. >> >> Reviewed by:allanjude >> Approved by:allanjude (mentor) >> Differential Revision: https://reviews.freebsd.org/D7718 > > Hmm, can you see if this fixes > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=176748 ? > > -- > John Baldwin eh… well. as he was reporting about bad sector size - my patch does not check it.. so apparently that would be good check as well…. unfortunately I don’t have any of such broken BIOSes handy to verify what kind of breakage it is - are they just filling EDD with garbage or is there any kind of logic. rgds, toomas ___ 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: r305236 - releng/11.0/sys/boot/i386/libi386
Author: gjb Date: Thu Sep 1 20:01:38 2016 New Revision: 305236 URL: https://svnweb.freebsd.org/changeset/base/305236 Log: MFS11 305232: MFC r304966 (peter): The read-ahead code from r298230 made it likely the boot code would read beyond the end of disk. r298900 added code to prevent this. Some BIOSes cause significant delays if asked to read past end-of-disk. We never trusted the BIOS to accurately report the sectorsize of disks before and this set of changes. Unfortuately they interact badly with the infamous >2TB wraparound bugs. We have a number of relatively-recent machines in the FreeBSD.org cluster where the BIOS reports 3TB disks as 1TB. With pre-r298900 they work just fine. After r298900 they stop working if the boot environment attempts to access anything outside the first 1TB on the disk. 'ZFS: I/O error, all block copies unavailable' etc. It affects both UFS and ZFS if they try to boot from large volumes. This change replaces the blind trust of the BIOS end-of-disk reporting with a read-ahead clip to prevent reads crossing the of end-of-disk boundary. Since 2^32 (2TB) size reporting truncation is not uncommon, the clipping is done on 2TB aliases of the reported end-of-disk. ie: a 3TB disk reported as 1TB has readahead clipped at 1TB, 3TB, 5TB, ... as one of them is likely to be the real end-of-disk. This should make the loader on these broken machines behave the same as traditional pre-r298900 loader behavior, without disabling read-ahead. PR: 212139 Approved by: re (kib) Sponsored by: The FreeBSD Foundation Modified: releng/11.0/sys/boot/i386/libi386/biosdisk.c Directory Properties: releng/11.0/ (props changed) Modified: releng/11.0/sys/boot/i386/libi386/biosdisk.c == --- releng/11.0/sys/boot/i386/libi386/biosdisk.cThu Sep 1 19:51:35 2016(r305235) +++ releng/11.0/sys/boot/i386/libi386/biosdisk.cThu Sep 1 20:01:38 2016(r305236) @@ -495,7 +495,7 @@ bd_realstrategy(void *devdata, int rw, d char *buf, size_t *rsize) { struct disk_devdesc *dev = (struct disk_devdesc *)devdata; -intblks; +intblks, remaining; #ifdef BD_SUPPORT_FRAGS /* XXX: sector size */ char fragbuf[BIOSDISK_SECSIZE]; size_t fragsize; @@ -511,14 +511,15 @@ bd_realstrategy(void *devdata, int rw, d if (rsize) *rsize = 0; -if (dblk >= BD(dev).bd_sectors) { - DEBUG("IO past disk end %llu", (unsigned long long)dblk); - return (EIO); -} - -if (dblk + blks > BD(dev).bd_sectors) { - /* perform partial read */ - blks = BD(dev).bd_sectors - dblk; +/* + * Perform partial read to prevent read-ahead crossing + * the end of disk - or any 32 bit aliases of the end. + * Signed arithmetic is used to handle wrap-around cases + * like we do for TCP sequence numbers. + */ +remaining = (int)(BD(dev).bd_sectors - dblk); /* truncate */ +if (remaining > 0 && remaining < blks) { + blks = remaining; size = blks * BD(dev).bd_sectorsize; DEBUG("short read %d", blks); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r305235 - in head: share/man/man4 sys/conf sys/modules/digi
> On Sep 1, 2016, at 12:51, John Baldwinwrote: > > Author: jhb > Date: Thu Sep 1 19:51:35 2016 > New Revision: 305235 > URL: https://svnweb.freebsd.org/changeset/base/305235 > > Log: > Remove the digi(4) drivers. > > These drivers were never updated for the new TTY changes and have > been disconnected from the build since 8.0. > > Ok'd by:imp, peterj Are these already being handled in ObsoleteFiles.inc (not that it probably matters given how far back it's been disabled, but it's kind of nice to be clean)? Thanks! -Ngie ___ 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: r305235 - in head: share/man/man4 sys/conf sys/modules/digi
Author: jhb Date: Thu Sep 1 19:51:35 2016 New Revision: 305235 URL: https://svnweb.freebsd.org/changeset/base/305235 Log: Remove the digi(4) drivers. These drivers were never updated for the new TTY changes and have been disconnected from the build since 8.0. Ok'd by: imp, peterj Deleted: head/share/man/man4/digi.4 head/sys/modules/digi/ Modified: head/share/man/man4/Makefile head/sys/conf/files Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileThu Sep 1 19:36:39 2016 (r305234) +++ head/share/man/man4/MakefileThu Sep 1 19:51:35 2016 (r305235) @@ -122,7 +122,6 @@ MAN=aac.4 \ ddb.4 \ de.4 \ devctl.4 \ - digi.4 \ disc.4 \ divert.4 \ ${_dpms.4} \ Modified: head/sys/conf/files == --- head/sys/conf/files Thu Sep 1 19:36:39 2016(r305234) +++ head/sys/conf/files Thu Sep 1 19:51:35 2016(r305235) @@ -1349,16 +1349,6 @@ dev/dcons/dcons.coptional dcons dev/dcons/dcons_crom.c optional dcons_crom dev/dcons/dcons_os.c optional dcons dev/de/if_de.c optional de pci -dev/digi/CX.c optional digi_CX -dev/digi/CX_PCI.c optional digi_CX_PCI -dev/digi/EPCX.coptional digi_EPCX -dev/digi/EPCX_PCI.coptional digi_EPCX_PCI -dev/digi/Xe.c optional digi_Xe -dev/digi/Xem.c optional digi_Xem -dev/digi/Xr.c optional digi_Xr -dev/digi/digi.coptional digi -dev/digi/digi_isa.coptional digi isa -dev/digi/digi_pci.coptional digi pci dev/dpt/dpt_eisa.c optional dpt eisa dev/dpt/dpt_pci.c optional dpt pci dev/dpt/dpt_scsi.c optional dpt ___ 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: r305234 - stable/9/cddl/contrib/opensolaris/lib/libzpool/common
Author: ngie Date: Thu Sep 1 19:36:39 2016 New Revision: 305234 URL: https://svnweb.freebsd.org/changeset/base/305234 Log: MFstable/10 r305233: MFstable/11 r305225: MFC r303573: Cast result from third parameter to int instead of promoting it to size_t This resolves a -Wformat issue when the value is used as a format width precision specifier, i.e. %*s Modified: stable/9/cddl/contrib/opensolaris/lib/libzpool/common/util.c Directory Properties: stable/9/ (props changed) stable/9/cddl/ (props changed) stable/9/cddl/contrib/ (props changed) stable/9/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libzpool/common/util.c == --- stable/9/cddl/contrib/opensolaris/lib/libzpool/common/util.cThu Sep 1 19:31:47 2016(r305233) +++ stable/9/cddl/contrib/opensolaris/lib/libzpool/common/util.cThu Sep 1 19:36:39 2016(r305234) @@ -108,7 +108,7 @@ show_vdev_stats(const char *desc, const (void) printf("%*s%s%*s%*s%*s %5s %5s %5s %5s %5s %5s %5s\n", indent, "", prefix, - indent + strlen(prefix) - 25 - (vs->vs_space ? 0 : 12), + (int)(indent + strlen(prefix) - 25 - (vs->vs_space ? 0 : 12)), desc, vs->vs_space ? 6 : 0, vs->vs_space ? used : "", vs->vs_space ? 6 : 0, vs->vs_space ? avail : "", ___ 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: r305233 - stable/10/cddl/contrib/opensolaris/lib/libzpool/common
Author: ngie Date: Thu Sep 1 19:31:47 2016 New Revision: 305233 URL: https://svnweb.freebsd.org/changeset/base/305233 Log: MFstable/11 r305225: MFC r303573: Cast result from third parameter to int instead of promoting it to size_t This resolves a -Wformat issue when the value is used as a format width precision specifier, i.e. %*s Modified: stable/10/cddl/contrib/opensolaris/lib/libzpool/common/util.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/lib/libzpool/common/util.c == --- stable/10/cddl/contrib/opensolaris/lib/libzpool/common/util.c Thu Sep 1 19:30:52 2016(r305232) +++ stable/10/cddl/contrib/opensolaris/lib/libzpool/common/util.c Thu Sep 1 19:31:47 2016(r305233) @@ -108,7 +108,7 @@ show_vdev_stats(const char *desc, const (void) printf("%*s%s%*s%*s%*s %5s %5s %5s %5s %5s %5s %5s\n", indent, "", prefix, - indent + strlen(prefix) - 25 - (vs->vs_space ? 0 : 12), + (int)(indent + strlen(prefix) - 25 - (vs->vs_space ? 0 : 12)), desc, vs->vs_space ? 6 : 0, vs->vs_space ? used : "", vs->vs_space ? 6 : 0, vs->vs_space ? avail : "", ___ 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: r305232 - stable/11/sys/boot/i386/libi386
Author: gjb Date: Thu Sep 1 19:30:52 2016 New Revision: 305232 URL: https://svnweb.freebsd.org/changeset/base/305232 Log: MFC r304966 (peter): The read-ahead code from r298230 made it likely the boot code would read beyond the end of disk. r298900 added code to prevent this. Some BIOSes cause significant delays if asked to read past end-of-disk. We never trusted the BIOS to accurately report the sectorsize of disks before and this set of changes. Unfortuately they interact badly with the infamous >2TB wraparound bugs. We have a number of relatively-recent machines in the FreeBSD.org cluster where the BIOS reports 3TB disks as 1TB. With pre-r298900 they work just fine. After r298900 they stop working if the boot environment attempts to access anything outside the first 1TB on the disk. 'ZFS: I/O error, all block copies unavailable' etc. It affects both UFS and ZFS if they try to boot from large volumes. This change replaces the blind trust of the BIOS end-of-disk reporting with a read-ahead clip to prevent reads crossing the of end-of-disk boundary. Since 2^32 (2TB) size reporting truncation is not uncommon, the clipping is done on 2TB aliases of the reported end-of-disk. ie: a 3TB disk reported as 1TB has readahead clipped at 1TB, 3TB, 5TB, ... as one of them is likely to be the real end-of-disk. This should make the loader on these broken machines behave the same as traditional pre-r298900 loader behavior, without disabling read-ahead. PR: 212139 Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/boot/i386/libi386/biosdisk.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/boot/i386/libi386/biosdisk.c == --- stable/11/sys/boot/i386/libi386/biosdisk.c Thu Sep 1 19:18:26 2016 (r305231) +++ stable/11/sys/boot/i386/libi386/biosdisk.c Thu Sep 1 19:30:52 2016 (r305232) @@ -495,7 +495,7 @@ bd_realstrategy(void *devdata, int rw, d char *buf, size_t *rsize) { struct disk_devdesc *dev = (struct disk_devdesc *)devdata; -intblks; +intblks, remaining; #ifdef BD_SUPPORT_FRAGS /* XXX: sector size */ char fragbuf[BIOSDISK_SECSIZE]; size_t fragsize; @@ -511,14 +511,15 @@ bd_realstrategy(void *devdata, int rw, d if (rsize) *rsize = 0; -if (dblk >= BD(dev).bd_sectors) { - DEBUG("IO past disk end %llu", (unsigned long long)dblk); - return (EIO); -} - -if (dblk + blks > BD(dev).bd_sectors) { - /* perform partial read */ - blks = BD(dev).bd_sectors - dblk; +/* + * Perform partial read to prevent read-ahead crossing + * the end of disk - or any 32 bit aliases of the end. + * Signed arithmetic is used to handle wrap-around cases + * like we do for TCP sequence numbers. + */ +remaining = (int)(BD(dev).bd_sectors - dblk); /* truncate */ +if (remaining > 0 && remaining < blks) { + blks = remaining; size = blks * BD(dev).bd_sectorsize; DEBUG("short read %d", blks); } ___ 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: r305231 - head/sys/dev/syscons
Author: bde Date: Thu Sep 1 19:18:26 2016 New Revision: 305231 URL: https://svnweb.freebsd.org/changeset/base/305231 Log: The log message for the previous commit didn't mention the most the important detail that sc_cngetc() now opens and closes the keyboard on every call again. This was moved from sc_cngetc() to scn_cngrab/ ungrab() in r228644, but the change wasn't quite complete. After fixes for nesting in kbdd_poll() in ukbd and kbdmux, these opens and closes should have no significant effect if done while grabbed. They fix unusual cases when cngetc() is called while not grabbed. This commit is the main fix for screen locking in sc_cnputc(): detect deadlock or likely-deadlock and handle it by buffering the output atomically and printing it later if the deadlock condition clears (and sc_cnputc() is called). The most common deadlock is when the screen lock is held by ourself. Then it would be safe to acquire the lock recursively if the console driver is calling printf() in a safe context, but we don't know when that is. It is not safe to ignore the lock even in kdb or panic mode. But ignore it in panic mode. The only other known case of deadlock is when another thread holds the lock but is running on a stopped CPU. Detect that case approximately by using trylock and retrying for 1000 usec. On a 4 GHz CPU, 100 usec is almost long enough -- screen switches take slightly longer than that. Not retrying at all is good enough except for stress tests, and planned future versions will extend the timeout so that the stress tests work better. To see the behaviour when deadlock is detected, single step through sctty_outwakeup() (or sc_puts() to start with deadlock). Another (serial) console is needed to the buffered-only output, but the keyboard works in this context to continue or step out of the deadlocked region. The buffer is not large enough to hold all the output for this. Modified: head/sys/dev/syscons/syscons.c head/sys/dev/syscons/syscons.h Modified: head/sys/dev/syscons/syscons.c == --- head/sys/dev/syscons/syscons.c Thu Sep 1 19:11:50 2016 (r305230) +++ head/sys/dev/syscons/syscons.c Thu Sep 1 19:18:26 2016 (r305231) @@ -1678,13 +1678,39 @@ sccnkbdunlock(sc_softc_t *sc, struct sc_ static void sccnscrlock(sc_softc_t *sc, struct sc_cnstate *sp) { -SC_VIDEO_LOCK(sc); +int retries; + +/** + * Locking method: + * - if kdb_active and video_mtx is not owned by anyone, then lock + * by kdb remaining active + * - if !kdb_active, try to acquire video_mtx without blocking or + * recursing; if we get it then it works normally. + * Note that video_mtx is especially unusable if we already own it, + * since then it is protecting something and syscons is not reentrant + * enough to ignore the protection even in the kdb_active case. + */ +if (kdb_active) { + sp->kdb_locked = sc->video_mtx.mtx_lock == MTX_UNOWNED || panicstr; + sp->mtx_locked = FALSE; +} else { + sp->kdb_locked = FALSE; + for (retries = 0; retries < 1000; retries++) { + sp->mtx_locked = mtx_trylock_spin_flags(>video_mtx, + MTX_QUIET) != 0 || panicstr; + if (sp->mtx_locked) + break; + DELAY(1); + } +} } static void sccnscrunlock(sc_softc_t *sc, struct sc_cnstate *sp) { -SC_VIDEO_UNLOCK(sc); +if (sp->mtx_locked) + mtx_unlock_spin(>video_mtx); +sp->mtx_locked = sp->kdb_locked = FALSE; } static void @@ -1721,6 +1747,8 @@ over_keyboard: ; /* The screen is opened iff locking it succeeds. */ sccnscrlock(sc, sp); +if (!sp->kdb_locked && !sp->mtx_locked) + return; sp->scr_opened = TRUE; /* The screen switch is optional. */ @@ -1797,6 +1825,10 @@ sc_cnungrab(struct consdev *cp) atomic_add_int(>grab_level, -1); } +static char sc_cnputc_log[0x1000]; +static u_int sc_cnputc_loghead; +static u_int sc_cnputc_logtail; + static void sc_cnputc(struct consdev *cd, int c) { @@ -1808,12 +1840,28 @@ sc_cnputc(struct consdev *cd, int c) struct tty *tp; #endif #endif /* !SC_NO_HISTORY */ +u_int head; int s; /* assert(sc_console != NULL) */ sccnopen(scp->sc, , 0); +/* + * Log the output. + * + * In the unlocked case, the logging is intentionally only + * perfectly atomic for the indexes. + */ +head = atomic_fetchadd_int(_cnputc_loghead, 1); +sc_cnputc_log[head % sizeof(sc_cnputc_log)] = c; + +/* + * If we couldn't open, return to defer output. + */ +if (!st.scr_opened) + return; + #ifndef SC_NO_HISTORY if (scp == scp->sc->cur_scp && scp->status & SLKED) { scp->status &= ~SLKED; @@ -1841,8 +1889,14 @@ sc_cnputc(struct consdev *cd, int c) } #endif /* !SC_NO_HISTORY */ -
svn commit: r305228 - stable/10/tests/sys/kern/acct
Author: ngie Date: Thu Sep 1 19:08:07 2016 New Revision: 305228 URL: https://svnweb.freebsd.org/changeset/base/305228 Log: MFstable/11 r304947: MFC r304238: Only expect :encode_tv_random_million to fail on 64-bit platforms It passes on i386 Modified: stable/10/tests/sys/kern/acct/acct_test.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tests/sys/kern/acct/acct_test.c == --- stable/10/tests/sys/kern/acct/acct_test.c Thu Sep 1 19:05:23 2016 (r305227) +++ stable/10/tests/sys/kern/acct/acct_test.c Thu Sep 1 19:08:07 2016 (r305228) @@ -204,7 +204,10 @@ ATF_TC_BODY(encode_tv_random_million, tc struct timeval tv; long k; - atf_tc_expect_fail("the testcase violates FLT_EPSILON"); +#ifdef __LP64__ + atf_tc_expect_fail("the testcase violates FLT_EPSILON on 64-bit " + "platforms, e.g. amd64"); +#endif ATF_REQUIRE_MSG(unsetenv("TZ") == 0, "unsetting TZ failed; errno=%d", errno); ___ 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: r305230 - stable/9/usr.bin/getconf
Author: ngie Date: Thu Sep 1 19:11:50 2016 New Revision: 305230 URL: https://svnweb.freebsd.org/changeset/base/305230 Log: MFstable/10 r305229: MFstable/11 r304949,r305226: r304949: MFC r303830,r304693,r304694,r304698: r303830: Remove vestigal references to __alpha__ Replace alpha reference in getconf(1) with amd64 [*] PR: 211300 [*] r304693: Clean up trailing whitespace r304694: Add `MIN_HOLE_SIZE` pathconf(2) support to getconf This allows shell programs to programmatically determine whether or not a filesystem supports sparse files r304698: Add support for _PC_ACL_NFS4 as TRUSTEDBSD_ACL_NFS4 The TRUSTEDBSD prefix was chosen for consistency with the other related `_PC_ACL*` prefixed variables. r305226: MFC r304809: Add non-TRUSTEDBSD prefixed knobs for the _PC_ACL* and {CAP,INF,MAC}_PRESENT knobs It's not necessarily intuitive that the variables to query contain TRUSTEDBSD in the prefix. Add non-TRUSTEDBSD prefixed knobs for querying things like "_PC_ACL_NFS4". Relnotes: yes Modified: stable/9/usr.bin/getconf/getconf.c stable/9/usr.bin/getconf/pathconf.gperf Directory Properties: stable/9/ (props changed) stable/9/usr.bin/ (props changed) Modified: stable/9/usr.bin/getconf/getconf.c == --- stable/9/usr.bin/getconf/getconf.c Thu Sep 1 19:10:42 2016 (r305229) +++ stable/9/usr.bin/getconf/getconf.c Thu Sep 1 19:11:50 2016 (r305230) @@ -109,13 +109,13 @@ main(int argc, char **argv) do_confstr(name, key); else printf("undefined\n"); - } else { + } else { valid = find_sysconf(name, ); if (valid > 0) { do_sysconf(name, key); } else if (valid < 0) { printf("undefined\n"); - } else + } else errx(EX_USAGE, "no such configuration parameter `%s'", name); Modified: stable/9/usr.bin/getconf/pathconf.gperf == --- stable/9/usr.bin/getconf/pathconf.gperf Thu Sep 1 19:10:42 2016 (r305229) +++ stable/9/usr.bin/getconf/pathconf.gperf Thu Sep 1 19:11:50 2016 (r305230) @@ -20,10 +20,17 @@ static const struct map *in_word_set(con %} struct map { const char *name; int key; int valid; }; %% +ACL_EXTENDED, _PC_ACL_EXTENDED +ACL_NFS4, _PC_ACL_NFS4 +ACL_PATH_MAX, _PC_ACL_PATH_MAX +CAP_PRESENT, _PC_CAP_PRESENT FILESIZEBITS, _PC_FILESIZEBITS +INF_PRESENT, _PC_INF_PRESENT LINK_MAX, _PC_LINK_MAX +MAC_PRESENT, _PC_MAC_PRESENT MAX_CANON, _PC_MAX_CANON MAX_INPUT, _PC_MAX_INPUT +MIN_HOLE_SIZE, _PC_MIN_HOLE_SIZE NAME_MAX, _PC_NAME_MAX PATH_MAX, _PC_PATH_MAX PIPE_BUF, _PC_PIPE_BUF @@ -34,6 +41,7 @@ POSIX_REC_MIN_XFER_SIZE, _PC_REC_MIN_XFE POSIX_REC_XFER_ALIGN, _PC_REC_XFER_ALIGN SYMLINK_MAX, _PC_SYMLINK_MAX TRUSTEDBSD_ACL_EXTENDED, _PC_ACL_EXTENDED +TRUSTEDBSD_ACL_NFS4, _PC_ACL_NFS4 TRUSTEDBSD_ACL_PATH_MAX, _PC_ACL_PATH_MAX TRUSTEDBSD_CAP_PRESENT, _PC_CAP_PRESENT TRUSTEDBSD_INF_PRESENT, _PC_INF_PRESENT ___ 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: r305229 - stable/10/usr.bin/getconf
Author: ngie Date: Thu Sep 1 19:10:42 2016 New Revision: 305229 URL: https://svnweb.freebsd.org/changeset/base/305229 Log: MFstable/11 r304949,r305226: r304949: MFC r303830,r304693,r304694,r304698: r303830: Remove vestigal references to __alpha__ Replace alpha reference in getconf(1) with amd64 [*] PR: 211300 [*] r304693: Clean up trailing whitespace r304694: Add `MIN_HOLE_SIZE` pathconf(2) support to getconf This allows shell programs to programmatically determine whether or not a filesystem supports sparse files r304698: Add support for _PC_ACL_NFS4 as TRUSTEDBSD_ACL_NFS4 The TRUSTEDBSD prefix was chosen for consistency with the other related `_PC_ACL*` prefixed variables. r305226: MFC r304809: Add non-TRUSTEDBSD prefixed knobs for the _PC_ACL* and {CAP,INF,MAC}_PRESENT knobs It's not necessarily intuitive that the variables to query contain TRUSTEDBSD in the prefix. Add non-TRUSTEDBSD prefixed knobs for querying things like "_PC_ACL_NFS4". Relnotes: yes Modified: stable/10/usr.bin/getconf/getconf.c stable/10/usr.bin/getconf/pathconf.gperf Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/getconf/getconf.c == --- stable/10/usr.bin/getconf/getconf.c Thu Sep 1 19:08:07 2016 (r305228) +++ stable/10/usr.bin/getconf/getconf.c Thu Sep 1 19:10:42 2016 (r305229) @@ -109,13 +109,13 @@ main(int argc, char **argv) do_confstr(name, key); else printf("undefined\n"); - } else { + } else { valid = find_sysconf(name, ); if (valid > 0) { do_sysconf(name, key); } else if (valid < 0) { printf("undefined\n"); - } else + } else errx(EX_USAGE, "no such configuration parameter `%s'", name); Modified: stable/10/usr.bin/getconf/pathconf.gperf == --- stable/10/usr.bin/getconf/pathconf.gperfThu Sep 1 19:08:07 2016 (r305228) +++ stable/10/usr.bin/getconf/pathconf.gperfThu Sep 1 19:10:42 2016 (r305229) @@ -20,10 +20,17 @@ static const struct map *in_word_set(con %} struct map { const char *name; int key; int valid; }; %% +ACL_EXTENDED, _PC_ACL_EXTENDED +ACL_NFS4, _PC_ACL_NFS4 +ACL_PATH_MAX, _PC_ACL_PATH_MAX +CAP_PRESENT, _PC_CAP_PRESENT FILESIZEBITS, _PC_FILESIZEBITS +INF_PRESENT, _PC_INF_PRESENT LINK_MAX, _PC_LINK_MAX +MAC_PRESENT, _PC_MAC_PRESENT MAX_CANON, _PC_MAX_CANON MAX_INPUT, _PC_MAX_INPUT +MIN_HOLE_SIZE, _PC_MIN_HOLE_SIZE NAME_MAX, _PC_NAME_MAX PATH_MAX, _PC_PATH_MAX PIPE_BUF, _PC_PIPE_BUF @@ -34,6 +41,7 @@ POSIX_REC_MIN_XFER_SIZE, _PC_REC_MIN_XFE POSIX_REC_XFER_ALIGN, _PC_REC_XFER_ALIGN SYMLINK_MAX, _PC_SYMLINK_MAX TRUSTEDBSD_ACL_EXTENDED, _PC_ACL_EXTENDED +TRUSTEDBSD_ACL_NFS4, _PC_ACL_NFS4 TRUSTEDBSD_ACL_PATH_MAX, _PC_ACL_PATH_MAX TRUSTEDBSD_CAP_PRESENT, _PC_CAP_PRESENT TRUSTEDBSD_INF_PRESENT, _PC_INF_PRESENT ___ 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: r305227 - stable/10/tests/sys/acl
Author: ngie Date: Thu Sep 1 19:05:23 2016 New Revision: 305227 URL: https://svnweb.freebsd.org/changeset/base/305227 Log: MFC r304040: Redirect the output of the testcases to stderr instead of redirecting it to /dev/null This will aid in debugging failures Modified: stable/10/tests/sys/acl/00.sh stable/10/tests/sys/acl/01.sh stable/10/tests/sys/acl/02.sh stable/10/tests/sys/acl/03.sh stable/10/tests/sys/acl/04.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/tests/sys/acl/00.sh == --- stable/10/tests/sys/acl/00.sh Thu Sep 1 19:00:30 2016 (r305226) +++ stable/10/tests/sys/acl/00.sh Thu Sep 1 19:05:23 2016 (r305227) @@ -75,7 +75,7 @@ chmod 600 xxx rm xxx echo "ok 2" -perl $TESTDIR/run $TESTDIR/tools-posix.test > /dev/null +perl $TESTDIR/run $TESTDIR/tools-posix.test >&2 if [ $? -eq 0 ]; then echo "ok 3" Modified: stable/10/tests/sys/acl/01.sh == --- stable/10/tests/sys/acl/01.sh Thu Sep 1 19:00:30 2016 (r305226) +++ stable/10/tests/sys/acl/01.sh Thu Sep 1 19:05:23 2016 (r305227) @@ -76,7 +76,7 @@ chmod 600 xxx rm xxx echo "ok 2" -perl $TESTDIR/run $TESTDIR/tools-nfs4-psarc.test > /dev/null +perl $TESTDIR/run $TESTDIR/tools-nfs4-psarc.test >&2 if [ $? -eq 0 ]; then echo "ok 3" Modified: stable/10/tests/sys/acl/02.sh == --- stable/10/tests/sys/acl/02.sh Thu Sep 1 19:00:30 2016 (r305226) +++ stable/10/tests/sys/acl/02.sh Thu Sep 1 19:05:23 2016 (r305227) @@ -76,9 +76,9 @@ rm xxx echo "ok 2" if [ `sysctl -n vfs.acl_nfs4_old_semantics` = 0 ]; then - perl $TESTDIR/run $TESTDIR/tools-nfs4-psarc.test > /dev/null + perl $TESTDIR/run $TESTDIR/tools-nfs4-psarc.test >&2 else - perl $TESTDIR/run $TESTDIR/tools-nfs4.test > /dev/null + perl $TESTDIR/run $TESTDIR/tools-nfs4.test >&2 fi if [ $? -eq 0 ]; then Modified: stable/10/tests/sys/acl/03.sh == --- stable/10/tests/sys/acl/03.sh Thu Sep 1 19:00:30 2016 (r305226) +++ stable/10/tests/sys/acl/03.sh Thu Sep 1 19:05:23 2016 (r305227) @@ -89,7 +89,7 @@ echo "ok 3" cd $MNTROOT -perl $TESTDIR/run $TESTDIR/tools-crossfs.test > /dev/null +perl $TESTDIR/run $TESTDIR/tools-crossfs.test >&2 if [ $? -eq 0 ]; then echo "ok 4" Modified: stable/10/tests/sys/acl/04.sh == --- stable/10/tests/sys/acl/04.sh Thu Sep 1 19:00:30 2016 (r305226) +++ stable/10/tests/sys/acl/04.sh Thu Sep 1 19:05:23 2016 (r305227) @@ -57,7 +57,7 @@ echo "ok 1" cd $MNT -perl $TESTDIR/run $TESTDIR/tools-nfs4-trivial.test > /dev/null +perl $TESTDIR/run $TESTDIR/tools-nfs4-trivial.test >&2 if [ $? -eq 0 ]; then echo "ok 2" ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r305178 - head/sys/boot/i386/libi386
On Thursday, September 01, 2016 06:35:13 AM Toomas Soome wrote: > Author: tsoome > Date: Thu Sep 1 06:35:13 2016 > New Revision: 305178 > URL: https://svnweb.freebsd.org/changeset/base/305178 > > Log: > bd_int13probe() should check extended info if sector info is bad > > In some Dell systems and usb stick combinations, it is found that > int13 AH=08 is reporting back bad sector information, preventing the > boot. > > This update is allowing bd_int13probe() to use extended info call to > build disk properties. > > It also can happen the total sectors count from extended info may be > wrong, in such case, the CHS data is used to calculate total sectors. > > Reviewed by:allanjude > Approved by:allanjude (mentor) > Differential Revision: https://reviews.freebsd.org/D7718 Hmm, can you see if this fixes https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=176748 ? -- John Baldwin ___ 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: r305226 - stable/11/usr.bin/getconf
Author: ngie Date: Thu Sep 1 19:00:30 2016 New Revision: 305226 URL: https://svnweb.freebsd.org/changeset/base/305226 Log: MFC r304809: Add non-TRUSTEDBSD prefixed knobs for the _PC_ACL* and {CAP,INF,MAC}_PRESENT knobs It's not necessarily intuitive that the variables to query contain TRUSTEDBSD in the prefix. Add non-TRUSTEDBSD prefixed knobs for querying things like "_PC_ACL_NFS4". Relnotes: yes Modified: stable/11/usr.bin/getconf/pathconf.gperf Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/getconf/pathconf.gperf == --- stable/11/usr.bin/getconf/pathconf.gperfThu Sep 1 18:56:42 2016 (r305225) +++ stable/11/usr.bin/getconf/pathconf.gperfThu Sep 1 19:00:30 2016 (r305226) @@ -20,8 +20,14 @@ static const struct map *in_word_set(con %} struct map { const char *name; int key; int valid; }; %% +ACL_EXTENDED, _PC_ACL_EXTENDED +ACL_NFS4, _PC_ACL_NFS4 +ACL_PATH_MAX, _PC_ACL_PATH_MAX +CAP_PRESENT, _PC_CAP_PRESENT FILESIZEBITS, _PC_FILESIZEBITS +INF_PRESENT, _PC_INF_PRESENT LINK_MAX, _PC_LINK_MAX +MAC_PRESENT, _PC_MAC_PRESENT MAX_CANON, _PC_MAX_CANON MAX_INPUT, _PC_MAX_INPUT MIN_HOLE_SIZE, _PC_MIN_HOLE_SIZE ___ 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: r305225 - stable/11/cddl/contrib/opensolaris/lib/libzpool/common
Author: ngie Date: Thu Sep 1 18:56:42 2016 New Revision: 305225 URL: https://svnweb.freebsd.org/changeset/base/305225 Log: MFC r303573: Cast result from third parameter to int instead of promoting it to size_t This resolves a -Wformat issue when the value is used as a format width precision specifier, i.e. %*s Modified: stable/11/cddl/contrib/opensolaris/lib/libzpool/common/util.c Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/lib/libzpool/common/util.c == --- stable/11/cddl/contrib/opensolaris/lib/libzpool/common/util.c Thu Sep 1 18:37:11 2016(r305224) +++ stable/11/cddl/contrib/opensolaris/lib/libzpool/common/util.c Thu Sep 1 18:56:42 2016(r305225) @@ -108,7 +108,7 @@ show_vdev_stats(const char *desc, const (void) printf("%*s%s%*s%*s%*s %5s %5s %5s %5s %5s %5s %5s\n", indent, "", prefix, - indent + strlen(prefix) - 25 - (vs->vs_space ? 0 : 12), + (int)(indent + strlen(prefix) - 25 - (vs->vs_space ? 0 : 12)), desc, vs->vs_space ? 6 : 0, vs->vs_space ? used : "", vs->vs_space ? 6 : 0, vs->vs_space ? avail : "", ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r305170 - head/lib/atf/libatf-c
> On Sep 1, 2016, at 09:54, Brooks Daviswrote: ... > Are these the variables used to control the tests that try to compile > things? Yes. > I've run into to some problems with them on CheriBSD because the > external compiler isn't available on the test target, but isn't listed > as a dependency. These tests should declare a dependency on CC, etc > as appropriate and be skipped if it isn't there. I'm not actually > convinced this shouldn't just use cc, cpp, and c++. (That would be > wrong for CheriBSD, but closer to right for current cases in FreeBSD). Agreed. I’ll add the necessary required.progs metadata soon. Thanks! -Ngie signature.asc Description: Message signed with OpenPGP using GPGMail
Re: svn commit: r305170 - head/lib/atf/libatf-c
On Thursday, September 1, 2016, Brooks Daviswrote: > > > Are these the variables used to control the tests that try to compile > things? > > > You need to carefully read the source code for this particular test to understand what is going on. This test compiles a binary, and then the test runs "strings" against the binary and expects a certain output. The compiler flags make a difference for this test. -- Craig ___ 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: r305224 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Thu Sep 1 18:37:11 2016 New Revision: 305224 URL: https://svnweb.freebsd.org/changeset/base/305224 Log: MFV r304158: 7136 ESC_VDEV_REMOVE_AUX ought to always include vdev information 7115 6922 generates ESC_ZFS_VDEV_REMOVE_AUX a bit too often illumos/illumos-gate@b72b6bb10ad55121a1b352c6f68ebdc8e20c9086 https://github.com/illumos/illumos-gate/commit/b72b6bb10ad55121a1b352c6f68ebdc8e 20c9086 https://www.illumos.org/issues/7136 6922 added ESC_ZFS_VDEV_REMOVE_AUX and ESC_ZFS_VDEV_REMOVE_DEV sysevents whenever an aux device gets removed from a pool. However, those sysevents will be created without the vdev_guid and vdev_path fields. It would be better to always populate those fields. https://www.illumos.org/issues/7115 The addition of spa_event_notify in vdev removal code (see #6922) causes event s to be generated even if the spare failed to be removed with EBUSY. Reviewed by: George WilsonReviewed by: Josef 'Jeff' Sipek Approved by: Robert Mustacchi Author: Alan Somers Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Thu Sep 1 18:35:37 2016(r305223) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Thu Sep 1 18:37:11 2016(r305224) @@ -151,6 +151,8 @@ const zio_taskq_info_t zio_taskqs[ZIO_TY { ZTI_ONE, ZTI_NULL, ZTI_ONE,ZTI_NULL }, /* IOCTL */ }; +static sysevent_t *spa_event_create(spa_t *spa, vdev_t *vd, const char *name); +static void spa_event_post(sysevent_t *ev); static void spa_sync_version(void *arg, dmu_tx_t *tx); static void spa_sync_props(void *arg, dmu_tx_t *tx); static boolean_t spa_has_active_shared_spare(spa_t *spa); @@ -5738,6 +5740,7 @@ int spa_vdev_remove(spa_t *spa, uint64_t guid, boolean_t unspare) { vdev_t *vd; + sysevent_t *ev = NULL; metaslab_group_t *mg; nvlist_t **spares, **l2cache, *nv; uint64_t txg = 0; @@ -5761,6 +5764,9 @@ spa_vdev_remove(spa_t *spa, uint64_t gui * in this pool. */ if (vd == NULL || unspare) { + if (vd == NULL) + vd = spa_lookup_by_guid(spa, guid, B_TRUE); + ev = spa_event_create(spa, vd, ESC_ZFS_VDEV_REMOVE_AUX); spa_vdev_remove_aux(spa->spa_spares.sav_config, ZPOOL_CONFIG_SPARES, spares, nspares, nv); spa_load_spares(spa); @@ -5768,7 +5774,6 @@ spa_vdev_remove(spa_t *spa, uint64_t gui } else { error = SET_ERROR(EBUSY); } - spa_event_notify(spa, vd, ESC_ZFS_VDEV_REMOVE_AUX); } else if (spa->spa_l2cache.sav_vdevs != NULL && nvlist_lookup_nvlist_array(spa->spa_l2cache.sav_config, ZPOOL_CONFIG_L2CACHE, , ) == 0 && @@ -5776,11 +5781,12 @@ spa_vdev_remove(spa_t *spa, uint64_t gui /* * Cache devices can always be removed. */ + vd = spa_lookup_by_guid(spa, guid, B_TRUE); + ev = spa_event_create(spa, vd, ESC_ZFS_VDEV_REMOVE_AUX); spa_vdev_remove_aux(spa->spa_l2cache.sav_config, ZPOOL_CONFIG_L2CACHE, l2cache, nl2cache, nv); spa_load_l2cache(spa); spa->spa_l2cache.sav_sync = B_TRUE; - spa_event_notify(spa, vd, ESC_ZFS_VDEV_REMOVE_AUX); } else if (vd != NULL && vd->vdev_islog) { ASSERT(!locked); ASSERT(vd == vd->vdev_top); @@ -5817,9 +5823,9 @@ spa_vdev_remove(spa_t *spa, uint64_t gui /* * Clean up the vdev namespace. */ + ev = spa_event_create(spa, vd, ESC_ZFS_VDEV_REMOVE_DEV); spa_vdev_remove_from_namespace(spa, vd); - spa_event_notify(spa, vd, ESC_ZFS_VDEV_REMOVE_DEV); } else if (vd != NULL) { /* * Normal vdevs cannot be removed (yet). @@ -5835,6 +5841,9 @@ spa_vdev_remove(spa_t *spa, uint64_t gui if (!locked) error = spa_vdev_exit(spa, NULL, txg, error); + if (ev) + spa_event_post(ev); + return (error); } @@ -7229,24 +7238,17 @@ spa_has_active_shared_spare(spa_t *spa) return (B_FALSE); } -/* - * Post a sysevent corresponding to the given event. The 'name' must be one of - * the event definitions in sys/sysevent/eventdefs.h. The payload will be - * filled in from the spa and (optionally)
svn commit: r305222 - in head/sys/cddl/contrib/opensolaris/uts/common: fs/zfs fs/zfs/sys sys/fs
Author: mav Date: Thu Sep 1 18:33:39 2016 New Revision: 305222 URL: https://svnweb.freebsd.org/changeset/base/305222 Log: MFV r302993: 7104 increase indirect block size illumos/illumos-gate@4b5c8e93cab28d3c65ba9d407fd8f46e3be1db1c https://github.com/illumos/illumos-gate/commit/4b5c8e93cab28d3c65ba9d407fd8f46e3 be1db1c https://www.illumos.org/issues/7104 The current default indirect block size is 16KB. We can improve performance by increasing it to 128KB. This is especially helpful for any workload that needs to read most of the metadata, e.g. scrub/resilver, file deletion, filesystem deletion, and zfs send. We also need to fix a few space estimation errors to make the tests pass. Reviewed by: George WilsonReviewed by: Paul Dagnelie Reviewed by: Dan McDonald Approved by: Robert Mustacchi Author: Matthew Ahrens Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h head/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.cThu Sep 1 18:25:49 2016(r305221) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.cThu Sep 1 18:33:39 2016(r305222) @@ -791,11 +791,17 @@ dmu_objset_create_impl(spa_t *spa, dsl_d /* * Determine the number of levels necessary for the meta-dnode -* to contain DN_MAX_OBJECT dnodes. +* to contain DN_MAX_OBJECT dnodes. Note that in order to +* ensure that we do not overflow 64 bits, there has to be +* a nlevels that gives us a number of blocks > DN_MAX_OBJECT +* but < 2^64. Therefore, +* (mdn->dn_indblkshift - SPA_BLKPTRSHIFT) (10) must be +* less than (64 - log2(DN_MAX_OBJECT)) (16). */ - while ((uint64_t)mdn->dn_nblkptr << (mdn->dn_datablkshift + + while ((uint64_t)mdn->dn_nblkptr << + (mdn->dn_datablkshift - DNODE_SHIFT + (levels - 1) * (mdn->dn_indblkshift - SPA_BLKPTRSHIFT)) < - DN_MAX_OBJECT * sizeof (dnode_phys_t)) + DN_MAX_OBJECT) levels++; mdn->dn_next_nlevels[tx->tx_txg & TXG_MASK] = Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Thu Sep 1 18:25:49 2016(r305221) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Thu Sep 1 18:33:39 2016(r305222) @@ -411,12 +411,20 @@ zfs_deadman_init() * it is possible to run the pool completely out of space, causing it to * be permanently read-only. * + * Note that on very small pools, the slop space will be larger than + * 3.2%, in an effort to have it be at least spa_min_slop (128MB), + * but we never allow it to be more than half the pool size. + * * See also the comments in zfs_space_check_t. */ int spa_slop_shift = 5; SYSCTL_INT(_vfs_zfs, OID_AUTO, spa_slop_shift, CTLFLAG_RWTUN, _slop_shift, 0, "Shift value of reserved space (1/(2^spa_slop_shift))."); +uint64_t spa_min_slop = 128 * 1024 * 1024; +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, spa_min_slop, CTLFLAG_RWTUN, +_min_slop, 0, +"Minimal value of reserved space"); /* * == @@ -1723,14 +1731,16 @@ spa_get_asize(spa_t *spa, uint64_t lsize /* * Return the amount of slop space in bytes. It is 1/32 of the pool (3.2%), - * or at least 32MB. + * or at least 128MB, unless that would cause it to be more than half the + * pool size. * * See the comment above spa_slop_shift for details. */ uint64_t -spa_get_slop_space(spa_t *spa) { +spa_get_slop_space(spa_t *spa) +{ uint64_t space = spa_get_dspace(spa); - return (MAX(space >> spa_slop_shift, SPA_MINDEVSIZE >> 1)); + return (MAX(space >> spa_slop_shift, MIN(space >> 1, spa_min_slop))); } uint64_t Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Thu Sep 1 18:25:49 2016(r305221) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Thu Sep 1 18:33:39
svn commit: r305221 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Thu Sep 1 18:25:49 2016 New Revision: 305221 URL: https://svnweb.freebsd.org/changeset/base/305221 Log: MFV r302992: 7071 lzc_snapshot does not fill in errlist on ENOENT illumos/illumos-gate@25f7d993adbfb3452ac4625b3791670746d35ae3 https://github.com/illumos/illumos-gate/commit/25f7d993adbfb3452ac4625b379167074 6d35ae3 https://www.illumos.org/issues/7071 upstream DLPX-40482 lzc_snapshot does not fill in errlist on ENOENT Reviewed by: Igor KozhukhovReviewed by: George Wilson Reviewed by: Dan Kimmel Approved by: Robert Mustacchi Author: Matthew Ahrens Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Thu Sep 1 18:16:45 2016(r305220) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Thu Sep 1 18:25:49 2016(r305221) @@ -500,6 +500,14 @@ zfs_secpolicy_write_perms(const char *na dsl_dataset_t *ds; dsl_pool_t *dp; + /* +* First do a quick check for root in the global zone, which +* is allowed to do all write_perms. This ensures that zfs_ioc_* +* will get to handle nonexistent datasets. +*/ + if (INGLOBALZONE(curthread) && secpolicy_zfs(cr) == 0) + return (0); + error = dsl_pool_hold(name, FTAG, ); if (error != 0) return (error); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r305219 - head/lib/libc/stdio
Author: ache Date: Thu Sep 1 18:12:53 2016 New Revision: 305219 URL: https://svnweb.freebsd.org/changeset/base/305219 Log: If error happens, don't overwrite original errno comes from __mbrtowc() and __srefill(). MFC after: 3 days Modified: head/lib/libc/stdio/fgetwc.c Modified: head/lib/libc/stdio/fgetwc.c == --- head/lib/libc/stdio/fgetwc.cThu Sep 1 18:11:44 2016 (r305218) +++ head/lib/libc/stdio/fgetwc.cThu Sep 1 18:12:53 2016 (r305219) @@ -84,9 +84,10 @@ __fgetwc_mbs(FILE *fp, mbstate_t *mbs, i return (WEOF); do { nconv = l->__mbrtowc(, fp->_p, fp->_r, mbs); - if (nconv == (size_t)-1) - break; - else if (nconv == (size_t)-2) + if (nconv == (size_t)-1) { + fp->_flags |= __SERR; + return (WEOF); + } else if (nconv == (size_t)-2) continue; else if (nconv == 0) { fp->_p++; @@ -100,7 +101,9 @@ __fgetwc_mbs(FILE *fp, mbstate_t *mbs, i return (wc); } } while (__srefill(fp) == 0); - fp->_flags |= __SERR; - errno = EILSEQ; + if (__sfeof(fp)) { + fp->_flags |= __SERR; + errno = EILSEQ; + } return (WEOF); } ___ 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: r305218 - head/contrib/llvm/lib/Target/AArch64
Author: dim Date: Thu Sep 1 18:11:44 2016 New Revision: 305218 URL: https://svnweb.freebsd.org/changeset/base/305218 Log: Pull in r277331 from upstream llvm trunk (by Diana Picus): [AArch64] Return the correct size for TLSDESC_CALLSEQ The branch relaxation pass is computing the wrong offsets because it assumes TLSDESC_CALLSEQ eats up 4 bytes, when in fact it is lowered to an instruction sequence taking up 16 bytes. This can become a problem in huge files with lots of TLS accesses, as it may slowly move branch targets out of the range computed by the branch relaxation pass. Fixes PR24234 https://llvm.org/bugs/show_bug.cgi?id=24234 Differential Revision: https://reviews.llvm.org/D22870 This fixes "error in backend: fixup value out of range" when compiling the misc/talkfilters port for AArch64. Reported by: sbruno PR: 201762 MFC after:3 days Modified: head/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp Modified: head/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp == --- head/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp Thu Sep 1 18:03:34 2016(r305217) +++ head/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp Thu Sep 1 18:11:44 2016(r305218) @@ -52,6 +52,9 @@ unsigned AArch64InstrInfo::GetInstSizeIn case TargetOpcode::IMPLICIT_DEF: case TargetOpcode::KILL: return 0; + case AArch64::TLSDESC_CALLSEQ: +// This gets lowered to an instruction sequence which takes 16 bytes +return 16; } llvm_unreachable("GetInstSizeInBytes()- Unable to determin insn size"); ___ 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: r305216 - head/share/mk
Author: bdrewery Date: Thu Sep 1 17:36:52 2016 New Revision: 305216 URL: https://svnweb.freebsd.org/changeset/base/305216 Log: FAST_DEPEND/META_MODE: Fix several issues with SRCS containing '/'. - For FAST_DEPEND, properly apply the -M flags when compiling by enduring that the condition also has the s,/,_,g filter applied to it first. - For FAST_DEPEND, properly read from the filtered filename. - For META_MODE, it needs to read from a full-pathed and s,/,_,g replaced filename based on bmake's meta_name() function which names the .meta file for SRCS with '/' in them. This support has not been extended to the kernel build yet but may be in the future. MFC after:2 weeks Reported by: dim Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk == --- head/share/mk/bsd.dep.mkThu Sep 1 17:05:54 2016(r305215) +++ head/share/mk/bsd.dep.mkThu Sep 1 17:36:52 2016(r305216) @@ -181,7 +181,7 @@ DEPEND_CFLAGS+= -MT${.TARGET} .if defined(.PARSEDIR) # Only add in DEPEND_CFLAGS for CFLAGS on files we expect from DEPENDOBJS # as those are the only ones we will include. -DEPEND_CFLAGS_CONDITION= "${DEPENDOBJS:M${.TARGET:${DEPEND_FILTER}}}" != "" +DEPEND_CFLAGS_CONDITION= "${DEPENDOBJS:${DEPEND_FILTER}:M${.TARGET:${DEPEND_FILTER}}}" != "" CFLAGS+= ${${DEPEND_CFLAGS_CONDITION}:?${DEPEND_CFLAGS}:} .else CFLAGS+= ${DEPEND_CFLAGS} @@ -216,8 +216,17 @@ afterdepend: beforedepend # For meta+filemon the .meta file is checked for since it is the dependency # file used. .for __obj in ${DEPENDOBJS:O:u} -.if (defined(_meta_filemon) && !exists(${.OBJDIR}/${__obj}.meta)) || \ -(!defined(_meta_filemon) && !exists(${.OBJDIR}/${DEPENDFILE}.${__obj})) +# If the obj has any '/', then replace with '_'. For meta files, this is +# mimicing what bmake's meta_name() does and adding in the full path +# as well to ensure that the expected meta file is read. +.if ${__obj:M*/*} +_meta_obj= ${.OBJDIR:C,/,_,g}_${__obj:C,/,_,g}.meta +.else +_meta_obj= ${__obj}.meta +.endif +_dep_obj= ${DEPENDFILE}.${__obj:${DEPEND_FILTER}} +.if (defined(_meta_filemon) && !exists(${.OBJDIR}/${_meta_obj})) || \ +(!defined(_meta_filemon) && !exists(${.OBJDIR}/${_dep_obj})) ${__obj}: ${OBJS_DEPEND_GUESS} ${__obj}: ${OBJS_DEPEND_GUESS.${__obj}} .elif defined(_meta_filemon) ___ 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: r305215 - head/share/misc
Author: maxim Date: Thu Sep 1 17:05:54 2016 New Revision: 305215 URL: https://svnweb.freebsd.org/changeset/base/305215 Log: OpenBSD 6.0 added. Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree == --- head/share/misc/bsd-family-tree Thu Sep 1 16:09:09 2016 (r305214) +++ head/share/misc/bsd-family-tree Thu Sep 1 17:05:54 2016 (r305215) @@ -339,7 +339,7 @@ FreeBSD 5.2 | | | FreeBSD | |OpenBSD 5.9 | | 10.3 | | | | || | | DragonFly 4.6.0 - *--FreeBSD | | | | + *--FreeBSD | |OpenBSD 6.0 | | 11.0 | | | | || | | | || | | | @@ -692,6 +692,7 @@ DragonFly 4.4.1 2015-12-07 [DFB] OpenBSD 5.92016-03-29 [OBD] FreeBSD 10.3 2016-04-04 [FBD] DragonFly 4.6.02016-08-02 [DFB] +OpenBSD 6.02016-09-01 [OBD] Bibliography ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r305170 - head/lib/atf/libatf-c
On Thu, Sep 01, 2016 at 02:42:11AM +, Ngie Cooper wrote: > Author: ngie > Date: Thu Sep 1 02:42:11 2016 > New Revision: 305170 > URL: https://svnweb.freebsd.org/changeset/base/305170 > > Log: > Don't bake all of CC/CPP/CXX into CFLAGS > > Capture executable names for CC, CPP, CXX (assumed to be the > first non-CCACHE_BIN word). > > This change strips out all of the cross-compiler arguments, (-target, > -B, etc), added to ${CC}, etc via ${CROSSENV} in Makefile.inc1, so it > doesn't infect the build and subsequently the test. > > Add comments noting why this logic is being added, and why the logic in > r305041 was necessary/what it was trying to achieve. > > This is required after recent changes made to the toolchain to always > specify --sysroot, -target, -B, etc with clang in buildworld (presumably > r304681). > > Reviewed by:rodrigc (earlier version) > Reported by:Jenkins (FreeBSD_HEAD job from 559+) > MFC after: 12 days > X-MFC with: r304681, r305041 > Sponsored by: EMC / Isilon Storage Division > Differential Revision: https://reviews.freebsd.org/D7732 > > Modified: > head/lib/atf/libatf-c/Makefile > > Modified: head/lib/atf/libatf-c/Makefile > == > --- head/lib/atf/libatf-c/MakefileThu Sep 1 02:05:46 2016 > (r305169) > +++ head/lib/atf/libatf-c/MakefileThu Sep 1 02:42:11 2016 > (r305170) > @@ -28,6 +28,18 @@ > .include > .include > > +# Store the toolchain executable in ATF_BUILD_{CC,CPP,CXX} to ensure other > +# values -- like -target, -B ..., etc -- don't get leaked into the tests. > +# > +# Be sure to omit ${CCACHE_BIN} (if specified) from the variable as it gets > +# automatically appended to the variables in bsd.compiler.mk when > +# ${MK_CCACHE_BUILD} != no. > +ATF_BUILD_CC:= ${CC:N${CCACHE_BIN}:[1]} > +ATF_BUILD_CPP:= ${CPP:N${CCACHE_BIN}:[1]} > +ATF_BUILD_CXX:= ${CXX:N${CCACHE_BIN}:[1]} > + > +# Only capture defines, includes, linker flags, optimization levels, warnings > +# and preprocessor flags when building ATF_BUILD_{C,CPP,CXX}FLAGS. > ATF_BUILD_CFLAGS:= ${CFLAGS:M-[DILOWf]*} > ATF_BUILD_CPPFLAGS:= ${CPPFLAGS:M-[DILOWf]*} > ATF_BUILD_CXXFLAGS:= ${CXXFLAGS:M-[DILOWf]*} > @@ -41,11 +53,11 @@ ATF= ${SRCTOP}/contrib/atf > .PATH: ${ATF}/atf-c > .PATH: ${ATF}/atf-c/detail > > -CFLAGS+= -DATF_BUILD_CC='"${CC}"' > +CFLAGS+= -DATF_BUILD_CC='"${ATF_BUILD_CC}"' > CFLAGS+= -DATF_BUILD_CFLAGS='"${ATF_BUILD_CFLAGS}"' > -CFLAGS+= -DATF_BUILD_CPP='"${CPP}"' > +CFLAGS+= -DATF_BUILD_CPP='"${ATF_BUILD_CPP}"' > CFLAGS+= -DATF_BUILD_CPPFLAGS='"${ATF_BUILD_CPPFLAGS}"' > -CFLAGS+= -DATF_BUILD_CXX='"${CXX}"' > +CFLAGS+= -DATF_BUILD_CXX='"${ATF_BUILD_CXX}"' > CFLAGS+= -DATF_BUILD_CXXFLAGS='"${ATF_BUILD_CXXFLAGS}"' > CFLAGS+= -I${ATF} > CFLAGS+= -I${.CURDIR} > Are these the variables used to control the tests that try to compile things? I've run into to some problems with them on CheriBSD because the external compiler isn't available on the test target, but isn't listed as a dependency. These tests should declare a dependency on CC, etc as appropriate and be skipped if it isn't there. I'm not actually convinced this shouldn't just use cc, cpp, and c++. (That would be wrong for CheriBSD, but closer to right for current cases in FreeBSD). -- Brooks signature.asc Description: PGP signature
svn commit: r305213 - in head/sys: amd64/amd64 i386/i386
Author: alc Date: Thu Sep 1 15:57:44 2016 New Revision: 305213 URL: https://svnweb.freebsd.org/changeset/base/305213 Log: As an optimization to the machine-independent layer, change the machine- dependent pmap_ts_referenced() so that it updates the page's dirty field if a modified bit is found while counting reference bits. This opportunistic update can be performed at low cost and can eliminate the need for some future calls to pmap_is_modified() by the machine- independent layer. Reviewed by: kib, markj MFC after:3 weeks Sponsored by: EMC / Isilon Storage Division Differential Revision:https://reviews.freebsd.org/D7722 Modified: head/sys/amd64/amd64/pmap.c head/sys/i386/i386/pmap.c Modified: head/sys/amd64/amd64/pmap.c == --- head/sys/amd64/amd64/pmap.c Thu Sep 1 15:23:33 2016(r305212) +++ head/sys/amd64/amd64/pmap.c Thu Sep 1 15:57:44 2016(r305213) @@ -5843,6 +5843,14 @@ safe_to_clear_referenced(pmap_t pmap, pt * should be tested and standardized at some point in the future for * optimal aging of shared pages. * + * As an optimization, update the page's dirty field if a modified bit is + * found while counting reference bits. This opportunistic update can be + * performed at low cost and can eliminate the need for some future calls + * to pmap_is_modified(). However, since this function stops after + * finding PMAP_TS_REFERENCED_MAX reference bits, it may not detect some + * dirty pages. Those dirty pages will only be detected by a future call + * to pmap_is_modified(). + * * A DI block is not needed within this function, because * invalidations are performed before the PV list lock is * released. @@ -5855,7 +5863,7 @@ pmap_ts_referenced(vm_page_t m) pmap_t pmap; struct rwlock *lock; pd_entry_t oldpde, *pde; - pt_entry_t *pte, PG_A; + pt_entry_t *pte, PG_A, PG_M, PG_RW; vm_offset_t va; vm_paddr_t pa; int cleared, md_gen, not_cleared, pvh_gen; @@ -5890,9 +5898,19 @@ retry: } } PG_A = pmap_accessed_bit(pmap); + PG_M = pmap_modified_bit(pmap); + PG_RW = pmap_rw_bit(pmap); va = pv->pv_va; pde = pmap_pde(pmap, pv->pv_va); oldpde = *pde; + if ((oldpde & (PG_M | PG_RW)) == (PG_M | PG_RW)) { + /* +* Although "oldpde" is mapping a 2MB page, because +* this function is called at a 4KB page granularity, +* we only update the 4KB page under test. +*/ + vm_page_dirty(m); + } if ((*pde & PG_A) != 0) { /* * Since this reference bit is shared by 512 4KB @@ -5986,11 +6004,15 @@ small_mappings: } } PG_A = pmap_accessed_bit(pmap); + PG_M = pmap_modified_bit(pmap); + PG_RW = pmap_rw_bit(pmap); pde = pmap_pde(pmap, pv->pv_va); KASSERT((*pde & PG_PS) == 0, ("pmap_ts_referenced: found a 2mpage in page %p's pv list", m)); pte = pmap_pde_to_pte(pde, pv->pv_va); + if ((*pte & (PG_M | PG_RW)) == (PG_M | PG_RW)) + vm_page_dirty(m); if ((*pte & PG_A) != 0) { if (safe_to_clear_referenced(pmap, *pte)) { atomic_clear_long(pte, PG_A); Modified: head/sys/i386/i386/pmap.c == --- head/sys/i386/i386/pmap.c Thu Sep 1 15:23:33 2016(r305212) +++ head/sys/i386/i386/pmap.c Thu Sep 1 15:57:44 2016(r305213) @@ -4798,6 +4798,14 @@ retry: * XXX: The exact number of bits to check and clear is a matter that * should be tested and standardized at some point in the future for * optimal aging of shared pages. + * + * As an optimization, update the page's dirty field if a modified bit is + * found while counting reference bits. This opportunistic update can be + * performed at low cost and can eliminate the need for some future calls + * to pmap_is_modified(). However, since this function stops after + * finding PMAP_TS_REFERENCED_MAX reference bits, it may not detect some + * dirty pages. Those dirty pages will only be detected by a future call + * to pmap_is_modified(). */ int pmap_ts_referenced(vm_page_t m) @@ -4824,6 +4832,14 @@ pmap_ts_referenced(vm_page_t m) pmap = PV_PMAP(pv); PMAP_LOCK(pmap); pde = pmap_pde(pmap, pv->pv_va); + if ((*pde & (PG_M |
svn commit: r305212 - head/usr.bin/localedef
Author: araujo Date: Thu Sep 1 15:23:33 2016 New Revision: 305212 URL: https://svnweb.freebsd.org/changeset/base/305212 Log: - Invert calloc(3) argument order. MFC after:4 weeks Modified: head/usr.bin/localedef/collate.c Modified: head/usr.bin/localedef/collate.c == --- head/usr.bin/localedef/collate.cThu Sep 1 15:17:39 2016 (r305211) +++ head/usr.bin/localedef/collate.cThu Sep 1 15:23:33 2016 (r305212) @@ -490,7 +490,7 @@ define_collsym(char *name) { collsym_t *sym; - if ((sym = calloc(sizeof (*sym), 1)) == NULL) { + if ((sym = calloc(1, sizeof(*sym))) == NULL) { fprintf(stderr,"out of memory"); return; } @@ -536,7 +536,7 @@ get_collundef(char *name) srch.name = name; if ((ud = RB_FIND(collundefs, , )) == NULL) { - if (((ud = calloc(sizeof (*ud), 1)) == NULL) || + if (((ud = calloc(1, sizeof(*ud))) == NULL) || ((ud->name = strdup(name)) == NULL)) { fprintf(stderr,"out of memory"); free(ud); @@ -561,7 +561,7 @@ get_collchar(wchar_t wc, int create) srch.wc = wc; cc = RB_FIND(collchars, , ); if ((cc == NULL) && create) { - if ((cc = calloc(sizeof (*cc), 1)) == NULL) { + if ((cc = calloc(1, sizeof(*cc))) == NULL) { fprintf(stderr, "out of memory"); return (NULL); } @@ -793,7 +793,7 @@ define_collelem(char *name, wchar_t *wcs return; } - if ((e = calloc(sizeof (*e), 1)) == NULL) { + if ((e = calloc(1, sizeof(*e))) == NULL) { fprintf(stderr, "out of memory"); return; } @@ -927,7 +927,7 @@ add_order_subst(void) s = RB_FIND(substs_ref, _ref[curr_weight], ); if (s == NULL) { - if ((s = calloc(sizeof (*s), 1)) == NULL) { + if ((s = calloc(1, sizeof(*s))) == NULL) { fprintf(stderr,"out of memory"); return; } @@ -1035,7 +1035,7 @@ add_weight(int32_t ref, int pass) if (RB_FIND(weights, [pass], ) != NULL) return; - if ((w = calloc(sizeof (*w), 1)) == NULL) { + if ((w = calloc(1, sizeof(*w))) == NULL) { fprintf(stderr, "out of memory"); return; } ___ 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: r305211 - in head: cddl/contrib/opensolaris/lib/libnvpair sys/cddl/contrib/opensolaris/common/nvpair
Author: mav Date: Thu Sep 1 15:17:39 2016 New Revision: 305211 URL: https://svnweb.freebsd.org/changeset/base/305211 Log: MFV r302662: 6447 handful of nvpair cleanups illumos/illumos-gate@759e89be359f2af635e4122d147df56bce948773 https://github.com/illumos/illumos-gate/commit/759e89be359f2af635e4122d147df56bc e948773 https://www.illumos.org/issues/6447 I got a patch from someone who uses nvpair code outside of illumos. It fixes a couple of gcc warnings/bugs for him. 1. silence uninitialized use warnings 2. add parentheses around assignment used as truth value 3. fix printf format specifier (ll is for integers only) 4. strstr, strspn, strcspn, and strcmp are declared in string.h, not strings.h. 5. avoid scanning integer into boolean variable Reviewed by: Josef 'Jeff' SipekReviewed by: Andy Stormont Reviewed by: Garrett D'Amore Approved by: Robert Mustacchi Author: Steve Dougherty Modified: head/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c head/sys/cddl/contrib/opensolaris/common/nvpair/opensolaris_nvpair.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c == --- head/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c Thu Sep 1 15:10:40 2016(r305210) +++ head/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c Thu Sep 1 15:17:39 2016(r305211) @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include "libnvpair.h" @@ -1228,7 +1228,8 @@ nvpair_value_match_regex(nvpair_t *nvp, break; } case DATA_TYPE_BOOLEAN_VALUE: { - boolean_t val, val_arg; + int32_t val_arg; + boolean_t val; /* scanf boolean_t from value and check for match */ sr = sscanf(value, "%"SCNi32, _arg); @@ -1239,7 +1240,8 @@ nvpair_value_match_regex(nvpair_t *nvp, break; } case DATA_TYPE_BOOLEAN_ARRAY: { - boolean_t *val_array, val_arg; + boolean_t *val_array; + int32_t val_arg; /* check indexed value of array for match */ sr = sscanf(value, "%"SCNi32, _arg); Modified: head/sys/cddl/contrib/opensolaris/common/nvpair/opensolaris_nvpair.c == --- head/sys/cddl/contrib/opensolaris/common/nvpair/opensolaris_nvpair.c Thu Sep 1 15:10:40 2016(r305210) +++ head/sys/cddl/contrib/opensolaris/common/nvpair/opensolaris_nvpair.c Thu Sep 1 15:17:39 2016(r305211) @@ -1629,6 +1629,8 @@ nvlist_lookup_nvpair_ei_sep(nvlist_t *nv if ((nvl == NULL) || (name == NULL)) return (EINVAL); + sepp = NULL; + idx = 0; /* step through components of name */ for (np = name; np && *np; np = sepp) { /* ensure unique names */ @@ -2386,7 +2388,7 @@ nvlist_xpack(nvlist_t *nvl, char **bufp, */ nv_priv_init(, nva, 0); - if (err = nvlist_size(nvl, _size, encoding)) + if ((err = nvlist_size(nvl, _size, encoding))) return (err); if ((buf = nv_mem_zalloc(, alloc_size)) == NULL) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r305210 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Thu Sep 1 15:10:40 2016 New Revision: 305210 URL: https://svnweb.freebsd.org/changeset/base/305210 Log: MFV r302661: 7082 bptree_iterate() passes wrong args to zfs_dbgmsg() illumos/illumos-gate@10e67aa0db0823d5464aafdd681f3c966155c68e https://github.com/illumos/illumos-gate/commit/10e67aa0db0823d5464aafdd681f3c966 155c68e https://www.illumos.org/issues/7082 upstream DLPX-40542 bptree_iterate() passes wrong args to zfs_dbgmsg() Reviewed by: Dan KimmelReviewed by: George Wilson Reviewed by: Igor Kozhukhov Approved by: Dan McDonald Author: Matthew Ahrens Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.cThu Sep 1 15:08:27 2016(r305209) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.cThu Sep 1 15:10:40 2016(r305210) @@ -20,7 +20,7 @@ */ /* - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. * Copyright (c) 2014 Integros [integros.com] */ @@ -220,9 +220,10 @@ bptree_iterate(objset_t *os, uint64_t ob if (zfs_free_leak_on_eio) flags |= TRAVERSE_HARD; - zfs_dbgmsg("bptree index %d: traversing from min_txg=%lld " + zfs_dbgmsg("bptree index %lld: traversing from min_txg=%lld " "bookmark %lld/%lld/%lld/%lld", - i, (longlong_t)bte.be_birth_txg, + (longlong_t)i, + (longlong_t)bte.be_birth_txg, (longlong_t)bte.be_zb.zb_objset, (longlong_t)bte.be_zb.zb_object, (longlong_t)bte.be_zb.zb_level, ___ 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: r305209 - in head: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zhack cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/cmd/z...
Author: mav Date: Thu Sep 1 15:08:27 2016 New Revision: 305209 URL: https://svnweb.freebsd.org/changeset/base/305209 Log: MFV r302660: 6314 buffer overflow in dsl_dataset_name illumos/illumos-gate@9adfa60d484ce2435f5af77cc99dcd4e692b6660 https://github.com/illumos/illumos-gate/commit/9adfa60d484ce2435f5af77cc99dcd4e6 92b6660 https://www.illumos.org/issues/6314 Callers of dsl_dataset_name pass a buffer of size ZFS_MAXNAMELEN, but dsl_dataset_name copies the datasets' name PLUS the snapshot name to it, resulting in a max of 2 * ZFS_MAXNAMELEN + '@'. Reviewed by: George WilsonReviewed by: Prakash Surya Reviewed by: Igor Kozhukhov Approved by: Dan McDonald Author: Matthew Ahrens Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c head/cddl/contrib/opensolaris/cmd/zhack/zhack.c head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c head/cddl/contrib/opensolaris/cmd/ztest/ztest.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c head/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c head/cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc head/sys/cddl/contrib/opensolaris/common/zfs/zfs_namecheck.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_bookmark.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deleg.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c head/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/cmd/zdb/ (props changed) head/cddl/contrib/opensolaris/cmd/zfs/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c == --- head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Thu Sep 1 14:58:11 2016 (r305208) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Thu Sep 1 15:08:27 2016 (r305209) @@ -60,7 +60,6 @@ #include #include #include -#undef ZFS_MAXNAMELEN #undef verify #include @@ -1945,7 +1944,7 @@ dump_dir(objset_t *os) uint64_t refdbytes, usedobjs, scratch; char numbuf[32]; char blkbuf[BP_SPRINTF_LEN + 20]; - char osname[MAXNAMELEN]; + char osname[ZFS_MAX_DATASET_NAME_LEN]; char *type = "UNKNOWN"; int verbosity = dump_opt['d']; int print_header = 1; @@ -3482,7 +3481,7 @@ find_zpool(char **target, nvlist_t **con nvlist_t *match = NULL; char *name = NULL; char *sepp = NULL; - char sep; + char sep = '\0'; int count = 0; importargs_t args = { 0 }; Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c == --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cThu Sep 1 14:58:11 2016(r305208) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cThu Sep 1 15:08:27 2016(r305209) @@ -1510,7
svn commit: r305208 - in head/sys: boot/fdt/dts/riscv riscv/riscv
Author: br Date: Thu Sep 1 14:58:11 2016 New Revision: 305208 URL: https://svnweb.freebsd.org/changeset/base/305208 Log: o Separate rtc and timecmp registers: they are different across RISC-V cpu implementations. o Update RocketChip device tree source (DTS). We now support latest verison of RocketChip synthesized on Xilinx FPGA (Zedboard). RocketChip is an implementation of RISC-V processor written on Chisel hardware construction language. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Modified: head/sys/boot/fdt/dts/riscv/rocket.dts head/sys/boot/fdt/dts/riscv/spike.dts head/sys/riscv/riscv/timer.c Modified: head/sys/boot/fdt/dts/riscv/rocket.dts == --- head/sys/boot/fdt/dts/riscv/rocket.dts Thu Sep 1 14:57:06 2016 (r305207) +++ head/sys/boot/fdt/dts/riscv/rocket.dts Thu Sep 1 14:58:11 2016 (r305208) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2016 Ruslan Bukin+ * Copyright (c) 2015-2016 Ruslan Bukin * All rights reserved. * * Portions of this software were developed by SRI International and the @@ -37,8 +37,8 @@ /dts-v1/; / { - model = "UC Berkeley Spike Simulator RV64I"; - compatible = "riscv,rv64i"; + model = "RocketChip RV64"; + compatible = "riscv,rv64"; #address-cells = <1>; #size-cells = <1>; #interrupt-cells = <1>; @@ -49,8 +49,8 @@ cpu@0 { device_type = "cpu"; - compatible = "riscv,rv64i"; - reg = <0x40002000>; + compatible = "riscv,rv64"; + reg = <0x0>; }; }; @@ -59,13 +59,17 @@ }; memory { + /* +* This is not used currently. +* We take information from sbi_query_memory. +*/ device_type = "memory"; - reg = <0x0 0x1000>; /* 256MB at 0x0 */ + reg = <0x8000 0x1000>; /* 256MB at 0x8000 */ }; soc { - #address-cells = <2>; - #size-cells = <2>; + #address-cells = <1>; + #size-cells = <1>; #interrupt-cells = <1>; compatible = "simple-bus"; @@ -78,7 +82,9 @@ timer0: timer@0 { compatible = "riscv,timer"; - interrupts = < 1 >; + reg = < 0x4400bff8 0x0008 >,/* rtc */ + < 0x44004000 0x1000 >;/* timecmp */ + interrupts = < 5 >; interrupt-parent = < >; clock-frequency = < 100 >; }; Modified: head/sys/boot/fdt/dts/riscv/spike.dts == --- head/sys/boot/fdt/dts/riscv/spike.dts Thu Sep 1 14:57:06 2016 (r305207) +++ head/sys/boot/fdt/dts/riscv/spike.dts Thu Sep 1 14:58:11 2016 (r305208) @@ -50,13 +50,13 @@ cpu@0 { device_type = "cpu"; compatible = "riscv,rv64"; - reg = <0x40001000>; + reg = <0x0>; }; cpu@1 { device_type = "cpu"; compatible = "riscv,rv64"; - reg = <0x40002000>; + reg = <0x0>; }; }; @@ -88,7 +88,8 @@ timer0: timer@0 { compatible = "riscv,timer"; - reg = < 0x4000 0x100 >; + reg = < 0x4000 0x0008 >,/* rtc */ + < 0x4008 0x1000 >;/* timecmp */ interrupts = < 5 >; interrupt-parent = < >; clock-frequency = < 100 >; Modified: head/sys/riscv/riscv/timer.c == --- head/sys/riscv/riscv/timer.cThu Sep 1 14:57:06 2016 (r305207) +++ head/sys/riscv/riscv/timer.cThu Sep 1 14:58:11 2016 (r305208) @@ -69,7 +69,7 @@ __FBSDID("$FreeBSD$"); #defineDEFAULT_FREQ100 #defineTIMER_COUNTS0x00 -#defineTIMER_MTIMECMP(cpu) (0x08 + (cpu * 8)) +#defineTIMER_MTIMECMP(cpu) (cpu * 8) #defineREAD8(_sc, _reg)\ bus_space_read_8(_sc->bst, _sc->bsh, _reg) @@ -77,9 +77,11 @@ __FBSDID("$FreeBSD$"); bus_space_write_8(_sc->bst, _sc->bsh, _reg, _val) struct riscv_tmr_softc { - struct resource *res[2]; + struct resource *res[3]; bus_space_tag_t bst; bus_space_handle_t bsh; +
svn commit: r305207 - in head: cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/common/zfs
Author: mav Date: Thu Sep 1 14:57:06 2016 New Revision: 305207 URL: https://svnweb.freebsd.org/changeset/base/305207 Log: MFV r302659: 6931 lib/libzfs: cleanup gcc warnings illumos/illumos-gate@88f61dee20b358671b1b643e9d1dbf220a1d69be https://github.com/illumos/illumos-gate/commit/88f61dee20b358671b1b643e9d1dbf220a1d69be https://www.illumos.org/issues/6931 need cleanup: CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-function Reviewed by: Matthew AhrensApproved by: Robert Mustacchi Author: Igor Kozhukhov Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c head/sys/cddl/contrib/opensolaris/common/zfs/zfs_deleg.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c == --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c Thu Sep 1 14:53:56 2016(r305206) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c Thu Sep 1 14:57:06 2016(r305207) @@ -24,9 +24,9 @@ * Use is subject to license terms. * * Portions Copyright 2007 Ramprakash Jelari - * * Copyright (c) 2011 Pawel Jakub Dawidek . * All rights reserved. + * Copyright 2016 Igor Kozhukhov */ #include @@ -136,6 +136,9 @@ changelist_prefix(prop_changelist_t *clp case ZFS_PROP_SHARESMB: (void) zfs_unshare_smb(cn->cn_handle, NULL); break; + + default: + break; } } } Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c == --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.cThu Sep 1 14:53:56 2016(r305206) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.cThu Sep 1 14:57:06 2016(r305207) @@ -29,6 +29,7 @@ * Copyright (c) 2013 Steven Hartland. All rights reserved. * Copyright (c) 2014 Integros [integros.com] * Copyright 2016 Nexenta Systems, Inc. + * Copyright 2016 Igor Kozhukhov */ #include @@ -78,55 +79,18 @@ zfs_type_to_name(zfs_type_t type) return (dgettext(TEXT_DOMAIN, "snapshot")); case ZFS_TYPE_VOLUME: return (dgettext(TEXT_DOMAIN, "volume")); + case ZFS_TYPE_POOL: + return (dgettext(TEXT_DOMAIN, "pool")); + case ZFS_TYPE_BOOKMARK: + return (dgettext(TEXT_DOMAIN, "bookmark")); + default: + assert(!"unhandled zfs_type_t"); } return (NULL); } /* - * Given a path and mask of ZFS types, return a string describing this dataset. - * This is used when we fail to open a dataset and we cannot get an exact type. - * We guess what the type would have been based on the path and the mask of - * acceptable types. - */ -static const char * -path_to_str(const char *path, int types) -{ - /* -* When given a single type, always report the exact type. -*/ - if (types == ZFS_TYPE_SNAPSHOT) - return (dgettext(TEXT_DOMAIN, "snapshot")); - if (types == ZFS_TYPE_FILESYSTEM) - return (dgettext(TEXT_DOMAIN, "filesystem")); - if (types == ZFS_TYPE_VOLUME) - return (dgettext(TEXT_DOMAIN, "volume")); - - /* -* The user is requesting more than one type of dataset. If this is the -* case, consult the path itself. If we're looking for a snapshot, and -* a '@' is found, then report it as "snapshot". Otherwise, remove the -* snapshot attribute and try again. -*/ - if (types & ZFS_TYPE_SNAPSHOT) { - if (strchr(path, '@') != NULL) - return (dgettext(TEXT_DOMAIN, "snapshot")); - return (path_to_str(path, types & ~ZFS_TYPE_SNAPSHOT)); - } - - /* -* The user has requested either filesystems or volumes. -* We have no way of knowing a priori what type this would be, so always -* report it as "filesystem" or "volume", our
svn commit: r305206 - in head/cddl/contrib/opensolaris: cmd/zpool lib/libzfs/common
Author: mav Date: Thu Sep 1 14:53:56 2016 New Revision: 305206 URL: https://svnweb.freebsd.org/changeset/base/305206 Log: MFV r302658: 6872 zfs libraries should not allow uninitialized variables illumos/illumos-gate@f83b46baf98d276f5f84fa84c8b461f412ac1f5e https://github.com/illumos/illumos-gate/commit/f83b46baf98d276f5f84fa84c8b461f41 2ac1f5e https://www.illumos.org/issues/6872 We compile the zfs libraries with -Wno-uninitialized. We should remove this. Change makefiles, fix new warnings, fix pbchk errors. Reviewed by: Dan KimmelReviewed by: George Wilson Reviewed by: Prakash Surya Reviewed by: Yuri Pankov Approved by: Robert Mustacchi Author: Paul Dagnelie Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c == --- head/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.cThu Sep 1 14:52:05 2016(r305205) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.cThu Sep 1 14:53:56 2016(r305206) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2013, 2015 by Delphix. All rights reserved. * Copyright 2016 Igor Kozhukhov . */ @@ -597,7 +597,6 @@ get_replication(nvlist_t *nvroot, boolea verify(nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN, , ) == 0); - lastrep.zprl_type = NULL; for (t = 0; t < toplevels; t++) { uint64_t is_log = B_FALSE; Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c == --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.cThu Sep 1 14:52:05 2016(r305205) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.cThu Sep 1 14:53:56 2016(r305206) @@ -1584,7 +1584,7 @@ zfs_prop_set_list(zfs_handle_t *zhp, nvl libzfs_handle_t *hdl = zhp->zfs_hdl; nvlist_t *nvl; int nvl_len; - int added_resv; + int added_resv = 0; (void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN, "cannot set property for '%s'"), @@ -3212,7 +3212,7 @@ zfs_create_ancestors(libzfs_handle_t *hd { int prefix; char *path_copy; - int rc; + int rc = 0; if (check_parents(hdl, path, NULL, B_TRUE, ) != 0) return (-1); @@ -3854,7 +3854,7 @@ zfs_rollback(zfs_handle_t *zhp, zfs_hand rollback_data_t cb = { 0 }; int err; boolean_t restore_resv = 0; - uint64_t old_volsize, new_volsize; + uint64_t old_volsize = 0, new_volsize; zfs_prop_t resv_prop; assert(zhp->zfs_type == ZFS_TYPE_FILESYSTEM || @@ -4071,6 +4071,7 @@ zfs_rename(zfs_handle_t *zhp, const char "child dataset with inherited mountpoint is used " "in a non-global zone")); (void) zfs_error(hdl, EZFS_ZONED, errbuf); + ret = -1; goto error; } Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c == --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Thu Sep 1 14:52:05 2016(r305205) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Thu Sep 1 14:53:56 2016(r305206) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2015 by Delphix. All rights reserved. * Copyright 2015 RackTop Systems. * Copyright 2016 Nexenta Systems, Inc. */ @@ -440,12 +440,12 @@ get_configs(libzfs_handle_t *hdl, pool_l pool_entry_t *pe; vdev_entry_t *ve; config_entry_t *ce; - nvlist_t *ret = NULL, *config = NULL, *tmp, *nvtop, *nvroot; + nvlist_t *ret = NULL, *config = NULL, *tmp = NULL, *nvtop, *nvroot; nvlist_t **spares, **l2cache; uint_t i, nspares, nl2cache; boolean_t config_seen; uint64_t best_txg; - char *name, *hostname; + char *name, *hostname = NULL; uint64_t
svn commit: r305205 - in head/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/common
Author: mav Date: Thu Sep 1 14:52:05 2016 New Revision: 305205 URL: https://svnweb.freebsd.org/changeset/base/305205 Log: MFV r302657: 4521 zfstest is trying to execute evil "zfs unmount -a" illumos/illumos-gate@8808ac5dae118369991f158b6ab736cb2691ecde https://github.com/illumos/illumos-gate/commit/8808ac5dae118369991f158b6ab736cb2 691ecde https://www.illumos.org/issues/4521 zfstest is trying to execute evil "zfs unmount -a", which fails (fortunately, as it would otherwise leave me with my ~ missing): 03:44:11.86 cannot unmount '/export/home/yuri': Device busy cannot unmount '/ export/home': Device busy 03:44:11.86 ERROR: /usr/sbin/zfs unmount -a exited 1 This affects, at least, zfs_mount_009_neg and zfs_mount_all_001_pos, both failing on that step. The pool containing the /export/home hierarchy is included in KEEP variable, but it doesn't seem to affect anything here. Reviewed by: Andriy GaponReviewed by: Dan McDonald Reviewed by: Matthew Ahrens Reviewed by: John Kennedy Approved by: Robert Mustacchi Author: Yuri Pankov Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_config.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/cmd/zfs/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c == --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cThu Sep 1 14:49:07 2016(r305204) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cThu Sep 1 14:52:05 2016(r305205) @@ -27,9 +27,9 @@ * Copyright (c) 2011-2012 Pawel Jakub Dawidek. All rights reserved. * Copyright (c) 2012 Martin Matuska . All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. - * Copyright 2013 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2014 Integros [integros.com] * Copyright 2016 Igor Kozhukhov . + * Copyright 2016 Nexenta Systems, Inc. */ #include @@ -6483,6 +6483,15 @@ unshare_unmount(int op, int argc, char * continue; } + /* +* Ignore datasets that are excluded/restricted by +* parent pool name. +*/ + if (zpool_skip_pool(zfs_get_pool_name(zhp))) { + zfs_close(zhp); + continue; + } + switch (op) { case OP_SHARE: verify(zfs_prop_get(zhp, ZFS_PROP_SHARENFS, Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h == --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.hThu Sep 1 14:49:07 2016(r305204) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.hThu Sep 1 14:52:05 2016(r305205) @@ -26,8 +26,8 @@ * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright (c) 2012 Martin Matuska . All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. - * Copyright 2013 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2014 Integros [integros.com] + * Copyright 2016 Nexenta Systems, Inc. */ #ifndef_LIBZFS_H @@ -221,6 +221,7 @@ extern void zpool_free_handles(libzfs_ha */ typedef int (*zpool_iter_f)(zpool_handle_t *, void *); extern int zpool_iter(libzfs_handle_t *, zpool_iter_f, void *); +extern boolean_t zpool_skip_pool(const char *); /* * Functions to create and destroy pools @@ -411,6 +412,7 @@ extern void zfs_close(zfs_handle_t *); extern zfs_type_t zfs_get_type(const zfs_handle_t *); extern const char *zfs_get_name(const zfs_handle_t *); extern zpool_handle_t *zfs_get_pool_handle(const zfs_handle_t *); +extern const char *zfs_get_pool_name(const zfs_handle_t *); /* * Property management functions. Some functions are shared with the kernel, Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_config.c == --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_config.c Thu Sep 1 14:49:07 2016(r305204) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_config.c Thu Sep 1 14:52:05 2016(r305205) @@ -27,6 +27,7 @@ /* * Copyright (c) 2012 by Delphix.
svn commit: r305204 - head/cddl/contrib/opensolaris
Author: mav Date: Thu Sep 1 14:49:07 2016 New Revision: 305204 URL: https://svnweb.freebsd.org/changeset/base/305204 Log: Record r302656 as merged. Modified: Directory Properties: head/cddl/contrib/opensolaris/ (props 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: r305203 - head/cddl/contrib/opensolaris/lib/libzfs/common
Author: mav Date: Thu Sep 1 14:47:43 2016 New Revision: 305203 URL: https://svnweb.freebsd.org/changeset/base/305203 Log: MFV r302655: 6873 zfs_destroy_snaps_nvl leaks errlist illumos/illumos-gate@4cde22c2ffb907ca39d2ebd512812f7e5168 https://github.com/illumos/illumos-gate/commit/4cde22c2ffb907ca39d2ebd512812 f7e5168 https://www.illumos.org/issues/6873 lzc_destroy_snaps() returns an nvlist in errlist. zfs_destroy_snaps_nvl() should nvlist_free() it before returning. Reviewed by: Matthew AhrensReviewed by: Paul Dagnelie Approved by: Dan McDonald Author: Chris Williamson Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c == --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.cThu Sep 1 14:46:33 2016(r305202) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.cThu Sep 1 14:47:43 2016(r305203) @@ -3466,12 +3466,14 @@ int zfs_destroy_snaps_nvl(libzfs_handle_t *hdl, nvlist_t *snaps, boolean_t defer) { int ret; - nvlist_t *errlist; + nvlist_t *errlist = NULL; ret = lzc_destroy_snaps(snaps, defer, ); - if (ret == 0) + if (ret == 0) { + nvlist_free(errlist); return (0); + } if (nvlist_empty(errlist)) { char errbuf[1024]; @@ -3499,6 +3501,7 @@ zfs_destroy_snaps_nvl(libzfs_handle_t *h } } + nvlist_free(errlist); return (ret); } ___ 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: r305202 - head/cddl/contrib/opensolaris/lib/libzfs/common
Author: mav Date: Thu Sep 1 14:46:33 2016 New Revision: 305202 URL: https://svnweb.freebsd.org/changeset/base/305202 Log: MFV r302654: 6879 incorrect endianness swap for drr_spill.drr_length in libzfs_sendrecv.c illumos/illumos-gate@20fea7a47472aceb64d3ed48cc2a3ea268bc4795 https://github.com/illumos/illumos-gate/commit/20fea7a47472aceb64d3ed48cc2a3ea26 8bc4795 https://www.illumos.org/issues/6879 In libzfs_sendrecv, there's a typo: case DRR_SPILL: if (byteswap) { drr->drr_u.drr_write.drr_length = BSWAP_64(drr->drr_u.drr_spill.drr_length); } Instead of drr_write.drr_length, we should be assigning the result of the byteswap to drr_spill.drr_length. Reviewed by: Matthew AhrensReviewed by: Paul Dagnelie Approved by: Robert Mustacchi Author: Dan Kimmel Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c == --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Thu Sep 1 14:45:11 2016(r305201) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Thu Sep 1 14:46:33 2016(r305202) @@ -2967,7 +2967,7 @@ recv_skip(libzfs_handle_t *hdl, int fd, break; case DRR_SPILL: if (byteswap) { - drr->drr_u.drr_write.drr_length = + drr->drr_u.drr_spill.drr_length = BSWAP_64(drr->drr_u.drr_spill.drr_length); } (void) recv_read(hdl, fd, buf, ___ 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: r305201 - head/cddl/contrib/opensolaris/lib/libzfs/common
Author: mav Date: Thu Sep 1 14:45:11 2016 New Revision: 305201 URL: https://svnweb.freebsd.org/changeset/base/305201 Log: MFV r302653: 6111 zfs send should ignore datasets created after the ending snapshot illumos/illumos-gate@4a20c933b148de8a1c1d3538391c64284e636653 https://github.com/illumos/illumos-gate/commit/4a20c933b148de8a1c1d3538391c64284 e636653 https://www.illumos.org/issues/6111 If you create a zfs child folder, zfs send returns an error when a recursive incremental send is done between two snapshots made prior to the folder creation. The problem can be reproduced with the following steps. root@zfs:/# zfs create pool/test root@zfs:/# zfs snapshot pool/test@snap1 root@zfs:/# zfs snapshot pool/test@snap2 root@zfs:/# zfs create pool/test/child root@zfs:/# zfs send -R -I pool/test@snap1 pool/test@snap2 > /dev/null WARNING: could not send pool/test/child@snap2: does not exist WARNING: could not send pool/test/child@snap2: does not exist root@zfs:/# echo $? 1 root@zfs:/# zfs snapshot -r pool/test@snap3 root@zfs:/# zfs send -R -I pool/test@snap1 pool/test@snap3 > /dev/null root@zfs:/# echo $? 0 root@zfs:/# zfs send -R -I pool/test@snap2 pool/test@snap3 > /dev/null root@zfs:/# echo $? 0 Since pool/test/child was created after snap2, zfs send should not expect snap2 to be in pool/test/child when doing a recursive send. It should examine the compare the creation time of the snapshot and each child folder to decide if the folder will be sent. The next incremental send between snap2 and snap3 would properly create the child folder and snap3 which first appears in the child folder. The problem is identical if '-i' is used instead of '-I'. Reviewed by: Alex Aizman alex.aiz...@nexenta.com Reviewed by: Alek Pinchuk alek.pinc...@nexenta.com Reviewed by: Roman Strashkin roman.strash...@nexenta.com Reviewed by: Matthew AhrensReviewed by: Paul Dagnelie Approved by: Garrett D'Amore Author: Alex Deiter Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c == --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Thu Sep 1 14:38:25 2016(r305200) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Thu Sep 1 14:45:11 2016(r305201) @@ -579,13 +579,30 @@ fsavl_create(nvlist_t *fss) * Routines for dealing with the giant nvlist of fs-nvlists, etc. */ typedef struct send_data { + /* +* assigned inside every recursive call, +* restored from *_save on return: +* +* guid of fromsnap snapshot in parent dataset +* txg of fromsnap snapshot in current dataset +* txg of tosnap snapshot in current dataset +*/ + uint64_t parent_fromsnap_guid; + uint64_t fromsnap_txg; + uint64_t tosnap_txg; + + /* the nvlists get accumulated during depth-first traversal */ nvlist_t *parent_snaps; nvlist_t *fss; nvlist_t *snapprops; + + /* send-receive configuration, does not change during traversal */ + const char *fsname; const char *fromsnap; const char *tosnap; boolean_t recursive; + boolean_t verbose; /* * The header nvlist is of the following format: @@ -618,11 +635,23 @@ send_iterate_snap(zfs_handle_t *zhp, voi { send_data_t *sd = arg; uint64_t guid = zhp->zfs_dmustats.dds_guid; + uint64_t txg = zhp->zfs_dmustats.dds_creation_txg; char *snapname; nvlist_t *nv; snapname = strrchr(zhp->zfs_name, '@')+1; + if (sd->tosnap_txg != 0 && txg > sd->tosnap_txg) { + if (sd->verbose) { + (void) fprintf(stderr, dgettext(TEXT_DOMAIN, + "skipping snapshot %s because it was created " + "after the destination snapshot (%s)\n"), + zhp->zfs_name, sd->tosnap); + } + zfs_close(zhp); + return (0); + } + VERIFY(0 == nvlist_add_uint64(sd->parent_snaps, snapname, guid)); /* * NB: if there is no fromsnap here (it's a newly created fs in @@ -716,6 +745,31 @@ send_iterate_prop(zfs_handle_t *zhp, nvl } /* + * returns snapshot creation txg + * and returns 0 if the snapshot does not exist + */ +static uint64_t +get_snap_txg(libzfs_handle_t *hdl, const char *fs, const char *snap) +{ + char name[ZFS_MAXNAMELEN]; + uint64_t txg = 0; + + if (fs ==
svn commit: r305200 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Author: mav Date: Thu Sep 1 14:38:25 2016 New Revision: 305200 URL: https://svnweb.freebsd.org/changeset/base/305200 Log: MFV r302651: 7054 dmu_tx_hold_t should use refcount_t to track space illumos/illumos-gate@0c779ad424a92a84d1e07d47cab7f8009189202b https://github.com/illumos/illumos-gate/commit/0c779ad424a92a84d1e07d47cab7f8009 189202b https://www.illumos.org/issues/7054 upstream: ee0003de7d3e598499be7ac3fe6b61efcc47cb7f DLPX-40399 dmu_tx_hold_t should use refcount_t to track space Reviewed by: George WilsonReviewed by: Paul Dagnelie Reviewed by: Igor Kozhukhov Approved by: Dan McDonald Author: Matthew Ahrens Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_tx.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.cThu Sep 1 14:24:54 2016(r305199) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.cThu Sep 1 14:38:25 2016(r305200) @@ -129,6 +129,12 @@ dmu_tx_hold_object_impl(dmu_tx_t *tx, ob txh = kmem_zalloc(sizeof (dmu_tx_hold_t), KM_SLEEP); txh->txh_tx = tx; txh->txh_dnode = dn; + refcount_create(>txh_space_towrite); + refcount_create(>txh_space_tofree); + refcount_create(>txh_space_tooverwrite); + refcount_create(>txh_space_tounref); + refcount_create(>txh_memory_tohold); + refcount_create(>txh_fudge); #ifdef ZFS_DEBUG txh->txh_type = type; txh->txh_arg1 = arg1; @@ -201,12 +207,18 @@ dmu_tx_count_twig(dmu_tx_hold_t *txh, dn freeable = (bp && (freeable || dsl_dataset_block_freeable(ds, bp, bp->blk_birth))); - if (freeable) - txh->txh_space_tooverwrite += space; - else - txh->txh_space_towrite += space; - if (bp) - txh->txh_space_tounref += bp_get_dsize(os->os_spa, bp); + if (freeable) { + (void) refcount_add_many(>txh_space_tooverwrite, + space, FTAG); + } else { + (void) refcount_add_many(>txh_space_towrite, + space, FTAG); + } + + if (bp) { + (void) refcount_add_many(>txh_space_tounref, + bp_get_dsize(os->os_spa, bp), FTAG); + } dmu_tx_count_twig(txh, dn, parent, level + 1, blkid >> epbs, freeable, history); @@ -336,8 +348,11 @@ dmu_tx_count_write(dmu_tx_hold_t *txh, u bits = 64 - min_bs; epbs = min_ibs - SPA_BLKPTRSHIFT; for (bits -= epbs * (nlvls - 1); - bits >= 0; bits -= epbs) - txh->txh_fudge += 1ULL << max_ibs; + bits >= 0; bits -= epbs) { + (void) refcount_add_many( + >txh_fudge, + 1ULL << max_ibs, FTAG); + } goto out; } off += delta; @@ -353,7 +368,8 @@ dmu_tx_count_write(dmu_tx_hold_t *txh, u */ start = P2ALIGN(off, 1ULL << max_bs); end = P2ROUNDUP(off + len, 1ULL << max_bs) - 1; - txh->txh_space_towrite += end - start + 1; + (void) refcount_add_many(>txh_space_towrite, + end - start + 1, FTAG); start >>= min_bs; end >>= min_bs; @@ -368,18 +384,21 @@ dmu_tx_count_write(dmu_tx_hold_t *txh, u start >>= epbs; end >>= epbs; ASSERT3U(end, >=, start); - txh->txh_space_towrite += (end - start + 1) << max_ibs; + (void) refcount_add_many(>txh_space_towrite, + (end - start + 1) << max_ibs, FTAG); if (start != 0) { /* * We also need a new blkid=0 indirect block * to reference any existing file data. */ - txh->txh_space_towrite += 1ULL << max_ibs; + (void) refcount_add_many(>txh_space_towrite, + 1ULL << max_ibs, FTAG); } } out: -
svn commit: r305199 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Thu Sep 1 14:24:54 2016 New Revision: 305199 URL: https://svnweb.freebsd.org/changeset/base/305199 Log: MFV r302648: 7019 zfsdev_ioctl skips secpolicy when FKIOCTL is set Note that the bulk of the upstream change is not applicable to FreeBSD and the affected files are not even in the vendor area. illumos/illumos-gate@45b1747515a17db45e8971501ee84a26bdff37b2 https://github.com/illumos/illumos-gate/commit/45b1747515a17db45e8971501ee84a26bdff37b2 https://www.illumos.org/issues/7019 Currently zfsdev_ioctl, when confronted by a request with the FKIOCTL flag set, skips all processing of secpolicy functions. This means that ZFS is not doing any kind of verification of the credentials or access rights of the caller and assuming that (as it is an in-kernel client) all such checks have already been done. This turns out to be quite a dangerous assumption, especially with respect to sdev. In general I don't think it's particularly reasonable to offload this enforcement of access rights onto other kernel subsystems when ZFS has some particular local semantics in this area (delegated datasets etc) and does not provide any kind of API to allow other subsystems to avoid code duplication when doing it. ZFS should apply its normal access policy to requests from within the kernel, and callers should take care to give it the correct credentials and call it from the correct context in order to get the results they need. You can observe the currently unfortunate consequences of this bug in any non- global zone that has access to /dev/zvol or any subset of it via sdev profiles. In particular, a zone used to contain a KVM or similar which has a single zvol passed through to it using a Reviewed by: Richard LoweReviewed by: Matthew Ahrens Approved by: Dan McDonald Author: Alex Wilson Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Thu Sep 1 14:17:30 2016(r305198) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Thu Sep 1 14:24:54 2016(r305199) @@ -26,7 +26,7 @@ * Copyright 2014 Xin Li . All rights reserved. * Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved. * Copyright 2015 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2014, Joyent, Inc. All rights reserved. + * Copyright (c) 2014, 2016 Joyent, Inc. All rights reserved. * Copyright (c) 2011, 2015 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. @@ -6367,7 +6367,7 @@ zfsdev_ioctl(struct cdev *dev, u_long zc break; } - if (error == 0 && !(flag & FKIOCTL)) + if (error == 0) error = vec->zvec_secpolicy(zc, innvl, cr); if (error != 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: r305198 - in head/sys/cddl/contrib/opensolaris/uts/common: fs/zfs sys/sysevent
Author: mav Date: Thu Sep 1 14:17:30 2016 New Revision: 305198 URL: https://svnweb.freebsd.org/changeset/base/305198 Log: MFV r302647: 6922 Emit ESC_ZFS_VDEV_REMOVE_AUX after removing an aux device illumos/illumos-gate@63364b0ee2604783e7a55f842567768eafa4 https://github.com/illumos/illumos-gate/commit/63364b0ee2604783e7a55f8425677 68eafa4 https://www.illumos.org/issues/6922 ZFS does not do a config_sync after removing an aux (spare, log, or cache) device. AFAICT this isn't being done because it is slow and was deemed unnecessary. However, it should be such a rare operation that speed doesn't matter, and not doing it results in two problems: 1) It is theoretically possible to remove an aux device from one pool and attach it to another, then lose power. When power is restored, both pools woul d think that they own the aux device. 2) Removal of the aux device doesn't send any useful sysevents to userland. Reviewed by: George WilsonReviewed by: Matthew Ahrens Approved by: Dan McDonald Author: Alan Somers Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/sys/sysevent/eventdefs.h Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Thu Sep 1 14:06:30 2016(r305197) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Thu Sep 1 14:17:30 2016(r305198) @@ -5773,6 +5773,7 @@ spa_vdev_remove(spa_t *spa, uint64_t gui } else { error = SET_ERROR(EBUSY); } + spa_event_notify(spa, vd, ESC_ZFS_VDEV_REMOVE_AUX); } else if (spa->spa_l2cache.sav_vdevs != NULL && nvlist_lookup_nvlist_array(spa->spa_l2cache.sav_config, ZPOOL_CONFIG_L2CACHE, , ) == 0 && @@ -5784,6 +5785,7 @@ spa_vdev_remove(spa_t *spa, uint64_t gui ZPOOL_CONFIG_L2CACHE, l2cache, nl2cache, nv); spa_load_l2cache(spa); spa->spa_l2cache.sav_sync = B_TRUE; + spa_event_notify(spa, vd, ESC_ZFS_VDEV_REMOVE_AUX); } else if (vd != NULL && vd->vdev_islog) { ASSERT(!locked); ASSERT(vd == vd->vdev_top); @@ -5822,6 +5824,7 @@ spa_vdev_remove(spa_t *spa, uint64_t gui */ spa_vdev_remove_from_namespace(spa, vd); + spa_event_notify(spa, vd, ESC_ZFS_VDEV_REMOVE_DEV); } else if (vd != NULL) { /* * Normal vdevs cannot be removed (yet). @@ -5835,7 +5838,7 @@ spa_vdev_remove(spa_t *spa, uint64_t gui } if (!locked) - return (spa_vdev_exit(spa, NULL, txg, error)); + error = spa_vdev_exit(spa, NULL, txg, error); return (error); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/sysevent/eventdefs.h == --- head/sys/cddl/contrib/opensolaris/uts/common/sys/sysevent/eventdefs.h Thu Sep 1 14:06:30 2016(r305197) +++ head/sys/cddl/contrib/opensolaris/uts/common/sys/sysevent/eventdefs.h Thu Sep 1 14:17:30 2016(r305198) @@ -249,6 +249,8 @@ extern "C" { #defineESC_ZFS_RESILVER_START "ESC_ZFS_resilver_start" #defineESC_ZFS_RESILVER_FINISH "ESC_ZFS_resilver_finish" #defineESC_ZFS_VDEV_REMOVE "ESC_ZFS_vdev_remove" +#defineESC_ZFS_VDEV_REMOVE_AUX "ESC_ZFS_vdev_remove_aux" +#defineESC_ZFS_VDEV_REMOVE_DEV "ESC_ZFS_vdev_remove_dev" #defineESC_ZFS_POOL_CREATE "ESC_ZFS_pool_create" #defineESC_ZFS_POOL_DESTROY"ESC_ZFS_pool_destroy" #defineESC_ZFS_POOL_IMPORT "ESC_ZFS_pool_import" ___ 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: r305197 - in head/sys/cddl/contrib/opensolaris: common/zfs uts/common/fs/zfs uts/common/fs/zfs/sys
Author: mav Date: Thu Sep 1 14:06:30 2016 New Revision: 305197 URL: https://svnweb.freebsd.org/changeset/base/305197 Log: MFV r302646: 6980 6902 causes zfs send to break due to 32-bit/64-bit struct mismatch illumos/illumos-gate@ea4a67f462de0a39a9adea8197bcdef849de5371 https://github.com/illumos/illumos-gate/commit/ea4a67f462de0a39a9adea8197bcdef84 9de5371 https://www.illumos.org/issues/6980 doing zfs send -i snap1 snap2 >testfile results in internal error: Invalid argument Abort (core dumped) Reviewed by: Paul DagnelieReviewed by: George Wilson Approved by: Robert Mustacchi Author: Matthew Ahrens Modified: head/sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.c head/sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.c == --- head/sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.c Thu Sep 1 13:38:46 2016(r305196) +++ head/sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.c Thu Sep 1 14:06:30 2016(r305197) @@ -55,8 +55,52 @@ zfs_cmd_compat_get(zfs_cmd_t *zc, caddr_ zfs_cmd_zcmd_t *zcmd_c; zfs_cmd_edbp_t *edbp_c; zfs_cmd_resume_t *resume_c; + zfs_cmd_inlanes_t *inlanes_c; switch (cflag) { + case ZFS_CMD_COMPAT_INLANES: + inlanes_c = (void *)addr; + /* zc */ + strlcpy(zc->zc_name, inlanes_c->zc_name, MAXPATHLEN); + strlcpy(zc->zc_value, inlanes_c->zc_value, MAXPATHLEN * 2); + strlcpy(zc->zc_string, inlanes_c->zc_string, MAXPATHLEN); + +#define FIELD_COPY(field) zc->field = inlanes_c->field + FIELD_COPY(zc_nvlist_src); + FIELD_COPY(zc_nvlist_src_size); + FIELD_COPY(zc_nvlist_dst); + FIELD_COPY(zc_nvlist_dst_size); + FIELD_COPY(zc_nvlist_dst_filled); + FIELD_COPY(zc_pad2); + FIELD_COPY(zc_history); + FIELD_COPY(zc_guid); + FIELD_COPY(zc_nvlist_conf); + FIELD_COPY(zc_nvlist_conf_size); + FIELD_COPY(zc_cookie); + FIELD_COPY(zc_objset_type); + FIELD_COPY(zc_perm_action); + FIELD_COPY(zc_history_len); + FIELD_COPY(zc_history_offset); + FIELD_COPY(zc_obj); + FIELD_COPY(zc_iflags); + FIELD_COPY(zc_share); + FIELD_COPY(zc_jailid); + FIELD_COPY(zc_objset_stats); + FIELD_COPY(zc_begin_record); + FIELD_COPY(zc_inject_record); + FIELD_COPY(zc_defer_destroy); + FIELD_COPY(zc_flags); + FIELD_COPY(zc_action_handle); + FIELD_COPY(zc_cleanup_fd); + FIELD_COPY(zc_simple); + FIELD_COPY(zc_resumable); + FIELD_COPY(zc_sendobj); + FIELD_COPY(zc_fromobj); + FIELD_COPY(zc_createtxg); + FIELD_COPY(zc_stat); +#undef FIELD_COPY + break; + case ZFS_CMD_COMPAT_RESUME: resume_c = (void *)addr; /* zc */ @@ -434,8 +478,50 @@ zfs_cmd_compat_put(zfs_cmd_t *zc, caddr_ zfs_cmd_zcmd_t *zcmd_c; zfs_cmd_edbp_t *edbp_c; zfs_cmd_resume_t *resume_c; + zfs_cmd_inlanes_t *inlanes_c; switch (cflag) { + case ZFS_CMD_COMPAT_INLANES: + inlanes_c = (void *)addr; + strlcpy(inlanes_c->zc_name, zc->zc_name, MAXPATHLEN); + strlcpy(inlanes_c->zc_value, zc->zc_value, MAXPATHLEN * 2); + strlcpy(inlanes_c->zc_string, zc->zc_string, MAXPATHLEN); + +#define FIELD_COPY(field) inlanes_c->field = zc->field + FIELD_COPY(zc_nvlist_src); + FIELD_COPY(zc_nvlist_src_size); + FIELD_COPY(zc_nvlist_dst); + FIELD_COPY(zc_nvlist_dst_size); + FIELD_COPY(zc_nvlist_dst_filled); + FIELD_COPY(zc_pad2); + FIELD_COPY(zc_history); + FIELD_COPY(zc_guid); + FIELD_COPY(zc_nvlist_conf); + FIELD_COPY(zc_nvlist_conf_size); + FIELD_COPY(zc_cookie); + FIELD_COPY(zc_objset_type); + FIELD_COPY(zc_perm_action); + FIELD_COPY(zc_history_len); + FIELD_COPY(zc_history_offset); + FIELD_COPY(zc_obj); + FIELD_COPY(zc_iflags); + FIELD_COPY(zc_share); + FIELD_COPY(zc_jailid); +
Re: svn commit: r304815 - in head: lib lib/libifc share/examples/libifc share/mk
On Thu, Aug 25, 2016 at 10:30 PM Alexey Dokuchaevwrote: > On Thu, Aug 25, 2016 at 10:20:29PM +0200, Kristof Provost wrote: > > On 25 Aug 2016, at 22:14, John Baldwin wrote: > > > I hate even writing this mail, and it looks like the topic wasn't > > > really discussed in the review, but I think libifconfig is probably > > > the "better" name if the goal is to move most of ifconfig into it. > > > ... > > > Hmm, it seems you are 'libifc_*'. Most of our libraries do not > > > include 'lib' in the namespace prefix (see above examples that all > > > use the name of the library without 'lib' as the prefix). If nothing > > > else I'd suggest dropping 'lib' to be consistent with most other > > > libraries in the tree. > > +1. > > > The name was in fact discussed privately, and we figured libifconfig > > was a bit on the long side. > > Oh come one, we already have `libblocksruntime' and `libbluetooth' (and > some others I probably don't remember now). `libifconfig' is just fine. > Potential namespace clashes are a lot nastier than a longer name. > > > I certainly take your point about libifc_. Does anyone else have any > > views regarding the naming (or other subjects)? > > I second John, dropping the `lib' prefix and going with `ifconfig_' looks > like a good idea. > > ./danfe > Considering the points raised on this topic, I agree naming it 'libifconfig' and using 'ifconfig_' prefix is better than what's currently in place. I've submitted a differential revision for it here: https://reviews.freebsd.org/D7742 This should be committed before further fixes, to keep as much history as possible. Regards, Marie Helene ___ 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: r305196 - head/sys/dev/bhnd/cores/pmu
Author: mizhka Date: Thu Sep 1 13:38:46 2016 New Revision: 305196 URL: https://svnweb.freebsd.org/changeset/base/305196 Log: [BHND/PMU] Correct shift of bits in BHND_PMU_SET_BITS macro The purpose of BHND_PMU_{GET,SET}_BITS macro is to transform values from/into register format. SET macro shifts value to left and applies filter mask. GET macro applies filter mask and then shifts value to right. Reviewed by:landonf, adrian (mentor) Approved by:adrian (mentor) Differential Revision: https://reviews.freebsd.org/D7721 Modified: head/sys/dev/bhnd/cores/pmu/bhnd_pmureg.h Modified: head/sys/dev/bhnd/cores/pmu/bhnd_pmureg.h == --- head/sys/dev/bhnd/cores/pmu/bhnd_pmureg.h Thu Sep 1 13:29:53 2016 (r305195) +++ head/sys/dev/bhnd/cores/pmu/bhnd_pmureg.h Thu Sep 1 13:38:46 2016 (r305196) @@ -30,7 +30,7 @@ #defineBHND_PMU_GET_BITS(_value, _field) \ (((_value) & _field ## _MASK) >> _field ## _SHIFT) #defineBHND_PMU_SET_BITS(_value, _field) \ - (((_value) & _field ## _MASK) >> _field ## _SHIFT) + (((_value) << _field ## _SHIFT) & _field ## _MASK) #defineBHND_PMU_ILP_CLOCK 32000 /**< default ILP freq */ #defineBHND_PMU_ALP_CLOCK 2000/**< default ALP freq */ ___ 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: r305195 - in head: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/...
Author: mav Date: Thu Sep 1 13:29:53 2016 New Revision: 305195 URL: https://svnweb.freebsd.org/changeset/base/305195 Log: MFV r302643: 6902 speed up listing of snapshots if requesting name only and sorting by name This was our change from the beginning, so just reduce the upstream diff. Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.h head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/cmd/zfs/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c == --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.cThu Sep 1 13:14:31 2016(r305194) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.cThu Sep 1 13:29:53 2016(r305195) @@ -21,8 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012 Pawel Jakub Dawidek. - * All rights reserved. + * Copyright (c) 2012 Pawel Jakub Dawidek. All rights reserved. * Copyright 2013 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. */ @@ -320,8 +319,8 @@ zfs_sort(const void *larg, const void *r } else if (psc->sc_prop == ZFS_PROP_NAME) { lvalid = rvalid = B_TRUE; - (void) strlcpy(lbuf, zfs_get_name(l), sizeof(lbuf)); - (void) strlcpy(rbuf, zfs_get_name(r), sizeof(rbuf)); + (void) strlcpy(lbuf, zfs_get_name(l), sizeof (lbuf)); + (void) strlcpy(rbuf, zfs_get_name(r), sizeof (rbuf)); lstr = lbuf; rstr = rbuf; Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.h == --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.hThu Sep 1 13:14:31 2016(r305194) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.hThu Sep 1 13:29:53 2016(r305195) @@ -22,6 +22,7 @@ /* * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * Copyright (c) 2011-2012 Pawel Jakub Dawidek. All rights reserved. * Copyright 2013 Nexenta Systems, Inc. All rights reserved. */ Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c == --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cThu Sep 1 13:14:31 2016(r305194) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cThu Sep 1 13:29:53 2016(r305195) @@ -24,8 +24,7 @@ * Copyright (c) 2011, 2015 by Delphix. All rights reserved. * Copyright 2012 Milan Jurik. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. - * Copyright (c) 2011-2012 Pawel Jakub Dawidek . - * All rights reserved. + * Copyright (c) 2011-2012 Pawel Jakub Dawidek. All rights reserved. * Copyright (c) 2012 Martin Matuska . All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. * Copyright 2013 Nexenta Systems, Inc. All rights reserved. @@ -3009,7 +3008,7 @@ print_dataset(zfs_handle_t *zhp, list_cb if (pl->pl_prop == ZFS_PROP_NAME) { (void) strlcpy(property, zfs_get_name(zhp), - sizeof(property)); + sizeof (property)); propstr = property; right_justify = zfs_prop_align_right(pl->pl_prop); } else if (pl->pl_prop != ZPROP_INVAL) { Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h == --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.hThu Sep 1 13:14:31 2016(r305194) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.hThu Sep 1 13:29:53 2016(r305195) @@ -21,8 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011 Pawel Jakub Dawidek . - * All rights reserved. + * Copyright (c) 2011 Pawel Jakub
svn commit: r305194 - head/cddl/contrib/opensolaris/lib/libzfs/common
Author: mav Date: Thu Sep 1 13:14:31 2016 New Revision: 305194 URL: https://svnweb.freebsd.org/changeset/base/305194 Log: MFV r302642: 6876 Stack corruption after importing a pool with a too-long name illumos/illumos-gate@c971037baa5d64dfecf6d87ed602fc3116ebec41 https://github.com/illumos/illumos-gate/commit/c971037baa5d64dfecf6d87ed602fc3116ebec41 https://www.illumos.org/issues/6876 Calling dsl_dataset_name on a dataset with a 256 byte buffer is asking for trouble. We should check every dataset on import, using a 1024 byte buffer and checking each time to see if the dataset's new name is longer than 256 bytes. Reviewed by: Prakash SuryaReviewed by: Dan Kimmel Reviewed by: George Wilson Reviewed by: Yuri Pankov Approved by: Richard Lowe Author: Paul Dagnelie Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c == --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Thu Sep 1 13:04:36 2016(r305193) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Thu Sep 1 13:14:31 2016(r305194) @@ -1786,7 +1786,12 @@ zpool_import_props(libzfs_handle_t *hdl, case EEXIST: (void) zpool_standard_error(hdl, error, desc); break; - + case ENAMETOOLONG: + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "new name of at least one dataset is longer than " + "the maximum allowable length")); + (void) zfs_error(hdl, EZFS_NAMETOOLONG, desc); + break; default: (void) zpool_standard_error(hdl, error, desc); zpool_explain_recover(hdl, ___ 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: r305193 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Thu Sep 1 13:04:36 2016 New Revision: 305193 URL: https://svnweb.freebsd.org/changeset/base/305193 Log: MFV r302642: 6876 Stack corruption after importing a pool with a too-long name illumos/illumos-gate@c971037baa5d64dfecf6d87ed602fc3116ebec41 https://github.com/illumos/illumos-gate/commit/c971037baa5d64dfecf6d87ed602fc3116ebec41 https://www.illumos.org/issues/6876 Calling dsl_dataset_name on a dataset with a 256 byte buffer is asking for trouble. We should check every dataset on import, using a 1024 byte buffer and checking each time to see if the dataset's new name is longer than 256 bytes. Reviewed by: Prakash SuryaReviewed by: Dan Kimmel Reviewed by: George Wilson Reviewed by: Yuri Pankov Approved by: Richard Lowe Author: Paul Dagnelie Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Thu Sep 1 12:01:23 2016(r305192) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Thu Sep 1 13:04:36 2016(r305193) @@ -1996,6 +1996,19 @@ spa_load_verify_cb(spa_t *spa, zilog_t * return (0); } +/* ARGSUSED */ +int +verify_dataset_name_len(dsl_pool_t *dp, dsl_dataset_t *ds, void *arg) +{ + char namebuf[MAXPATHLEN]; + dsl_dataset_name(ds, namebuf); + if (strlen(namebuf) > MAXNAMELEN) { + return (SET_ERROR(ENAMETOOLONG)); + } + + return (0); +} + static int spa_load_verify(spa_t *spa) { @@ -2010,6 +2023,14 @@ spa_load_verify(spa_t *spa) if (policy.zrp_request & ZPOOL_NEVER_REWIND) return (0); + dsl_pool_config_enter(spa->spa_dsl_pool, FTAG); + error = dmu_objset_find_dp(spa->spa_dsl_pool, + spa->spa_dsl_pool->dp_root_dir_obj, verify_dataset_name_len, NULL, + DS_FIND_CHILDREN); + dsl_pool_config_exit(spa->spa_dsl_pool, FTAG); + if (error != 0) + return (error); + rio = zio_root(spa, NULL, , ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE); ___ 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: r305192 - in stable/10: contrib/libarchive/cat/test contrib/libarchive/cpio contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/libarchive/libarchive/test contrib/libarch...
Author: mm Date: Thu Sep 1 12:01:23 2016 New Revision: 305192 URL: https://svnweb.freebsd.org/changeset/base/305192 Log: MFC r304075,r304989: Sync libarchive with vendor including security fixes Vendor issues fixed: Issue #731: Reject tar entries >= INT64_MAX Issue #744: Very long pathnames evade symlink checks Issue #748: libarchive can compress, but cannot decompress zip some files PR #750: ustar: fix out of bounds read on empty string ("") filename PR #755: fix use of acl_get_flagset_np() on FreeBSD Issue #767: Buffer overflow printing a filename Issue #770: Zip read: be more careful about extra_length MFC r304874: Temporarily disable two libarchive tests that have not yet been fixed by vendor. Tests will be re-enabled after a fix has been merged. Added: stable/10/contrib/libarchive/libarchive/test/test_read_format_zip_high_compression.c - copied unchanged from r304075, head/contrib/libarchive/libarchive/test/test_read_format_zip_high_compression.c stable/10/contrib/libarchive/libarchive/test/test_read_format_zip_high_compression.zip.uu - copied unchanged from r304075, head/contrib/libarchive/libarchive/test/test_read_format_zip_high_compression.zip.uu stable/10/contrib/libarchive/libarchive/test/test_write_disk_secure744.c - copied unchanged from r304075, head/contrib/libarchive/libarchive/test/test_write_disk_secure744.c stable/10/contrib/libarchive/libarchive/test/test_write_disk_secure745.c - copied unchanged from r304075, head/contrib/libarchive/libarchive/test/test_write_disk_secure745.c stable/10/contrib/libarchive/libarchive/test/test_write_disk_secure746.c - copied unchanged from r304075, head/contrib/libarchive/libarchive/test/test_write_disk_secure746.c Modified: stable/10/contrib/libarchive/cat/test/test_version.c stable/10/contrib/libarchive/cpio/cmdline.c stable/10/contrib/libarchive/cpio/test/test_option_version.c stable/10/contrib/libarchive/libarchive/archive_match.c stable/10/contrib/libarchive/libarchive/archive_ppmd7_private.h stable/10/contrib/libarchive/libarchive/archive_read_add_passphrase.c stable/10/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c stable/10/contrib/libarchive/libarchive/archive_read_disk_posix.c stable/10/contrib/libarchive/libarchive/archive_read_private.h stable/10/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c stable/10/contrib/libarchive/libarchive/archive_read_support_format_lha.c stable/10/contrib/libarchive/libarchive/archive_read_support_format_tar.c stable/10/contrib/libarchive/libarchive/archive_read_support_format_warc.c stable/10/contrib/libarchive/libarchive/archive_read_support_format_zip.c stable/10/contrib/libarchive/libarchive/archive_util.c stable/10/contrib/libarchive/libarchive/archive_write_disk_acl.c stable/10/contrib/libarchive/libarchive/archive_write_disk_posix.c stable/10/contrib/libarchive/libarchive/archive_write_set_format_iso9660.c stable/10/contrib/libarchive/libarchive/archive_write_set_format_ustar.c stable/10/contrib/libarchive/libarchive/test/main.c stable/10/contrib/libarchive/libarchive/test/test.h stable/10/contrib/libarchive/libarchive/test/test_archive_string_conversion.c stable/10/contrib/libarchive/libarchive/test/test_fuzz.c stable/10/contrib/libarchive/libarchive/test/test_read_format_rar.c stable/10/contrib/libarchive/tar/cmdline.c stable/10/contrib/libarchive/tar/test/test_version.c stable/10/contrib/libarchive/tar/util.c stable/10/lib/libarchive/tests/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/libarchive/cat/test/test_version.c == --- stable/10/contrib/libarchive/cat/test/test_version.cThu Sep 1 10:26:06 2016(r305191) +++ stable/10/contrib/libarchive/cat/test/test_version.cThu Sep 1 12:01:23 2016(r305192) @@ -83,7 +83,7 @@ DEFINE_TEST(test_version) if (*q == 'a' || *q == 'b' || *q == 'c' || *q == 'd') ++q; /* Skip arbitrary third-party version numbers. */ - while (s > 0 && (*q == ' ' || *q == '/' || *q == '.' || isalnum(*q))) { + while (s > 0 && (*q == ' ' || *q == '-' || *q == '/' || *q == '.' || isalnum(*q))) { ++q; --s; } Modified: stable/10/contrib/libarchive/cpio/cmdline.c == --- stable/10/contrib/libarchive/cpio/cmdline.c Thu Sep 1 10:26:06 2016 (r305191) +++ stable/10/contrib/libarchive/cpio/cmdline.c Thu Sep 1 12:01:23 2016 (r305192) @@ -63,6 +63,7 @@ static const struct option { } cpio_longopts[] = { { "b64encode", 0, OPTION_B64ENCODE }, { "create", 0, 'o' }, + { "dereference",0, 'L' }, { "dot",0, 'V'
svn commit: r305191 - head/sys/arm64/arm64
Author: andrew Date: Thu Sep 1 10:26:06 2016 New Revision: 305191 URL: https://svnweb.freebsd.org/changeset/base/305191 Log: Fix arm64 superpages bugs in pmap_enter: * Pass the correct virtual address when demoting a superpage * Use the correct l3 table after demoting a superpage * Remove an invalid KASSERT hit demoting then promoting a superpage [1] With this it is believed that superpages on arm64 is stable. Reported by: [1] cognet Obtained from:ABT Systems Ltd MFC after:1 week Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c == --- head/sys/arm64/arm64/pmap.c Thu Sep 1 08:34:31 2016(r305190) +++ head/sys/arm64/arm64/pmap.c Thu Sep 1 10:26:06 2016(r305191) @@ -2732,7 +2732,9 @@ pmap_enter(pmap_t pmap, vm_offset_t va, if (pde != NULL && lvl == 1) { l2 = pmap_l1_to_l2(pde, va); if ((pmap_load(l2) & ATTR_DESCR_MASK) == L2_BLOCK && - (l3 = pmap_demote_l2_locked(pmap, l2, va, )) != NULL) { + (l3 = pmap_demote_l2_locked(pmap, l2, va & ~L2_OFFSET, + )) != NULL) { + l3 = [pmap_l3_index(va)]; if (va < VM_MAXUSER_ADDRESS) { mpte = PHYS_TO_VM_PAGE( pmap_load(l2) & ~ATTR_MASK); @@ -2944,7 +2946,6 @@ validate: pmap_superpages_enabled() && (m->flags & PG_FICTITIOUS) == 0 && vm_reserv_level_iffullpop(m) == 0) { - KASSERT(lvl == 2, ("Invalid pde level %d", lvl)); pmap_promote_l2(pmap, pde, va, ); } } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r301752 - head/contrib/netbsd-tests/lib/libc/string
> On Aug 31, 2016, at 19:12, Ngie Cooper (yaneurabeya)> wrote: … > Shoot — I’ll verify the issue and commit the change. Confirmed and fixed in r305190. Thanks! -Ngie signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r305190 - stable/10/contrib/netbsd-tests/lib/libc/string
Author: ngie Date: Thu Sep 1 08:34:31 2016 New Revision: 305190 URL: https://svnweb.freebsd.org/changeset/base/305190 Log: MFC r301752: Update `goodResult` after recent changes made to the PRNG in libc The PRNG was changed in r300953/r300956, and subsequently, the numbers generated have changed. This is expected ABI breakage per ache Tested with: amd64, i386 Modified: stable/10/contrib/netbsd-tests/lib/libc/string/t_memcpy.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/string/t_memcpy.c == --- stable/10/contrib/netbsd-tests/lib/libc/string/t_memcpy.c Thu Sep 1 08:01:13 2016(r305189) +++ stable/10/contrib/netbsd-tests/lib/libc/string/t_memcpy.c Thu Sep 1 08:34:31 2016(r305190) @@ -54,7 +54,7 @@ char result[100]; #ifdef __NetBSD__ const char goodResult[] = "7b405d24bc03195474c70ddae9e1f8fb"; #else -const char goodResult[] = "217b4fbe456916bf62a2f85df752e4ab"; +const char goodResult[] = "5ab4443f0e3e058d94087d9f2a11ef5e"; #endif static void ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r305188 - in stable/11: contrib/libarchive/cat/test contrib/libarchive/cpio contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/libarchive/libarchive/test contrib/libarch...
Author: mm Date: Thu Sep 1 07:53:59 2016 New Revision: 305188 URL: https://svnweb.freebsd.org/changeset/base/305188 Log: MFC r304075,r304989: Sync libarchive with vendor including security fixes Vendor issues fixed: Issue #731: Reject tar entries >= INT64_MAX Issue #744: Very long pathnames evade symlink checks Issue #748: libarchive can compress, but cannot decompress zip some files PR #750: ustar: fix out of bounds read on empty string ("") filename PR #755: fix use of acl_get_flagset_np() on FreeBSD Issue #767: Buffer overflow printing a filename Issue #770: Zip read: be more careful about extra_length MFC r304874: Temporarily disable two libarchive tests that have not yet been fixed by vendor. Tests will be re-enabled after a fix has been merged. Added: stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_high_compression.c - copied unchanged from r304075, head/contrib/libarchive/libarchive/test/test_read_format_zip_high_compression.c stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_high_compression.zip.uu - copied unchanged from r304075, head/contrib/libarchive/libarchive/test/test_read_format_zip_high_compression.zip.uu stable/11/contrib/libarchive/libarchive/test/test_write_disk_secure744.c - copied unchanged from r304075, head/contrib/libarchive/libarchive/test/test_write_disk_secure744.c stable/11/contrib/libarchive/libarchive/test/test_write_disk_secure745.c - copied unchanged from r304075, head/contrib/libarchive/libarchive/test/test_write_disk_secure745.c stable/11/contrib/libarchive/libarchive/test/test_write_disk_secure746.c - copied unchanged from r304075, head/contrib/libarchive/libarchive/test/test_write_disk_secure746.c Modified: stable/11/contrib/libarchive/cat/test/test_version.c stable/11/contrib/libarchive/cpio/cmdline.c stable/11/contrib/libarchive/cpio/test/test_option_version.c stable/11/contrib/libarchive/libarchive/archive_match.c stable/11/contrib/libarchive/libarchive/archive_ppmd7_private.h stable/11/contrib/libarchive/libarchive/archive_read_add_passphrase.c stable/11/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c stable/11/contrib/libarchive/libarchive/archive_read_disk_posix.c stable/11/contrib/libarchive/libarchive/archive_read_private.h stable/11/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_lha.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_tar.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_warc.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_zip.c stable/11/contrib/libarchive/libarchive/archive_util.c stable/11/contrib/libarchive/libarchive/archive_write_disk_acl.c stable/11/contrib/libarchive/libarchive/archive_write_disk_posix.c stable/11/contrib/libarchive/libarchive/archive_write_set_format_iso9660.c stable/11/contrib/libarchive/libarchive/archive_write_set_format_ustar.c stable/11/contrib/libarchive/libarchive/test/main.c stable/11/contrib/libarchive/libarchive/test/test.h stable/11/contrib/libarchive/libarchive/test/test_archive_string_conversion.c stable/11/contrib/libarchive/libarchive/test/test_fuzz.c stable/11/contrib/libarchive/libarchive/test/test_read_format_rar.c stable/11/contrib/libarchive/tar/cmdline.c stable/11/contrib/libarchive/tar/test/test_version.c stable/11/contrib/libarchive/tar/util.c stable/11/lib/libarchive/tests/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/libarchive/cat/test/test_version.c == --- stable/11/contrib/libarchive/cat/test/test_version.cThu Sep 1 07:41:49 2016(r305187) +++ stable/11/contrib/libarchive/cat/test/test_version.cThu Sep 1 07:53:59 2016(r305188) @@ -83,7 +83,7 @@ DEFINE_TEST(test_version) if (*q == 'a' || *q == 'b' || *q == 'c' || *q == 'd') ++q; /* Skip arbitrary third-party version numbers. */ - while (s > 0 && (*q == ' ' || *q == '/' || *q == '.' || isalnum(*q))) { + while (s > 0 && (*q == ' ' || *q == '-' || *q == '/' || *q == '.' || isalnum(*q))) { ++q; --s; } Modified: stable/11/contrib/libarchive/cpio/cmdline.c == --- stable/11/contrib/libarchive/cpio/cmdline.c Thu Sep 1 07:41:49 2016 (r305187) +++ stable/11/contrib/libarchive/cpio/cmdline.c Thu Sep 1 07:53:59 2016 (r305188) @@ -63,6 +63,7 @@ static const struct option { } cpio_longopts[] = { { "b64encode", 0, OPTION_B64ENCODE }, { "create", 0, 'o' }, + { "dereference",0, 'L' }, { "dot",0, 'V'
svn commit: r305189 - stable/10/sys/netinet
Author: sephe Date: Thu Sep 1 08:01:13 2016 New Revision: 305189 URL: https://svnweb.freebsd.org/changeset/base/305189 Log: MFC 304202 tcp/lro: Make # of LRO entries tunable Reviewed by:hps, gallatin Obtained from: rrs, gallatin Sponsored by: Netflix (rrs, gallatin), Microsoft (sephe) Differential Revision: https://reviews.freebsd.org/D7499 Modified: stable/10/sys/netinet/tcp_lro.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/tcp_lro.c == --- stable/10/sys/netinet/tcp_lro.c Thu Sep 1 07:53:59 2016 (r305188) +++ stable/10/sys/netinet/tcp_lro.c Thu Sep 1 08:01:13 2016 (r305189) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -53,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -67,6 +69,14 @@ __FBSDID("$FreeBSD$"); #defineTCP_LRO_INVALID_CSUM0x #endif +SYSCTL_NODE(_net_inet_tcp, OID_AUTO, lro, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, +"TCP LRO"); + +static unsignedtcp_lro_entries = LRO_ENTRIES; +SYSCTL_UINT(_net_inet_tcp_lro, OID_AUTO, entries, +CTLFLAG_RDTUN | CTLFLAG_MPSAFE, _lro_entries, 0, +"default number of LRO entries"); + int tcp_lro_init(struct lro_ctrl *lc) { @@ -81,7 +91,7 @@ tcp_lro_init(struct lro_ctrl *lc) SLIST_INIT(>lro_active); error = 0; - for (i = 0; i < LRO_ENTRIES; i++) { + for (i = 0; i < tcp_lro_entries; i++) { le = (struct lro_entry *)malloc(sizeof(*le), M_DEVBUF, M_NOWAIT | M_ZERO); if (le == NULL) { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r305181 - stable/11/sys/kern
Author: kib Date: Thu Sep 1 07:15:23 2016 New Revision: 305181 URL: https://svnweb.freebsd.org/changeset/base/305181 Log: MFC r304812: In both do_rw_wrlock() and do_rw_rdlock(), do not obliterate possible error from sleep. Modified: stable/11/sys/kern/kern_umtx.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_umtx.c == --- stable/11/sys/kern/kern_umtx.c Thu Sep 1 07:08:01 2016 (r305180) +++ stable/11/sys/kern/kern_umtx.c Thu Sep 1 07:15:23 2016 (r305181) @@ -2609,7 +2609,7 @@ do_rw_rdlock(struct thread *td, struct u uint32_t flags, wrflags; int32_t state, oldstate; int32_t blocked_readers; - int error, rv; + int error, error1, rv; uq = td->td_umtxq; error = fueword32(>rw_flags, ); @@ -2758,9 +2758,12 @@ sleep: if (oldstate == state) break; state = oldstate; - error = umtxq_check_susp(td); - if (error != 0) + error1 = umtxq_check_susp(td); + if (error1 != 0) { + if (error == 0) + error = error1; break; + } } } @@ -2783,7 +2786,7 @@ do_rw_wrlock(struct thread *td, struct u int32_t state, oldstate; int32_t blocked_writers; int32_t blocked_readers; - int error, rv; + int error, error1, rv; uq = td->td_umtxq; error = fueword32(>rw_flags, ); @@ -2929,14 +2932,17 @@ sleep: if (oldstate == state) break; state = oldstate; - error = umtxq_check_susp(td); + error1 = umtxq_check_susp(td); /* * We are leaving the URWLOCK_WRITE_WAITERS * behind, but this should not harm the * correctness. */ - if (error != 0) + if (error1 != 0) { + if (error == 0) + error = error1; break; + } } rv = fueword32(>rw_blocked_readers, _readers); ___ 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: r305187 - stable/11/sys/netinet
Author: sephe Date: Thu Sep 1 07:41:49 2016 New Revision: 305187 URL: https://svnweb.freebsd.org/changeset/base/305187 Log: MFC 304202 tcp/lro: Make # of LRO entries tunable Reviewed by:hps, gallatin Obtained from: rrs, gallatin Sponsored by: Netflix (rrs, gallatin), Microsoft (sephe) Differential Revision: https://reviews.freebsd.org/D7499 Modified: stable/11/sys/netinet/tcp_lro.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/tcp_lro.c == --- stable/11/sys/netinet/tcp_lro.c Thu Sep 1 07:23:47 2016 (r305186) +++ stable/11/sys/netinet/tcp_lro.c Thu Sep 1 07:41:49 2016 (r305187) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -55,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -69,6 +71,14 @@ static MALLOC_DEFINE(M_LRO, "LRO", "LRO static voidtcp_lro_rx_done(struct lro_ctrl *lc); +SYSCTL_NODE(_net_inet_tcp, OID_AUTO, lro, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, +"TCP LRO"); + +static unsignedtcp_lro_entries = TCP_LRO_ENTRIES; +SYSCTL_UINT(_net_inet_tcp_lro, OID_AUTO, entries, +CTLFLAG_RDTUN | CTLFLAG_MPSAFE, _lro_entries, 0, +"default number of LRO entries"); + static __inline void tcp_lro_active_insert(struct lro_ctrl *lc, struct lro_entry *le) { @@ -86,7 +96,7 @@ tcp_lro_active_remove(struct lro_entry * int tcp_lro_init(struct lro_ctrl *lc) { - return (tcp_lro_init_args(lc, NULL, TCP_LRO_ENTRIES, 0)); + return (tcp_lro_init_args(lc, NULL, tcp_lro_entries, 0)); } int ___ 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: r305183 - stable/11/lib/libc/sys
Author: kib Date: Thu Sep 1 07:19:04 2016 New Revision: 305183 URL: https://svnweb.freebsd.org/changeset/base/305183 Log: MFC r305024: Typesetting fixes. Modified: stable/11/lib/libc/sys/ptrace.2 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/ptrace.2 == --- stable/11/lib/libc/sys/ptrace.2 Thu Sep 1 07:17:06 2016 (r305182) +++ stable/11/lib/libc/sys/ptrace.2 Thu Sep 1 07:19:04 2016 (r305183) @@ -104,7 +104,7 @@ Each traced process has a tracing event An event in the traced process only reports a signal stop if the corresponding flag is set in the tracing event mask. The current set of tracing event flags include: -.Bl -tag -width ".Dv PTRACE_SYSCALL" +.Bl -tag -width "Dv PTRACE_SYSCALL" .It Dv PTRACE_EXEC Report a stop for a successful invocation of .Xr execve 2 . @@ -231,7 +231,7 @@ The .Fa request argument can be: -.Bl -tag -width 12n +.Bl -tag -width "Dv PT_GET_EVENT_MASK" .It Dv PT_TRACE_ME This request is the only one used by the traced process; it declares that the process expects to be traced by its parent. @@ -469,31 +469,31 @@ The fields in the .Vt "struct ptrace_lwpinfo" have the following meaning: .Bl -tag -width indent -compact -.It pl_lwpid +.It Va pl_lwpid LWP id of the thread -.It pl_event +.It Va pl_event Event that caused the stop. -Currently defined events are -.Bl -tag -width indent -compact -.It PL_EVENT_NONE +Currently defined events are: +.Bl -tag -width "Dv PL_EVENT_SIGNAL" -compact +.It Dv PL_EVENT_NONE No reason given -.It PL_EVENT_SIGNAL +.It Dv PL_EVENT_SIGNAL Thread stopped due to the pending signal .El -.It pl_flags +.It Va pl_flags Flags that specify additional details about observed stop. Currently defined flags are: .Bl -tag -width indent -compact -.It PL_FLAG_SCE +.It Dv PL_FLAG_SCE The thread stopped due to system call entry, right after the kernel is entered. The debugger may examine syscall arguments that are stored in memory and registers according to the ABI of the current process, and modify them, if needed. -.It PL_FLAG_SCX +.It Dv PL_FLAG_SCX The thread is stopped immediately before syscall is returning to the usermode. The debugger may examine system call return values in the ABI-defined registers and/or memory. -.It PL_FLAG_EXEC +.It Dv PL_FLAG_EXEC When .Dv PL_FLAG_SCX is set, this flag may be additionally specified to inform that the @@ -501,13 +501,13 @@ program being executed by debuggee proce execution of a system call from the .Fn execve 2 family. -.It PL_FLAG_SI +.It Dv PL_FLAG_SI Indicates that .Va pl_siginfo member of .Vt "struct ptrace_lwpinfo" contains valid information. -.It PL_FLAG_FORKED +.It Dv PL_FLAG_FORKED Indicates that the process is returning from a call to .Fn fork 2 that created a new child process. @@ -515,42 +515,42 @@ The process identifier of the new proces .Va pl_child_pid member of .Vt "struct ptrace_lwpinfo" . -.It PL_FLAG_CHILD +.It Dv PL_FLAG_CHILD The flag is set for first event reported from a new child which is automatically attached when .Dv PTRACE_FORK is enabled. -.It PL_FLAG_BORN +.It Dv PL_FLAG_BORN This flag is set for the first event reported from a new LWP when .Dv PTRACE_LWP is enabled. It is reported along with .Dv PL_FLAG_SCX . -.It PL_FLAG_EXITED +.It Dv PL_FLAG_EXITED This flag is set for the last event reported by an exiting LWP when .Dv PTRACE_LWP is enabled. Note that this event is not reported when the last LWP in a process exits. The termination of the last thread is reported via a normal process exit event. -.It PL_FLAG_VFORKED +.It Dv PL_FLAG_VFORKED Indicates that the thread is returning from a call to .Xr vfork 2 that created a new child process. This flag is set in addition to .Dv PL_FLAG_FORKED . -.It PL_FLAG_VFORK_DONE +.It Dv PL_FLAG_VFORK_DONE Indicates that the thread has resumed after a child process created via .Xr vfork 2 has stopped sharing its address space with the traced process. .El -.It pl_sigmask +.It Va pl_sigmask The current signal mask of the LWP -.It pl_siglist +.It Va pl_siglist The current pending set of signals for the LWP. Note that signals that are delivered to the process would not appear on an LWP siglist until the thread is selected for delivery. -.It pl_siginfo +.It Va pl_siginfo The siginfo that accompanies the signal pending. Only valid for .Dv PL_EVENT_SIGNAL @@ -558,9 +558,9 @@ stop when .Dv PL_FLAG_SI is set in .Va pl_flags . -.It pl_tdname +.It Va pl_tdname The name of the thread. -.It pl_child_pid +.It Va pl_child_pid The process identifier of the new child process. Only valid for a .Dv PL_EVENT_SIGNAL @@ -568,7 +568,7 @@ stop when .Dv PL_FLAG_FORKED is set in .Va pl_flags . -.It pl_syscall_code +.It Va pl_syscall_code The ABI-specific identifier of the current system call. Note that for indirect system calls this field reports the
svn commit: r305182 - head/sys/net
Author: sephe Date: Thu Sep 1 07:17:06 2016 New Revision: 305182 URL: https://svnweb.freebsd.org/changeset/base/305182 Log: net/rndis: Define types for RNDIS pktinfo rm_type field. They are defined by NDIS spec, so the NDIS prefix. Reviewed by: hps MFC after:1 week Sponsored by: Microsoft Differential Revision:https://reviews.freebsd.org/D7717 Modified: head/sys/net/rndis.h Modified: head/sys/net/rndis.h == --- head/sys/net/rndis.hThu Sep 1 07:15:23 2016(r305181) +++ head/sys/net/rndis.hThu Sep 1 07:17:06 2016(r305182) @@ -122,7 +122,7 @@ struct rndis_packet_msg { /* Per-packet-info for RNDIS data message */ struct rndis_pktinfo { uint32_t rm_size; - uint32_t rm_type; + uint32_t rm_type; /* NDIS_PKTINFO_TYPE_ */ uint32_t rm_pktinfooffset; uint8_t rm_data[]; }; @@ -131,6 +131,19 @@ struct rndis_pktinfo { __offsetof(struct rndis_pktinfo, rm_data[0]) #defineRNDIS_PKTINFO_ALIGN 4 +#defineNDIS_PKTINFO_TYPE_CSUM 0 +#defineNDIS_PKTINFO_TYPE_IPSEC 1 +#defineNDIS_PKTINFO_TYPE_LSO 2 +#defineNDIS_PKTINFO_TYPE_CLASSIFY 3 +/* reserved 4 */ +#defineNDIS_PKTINFO_TYPE_SGLIST5 +#defineNDIS_PKTINFO_TYPE_VLAN 6 +#defineNDIS_PKTINFO_TYPE_ORIG 7 +#defineNDIS_PKTINFO_TYPE_PKT_CANCELID 8 +#defineNDIS_PKTINFO_TYPE_ORIG_NBLIST 9 +#defineNDIS_PKTINFO_TYPE_CACHE_NBLIST 10 +#defineNDIS_PKTINFO_TYPE_PKT_PAD 11 + /* * RNDIS control messages */ ___ 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: r305186 - stable/10/lib/libc/sys
Author: kib Date: Thu Sep 1 07:23:47 2016 New Revision: 305186 URL: https://svnweb.freebsd.org/changeset/base/305186 Log: MFC r305024: Typesetting fixes. Modified: stable/10/lib/libc/sys/ptrace.2 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sys/ptrace.2 == --- stable/10/lib/libc/sys/ptrace.2 Thu Sep 1 07:21:42 2016 (r305185) +++ stable/10/lib/libc/sys/ptrace.2 Thu Sep 1 07:23:47 2016 (r305186) @@ -104,7 +104,7 @@ Each traced process has a tracing event An event in the traced process only reports a signal stop if the corresponding flag is set in the tracing event mask. The current set of tracing event flags include: -.Bl -tag -width ".Dv PTRACE_SYSCALL" +.Bl -tag -width "Dv PTRACE_SYSCALL" .It Dv PTRACE_EXEC Report a stop for a successful invocation of .Xr execve 2 . @@ -231,7 +231,7 @@ The .Fa request argument can be: -.Bl -tag -width 12n +.Bl -tag -width "Dv PT_GET_EVENT_MASK" .It Dv PT_TRACE_ME This request is the only one used by the traced process; it declares that the process expects to be traced by its parent. @@ -469,31 +469,31 @@ The fields in the .Vt "struct ptrace_lwpinfo" have the following meaning: .Bl -tag -width indent -compact -.It pl_lwpid +.It Va pl_lwpid LWP id of the thread -.It pl_event +.It Va pl_event Event that caused the stop. -Currently defined events are -.Bl -tag -width indent -compact -.It PL_EVENT_NONE +Currently defined events are: +.Bl -tag -width "Dv PL_EVENT_SIGNAL" -compact +.It Dv PL_EVENT_NONE No reason given -.It PL_EVENT_SIGNAL +.It Dv PL_EVENT_SIGNAL Thread stopped due to the pending signal .El -.It pl_flags +.It Va pl_flags Flags that specify additional details about observed stop. Currently defined flags are: .Bl -tag -width indent -compact -.It PL_FLAG_SCE +.It Dv PL_FLAG_SCE The thread stopped due to system call entry, right after the kernel is entered. The debugger may examine syscall arguments that are stored in memory and registers according to the ABI of the current process, and modify them, if needed. -.It PL_FLAG_SCX +.It Dv PL_FLAG_SCX The thread is stopped immediately before syscall is returning to the usermode. The debugger may examine system call return values in the ABI-defined registers and/or memory. -.It PL_FLAG_EXEC +.It Dv PL_FLAG_EXEC When .Dv PL_FLAG_SCX is set, this flag may be additionally specified to inform that the @@ -501,13 +501,13 @@ program being executed by debuggee proce execution of a system call from the .Fn execve 2 family. -.It PL_FLAG_SI +.It Dv PL_FLAG_SI Indicates that .Va pl_siginfo member of .Vt "struct ptrace_lwpinfo" contains valid information. -.It PL_FLAG_FORKED +.It Dv PL_FLAG_FORKED Indicates that the process is returning from a call to .Fn fork 2 that created a new child process. @@ -515,42 +515,42 @@ The process identifier of the new proces .Va pl_child_pid member of .Vt "struct ptrace_lwpinfo" . -.It PL_FLAG_CHILD +.It Dv PL_FLAG_CHILD The flag is set for first event reported from a new child which is automatically attached when .Dv PTRACE_FORK is enabled. -.It PL_FLAG_BORN +.It Dv PL_FLAG_BORN This flag is set for the first event reported from a new LWP when .Dv PTRACE_LWP is enabled. It is reported along with .Dv PL_FLAG_SCX . -.It PL_FLAG_EXITED +.It Dv PL_FLAG_EXITED This flag is set for the last event reported by an exiting LWP when .Dv PTRACE_LWP is enabled. Note that this event is not reported when the last LWP in a process exits. The termination of the last thread is reported via a normal process exit event. -.It PL_FLAG_VFORKED +.It Dv PL_FLAG_VFORKED Indicates that the thread is returning from a call to .Xr vfork 2 that created a new child process. This flag is set in addition to .Dv PL_FLAG_FORKED . -.It PL_FLAG_VFORK_DONE +.It Dv PL_FLAG_VFORK_DONE Indicates that the thread has resumed after a child process created via .Xr vfork 2 has stopped sharing its address space with the traced process. .El -.It pl_sigmask +.It Va pl_sigmask The current signal mask of the LWP -.It pl_siglist +.It Va pl_siglist The current pending set of signals for the LWP. Note that signals that are delivered to the process would not appear on an LWP siglist until the thread is selected for delivery. -.It pl_siginfo +.It Va pl_siginfo The siginfo that accompanies the signal pending. Only valid for .Dv PL_EVENT_SIGNAL @@ -558,9 +558,9 @@ stop when .Dv PL_FLAG_SI is set in .Va pl_flags . -.It pl_tdname +.It Va pl_tdname The name of the thread. -.It pl_child_pid +.It Va pl_child_pid The process identifier of the new child process. Only valid for a .Dv PL_EVENT_SIGNAL @@ -568,7 +568,7 @@ stop when .Dv PL_FLAG_FORKED is set in .Va pl_flags . -.It pl_syscall_code +.It Va pl_syscall_code The ABI-specific identifier of the current system call. Note that for indirect system calls this field reports the
svn commit: r305179 - head/sys/dev/hyperv/netvsc
Author: sephe Date: Thu Sep 1 07:04:47 2016 New Revision: 305179 URL: https://svnweb.freebsd.org/changeset/base/305179 Log: hyperv/hn: Fix VLAN tag construction. MFC after:1 week Sponsored by: Microsoft Differential Revision:https://reviews.freebsd.org/D7716 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c head/sys/dev/hyperv/netvsc/hv_rndis_filter.c head/sys/dev/hyperv/netvsc/if_hnvar.h head/sys/dev/hyperv/netvsc/ndis.h Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c == --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Thu Sep 1 06:35:13 2016(r305178) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Thu Sep 1 07:04:47 2016(r305179) @@ -1412,8 +1412,11 @@ netvsc_recv(struct hn_rx_ring *rxr, cons } } skip: - if (info->vlan_info != NULL) { - m_new->m_pkthdr.ether_vtag = info->vlan_info->u1.s1.vlan_id; + if (info->vlan_info != HN_NDIS_VLAN_INFO_INVALID) { + m_new->m_pkthdr.ether_vtag = EVL_MAKETAG( + NDIS_VLAN_INFO_ID(info->vlan_info), + NDIS_VLAN_INFO_PRI(info->vlan_info), + NDIS_VLAN_INFO_CFI(info->vlan_info)); m_new->m_flags |= M_VLANTAG; } Modified: head/sys/dev/hyperv/netvsc/hv_rndis_filter.c == --- head/sys/dev/hyperv/netvsc/hv_rndis_filter.cThu Sep 1 06:35:13 2016(r305178) +++ head/sys/dev/hyperv/netvsc/hv_rndis_filter.cThu Sep 1 07:04:47 2016(r305179) @@ -156,7 +156,7 @@ hv_rf_find_recvinfo(const rndis_packet * const struct rndis_pktinfo *pi; uint32_t mask = 0, len; - info->vlan_info = NULL; + info->vlan_info = HN_NDIS_VLAN_INFO_INVALID; info->csum_info = NULL; info->hash_info = NULL; info->hash_value = NULL; @@ -193,9 +193,9 @@ hv_rf_find_recvinfo(const rndis_packet * switch (pi->rm_type) { case ieee_8021q_info: - if (__predict_false(dlen < sizeof(ndis_8021q_info))) + if (__predict_false(dlen < NDIS_VLAN_INFO_SIZE)) return (EINVAL); - info->vlan_info = data; + info->vlan_info = *((const uint32_t *)data); mask |= HV_RF_RECVINFO_VLAN; break; Modified: head/sys/dev/hyperv/netvsc/if_hnvar.h == --- head/sys/dev/hyperv/netvsc/if_hnvar.h Thu Sep 1 06:35:13 2016 (r305178) +++ head/sys/dev/hyperv/netvsc/if_hnvar.h Thu Sep 1 07:04:47 2016 (r305179) @@ -55,8 +55,10 @@ struct rndix_hash_value; struct ndis_8021q_info_; struct rndis_tcp_ip_csum_info_; +#define HN_NDIS_VLAN_INFO_INVALID 0x + struct hn_recvinfo { - const struct ndis_8021q_info_ *vlan_info; + uint32_tvlan_info; const struct rndis_tcp_ip_csum_info_ *csum_info; const struct rndis_hash_info*hash_info; const struct rndis_hash_value *hash_value; Modified: head/sys/dev/hyperv/netvsc/ndis.h == --- head/sys/dev/hyperv/netvsc/ndis.h Thu Sep 1 06:35:13 2016 (r305178) +++ head/sys/dev/hyperv/netvsc/ndis.h Thu Sep 1 07:04:47 2016 (r305179) @@ -203,4 +203,20 @@ struct ndis_rssprm_toeplitz { uint32_trss_ind[NDIS_HASH_INDCNT]; }; +/* + * Per-packet-info + */ + +/* VLAN */ +#defineNDIS_VLAN_INFO_SIZE sizeof(uint32_t) +#defineNDIS_VLAN_INFO_PRI_MASK 0x0007 +#defineNDIS_VLAN_INFO_CFI_MASK 0x0008 +#defineNDIS_VLAN_INFO_ID_MASK 0xfff0 +#defineNDIS_VLAN_INFO_MAKE(id, pri, cfi) \ +(((pri) & NVIS_VLAN_INFO_PRI_MASK) | \ +(((cfi) & 0x1) << 3) | (((id) & 0xfff) << 4)) +#defineNDIS_VLAN_INFO_ID(inf) (((inf) & NDIS_VLAN_INFO_ID_MASK) >> 4) +#defineNDIS_VLAN_INFO_CFI(inf) (((inf) & NDIS_VLAN_INFO_CFI_MASK) >> 3) +#defineNDIS_VLAN_INFO_PRI(inf) ((inf) & NDIS_VLAN_INFO_PRI_MASK) + #endif /* !_NET_NDIS_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: r305184 - stable/10/sys/kern
Author: kib Date: Thu Sep 1 07:20:50 2016 New Revision: 305184 URL: https://svnweb.freebsd.org/changeset/base/305184 Log: MFC r304808: Prevent leak of URWLOCK_READ_WAITERS flag for urwlocks. PR: 211947 Modified: stable/10/sys/kern/kern_umtx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_umtx.c == --- stable/10/sys/kern/kern_umtx.c Thu Sep 1 07:19:04 2016 (r305183) +++ stable/10/sys/kern/kern_umtx.c Thu Sep 1 07:20:50 2016 (r305184) @@ -2965,9 +2965,12 @@ sleep: suword32(>rw_blocked_readers, blocked_readers-1); if (blocked_readers == 1) { rv = fueword32(>rw_state, ); - if (rv == -1) + if (rv == -1) { + umtxq_unbusy_unlocked(>uq_key); error = EFAULT; - while (error == 0) { + break; + } + for (;;) { rv = casueword32(>rw_state, state, , state & ~URWLOCK_READ_WAITERS); if (rv == -1) { @@ -2978,6 +2981,8 @@ sleep: break; state = oldstate; error = umtxq_check_susp(td); + if (error != 0) + 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: r305180 - stable/11/sys/kern
Author: kib Date: Thu Sep 1 07:08:01 2016 New Revision: 305180 URL: https://svnweb.freebsd.org/changeset/base/305180 Log: MFC r304808: Prevent leak of URWLOCK_READ_WAITERS flag for urwlocks. PR: 211947 Modified: stable/11/sys/kern/kern_umtx.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_umtx.c == --- stable/11/sys/kern/kern_umtx.c Thu Sep 1 07:04:47 2016 (r305179) +++ stable/11/sys/kern/kern_umtx.c Thu Sep 1 07:08:01 2016 (r305180) @@ -2743,9 +2743,12 @@ sleep: suword32(>rw_blocked_readers, blocked_readers-1); if (blocked_readers == 1) { rv = fueword32(>rw_state, ); - if (rv == -1) + if (rv == -1) { + umtxq_unbusy_unlocked(>uq_key); error = EFAULT; - while (error == 0) { + break; + } + for (;;) { rv = casueword32(>rw_state, state, , state & ~URWLOCK_READ_WAITERS); if (rv == -1) { @@ -2756,6 +2759,8 @@ sleep: break; state = oldstate; error = umtxq_check_susp(td); + if (error != 0) + 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: r305177 - head/sys/net
Author: sephe Date: Thu Sep 1 06:32:35 2016 New Revision: 305177 URL: https://svnweb.freebsd.org/changeset/base/305177 Log: net/vlan: Shift for pri is 13 (pri mask 0xe000) not 1. Reviewed by: araujo, hps MFC after:1 week Sponsored by: Microsoft Differential Revision:https://reviews.freebsd.org/D7710 Modified: head/sys/net/ethernet.h Modified: head/sys/net/ethernet.h == --- head/sys/net/ethernet.h Thu Sep 1 06:05:08 2016(r305176) +++ head/sys/net/ethernet.h Thu Sep 1 06:32:35 2016(r305177) @@ -92,7 +92,7 @@ struct ether_vlan_header { #defineEVL_PRIOFTAG(tag) (((tag) >> 13) & 7) #defineEVL_CFIOFTAG(tag) (((tag) >> 12) & 1) #defineEVL_MAKETAG(vlid, pri, cfi) \ - ((pri) & 7) << 1) | ((cfi) & 1)) << 12) | ((vlid) & EVL_VLID_MASK)) + ((pri) & 7) << 13) | ((cfi) & 1)) << 12) | ((vlid) & EVL_VLID_MASK)) /* * NOTE: 0x-0x05DC (0..1500) are generally IEEE 802.3 length fields. ___ 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"