svn commit: r283139 - head
Author: bapt Date: Wed May 20 09:23:37 2015 New Revision: 283139 URL: https://svnweb.freebsd.org/changeset/base/283139 Log: Fix buildworld by adding libproc and librtld_db to the _prebuild_libs Those are needed to build libdtrace Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Wed May 20 06:23:01 2015(r283138) +++ head/Makefile.inc1 Wed May 20 09:23:37 2015(r283139) @@ -1691,6 +1691,8 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 lib/libopie lib/libpam ${_lib_libthr} \ ${_lib_libradius} lib/libsbuf lib/libtacplus \ lib/libgeom \ + lib/libproc \ + lib/librtld_db \ ${_cddl_lib_libumem} ${_cddl_lib_libnvpair} \ ${_cddl_lib_libuutil} \ ${_cddl_lib_libavl} \ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r283140 - head
Author: ngie Date: Wed May 20 09:36:25 2015 New Revision: 283140 URL: https://svnweb.freebsd.org/changeset/base/283140 Log: Only build sys/boot/usb/tools if MK_USB != no Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Wed May 20 09:23:37 2015(r283139) +++ head/Makefile.inc1 Wed May 20 09:36:25 2015(r283140) @@ -1502,6 +1502,9 @@ _clang_libs= lib/clang _cc= gnu/usr.bin/cc .endif .endif +.if ${MK_USB} != "no" +_usb_tools=sys/boot/usb/tools +.endif cross-tools: .MAKE .for _tool in \ @@ -1512,7 +1515,7 @@ cross-tools: .MAKE ${_cc} \ ${_btxld} \ ${_crunchide} \ -sys/boot/usb/tools +${_usb_tools} ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_tool} && \ ${MAKE} DIRPRFX=${_tool}/ obj && \ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r283141 - head/usr.sbin/uefisign
Author: trasz Date: Wed May 20 09:40:34 2015 New Revision: 283141 URL: https://svnweb.freebsd.org/changeset/base/283141 Log: Remove the warning about invalid PE checksum; apparently nothing cares about those checksums anyway. MFC after:1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/uefisign/pe.c Modified: head/usr.sbin/uefisign/pe.c == --- head/usr.sbin/uefisign/pe.c Wed May 20 09:36:25 2015(r283140) +++ head/usr.sbin/uefisign/pe.c Wed May 20 09:40:34 2015(r283141) @@ -346,7 +346,9 @@ static void parse_optional_32_plus(struct executable *x, off_t off, int number_of_sections) { +#if 0 uint32_t computed_checksum; +#endif const struct pe_optional_header_32_plus *po; range_check(x, off, sizeof(*po), "PE Optional Header"); @@ -373,13 +375,13 @@ parse_optional_32_plus(struct executable #if 0 printf("checksum 0x%x at offset %zd, len %zd\n", po->po_checksum, x->x_checksum_off, x->x_checksum_len); -#endif computed_checksum = compute_checksum(x); if (computed_checksum != po->po_checksum) { warnx("invalid PE+ checksum; is 0x%x, should be 0x%x", po->po_checksum, computed_checksum); } +#endif if (x->x_len < x->x_headers_len) errx(1, "invalid SizeOfHeaders %d", po->po_size_of_headers); @@ -393,7 +395,9 @@ parse_optional_32_plus(struct executable static void parse_optional_32(struct executable *x, off_t off, int number_of_sections) { +#if 0 uint32_t computed_checksum; +#endif const struct pe_optional_header_32 *po; range_check(x, off, sizeof(*po), "PE Optional Header"); @@ -420,13 +424,13 @@ parse_optional_32(struct executable *x, #if 0 printf("checksum at offset %zd, len %zd\n", x->x_checksum_off, x->x_checksum_len); -#endif computed_checksum = compute_checksum(x); if (computed_checksum != po->po_checksum) { warnx("invalid PE checksum; is 0x%x, should be 0x%x", po->po_checksum, computed_checksum); } +#endif if (x->x_len < x->x_headers_len) errx(1, "invalid SizeOfHeaders %d", po->po_size_of_headers); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r283142 - head/sys/net80211
Author: glebius Date: Wed May 20 09:42:33 2015 New Revision: 283142 URL: https://svnweb.freebsd.org/changeset/base/283142 Log: EVENTHANDLER_REGISTER() doesn't fail. Modified: head/sys/net80211/ieee80211_freebsd.c Modified: head/sys/net80211/ieee80211_freebsd.c == --- head/sys/net80211/ieee80211_freebsd.c Wed May 20 09:40:34 2015 (r283141) +++ head/sys/net80211/ieee80211_freebsd.c Wed May 20 09:42:33 2015 (r283142) @@ -873,14 +873,8 @@ wlan_modevent(module_t mod, int type, vo printf("wlan: <802.11 Link Layer>\n"); wlan_bpfevent = EVENTHANDLER_REGISTER(bpf_track, bpf_track, 0, EVENTHANDLER_PRI_ANY); - if (wlan_bpfevent == NULL) - return ENOMEM; wlan_ifllevent = EVENTHANDLER_REGISTER(iflladdr_event, wlan_iflladdr, NULL, EVENTHANDLER_PRI_ANY); - if (wlan_ifllevent == NULL) { - EVENTHANDLER_DEREGISTER(bpf_track, wlan_bpfevent); - return ENOMEM; - } #if __FreeBSD_version >= 120 wlan_cloner = if_clone_simple(wlanname, wlan_clone_create, wlan_clone_destroy, 0); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r283139 - head
> On 20 May 2015, at 09:23 , Baptiste Daroussin wrote: > > Author: bapt > Date: Wed May 20 09:23:37 2015 > New Revision: 283139 > URL: https://svnweb.freebsd.org/changeset/base/283139 > > Log: > Fix buildworld by adding libproc and librtld_db to the _prebuild_libs > Those are needed to build libdtrace Still seeing build failures for sparc64 and arm64 even after this. Could you please check? — Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend." ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r283143 - head/tools/build/mk
Author: ngie Date: Wed May 20 10:56:09 2015 New Revision: 283143 URL: https://svnweb.freebsd.org/changeset/base/283143 Log: Remove usr/share/dtrace/{tcpconn,tcpstate,tcptrack,udptrack} if MK_CDDL == no Sponsored by: EMC / Isilon Storage Division Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc == --- head/tools/build/mk/OptionalObsoleteFiles.inc Wed May 20 09:42:33 2015(r283142) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Wed May 20 10:56:09 2015(r283143) @@ -781,6 +781,10 @@ OLD_FILES+=usr/share/dtrace/toolkit/hotk OLD_FILES+=usr/share/dtrace/toolkit/hotuser OLD_FILES+=usr/share/dtrace/toolkit/opensnoop OLD_FILES+=usr/share/dtrace/toolkit/procsystime +OLD_FILES+=usr/share/dtrace/tcpconn +OLD_FILES+=usr/share/dtrace/tcpstate +OLD_FILES+=usr/share/dtrace/tcptrack +OLD_FILES+=usr/share/dtrace/udptrack OLD_FILES+=usr/share/man/man1/dtrace.1.gz OLD_DIRS+=usr/lib/dtrace OLD_DIRS+=usr/lib32/dtrace ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r283144 - head/cddl/lib
Author: ngie Date: Wed May 20 11:03:53 2015 New Revision: 283144 URL: https://svnweb.freebsd.org/changeset/base/283144 Log: Articulate dependencies for cddl/lib/libdtrace and cddl/lib/libzfs Parallelize the build in this subdirectory MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/cddl/lib/Makefile Modified: head/cddl/lib/Makefile == --- head/cddl/lib/Makefile Wed May 20 10:56:09 2015(r283143) +++ head/cddl/lib/Makefile Wed May 20 11:03:53 2015(r283144) @@ -33,4 +33,9 @@ _drti=drti _libdtrace=libdtrace .endif +SUBDIR_DEPEND_libdtrace= libctf +SUBDIR_DEPEND_libzfs= libavl libnvpair libumem libuutil libzfs_core + +SUBDIR_PARALLEL= + .include ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r283145 - head/cddl/lib
Author: ngie Date: Wed May 20 11:16:17 2015 New Revision: 283145 URL: https://svnweb.freebsd.org/changeset/base/283145 Log: Add dependencies for libzfs_core and libzpool I missed on my first pass on this Makefile MFC with: r283144 Sponsored by: EMC / Isilon Storage Division Modified: head/cddl/lib/Makefile Modified: head/cddl/lib/Makefile == --- head/cddl/lib/Makefile Wed May 20 11:03:53 2015(r283144) +++ head/cddl/lib/Makefile Wed May 20 11:16:17 2015(r283145) @@ -34,7 +34,9 @@ _libdtrace= libdtrace .endif SUBDIR_DEPEND_libdtrace= libctf +SUBDIR_DEPEND_libzfs_core= libnvpair SUBDIR_DEPEND_libzfs= libavl libnvpair libumem libuutil libzfs_core +SUBDIR_DEPEND_libzpool=libavl libnvpair libumem SUBDIR_PARALLEL= ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r283139 - head
On May 20, 2015, at 3:06, Bjoern A. Zeeb wrote: >> On 20 May 2015, at 09:23 , Baptiste Daroussin wrote: >> >> Author: bapt >> Date: Wed May 20 09:23:37 2015 >> New Revision: 283139 >> URL: https://svnweb.freebsd.org/changeset/base/283139 >> >> Log: >> Fix buildworld by adding libproc and librtld_db to the _prebuild_libs >> Those are needed to build libdtrace > > Still seeing build failures for sparc64 and arm64 even after this. > Could you please check? There are a few bugs. 1. arm64/sparc64 don’t have libproc/librtld_db support at all, so the library spamming in LIBADD and Makefile.inc1 is wrong in those cases. 2. There are a lot of missing dependencies in Makefile.inc for the libproc/librtld_db addition. I’m testing out fixes for both these issues. Thanks, -NGie signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r283146 - head/sys/netipsec
Author: ae Date: Wed May 20 11:59:53 2015 New Revision: 283146 URL: https://svnweb.freebsd.org/changeset/base/283146 Log: In the reply to SADB_X_SPDGET message use the same sequence number that was in the request. Some IKE deamons expect it will the same. Linux and NetBSD also follow this behaviour. PR: 137309 MFC after:2 weeks Modified: head/sys/netipsec/key.c Modified: head/sys/netipsec/key.c == --- head/sys/netipsec/key.c Wed May 20 11:16:17 2015(r283145) +++ head/sys/netipsec/key.c Wed May 20 11:59:53 2015(r283146) @@ -2199,7 +2199,7 @@ key_spddelete2(struct socket *so, struct } /* - * SADB_X_GET processing + * SADB_X_SPDGET processing * receive * * from the user(?), @@ -2237,7 +2237,8 @@ key_spdget(struct socket *so, struct mbu return key_senderror(so, m, ENOENT); } - n = key_setdumpsp(sp, SADB_X_SPDGET, 0, mhp->msg->sadb_msg_pid); + n = key_setdumpsp(sp, SADB_X_SPDGET, mhp->msg->sadb_msg_seq, + mhp->msg->sadb_msg_pid); KEY_FREESP(&sp); if (n != NULL) { m_freem(m); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r283147 - in head/cddl: sbin usr.bin usr.sbin
Author: ngie Date: Wed May 20 12:26:09 2015 New Revision: 283147 URL: https://svnweb.freebsd.org/changeset/base/283147 Log: Build cddl/{sbin,usr.bin,usr.sbin} in parallel as all of the applications are freestanding (they require libraries build via make libraries in buildworld) MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/cddl/sbin/Makefile head/cddl/usr.bin/Makefile head/cddl/usr.sbin/Makefile Modified: head/cddl/sbin/Makefile == --- head/cddl/sbin/Makefile Wed May 20 11:59:53 2015(r283146) +++ head/cddl/sbin/Makefile Wed May 20 12:26:09 2015(r283147) @@ -13,4 +13,6 @@ _zfs= zfs _zpool=zpool .endif +SUBDIR_PARALLEL= + .include Modified: head/cddl/usr.bin/Makefile == --- head/cddl/usr.bin/Makefile Wed May 20 11:59:53 2015(r283146) +++ head/cddl/usr.bin/Makefile Wed May 20 12:26:09 2015(r283147) @@ -26,4 +26,6 @@ _zstreamdump = zstreamdump .endif .endif +SUBDIR_PARALLEL= + .include Modified: head/cddl/usr.sbin/Makefile == --- head/cddl/usr.sbin/Makefile Wed May 20 11:59:53 2015(r283146) +++ head/cddl/usr.sbin/Makefile Wed May 20 12:26:09 2015(r283147) @@ -46,4 +46,6 @@ _dtruss= dtruss _lockstat= lockstat .endif +SUBDIR_PARALLEL= + .include ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r283148 - head
Author: ngie Date: Wed May 20 12:46:30 2015 New Revision: 283148 URL: https://svnweb.freebsd.org/changeset/base/283148 Log: Articulate all dependencies for lib/libproc to squash build races after r283139 on !arm64 and !sparc64 Pointyhat to: bapt Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Wed May 20 12:26:09 2015(r283147) +++ head/Makefile.inc1 Wed May 20 12:46:30 2015(r283148) @@ -1746,6 +1746,8 @@ _generic_libs+= ${_DIR} lib/libopie__L lib/libtacplus__L: lib/libmd__L +lib/libproc__L: lib/libelf__L lib/librtld_db__L lib/libutil__L + .if ${MK_CDDL} != "no" _cddl_lib_libumem= cddl/lib/libumem _cddl_lib_libnvpair= cddl/lib/libnvpair ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r283149 - head/sys/modules
Author: emaste Date: Wed May 20 12:54:22 2015 New Revision: 283149 URL: https://svnweb.freebsd.org/changeset/base/283149 Log: Avoid trying to build cxbge on 32-bit MIPS It lacks required 64-bit atomics. Reviewed by: imp (earlier version) Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D2585 Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile == --- head/sys/modules/Makefile Wed May 20 12:46:30 2015(r283148) +++ head/sys/modules/Makefile Wed May 20 12:54:22 2015(r283149) @@ -456,6 +456,7 @@ _txp= txp .endif .if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \ + ${MACHINE_ARCH:C/mips(el)?/mips/} != "mips" && \ ${MACHINE_ARCH} != "powerpc" _cxgbe=cxgbe .endif ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r283150 - head
Author: ngie Date: Wed May 20 12:56:40 2015 New Revision: 283150 URL: https://svnweb.freebsd.org/changeset/base/283150 Log: Add _more_ missing dependencies for lib/libproc to further squash build races Verified via `cd lib/libproc; make -VLIBADD` Pointyhat to: ngie Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Wed May 20 12:54:22 2015(r283149) +++ head/Makefile.inc1 Wed May 20 12:56:40 2015(r283150) @@ -1746,7 +1746,15 @@ _generic_libs+= ${_DIR} lib/libopie__L lib/libtacplus__L: lib/libmd__L -lib/libproc__L: lib/libelf__L lib/librtld_db__L lib/libutil__L +lib/libproc__L: \ +cddl/lib/libctf__L lib/libelf__L lib/librtld_db__L lib/libutil__L +.if ${MK_CXX} != "no" +.if ${MK_LIBCPLUSPLUS} != "no" +lib/libproc__L: lib/libc++ +.else +lib/libproc__L: gnu/lib/libsupc++__L +.endif +.endif .if ${MK_CDDL} != "no" _cddl_lib_libumem= cddl/lib/libumem ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r283151 - head
Author: ngie Date: Wed May 20 13:04:00 2015 New Revision: 283151 URL: https://svnweb.freebsd.org/changeset/base/283151 Log: cddl/lib/libctf isn't always a requirement for lib/libproc; its use is dependent on MK_CTF != "no". Use the other divined value instead of reinventing the wheel Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Wed May 20 12:56:40 2015(r283150) +++ head/Makefile.inc1 Wed May 20 13:04:00 2015(r283151) @@ -1747,7 +1747,7 @@ _generic_libs+= ${_DIR} lib/libopie__L lib/libtacplus__L: lib/libmd__L lib/libproc__L: \ -cddl/lib/libctf__L lib/libelf__L lib/librtld_db__L lib/libutil__L +${_cddl_lib_libctf} lib/libelf__L lib/librtld_db__L lib/libutil__L .if ${MK_CXX} != "no" .if ${MK_LIBCPLUSPLUS} != "no" lib/libproc__L: lib/libc++ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r283152 - head
Author: ngie Date: Wed May 20 13:05:33 2015 New Revision: 283152 URL: https://svnweb.freebsd.org/changeset/base/283152 Log: Unbreak the arm64/sparc64 tinderbox by only compiling lib/libproc and lib/librtld_db on architectures where they're supported Reported by: bz, Jenkins Pointyhat to: bapt Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Wed May 20 13:04:00 2015(r283151) +++ head/Makefile.inc1 Wed May 20 13:05:33 2015(r283152) @@ -1694,8 +1694,6 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 lib/libopie lib/libpam ${_lib_libthr} \ ${_lib_libradius} lib/libsbuf lib/libtacplus \ lib/libgeom \ - lib/libproc \ - lib/librtld_db \ ${_cddl_lib_libumem} ${_cddl_lib_libnvpair} \ ${_cddl_lib_libuutil} \ ${_cddl_lib_libavl} \ @@ -1767,6 +1765,13 @@ _cddl_lib= cddl/lib cddl/lib/libzfs_core__L: cddl/lib/libnvpair__L cddl/lib/libzfs__L: lib/libgeom__L cddl/lib/libctf__L: lib/libz__L +# cddl/lib/libdtrace requires lib/libproc and lib/librtld_db; it's only built +# on select architectures though (see cddl/lib/Makefile) +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || \ + ${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "powerpc" || \ + ${MACHINE_CPUARCH} == "arm" +_prebuild_libs+= lib/libproc lib/librtld_db +.endif .endif .if ${MK_CRYPT} != "no" ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r283136 - head/sys/netinet
On 05/20/2015 02:33, Lawrence Stewart wrote: > On 05/20/15 14:24, Hiren Panchasara wrote: >> On 05/20/15 at 02:13P, Lawrence Stewart wrote: >>> Hi Hiren, >>> >>> On 05/20/15 11:08, Hiren Panchasara wrote: Author: hiren Date: Wed May 20 01:08:01 2015 New Revision: 283136 URL: https://svnweb.freebsd.org/changeset/base/283136 Log: Add a new sysctl net.inet.tcp.hostcache.purgenow=1 to expire and purge all entries in hostcache immediately. In collaboration with: bz, rwatson MFC after: 1 week Relnotes: yes Sponsored by: Limelight Networks >>> >>> Why introduce a new sysctl and not change the existing behaviour >>> of net.inet.tcp.hostcache.purge? >> >> I thought it'd make more sense to keep the existing behavior as is >> and provide new knob for the new behavior. > > Don't think so - why would deferring a purge to the next purge run be > useful compared to purging immediately? I'd strongly suggest you adapt > this change to the existing purge sysctl. I can't see why anyone would > miss the old functionality. I am generally wary of a question such as "Why would anyone want...", because as soon as the code is released, someone answers it. That being said, I have always wanted Hiren's purgenow behavior, and I've always been annoyed by the lazy-purge behavior. I would suggest implementing Lawrence's suggestion, but NOT MFC'ing it, since that would be a disruptive change. Thanks for your work, Hiren. Eric ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r283153 - head/lib/libc/gen
Author: kib Date: Wed May 20 15:37:15 2015 New Revision: 283153 URL: https://svnweb.freebsd.org/changeset/base/283153 Log: Remove the write-only variable phent. We currently do not check the size of the program header's entries. Reported by: adrian (by using gcc 4.9) Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/lib/libc/gen/dlfcn.c Modified: head/lib/libc/gen/dlfcn.c == --- head/lib/libc/gen/dlfcn.c Wed May 20 13:05:33 2015(r283152) +++ head/lib/libc/gen/dlfcn.c Wed May 20 15:37:15 2015(r283153) @@ -149,10 +149,8 @@ static void dl_init_phdr_info(void) { Elf_Auxinfo *auxp; - size_t phent; unsigned int i; - phent = 0; for (auxp = __elf_aux_vector; auxp->a_type != AT_NULL; auxp++) { switch (auxp->a_type) { case AT_BASE: @@ -165,9 +163,6 @@ dl_init_phdr_info(void) phdr_info.dlpi_phdr = (const Elf_Phdr *)auxp->a_un.a_ptr; break; - case AT_PHENT: - phent = auxp->a_un.a_val; - break; case AT_PHNUM: phdr_info.dlpi_phnum = (Elf_Half)auxp->a_un.a_val; break; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r282971 - in head/sys: kern sys
On Fri, 15 May 2015 13:50:38 + (UTC) John Baldwin wrote: > Author: jhb > Date: Fri May 15 13:50:37 2015 > New Revision: 282971 > URL: https://svnweb.freebsd.org/changeset/base/282971 > > Log: > Previously, cv_waiters was only updated by cv_signal or cv_wait. If > a thread awakened due to a time out, then cv_waiters was not > decremented. If INT_MAX threads timed out on a cv without an > intervening cv_broadcast, then cv_waiters could overflow. To fix > this, have each sleeping thread decrement cv_waiters when it resumes. > > Note that previously cv_waiters was protected by the sleepq chain > lock. However, that lock is not held when threads resume from sleep. > In addition, the interlock is also not always reacquired after > resuming (cv_wait_unlock), nor is it always held by callers of > cv_signal() or cv_broadcast(). Instead, use atomic ops to update > cv_waiters. Since the sleepq chain lock is still held on every > increment, it should still be safe to compare cv_waiters against zero > while holding the lock in the wakeup routines as the only way the > race should be lost would result in extra calls to sleepq_signal() or > sleepq_broadcast(). > Differential Revision: https://reviews.freebsd.org/D2427 > Reviewed by:benno > Reported by:benno (wrap of cv_waiters in the field) > MFC after: 2 weeks > > Modified: > head/sys/kern/kern_condvar.c > head/sys/sys/condvar.h > This breaks ZFS range locking code, which expects to be able to wakeup everyone on the condition variable and then free the structure that contains it. Having woken up threads modify cv_waiters results in a race that leads to already freed memory to be accessed. It is debatable just how correct ZFS code in its expectations, but I think this commit should probably be reverted until either ZFS is changed not to expect cv modifiable by waking threads or until alternative solution is found to the cv_waiters overflow issue fixed by this commit. -- Alexander Kabaev pgpESgZs_K4y1.pgp Description: OpenPGP digital signature
Re: svn commit: r282971 - in head/sys: kern sys
On Wed, May 20, 2015 at 9:00 AM, Alexander Kabaev wrote: > On Fri, 15 May 2015 13:50:38 + (UTC) > John Baldwin wrote: > > > Author: jhb > > Date: Fri May 15 13:50:37 2015 > > New Revision: 282971 > > URL: https://svnweb.freebsd.org/changeset/base/282971 > > > > Log: > > Previously, cv_waiters was only updated by cv_signal or cv_wait. If > > a thread awakened due to a time out, then cv_waiters was not > > decremented. If INT_MAX threads timed out on a cv without an > > intervening cv_broadcast, then cv_waiters could overflow. To fix > > this, have each sleeping thread decrement cv_waiters when it resumes. > > > > Note that previously cv_waiters was protected by the sleepq chain > > lock. However, that lock is not held when threads resume from sleep. > > In addition, the interlock is also not always reacquired after > > resuming (cv_wait_unlock), nor is it always held by callers of > > cv_signal() or cv_broadcast(). Instead, use atomic ops to update > > cv_waiters. Since the sleepq chain lock is still held on every > > increment, it should still be safe to compare cv_waiters against zero > > while holding the lock in the wakeup routines as the only way the > > race should be lost would result in extra calls to sleepq_signal() or > > sleepq_broadcast(). > > Differential Revision: https://reviews.freebsd.org/D2427 > > Reviewed by:benno > > Reported by:benno (wrap of cv_waiters in the field) > > MFC after: 2 weeks > > > > Modified: > > head/sys/kern/kern_condvar.c > > head/sys/sys/condvar.h > > > > This breaks ZFS range locking code, which expects to be able to wakeup > everyone on the condition variable and then free the structure that > contains it. Having woken up threads modify cv_waiters results in a > race that leads to already freed memory to be accessed. > > It is debatable just how correct ZFS code in its expectations, but I > think this commit should probably be reverted until either ZFS is > changed not to expect cv modifiable by waking threads or until > alternative solution is found to the cv_waiters overflow issue fixed by > this commit. > > It isn't clear to me how the zfs_range_unlock() code could know when all the waiters have woken up and updated the CV, and thus it's safe to destroy/free the CV. Would the woken threads ask, "was I the last thread to be woken by this CV" and if so free the struct containing the CV? Obviously such a check would need to ensure that the other threads have completed their updates to the CV. --matt ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r283151 - head
On 20/05/2015 16:04, Garrett Cooper wrote: > Author: ngie > Date: Wed May 20 13:04:00 2015 > New Revision: 283151 > URL: https://svnweb.freebsd.org/changeset/base/283151 > > Log: > cddl/lib/libctf isn't always a requirement for lib/libproc; its use is > dependent > on MK_CTF != "no". Use the other divined value instead of reinventing the > wheel > > Modified: > head/Makefile.inc1 > > Modified: head/Makefile.inc1 > == > --- head/Makefile.inc1Wed May 20 12:56:40 2015(r283150) > +++ head/Makefile.inc1Wed May 20 13:04:00 2015(r283151) > @@ -1747,7 +1747,7 @@ _generic_libs+= ${_DIR} > lib/libopie__L lib/libtacplus__L: lib/libmd__L > > lib/libproc__L: \ > -cddl/lib/libctf__L lib/libelf__L lib/librtld_db__L lib/libutil__L > +${_cddl_lib_libctf} lib/libelf__L lib/librtld_db__L lib/libutil__L > .if ${MK_CXX} != "no" > .if ${MK_LIBCPLUSPLUS} != "no" > lib/libproc__L: lib/libc++ > I've just experienced a buildworld failure in lib/libproc. The build complained about missing -lctf. At this moment I am not sure if that was a parallel build issue or something caused by this commit. -- Andriy Gapon ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r283151 - head
On Wed, 2015-05-20 at 20:01 +0300, Andriy Gapon wrote: > On 20/05/2015 16:04, Garrett Cooper wrote: > > Author: ngie > > Date: Wed May 20 13:04:00 2015 > > New Revision: 283151 > > URL: https://svnweb.freebsd.org/changeset/base/283151 > > > > Log: > > cddl/lib/libctf isn't always a requirement for lib/libproc; its use is > > dependent > > on MK_CTF != "no". Use the other divined value instead of reinventing the > > wheel > > > > Modified: > > head/Makefile.inc1 > > > > Modified: head/Makefile.inc1 > > == > > --- head/Makefile.inc1 Wed May 20 12:56:40 2015(r283150) > > +++ head/Makefile.inc1 Wed May 20 13:04:00 2015(r283151) > > @@ -1747,7 +1747,7 @@ _generic_libs+= ${_DIR} > > lib/libopie__L lib/libtacplus__L: lib/libmd__L > > > > lib/libproc__L: \ > > -cddl/lib/libctf__L lib/libelf__L lib/librtld_db__L lib/libutil__L > > +${_cddl_lib_libctf} lib/libelf__L lib/librtld_db__L lib/libutil__L > > .if ${MK_CXX} != "no" > > .if ${MK_LIBCPLUSPLUS} != "no" > > lib/libproc__L: lib/libc++ > > > > I've just experienced a buildworld failure in lib/libproc. The build > complained > about missing -lctf. At this moment I am not sure if that was a parallel > build > issue or something caused by this commit. > Single-job builds work fine. Parallelized builds (-j16 for me) fail. Lots of buildworld errors are hitting the current@ mailing list. Thanks, Shawn signature.asc Description: This is a digitally signed message part
Re: svn commit: r283151 - head
On 20/05/2015 20:01, Andriy Gapon wrote: > On 20/05/2015 16:04, Garrett Cooper wrote: >> Author: ngie >> Date: Wed May 20 13:04:00 2015 >> New Revision: 283151 >> URL: https://svnweb.freebsd.org/changeset/base/283151 >> >> Log: >> cddl/lib/libctf isn't always a requirement for lib/libproc; its use is >> dependent >> on MK_CTF != "no". Use the other divined value instead of reinventing the >> wheel >> >> Modified: >> head/Makefile.inc1 >> >> Modified: head/Makefile.inc1 >> == >> --- head/Makefile.inc1 Wed May 20 12:56:40 2015(r283150) >> +++ head/Makefile.inc1 Wed May 20 13:04:00 2015(r283151) >> @@ -1747,7 +1747,7 @@ _generic_libs+= ${_DIR} >> lib/libopie__L lib/libtacplus__L: lib/libmd__L >> >> lib/libproc__L: \ >> -cddl/lib/libctf__L lib/libelf__L lib/librtld_db__L lib/libutil__L >> +${_cddl_lib_libctf} lib/libelf__L lib/librtld_db__L lib/libutil__L Should the above perhaps be ${_cddl_lib_libctf}__L? But such that it is empty if _cddl_lib_libctf is unset. Not sure how to express that with the make syntax. In shell it'd be ${_cddl_lib_libctf:+${_cddl_lib_libctf}__L}. >> .if ${MK_CXX} != "no" >> .if ${MK_LIBCPLUSPLUS} != "no" >> lib/libproc__L: lib/libc++ >> > > I've just experienced a buildworld failure in lib/libproc. The build > complained > about missing -lctf. At this moment I am not sure if that was a parallel > build > issue or something caused by this commit. > -- Andriy Gapon ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r283136 - head/sys/netinet
On 05/20/15 23:19, Eric van Gyzen wrote: > On 05/20/2015 02:33, Lawrence Stewart wrote: >> On 05/20/15 14:24, Hiren Panchasara wrote: >>> On 05/20/15 at 02:13P, Lawrence Stewart wrote: Hi Hiren, On 05/20/15 11:08, Hiren Panchasara wrote: > Author: hiren Date: Wed May 20 01:08:01 2015 New Revision: > 283136 URL: https://svnweb.freebsd.org/changeset/base/283136 > > Log: Add a new sysctl net.inet.tcp.hostcache.purgenow=1 to > expire and purge all entries in hostcache immediately. > > In collaboration with:bz, rwatson MFC after: 1 week Relnotes: > yes Sponsored by: Limelight Networks Why introduce a new sysctl and not change the existing behaviour of net.inet.tcp.hostcache.purge? >>> >>> I thought it'd make more sense to keep the existing behavior as is >>> and provide new knob for the new behavior. >> >> Don't think so - why would deferring a purge to the next purge run be >> useful compared to purging immediately? I'd strongly suggest you adapt >> this change to the existing purge sysctl. I can't see why anyone would >> miss the old functionality. > > I am generally wary of a question such as "Why would anyone want...", because > as soon as the code is released, someone answers it. > > That being said, I have always wanted Hiren's purgenow behavior, and I've > always been annoyed by the lazy-purge behavior. I would suggest implementing > Lawrence's suggestion, but NOT MFC'ing it, since that would be a disruptive > change. > > Thanks for your work, Hiren. I see no reason not to MFC it - it's not a POLA violation for a stable branch. When the user requests a purge, it's surely equally as good (and I think anyone of right mind would argue better ;) to purge immediately than some number of seconds "n" in the future, where "n" is between 1 and the value of net.inet.tcp.hostcache.prune. Cheers, Lawrence ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r283152 - head
On Wed, May 20, 2015 at 01:05:34PM +, Garrett Cooper wrote: > Author: ngie > Date: Wed May 20 13:05:33 2015 > New Revision: 283152 > URL: https://svnweb.freebsd.org/changeset/base/283152 > > Log: > Unbreak the arm64/sparc64 tinderbox by only compiling lib/libproc and > lib/librtld_db on architectures where they're supported > > Reported by: bz, Jenkins > Pointyhat to: bapt > > Modified: > head/Makefile.inc1 > > Modified: head/Makefile.inc1 > == > --- head/Makefile.inc1Wed May 20 13:04:00 2015(r283151) > +++ head/Makefile.inc1Wed May 20 13:05:33 2015(r283152) > @@ -1694,8 +1694,6 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 > lib/libopie lib/libpam ${_lib_libthr} \ > ${_lib_libradius} lib/libsbuf lib/libtacplus \ > lib/libgeom \ > - lib/libproc \ > - lib/librtld_db \ > ${_cddl_lib_libumem} ${_cddl_lib_libnvpair} \ > ${_cddl_lib_libuutil} \ > ${_cddl_lib_libavl} \ > @@ -1767,6 +1765,13 @@ _cddl_lib= cddl/lib > cddl/lib/libzfs_core__L: cddl/lib/libnvpair__L > cddl/lib/libzfs__L: lib/libgeom__L > cddl/lib/libctf__L: lib/libz__L > +# cddl/lib/libdtrace requires lib/libproc and lib/librtld_db; it's only built > +# on select architectures though (see cddl/lib/Makefile) > +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || \ > + ${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "powerpc" || \ > + ${MACHINE_CPUARCH} == "arm" > +_prebuild_libs+= lib/libproc lib/librtld_db > +.endif > .endif Thanks I was about to commit this one just waiting for make universe to finish. Best regards, Bapt pgpkA0Sirl8SY.pgp Description: PGP signature
Re: svn commit: r282971 - in head/sys: kern sys
On Wed, 20 May 2015 09:54:45 -0700 Matthew Ahrens wrote: > On Wed, May 20, 2015 at 9:00 AM, Alexander Kabaev > wrote: > > > On Fri, 15 May 2015 13:50:38 + (UTC) > > John Baldwin wrote: > > > > > Author: jhb > > > Date: Fri May 15 13:50:37 2015 > > > New Revision: 282971 > > > URL: https://svnweb.freebsd.org/changeset/base/282971 > > > > > > Log: > > > Previously, cv_waiters was only updated by cv_signal or > > > cv_wait. If a thread awakened due to a time out, then cv_waiters > > > was not decremented. If INT_MAX threads timed out on a cv without > > > an intervening cv_broadcast, then cv_waiters could overflow. To > > > fix this, have each sleeping thread decrement cv_waiters when it > > > resumes. > > > > > > Note that previously cv_waiters was protected by the sleepq > > > chain lock. However, that lock is not held when threads resume > > > from sleep. In addition, the interlock is also not always > > > reacquired after resuming (cv_wait_unlock), nor is it always held > > > by callers of cv_signal() or cv_broadcast(). Instead, use atomic > > > ops to update cv_waiters. Since the sleepq chain lock is still > > > held on every increment, it should still be safe to compare > > > cv_waiters against zero while holding the lock in the wakeup > > > routines as the only way the race should be lost would result in > > > extra calls to sleepq_signal() or sleepq_broadcast(). > > > Differential Revision: https://reviews.freebsd.org/D2427 > > > Reviewed by:benno > > > Reported by:benno (wrap of cv_waiters in the field) > > > MFC after: 2 weeks > > > > > > Modified: > > > head/sys/kern/kern_condvar.c > > > head/sys/sys/condvar.h > > > > > > > This breaks ZFS range locking code, which expects to be able to > > wakeup everyone on the condition variable and then free the > > structure that contains it. Having woken up threads modify > > cv_waiters results in a race that leads to already freed memory to > > be accessed. > > > > It is debatable just how correct ZFS code in its expectations, but I > > think this commit should probably be reverted until either ZFS is > > changed not to expect cv modifiable by waking threads or until > > alternative solution is found to the cv_waiters overflow issue > > fixed by this commit. > > > > > It isn't clear to me how the zfs_range_unlock() code could know when > all the waiters have woken up and updated the CV, and thus it's safe > to destroy/free the CV. Would the woken threads ask, "was I the last > thread to be woken by this CV" and if so free the struct containing > the CV? Obviously such a check would need to ensure that the other > threads have completed their updates to the CV. > > --matt Assuming other threads _need_ to update cv after they have been woken up. Clearly Solaris implementation managed to do without and our code changed that breaking range locks implementation we took directly from OpenSolaris (or illumos). What was previously possible now isn't. As I wrote before, while merits of this expectations are debatable and it is not hard to see where Solaris way is advantageous, that is really besides the point. Are you arguing that we should leave kernel in known broken state until 'proper' fix makes its way through possible upstream detour? Also, we have large code base taken from Solaris and chances are this is not the only place that might be affected. I think we are better off with this commit temporarily reverted until necessary repairs and auditing are complete for it to be safely re-enabled. -- Alexander Kabaev pgptnVvwqZbvl.pgp Description: OpenPGP digital signature
svn commit: r283155 - head/sys/sys
Author: oshogbo Date: Wed May 20 17:42:40 2015 New Revision: 283155 URL: https://svnweb.freebsd.org/changeset/base/283155 Log: Correct variable name in the interface. Approved by: pjd (mentor) Modified: head/sys/sys/nvpair_impl.h Modified: head/sys/sys/nvpair_impl.h == --- head/sys/sys/nvpair_impl.h Wed May 20 17:02:30 2015(r283154) +++ head/sys/sys/nvpair_impl.h Wed May 20 17:42:40 2015(r283155) @@ -85,7 +85,7 @@ const unsigned char *nvpair_unpack_numbe const unsigned char *nvpair_unpack_string(bool isbe, nvpair_t *nvp, const unsigned char *ptr, size_t *leftp); const unsigned char *nvpair_unpack_nvlist(bool isbe, nvpair_t *nvp, -const unsigned char *ptr, size_t *leftp, size_t nvlist, nvlist_t **child); +const unsigned char *ptr, size_t *leftp, size_t nfds, nvlist_t **child); const unsigned char *nvpair_unpack_descriptor(bool isbe, nvpair_t *nvp, const unsigned char *ptr, size_t *leftp, const int *fds, size_t nfds); const unsigned char *nvpair_unpack_binary(bool isbe, nvpair_t *nvp, ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r283151 - head
On Wed, May 20, 2015 at 10:24 AM, Andriy Gapon wrote: > >> > >> lib/libproc__L: \ > >> -cddl/lib/libctf__L lib/libelf__L lib/librtld_db__L lib/libutil__L > >> +${_cddl_lib_libctf} lib/libelf__L lib/librtld_db__L lib/libutil__L > > Should the above perhaps be ${_cddl_lib_libctf}__L? But such that it is > empty > if _cddl_lib_libctf is unset. Not sure how to express that with the make > syntax. In shell it'd be ${_cddl_lib_libctf:+${_cddl_lib_libctf}__L}. > > You can use: ${_cddl_lib_libctf:D${_cddl_lib_libctf}__L} If you look at the make(1) man page and look for the section "Variable modifiers", you can see the documentation for this. -- Craig ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r283156 - head/sys/kern
Author: oshogbo Date: Wed May 20 17:44:58 2015 New Revision: 283156 URL: https://svnweb.freebsd.org/changeset/base/283156 Log: Always use the nv_free function. Approved by: pjd (mentor) Modified: head/sys/kern/subr_nvlist.c Modified: head/sys/kern/subr_nvlist.c == --- head/sys/kern/subr_nvlist.c Wed May 20 17:42:40 2015(r283155) +++ head/sys/kern/subr_nvlist.c Wed May 20 17:44:58 2015(r283156) @@ -902,8 +902,8 @@ nvlist_send(int sock, const nvlist_t *nv ret = 0; out: ERRNO_SAVE(); - free(fds); - free(data); + nv_free(fds); + nv_free(data); ERRNO_RESTORE(); return (ret); } @@ -958,8 +958,8 @@ nvlist_recv(int sock, int flags) ret = nvl; out: ERRNO_SAVE(); - free(buf); - free(fds); + nv_free(buf); + nv_free(fds); ERRNO_RESTORE(); return (ret); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r283157 - head/sys/kern
Author: oshogbo Date: Wed May 20 17:47:01 2015 New Revision: 283157 URL: https://svnweb.freebsd.org/changeset/base/283157 Log: Style. Approved by: pjd (mentor) Modified: head/sys/kern/subr_nvpair.c Modified: head/sys/kern/subr_nvpair.c == --- head/sys/kern/subr_nvpair.c Wed May 20 17:44:58 2015(r283156) +++ head/sys/kern/subr_nvpair.c Wed May 20 17:47:01 2015(r283157) @@ -742,7 +742,7 @@ nvpair_allocv(const char *name, int type } return (nvp); -}; +} nvpair_t * nvpair_create_stringf(const char *name, const char *valuefmt, ...) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r283158 - head/sys/kern
Author: oshogbo Date: Wed May 20 17:48:22 2015 New Revision: 283158 URL: https://svnweb.freebsd.org/changeset/base/283158 Log: Fix memory leak. Approved by: pjd (mentor) Modified: head/sys/kern/subr_nvlist.c Modified: head/sys/kern/subr_nvlist.c == --- head/sys/kern/subr_nvlist.c Wed May 20 17:47:01 2015(r283157) +++ head/sys/kern/subr_nvlist.c Wed May 20 17:48:22 2015(r283158) @@ -838,6 +838,7 @@ nvlist_xunpack(const void *buf, size_t s if (nvl->nvl_parent == NULL) goto failed; nvl = nvpair_nvlist(nvl->nvl_parent); + nvpair_free_structure(nvp); continue; default: PJDLOG_ABORT("Invalid type (%d).", nvpair_type(nvp)); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r282971 - in head/sys: kern sys
On Wed, May 20, 2015 at 10:41 AM, Alexander Kabaev wrote: > On Wed, 20 May 2015 09:54:45 -0700 > Matthew Ahrens wrote: > > > On Wed, May 20, 2015 at 9:00 AM, Alexander Kabaev > > wrote: > > > > > On Fri, 15 May 2015 13:50:38 + (UTC) > > > John Baldwin wrote: > > > > > > > Author: jhb > > > > Date: Fri May 15 13:50:37 2015 > > > > New Revision: 282971 > > > > URL: https://svnweb.freebsd.org/changeset/base/282971 > > > > > > > > Log: > > > > Previously, cv_waiters was only updated by cv_signal or > > > > cv_wait. If a thread awakened due to a time out, then cv_waiters > > > > was not decremented. If INT_MAX threads timed out on a cv without > > > > an intervening cv_broadcast, then cv_waiters could overflow. To > > > > fix this, have each sleeping thread decrement cv_waiters when it > > > > resumes. > > > > > > > > Note that previously cv_waiters was protected by the sleepq > > > > chain lock. However, that lock is not held when threads resume > > > > from sleep. In addition, the interlock is also not always > > > > reacquired after resuming (cv_wait_unlock), nor is it always held > > > > by callers of cv_signal() or cv_broadcast(). Instead, use atomic > > > > ops to update cv_waiters. Since the sleepq chain lock is still > > > > held on every increment, it should still be safe to compare > > > > cv_waiters against zero while holding the lock in the wakeup > > > > routines as the only way the race should be lost would result in > > > > extra calls to sleepq_signal() or sleepq_broadcast(). > > > > Differential Revision: https://reviews.freebsd.org/D2427 > > > > Reviewed by:benno > > > > Reported by:benno (wrap of cv_waiters in the field) > > > > MFC after: 2 weeks > > > > > > > > Modified: > > > > head/sys/kern/kern_condvar.c > > > > head/sys/sys/condvar.h > > > > > > > > > > This breaks ZFS range locking code, which expects to be able to > > > wakeup everyone on the condition variable and then free the > > > structure that contains it. Having woken up threads modify > > > cv_waiters results in a race that leads to already freed memory to > > > be accessed. > > > > > > It is debatable just how correct ZFS code in its expectations, but I > > > think this commit should probably be reverted until either ZFS is > > > changed not to expect cv modifiable by waking threads or until > > > alternative solution is found to the cv_waiters overflow issue > > > fixed by this commit. > > > > > > > > It isn't clear to me how the zfs_range_unlock() code could know when > > all the waiters have woken up and updated the CV, and thus it's safe > > to destroy/free the CV. Would the woken threads ask, "was I the last > > thread to be woken by this CV" and if so free the struct containing > > the CV? Obviously such a check would need to ensure that the other > > threads have completed their updates to the CV. > > > > --matt > > Assuming other threads _need_ to update cv after they have been woken > up. Clearly Solaris implementation managed to do without and our code > changed that breaking range locks implementation we took directly from > OpenSolaris (or illumos). What was previously possible now isn't. As I > wrote before, while merits of this expectations are debatable and it is > not hard to see where Solaris way is advantageous, that is really > besides the point. Are you arguing that we should leave kernel in known > broken state until 'proper' fix makes its way through possible upstream > detour? > Not at all. Breaking ZFS is not OK. I was just trying to understand if it's even possible to fix the breakage within ZFS. If it's not possible/reasonable, then the CV semantics would clearly have to be reverted. > > Also, we have large code base taken from Solaris and chances are this is > not the only place that might be affected. I think we are better off > with this commit temporarily reverted until necessary repairs and > auditing are complete for it to be safely re-enabled. > > Agreed that the risk is large (a huge amount of code is potentially impacted, probably not only Solaris-derived code), and does not seem to have been analyzed before this change was landed. --matt ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r283159 - head
Author: ngie Date: Wed May 20 18:41:54 2015 New Revision: 283159 URL: https://svnweb.freebsd.org/changeset/base/283159 Log: Fix breakage I didn't fully solve in r283151 by depending on the .PHONY target, not the directory when building libctf for libproc Reported by: many, Jenkins Submitted by: rodrigc Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Wed May 20 17:48:22 2015(r283158) +++ head/Makefile.inc1 Wed May 20 18:41:54 2015(r283159) @@ -1745,7 +1745,7 @@ _generic_libs+= ${_DIR} lib/libopie__L lib/libtacplus__L: lib/libmd__L lib/libproc__L: \ -${_cddl_lib_libctf} lib/libelf__L lib/librtld_db__L lib/libutil__L +${_cddl_lib_libctf:D${_cddl_lib_libctf}__L} lib/libelf__L lib/librtld_db__L lib/libutil__L .if ${MK_CXX} != "no" .if ${MK_LIBCPLUSPLUS} != "no" lib/libproc__L: lib/libc++ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r283151 - head
On May 20, 2015, at 10:43, Craig Rodrigues wrote: > On Wed, May 20, 2015 at 10:24 AM, Andriy Gapon wrote: > >> > >> lib/libproc__L: \ > >> -cddl/lib/libctf__L lib/libelf__L lib/librtld_db__L lib/libutil__L > >> +${_cddl_lib_libctf} lib/libelf__L lib/librtld_db__L lib/libutil__L > > Should the above perhaps be ${_cddl_lib_libctf}__L? But such that it is empty > if _cddl_lib_libctf is unset. Not sure how to express that with the make > syntax. In shell it'd be ${_cddl_lib_libctf:+${_cddl_lib_libctf}__L}. > > > You can use: > > ${_cddl_lib_libctf:D${_cddl_lib_libctf}__L} > > > If you look at the make(1) man page and look for the section > "Variable modifiers", you can see the documentation for this. Fixed in r283159. Thank you Craig! signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r283160 - in head: . kerberos5/lib kerberos5/lib/libhdb kerberos5/lib/libheimsqlite
Author: bapt Date: Wed May 20 18:56:29 2015 New Revision: 283160 URL: https://svnweb.freebsd.org/changeset/base/283160 Log: Make kerberos use the same sqlite libraries as other sqlite consumer. This reduces the number of copy of sqlite we have to just one and easier tracking version of sqlite Differential Revision:https://reviews.freebsd.org/D2443 Reviewed by: imp, stas, bjk Deleted: head/kerberos5/lib/libheimsqlite/ Modified: head/Makefile.inc1 head/ObsoleteFiles.inc head/kerberos5/lib/Makefile head/kerberos5/lib/libhdb/Makefile Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Wed May 20 18:41:54 2015(r283159) +++ head/Makefile.inc1 Wed May 20 18:56:29 2015(r283160) @@ -1679,7 +1679,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 ${_kerberos5_lib_libhdb} \ ${_kerberos5_lib_libheimbase} \ ${_kerberos5_lib_libheimntlm} \ - ${_kerberos5_lib_libheimsqlite} \ + ${_libsqlite3} \ ${_kerberos5_lib_libheimipcc} \ ${_kerberos5_lib_libhx509} ${_kerberos5_lib_libkrb5} \ ${_kerberos5_lib_libroken} \ @@ -1803,7 +1803,7 @@ _secure_lib= secure/lib kerberos5/lib/libasn1__L: lib/libcom_err__L kerberos5/lib/libroken__L kerberos5/lib/libhdb__L: kerberos5/lib/libasn1__L lib/libcom_err__L \ kerberos5/lib/libkrb5__L kerberos5/lib/libroken__L \ -kerberos5/lib/libwind__L kerberos5/lib/libheimsqlite__L +kerberos5/lib/libwind__L lib/libsqlite3__L kerberos5/lib/libheimntlm__L: secure/lib/libcrypto__L kerberos5/lib/libkrb5__L \ kerberos5/lib/libroken__L lib/libcom_err__L kerberos5/lib/libhx509__L: kerberos5/lib/libasn1__L lib/libcom_err__L \ @@ -1816,7 +1816,7 @@ kerberos5/lib/libroken__L: lib/libcrypt_ kerberos5/lib/libwind__L: kerberos5/lib/libroken__L lib/libcom_err__L kerberos5/lib/libheimbase__L: lib/libthr__L kerberos5/lib/libheimipcc__L: kerberos5/lib/libroken__L kerberos5/lib/libheimbase__L lib/libthr__L -kerberos5/lib/libheimsqlite__L: lib/libthr__L +lib/libsqlite3__L: lib/libthr__L .endif .if ${MK_GSSAPI} != "no" @@ -1832,7 +1832,7 @@ _kerberos5_lib_libkrb5= kerberos5/lib/li _kerberos5_lib_libhx509= kerberos5/lib/libhx509 _kerberos5_lib_libroken= kerberos5/lib/libroken _kerberos5_lib_libheimntlm= kerberos5/lib/libheimntlm -_kerberos5_lib_libheimsqlite= kerberos5/lib/libheimsqlite +_libsqlite3= lib/libsqlite3 _kerberos5_lib_libheimipcc= kerberos5/lib/libheimipcc _kerberos5_lib_libwind= kerberos5/lib/libwind _libcom_err= lib/libcom_err Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Wed May 20 18:41:54 2015(r283159) +++ head/ObsoleteFiles.inc Wed May 20 18:56:29 2015(r283160) @@ -38,6 +38,15 @@ # xargs -n1 | sort | uniq -d; # done +# 20150520 +OLD_FILES+=usr/lib/libheimsqlite.a +OLD_FILES+=usr/lib/libheimsqlite.so +OLD_LIBS+=usr/lib/libheimsqlite.so.11 +OLD_FILES+=usr/lib/libheimsqlite_p.a +OLD_FILES+=usr/lib32/libheimsqlite.a +OLD_FILES+=usr/lib32/libheimsqlite.so +OLD_LIBS+=usr/lib32/libheimsqlite.so.11 +OLD_FILES+=usr/lib32/libheimsqlite_p.a # 20150506 OLD_FILES+=usr/share/man/man9/NDHASGIANT.9.gz # 20150504 Modified: head/kerberos5/lib/Makefile == --- head/kerberos5/lib/Makefile Wed May 20 18:41:54 2015(r283159) +++ head/kerberos5/lib/Makefile Wed May 20 18:56:29 2015(r283160) @@ -3,7 +3,7 @@ SUBDIR=libasn1 libgssapi_krb5 libgssapi_ntlm libgssapi_spnego libhdb \ libheimntlm libhx509 libkadm5clnt libkadm5srv libkrb5 \ - libroken libsl libvers libkdc libwind libheimsqlite libheimbase libheimipcc libheimipcs + libroken libsl libvers libkdc libwind libheimbase libheimipcc libheimipcs SUBDIR+= libkafs5 # requires krb_err.h from libkrb5 Modified: head/kerberos5/lib/libhdb/Makefile == --- head/kerberos5/lib/libhdb/Makefile Wed May 20 18:41:54 2015 (r283159) +++ head/kerberos5/lib/libhdb/Makefile Wed May 20 18:56:29 2015 (r283160) @@ -3,7 +3,7 @@ LIB= hdb LDFLAGS= -Wl,--no-undefined VERSION_MAP= ${KRB5DIR}/lib/hdb/version-script.map -LIBADD=asn1 com_err krb5 roken heimsqlite +LIBADD=asn1 com_err krb5 roken sqlite3 DPADD= ${LDAPDPADD} MAN= HDB.3 hdb_entry_ex.3 @@ -56,7 +56,7 @@ SRCS= common.c \ ${GEN:S/.x$/.c/:S/.hx$/.h/} CFLAGS+=-I${KRB5DIR}/lib/hdb -I${KRB5DIR}/lib/asn1 \ - -I${KRB5DIR}/lib/roken -I${KRB5DIR}/lib/sqlite \ + -I${KRB5DIR}/lib/roken -I${.CURDIR}/../../../contrib/sqlite3/ \ -I${KRB5DIR}/lib/krb5 \ -I. ${LDAPCFLAGS} CFLAGS+=-DHDB_DB_DIR="
Re: svn commit: r283088 - head/sys/ddb
On 05/19/15 10:58, Pedro Giffuni wrote: On 05/19/15 08:45, John Baldwin wrote: ... I will disagree with Bruce a bit and put my vote in for replacing boolean_t with bool where it is used. I do think that logically (if not strictly) your commit is a type mismatch as TRUE/FALSE is for boolean_t and true/false are for bool. I agree with Bruce that we probably don't want to use bool for system calls. However, I think using bool in the kernel itself is ok and that we should replace boolean_t with bool. I guess it boils down to the dilemma between modernity and common practice. OK, I know the current change can't stay as-is, and even Bruce admits that boolean_t is a mistake, so I think I will give the bool a try. FWIW, I have a patch for this[1] but it became rather interesting because on MIPS, bool and int are not interchangeable so I am finding some places where the prototypes and the implementation don't match. It will still take me some time (the tinderbox is really slow) but the result should be cleaner. Pedro. [1] https://people.freebsd.org/~pfg/patches/ddb-bool.diff ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r282971 - in head/sys: kern sys
I think we should also assert that no waiter remains when a conditional variable is destroyed (which also suggests that the memory may be freed shortly). Otherwise we would either have modify after free or lost wakeups. Cheers, -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die Index: sys/kern/kern_condvar.c === --- sys/kern/kern_condvar.c (revision 283099) +++ sys/kern/kern_condvar.c (working copy) @@ -77,6 +77,7 @@ cv_destroy(struct cv *cvp) #ifdef INVARIANTS struct sleepqueue *sq; + KASSERT(cvp->cv_waiters == 0, ("%s: dangling waiters", __func__)); sleepq_lock(cvp); sq = sleepq_lookup(cvp); sleepq_release(cvp); signature.asc Description: OpenPGP digital signature
svn commit: r283162 - head/sys/vm
Author: kib Date: Wed May 20 23:03:22 2015 New Revision: 283162 URL: https://svnweb.freebsd.org/changeset/base/283162 Log: Remove the write-only variable phent. We currently do not check the size of the program header's entries. Reported by: adrian (by using gcc 4.9) Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c == --- head/sys/vm/vm_page.c Wed May 20 19:32:57 2015(r283161) +++ head/sys/vm/vm_page.c Wed May 20 23:03:22 2015(r283162) @@ -1756,6 +1756,7 @@ vm_page_alloc(vm_object_t object, vm_pin m->wire_count = 0; } m->object = NULL; + m->oflags = VPO_UNMANAGED; vm_page_free(m); return (NULL); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r283163 - head/sys/vm
Author: kib Date: Wed May 20 23:15:56 2015 New Revision: 283163 URL: https://svnweb.freebsd.org/changeset/base/283163 Log: Do grammar fix in the comment to record the right commit message for r283162. Fix a cosmetic issue with vm_page_alloc() calling vm_page_free_toq() with the page not completely satisfying vm_page_free() assertions. The page is not owned by the object, since insertion failed. But besides m->object reset to NULL, we should also set VPO_UNMANAGED flag for consistency. Reported by: pho Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c == --- head/sys/vm/vm_page.c Wed May 20 23:03:22 2015(r283162) +++ head/sys/vm/vm_page.c Wed May 20 23:15:56 2015(r283163) @@ -3154,8 +3154,8 @@ vm_page_zero_invalid(vm_page_t m, boolea VM_OBJECT_ASSERT_WLOCKED(m->object); /* * Scan the valid bits looking for invalid sections that -* must be zerod. Invalid sub-DEV_BSIZE'd areas ( where the -* valid bit may be set ) have already been zerod by +* must be zeroed. Invalid sub-DEV_BSIZE'd areas ( where the +* valid bit may be set ) have already been zeroed by * vm_page_set_validclean(). */ for (b = i = 0; i <= PAGE_SIZE / DEV_BSIZE; ++i) { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r283159 - head
On Wednesday, May 20, 2015 06:41:54 PM Garrett Cooper wrote: > Author: ngie > Date: Wed May 20 18:41:54 2015 > New Revision: 283159 > URL: https://svnweb.freebsd.org/changeset/base/283159 > > Log: > Fix breakage I didn't fully solve in r283151 by depending on the .PHONY > target, not the directory when building libctf for libproc > > Reported by: many, Jenkins > Submitted by: rodrigc > > Modified: > head/Makefile.inc1 > > Modified: head/Makefile.inc1 > > == --- head/Makefile.inc1 Wed May 20 17:48:22 2015(r283158) > +++ head/Makefile.inc1Wed May 20 18:41:54 2015(r283159) > @@ -1745,7 +1745,7 @@ _generic_libs+= ${_DIR} > lib/libopie__L lib/libtacplus__L: lib/libmd__L > > lib/libproc__L: \ > -${_cddl_lib_libctf} lib/libelf__L lib/librtld_db__L lib/libutil__L > +${_cddl_lib_libctf:D${_cddl_lib_libctf}__L} lib/libelf__L > lib/librtld_db__L lib/libutil__L .if ${MK_CXX} != "no" > .if ${MK_LIBCPLUSPLUS} != "no" > lib/libproc__L: lib/libc++ Even after this, head is still not buildable for me: ===> lib/libproc (obj,depend,all,install) make[4]: /usr/obj/usr/src/lib/libproc/.depend, 425: ignoring stale .depend for /usr/obj/usr/src/tmp/usr/lib/libctf.a /usr/obj/usr/src/tmp/usr/bin/ld: cannot find -lctf cc: error: linker command failed with exit code 1 (use -v to see invocation) svn rev is 283163. Perhaps a full revert is in order? -- Peter Wemm - pe...@wemm.org; pe...@freebsd.org; pe...@yahoo-inc.com; KI6FJV UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246 signature.asc Description: This is a digitally signed message part.
svn commit: r283167 - in head: lib/libprocstat usr.bin/procstat
Author: allanjude (doc committer) Date: Thu May 21 03:32:44 2015 New Revision: 283167 URL: https://svnweb.freebsd.org/changeset/base/283167 Log: Create links to the libprocstat man pages for all of the libprocstat functions so they can be looked up by name Add a cross refrence to libprocstat in the procstat.1 man page Differential Revision:https://reviews.freebsd.org/D2578 Suggested by: jmg Reviewed by: brueffer Approved by: wblock (mentor) MFC after:1 week Sponsored by: ScaleEngine Inc. Modified: head/lib/libprocstat/Makefile head/lib/libprocstat/libprocstat.3 head/usr.bin/procstat/procstat.1 Modified: head/lib/libprocstat/Makefile == --- head/lib/libprocstat/Makefile Thu May 21 03:26:46 2015 (r283166) +++ head/lib/libprocstat/Makefile Thu May 21 03:32:44 2015 (r283167) @@ -22,6 +22,36 @@ SHLIB_MAJOR= 1 LIBADD=elf kvm util MAN= libprocstat.3 +MLINKS+=libprocstat.3 procstat_close.3 \ + libprocstat.3 procstat_freeargv.3 \ + libprocstat.3 procstat_freeauxv.3 \ + libprocstat.3 procstat_freeenvv.3 \ + libprocstat.3 procstat_freefiles.3 \ + libprocstat.3 procstat_freegroups.3 \ + libprocstat.3 procstat_freekstack.3 \ + libprocstat.3 procstat_freeprocs.3 \ + libprocstat.3 procstat_freevmmap.3 \ + libprocstat.3 procstat_get_pipe_info.3 \ + libprocstat.3 procstat_get_pts_info.3 \ + libprocstat.3 procstat_get_sem_info.3 \ + libprocstat.3 procstat_get_shm_info.3 \ + libprocstat.3 procstat_get_socket_info.3 \ + libprocstat.3 procstat_get_vnode_info.3 \ + libprocstat.3 procstat_getargv.3 \ + libprocstat.3 procstat_getauxv.3 \ + libprocstat.3 procstat_getenvv.3 \ + libprocstat.3 procstat_getfiles.3 \ + libprocstat.3 procstat_getgroups.3 \ + libprocstat.3 procstat_getkstack.3 \ + libprocstat.3 procstat_getosrel.3 \ + libprocstat.3 procstat_getpathname.3 \ + libprocstat.3 procstat_getprocs.3 \ + libprocstat.3 procstat_getrlimit.3 \ + libprocstat.3 procstat_getumask.3 \ + libprocstat.3 procstat_getvmmap.3 \ + libprocstat.3 procstat_open_core.3 \ + libprocstat.3 procstat_open_kvm.3 \ + libprocstat.3 procstat_open_sysctl.3 # XXX This is a hack. .if ${MK_CDDL} != "no" Modified: head/lib/libprocstat/libprocstat.3 == --- head/lib/libprocstat/libprocstat.3 Thu May 21 03:26:46 2015 (r283166) +++ head/lib/libprocstat/libprocstat.3 Thu May 21 03:32:44 2015 (r283167) @@ -24,25 +24,11 @@ .\" .\" $FreeBSD$ .\" -.Dd May 3, 2013 +.Dd May 18, 2015 .Dt LIBPROCSTAT 3 .Os .Sh NAME -.Nm procstat_open_core , -.Nm procstat_open_kvm , -.Nm procstat_open_sysctl , .Nm procstat_close , -.Nm procstat_getargv , -.Nm procstat_getauxv , -.Nm procstat_getenvv , -.Nm procstat_getfiles , -.Nm procstat_getgroups , -.Nm procstat_getkstack , -.Nm procstat_getosrel , -.Nm procstat_getpathname , -.Nm procstat_getprocs , -.Nm procstat_getumask , -.Nm procstat_getvmmap , .Nm procstat_freeargv , .Nm procstat_freeauxv , .Nm procstat_freeenvv , @@ -56,7 +42,22 @@ .Nm procstat_get_sem_info , .Nm procstat_get_shm_info , .Nm procstat_get_socket_info , -.Nm procstat_get_vnode_info +.Nm procstat_get_vnode_info , +.Nm procstat_getargv , +.Nm procstat_getauxv , +.Nm procstat_getenvv , +.Nm procstat_getfiles , +.Nm procstat_getgroups , +.Nm procstat_getkstack , +.Nm procstat_getosrel , +.Nm procstat_getpathname , +.Nm procstat_getprocs , +.Nm procstat_getrlimit , +.Nm procstat_getumask , +.Nm procstat_getvmmap , +.Nm procstat_open_core , +.Nm procstat_open_kvm , +.Nm procstat_open_sysctl .Nd library interface for file and process information retrieval .Sh LIBRARY .Lb libprocstat @@ -175,17 +176,24 @@ .Fa "struct kinfo_proc *kp" .Fa "unsigned int *count" .Fc +.Ft "struct kinfo_kstack *" +.Fo procstat_getkstack +.Fa "struct procstat *procstat" +.Fa "struct kinfo_proc *kp" +.Fa "unsigned int *count" +.Fc .Ft int .Fo procstat_getosrel .Fa "struct procstat *procstat" .Fa "struct kinfo_proc *kp" .Fa "int *osrelp" .Fc -.Ft "struct kinfo_kstack *" -.Fo procstat_getkstack +.Ft "int" +.Fo procstat_getpathname .Fa "struct procstat *procstat" .Fa "struct kinfo_proc *kp" -.Fa "unsigned int *count" +.Fa "char *pathname" +.Fa "size_t maxlen" .Fc .Ft "struct kinfo_proc *" .Fo procstat_getprocs @@ -195,13 +203,6 @@ .Fa "unsigned int *count" .Fc .Ft "int" -.Fo procstat_getpathname -.Fa "struct procstat *procstat" -.Fa "struct kinfo_proc *kp" -.Fa "char *pathname" -.Fa "size_t maxlen"
Re: svn commit: r283132 - head/lib/libproc
On 5/19/15 5:23 PM, Baptiste Daroussin wrote: Author: bapt Date: Tue May 19 22:23:15 2015 New Revision: 283132 URL: https://svnweb.freebsd.org/changeset/base/283132 Log: Fix underlinking I recommend always doing a full clean build when adding or removing libraries to libraries when targetting under/over link problems. Often an exp-run may even make sense. Many library consumers have benefited from overlinking for a long time and no one has realized they were missing direct links. I've added build-time tests into our build at work to force all libraries to not be over or under linked by using -Wl,--no-undefined and tools/build/check-links.sh (this gets tricky with WORLDTMP btw). In most cases of fixing an overlink issue I found that consumers were underlinked. It was a cascading issue. As an update to the clang++ -lm link, I modified it at work to use --as-needed -lm and had no fallout. I need to test build it in FreeBSD and get an exp-run for it. That will make check-links.sh happier on many of the PROG_CXX/LIB_CXX FreeBSD has. As for prebuild_libs, it seems that most of the time it is touched in the past year it is done wrong and without good testing. Please seek out reviews and consider dependencies. The libproc one committed currently is still wrong as it is depending on lib/libc++ (rather than lib/libc++__L) and libproc does not even use libc++, it uses libcxxrt. So it should be depending on libcxxrt__L. Not to mention it actually still errors too due to other bugs in it. -- Regards, Bryan Drewery ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r283168 - head/usr.sbin/bhyve
Author: grehan Date: Thu May 21 04:19:22 2015 New Revision: 283168 URL: https://svnweb.freebsd.org/changeset/base/283168 Log: Temporarily revert r282922 which bumped the max descriptors. While there is no issued with the number of descriptors in a virtio indirect descriptor, it's a guest's choice as to whether indirect descriptors are used. For the case where they aren't, the virtio block ring size is still 64 which is less than the now reported max_segs of 67. This results in an assertion in recent Linux guests even though it was benign since they were using indirect descs. The intertwined relationship between virtio ring size, max seg size and blockif queue size will be addressed in an upcoming commit, at which point the max descriptors will again be bumped up to 67. Modified: head/usr.sbin/bhyve/block_if.h Modified: head/usr.sbin/bhyve/block_if.h == --- head/usr.sbin/bhyve/block_if.h Thu May 21 03:32:44 2015 (r283167) +++ head/usr.sbin/bhyve/block_if.h Thu May 21 04:19:22 2015 (r283168) @@ -39,7 +39,7 @@ #include #include -#define BLOCKIF_IOV_MAX67 /* not practical to be IOV_MAX */ +#define BLOCKIF_IOV_MAX33 /* not practical to be IOV_MAX */ struct blockif_req { struct iovecbr_iov[BLOCKIF_IOV_MAX]; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r283169 - head
Author: ngie Date: Thu May 21 05:02:08 2015 New Revision: 283169 URL: https://svnweb.freebsd.org/changeset/base/283169 Log: _Really_, _Really_ fix buildworld by moving the conditionals down, fixing some typos, and fixing the dependency when MK_LIBCPLUSPLUS != no - `:D` operator evaluation is immediate, i.e. like .if defined(..). So r283159 was in effect a no-op commit. - Fix dependency in MK_LIBCPLUSPLUS case in two ways: -- lib/libc++ was the wrong dependency. It should have been libcxxrt. -- lib/libc++ was missing __L, so again it was depending on the directory, not the relevant .PHONY target. Tested with: make tinderbox (amd64, arm, sparc64) and JFLAG=-j16 In collaboration with: bdrewery, imp, peter BIG pointyhat to: ngie (for trying to commit things at 6am while staying up all night working on other tasks) Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Thu May 21 04:19:22 2015(r283168) +++ head/Makefile.inc1 Thu May 21 05:02:08 2015(r283169) @@ -1744,16 +1744,6 @@ _generic_libs+= ${_DIR} lib/libopie__L lib/libtacplus__L: lib/libmd__L -lib/libproc__L: \ -${_cddl_lib_libctf:D${_cddl_lib_libctf}__L} lib/libelf__L lib/librtld_db__L lib/libutil__L -.if ${MK_CXX} != "no" -.if ${MK_LIBCPLUSPLUS} != "no" -lib/libproc__L: lib/libc++ -.else -lib/libproc__L: gnu/lib/libsupc++__L -.endif -.endif - .if ${MK_CDDL} != "no" _cddl_lib_libumem= cddl/lib/libumem _cddl_lib_libnvpair= cddl/lib/libnvpair @@ -1846,6 +1836,16 @@ _lib_libypclnt= lib/libypclnt lib/libradius__L: lib/libmd__L .endif +lib/libproc__L: \ +${_cddl_lib_libctf:D${_cddl_lib_libctf}__L} lib/libelf__L lib/librtld_db__L lib/libutil__L +.if ${MK_CXX} != "no" +.if ${MK_LIBCPLUSPLUS} != "no" +lib/libproc__L: lib/libcxxrt__L +.else # This implies MK_GNUCXX != "no"; see lib/libproc +lib/libproc__L: gnu/lib/libsupc++__L +.endif +.endif + gnu/lib/libdialog__L: lib/msun__L lib/ncurses/ncursesw__L .for _lib in ${_prereq_libs} ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r283170 - head/contrib/atf/atf-sh
Author: ngie Date: Thu May 21 05:06:08 2015 New Revision: 283170 URL: https://svnweb.freebsd.org/changeset/base/283170 Log: Import proposed fix from upstream for atf-sh/atf_check_test:flush_stdout_on_timeout Many thanks for jmmv for the fix! MFC after: 1 week PR: 197060 Original commit message: From 0e546407567ea858e261e72f75c5ed61e07d0ddf Mon Sep 17 00:00:00 2001 From: Julio Merino Date: Tue, 17 Feb 2015 18:10:11 -0500 Subject: [PATCH] Fix atf-sh/atf_check_test:flush_stdout_on_death The test atf-sh/atf_check_test:flush_stdout_on_timeout was flaky as it was playing solely with time. Fix this by making the test more robust and rename it while we are at it: there is nothing left about "timeouts" in this test, considering that ATF itself does not enforce deadlines any longer. Fixes FreeBSD PR 197060. Modified: head/contrib/atf/atf-sh/atf_check_test.sh head/contrib/atf/atf-sh/misc_helpers.sh Directory Properties: head/contrib/atf/ (props changed) Modified: head/contrib/atf/atf-sh/atf_check_test.sh == --- head/contrib/atf/atf-sh/atf_check_test.sh Thu May 21 05:02:08 2015 (r283169) +++ head/contrib/atf/atf-sh/atf_check_test.sh Thu May 21 05:06:08 2015 (r283170) @@ -164,18 +164,22 @@ equal_body() grep '^failed: \${x} != \${y} (a != b)$' resfile } -atf_test_case flush_stdout_on_timeout -flush_stdout_on_timeout_body() +atf_test_case flush_stdout_on_death +flush_stdout_on_death_body() { -"$(atf_get_srcdir)/misc_helpers" -s "$(atf_get_srcdir)" atf_check_timeout \ ->out 2>err & +CONTROL_FILE="$(pwd)/done" "$(atf_get_srcdir)/misc_helpers" \ +-s "$(atf_get_srcdir)" atf_check_flush_stdout >out 2>err & pid="${!}" -sleep 1 -kill "${pid}" +while [ ! -f ./done ]; do +echo "Still waiting for helper to create control file" +ls +sleep 1 +done +kill -9 "${pid}" grep 'Executing command.*true' out \ || atf_fail 'First command not in output' -grep 'Executing command.*sleep 42' out \ +grep 'Executing command.*false' out \ || atf_fail 'Second command not in output' } @@ -187,7 +191,7 @@ atf_init_test_cases() atf_add_test_case null_stdout atf_add_test_case null_stderr atf_add_test_case equal -atf_add_test_case flush_stdout_on_timeout +atf_add_test_case flush_stdout_on_death } # vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4 Modified: head/contrib/atf/atf-sh/misc_helpers.sh == --- head/contrib/atf/atf-sh/misc_helpers.sh Thu May 21 05:02:08 2015 (r283169) +++ head/contrib/atf/atf-sh/misc_helpers.sh Thu May 21 05:06:08 2015 (r283170) @@ -139,16 +139,20 @@ atf_check_equal_eval_fail_body() atf_check_equal '${x}' '${y}' } -atf_test_case atf_check_timeout -atf_check_timeout_head() +atf_test_case atf_check_flush_stdout +atf_check_flush_stdout_head() { atf_set "descr" "Helper test case for the t_atf_check test program" -atf_set "timeout" 1 +atf_set "timeout" "30" } -atf_check_timeout_body() +atf_check_flush_stdout_body() { atf_check true -atf_check sleep 42 +atf_check -s exit:1 false +touch "${CONTROL_FILE:-done}" +while :; do +sleep 1 +done } # - @@ -281,7 +285,7 @@ atf_init_test_cases() atf_add_test_case atf_check_equal_fail atf_add_test_case atf_check_equal_eval_ok atf_add_test_case atf_check_equal_eval_fail -atf_add_test_case atf_check_timeout +atf_add_test_case atf_check_flush_stdout # Add helper tests for t_config. atf_add_test_case config_get ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"