Re: svn commit: r334701 - in head: lib/libpmc share/examples/hwpmc sys/dev/hwpmc sys/sys usr.sbin/pmc usr.sbin/pmcstat
I came to that same conclusion myself moments ago. Thanks. In message , Matthew Macy writes: > -DNO_CLEAN doesn't work with the file rename. > > On Tue, Jun 5, 2018 at 10:14 PM, Cy Schubert wrot > e: > > amd64 > > > > ~cy > > > > In message > il.com> > > , Matthew Macy writes: > >> Which arch? Universe is passing for me (except for pre-existing > >> breakage of i386-LINT-NOINET). > >> > >> -M > >> > >> On Tue, Jun 5, 2018 at 8:53 PM, Cy Schubert wr > ote > >> : > >> > In message <201806060248.w562m9tb083...@repo.freebsd.org>, Matt Macy > >> > writes: > >> >> Author: mmacy > >> >> Date: Wed Jun 6 02:48:09 2018 > >> >> New Revision: 334701 > >> >> URL: https://svnweb.freebsd.org/changeset/base/334701 > >> >> > >> >> Log: > >> >> hwpmc: add summary command and further metadata extensions > >> >> > >> >> metadata changes: > >> >> - log pmc sample rate with pmcallocate > >> >> - log proc flags with thread / process logging > >> >> to identify user vs kernel threads > >> >> > >> >> fixes: > >> >> - use log cpuid to translate event id to event name > >> >> > >> >> Implement rudimentary summary command to track sample > >> >> counts by thread and process name within a pmc log. > >> >> > >> >> % make -j4 buildkernel >& /dev/null & > >> >> % sudo pmcstat -S unhalted_core_cycles -S llc-misses -O foo sleep 15 > >> >> % pmc summary foo > >> >> cpu_clk_unhalted.thread_p_any: > >> >> idle: 138108207162 > >> >> clang-6.0: 105336158004 > >> >> sh: 72340108510 > >> >> make: 8642012963 > >> >> kernel: 7754011631 > >> >> longest_lat_cache.miss: > >> >> clang-6.0: 87502625 > >> >> sh: 40901227 > >> >> make: 5500165 > >> >> kernel: 3300099 > >> >> awk: 260 > >> >> > >> >> % pmc summary -f ~/foo > >> >> idx: 278 name: cpu_clk_unhalted.thread_p_any rate: 203 > >> >> idle: 69054 > >> >> clang-6.0: 52668 > >> >> sh: 36170 > >> >> make: 4321 > >> >> kernel: 3877 > >> >> hwpmc: proc(7445): 3319 > >> >> awk: 1289 > >> >> xargs: 357 > >> >> rand_harvestq: 181 > >> >> mtree: 102 > >> >> intr: 53 > >> >> zfskern: 31 > >> >> usb: 7 > >> >> pagedaemon: 4 > >> >> ntpd: 3 > >> >> syslogd: 1 > >> >> acpi_thermal: 1 > >> >> logger: 1 > >> >> syncer: 1 > >> >> snmptrapd: 1 > >> >> sleep: 1 > >> >> idx: 17 name: longest_lat_cache.miss rate: 13 > >> >> clang-6.0: 875 > >> >> sh: 409 > >> >> make: 55 > >> >> kernel: 33 > >> >> awk: 20 > >> >> hwpmc: proc(7445): 14 > >> >> xargs: 9 > >> >> idle: 8 > >> >> intr: 3 > >> >> zfskern: 2 > >> > > >> > Hi Matt, > >> > > >> > I'm not sure if this is due to this commit or one of your others but > >> > it's broken the build. > >> > > >> > Sorry I can't do any more analysis but I need to get dinner on the > >> > table. > >> > > >> > > >> > > >> > > >> > -- > >> > Cheers, > >> > Cy Schubert > >> > FreeBSD UNIX: Web: http://www.FreeBSD.org > >> > > >> > The need of the many outweighs the greed of the few. > >> > > >> > > > > > -- > > Cheers, > > Cy Schubert > > FreeBSD UNIX: Web: http://www.FreeBSD.org > > > > The need of the many outweighs the greed of the few. > > > > > -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. ___ 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: r334701 - in head: lib/libpmc share/examples/hwpmc sys/dev/hwpmc sys/sys usr.sbin/pmc usr.sbin/pmcstat
-DNO_CLEAN doesn't work with the file rename. On Tue, Jun 5, 2018 at 10:14 PM, Cy Schubert wrote: > amd64 > > ~cy > > In message il.com> > , Matthew Macy writes: >> Which arch? Universe is passing for me (except for pre-existing >> breakage of i386-LINT-NOINET). >> >> -M >> >> On Tue, Jun 5, 2018 at 8:53 PM, Cy Schubert wrote >> : >> > In message <201806060248.w562m9tb083...@repo.freebsd.org>, Matt Macy >> > writes: >> >> Author: mmacy >> >> Date: Wed Jun 6 02:48:09 2018 >> >> New Revision: 334701 >> >> URL: https://svnweb.freebsd.org/changeset/base/334701 >> >> >> >> Log: >> >> hwpmc: add summary command and further metadata extensions >> >> >> >> metadata changes: >> >> - log pmc sample rate with pmcallocate >> >> - log proc flags with thread / process logging >> >> to identify user vs kernel threads >> >> >> >> fixes: >> >> - use log cpuid to translate event id to event name >> >> >> >> Implement rudimentary summary command to track sample >> >> counts by thread and process name within a pmc log. >> >> >> >> % make -j4 buildkernel >& /dev/null & >> >> % sudo pmcstat -S unhalted_core_cycles -S llc-misses -O foo sleep 15 >> >> % pmc summary foo >> >> cpu_clk_unhalted.thread_p_any: >> >> idle: 138108207162 >> >> clang-6.0: 105336158004 >> >> sh: 72340108510 >> >> make: 8642012963 >> >> kernel: 7754011631 >> >> longest_lat_cache.miss: >> >> clang-6.0: 87502625 >> >> sh: 40901227 >> >> make: 5500165 >> >> kernel: 3300099 >> >> awk: 260 >> >> >> >> % pmc summary -f ~/foo >> >> idx: 278 name: cpu_clk_unhalted.thread_p_any rate: 203 >> >> idle: 69054 >> >> clang-6.0: 52668 >> >> sh: 36170 >> >> make: 4321 >> >> kernel: 3877 >> >> hwpmc: proc(7445): 3319 >> >> awk: 1289 >> >> xargs: 357 >> >> rand_harvestq: 181 >> >> mtree: 102 >> >> intr: 53 >> >> zfskern: 31 >> >> usb: 7 >> >> pagedaemon: 4 >> >> ntpd: 3 >> >> syslogd: 1 >> >> acpi_thermal: 1 >> >> logger: 1 >> >> syncer: 1 >> >> snmptrapd: 1 >> >> sleep: 1 >> >> idx: 17 name: longest_lat_cache.miss rate: 13 >> >> clang-6.0: 875 >> >> sh: 409 >> >> make: 55 >> >> kernel: 33 >> >> awk: 20 >> >> hwpmc: proc(7445): 14 >> >> xargs: 9 >> >> idle: 8 >> >> intr: 3 >> >> zfskern: 2 >> > >> > Hi Matt, >> > >> > I'm not sure if this is due to this commit or one of your others but >> > it's broken the build. >> > >> > Sorry I can't do any more analysis but I need to get dinner on the >> > table. >> > >> > >> > >> > >> > -- >> > Cheers, >> > Cy Schubert >> > FreeBSD UNIX: Web: http://www.FreeBSD.org >> > >> > The need of the many outweighs the greed of the few. >> > >> > > > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: http://www.FreeBSD.org > > The need of the many outweighs the greed of the few. > > ___ 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: r334703 - head/sys/netinet6
Author: ae Date: Wed Jun 6 05:17:21 2018 New Revision: 334703 URL: https://svnweb.freebsd.org/changeset/base/334703 Log: Fix LINT-NOINET build. Use known at build time size for min_length value. Also remove the check from in6_gre_encapcheck(), now it is done in generic code. Modified: head/sys/netinet6/ip6_gre.c Modified: head/sys/netinet6/ip6_gre.c == --- head/sys/netinet6/ip6_gre.c Wed Jun 6 05:08:05 2018(r334702) +++ head/sys/netinet6/ip6_gre.c Wed Jun 6 05:17:21 2018(r334703) @@ -79,17 +79,6 @@ in6_gre_encapcheck(const struct mbuf *m, int off, int return (0); M_ASSERTPKTHDR(m); - /* -* We expect that payload contains at least IPv4 -* or IPv6 packet. -*/ - if (m->m_pkthdr.len < sizeof(struct greip6) + -#ifdef INET - sizeof(struct ip)) -#else - sizeof(struct ip6_hdr)) -#endif - return (0); GRE_RLOCK(sc); if (sc->gre_family == 0) @@ -122,7 +111,12 @@ in6_gre_output(struct mbuf *m, int af, int hlen) static const struct encap_config ipv6_encap_cfg = { .proto = IPPROTO_GRE, - .min_length = sizeof(struct greip6) + sizeof(struct ip), + .min_length = sizeof(struct greip6) + +#ifdef INET + sizeof(struct ip), +#else + sizeof(struct ip6_hdr), +#endif .exact_match = (sizeof(struct in6_addr) << 4) + 32, .check = in6_gre_encapcheck, .input = gre_input ___ 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: r334701 - in head: lib/libpmc share/examples/hwpmc sys/dev/hwpmc sys/sys usr.sbin/pmc usr.sbin/pmcstat
amd64 ~cy In message , Matthew Macy writes: > Which arch? Universe is passing for me (except for pre-existing > breakage of i386-LINT-NOINET). > > -M > > On Tue, Jun 5, 2018 at 8:53 PM, Cy Schubert wrote > : > > In message <201806060248.w562m9tb083...@repo.freebsd.org>, Matt Macy > > writes: > >> Author: mmacy > >> Date: Wed Jun 6 02:48:09 2018 > >> New Revision: 334701 > >> URL: https://svnweb.freebsd.org/changeset/base/334701 > >> > >> Log: > >> hwpmc: add summary command and further metadata extensions > >> > >> metadata changes: > >> - log pmc sample rate with pmcallocate > >> - log proc flags with thread / process logging > >> to identify user vs kernel threads > >> > >> fixes: > >> - use log cpuid to translate event id to event name > >> > >> Implement rudimentary summary command to track sample > >> counts by thread and process name within a pmc log. > >> > >> % make -j4 buildkernel >& /dev/null & > >> % sudo pmcstat -S unhalted_core_cycles -S llc-misses -O foo sleep 15 > >> % pmc summary foo > >> cpu_clk_unhalted.thread_p_any: > >> idle: 138108207162 > >> clang-6.0: 105336158004 > >> sh: 72340108510 > >> make: 8642012963 > >> kernel: 7754011631 > >> longest_lat_cache.miss: > >> clang-6.0: 87502625 > >> sh: 40901227 > >> make: 5500165 > >> kernel: 3300099 > >> awk: 260 > >> > >> % pmc summary -f ~/foo > >> idx: 278 name: cpu_clk_unhalted.thread_p_any rate: 203 > >> idle: 69054 > >> clang-6.0: 52668 > >> sh: 36170 > >> make: 4321 > >> kernel: 3877 > >> hwpmc: proc(7445): 3319 > >> awk: 1289 > >> xargs: 357 > >> rand_harvestq: 181 > >> mtree: 102 > >> intr: 53 > >> zfskern: 31 > >> usb: 7 > >> pagedaemon: 4 > >> ntpd: 3 > >> syslogd: 1 > >> acpi_thermal: 1 > >> logger: 1 > >> syncer: 1 > >> snmptrapd: 1 > >> sleep: 1 > >> idx: 17 name: longest_lat_cache.miss rate: 13 > >> clang-6.0: 875 > >> sh: 409 > >> make: 55 > >> kernel: 33 > >> awk: 20 > >> hwpmc: proc(7445): 14 > >> xargs: 9 > >> idle: 8 > >> intr: 3 > >> zfskern: 2 > > > > Hi Matt, > > > > I'm not sure if this is due to this commit or one of your others but > > it's broken the build. > > > > Sorry I can't do any more analysis but I need to get dinner on the > > table. > > > > > > > > > > -- > > Cheers, > > Cy Schubert > > FreeBSD UNIX: Web: http://www.FreeBSD.org > > > > The need of the many outweighs the greed of the few. > > > > -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. ___ 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: r334702 - head/sys/sys
Author: mjg Date: Wed Jun 6 05:08:05 2018 New Revision: 334702 URL: https://svnweb.freebsd.org/changeset/base/334702 Log: malloc: elaborate on r334545 due to frequent questions While here annotate the NULL check as probably true. Modified: head/sys/sys/malloc.h Modified: head/sys/sys/malloc.h == --- head/sys/sys/malloc.h Wed Jun 6 02:48:09 2018(r334701) +++ head/sys/sys/malloc.h Wed Jun 6 05:08:05 2018(r334702) @@ -186,6 +186,41 @@ void free(void *addr, struct malloc_type *type); void free_domain(void *addr, struct malloc_type *type); void *malloc(size_t size, struct malloc_type *type, int flags) __malloc_like __result_use_check __alloc_size(1); +/* + * Try to optimize malloc(..., ..., M_ZERO) allocations by doing zeroing in + * place if the size is known at compilation time. + * + * Passing the flag down requires malloc to blindly zero the entire object. + * In practice a lot of the zeroing can be avoided if most of the object + * gets explicitly initialized after the allocation. Letting the compiler + * zero in place gives it the opportunity to take advantage of this state. + * + * Note that the operation is only applicable if both flags and size are + * known at compilation time. If M_ZERO is passed but M_WAITOK is not, the + * allocation can fail and a NULL check is needed. However, if M_WAITOK is + * passed we know the allocation must succeed and the check can be elided. + * + * _malloc_item = malloc(_size, type, (flags) &~ M_ZERO); + * if (((flags) & M_WAITOK) != 0 || _malloc_item != NULL) + * bzero(_malloc_item, _size); + * + * If the flag is set, the compiler knows the left side is always true, + * therefore the entire statement is true and the callsite is: + * + * _malloc_item = malloc(_size, type, (flags) &~ M_ZERO); + * bzero(_malloc_item, _size); + * + * If the flag is not set, the compiler knows the left size is always false + * and the NULL check is needed, therefore the callsite is: + * + * _malloc_item = malloc(_size, type, (flags) &~ M_ZERO); + * if (_malloc_item != NULL) + * bzero(_malloc_item, _size); + * + * The implementation is a macro because of what appears to be a clang 6 bug: + * an inline function variant ended up being compiled to a mere malloc call + * regardless of argument. gcc generates expected code (like the above). + */ #ifdef _KERNEL #definemalloc(size, type, flags) ({ \ void *_malloc_item; \ @@ -193,7 +228,8 @@ void*malloc(size_t size, struct malloc_type *type, in if (__builtin_constant_p(size) && __builtin_constant_p(flags) &&\ ((flags) & M_ZERO) != 0) { \ _malloc_item = malloc(_size, type, (flags) &~ M_ZERO); \ - if (((flags) & M_WAITOK) != 0 || _malloc_item != NULL) \ + if (((flags) & M_WAITOK) != 0 ||\ + __predict_true(_malloc_item != NULL)) \ bzero(_malloc_item, _size); \ } else {\ _malloc_item = malloc(_size, type, flags); \ ___ 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: r334701 - in head: lib/libpmc share/examples/hwpmc sys/dev/hwpmc sys/sys usr.sbin/pmc usr.sbin/pmcstat
Which arch? Universe is passing for me (except for pre-existing breakage of i386-LINT-NOINET). -M On Tue, Jun 5, 2018 at 8:53 PM, Cy Schubert wrote: > In message <201806060248.w562m9tb083...@repo.freebsd.org>, Matt Macy > writes: >> Author: mmacy >> Date: Wed Jun 6 02:48:09 2018 >> New Revision: 334701 >> URL: https://svnweb.freebsd.org/changeset/base/334701 >> >> Log: >> hwpmc: add summary command and further metadata extensions >> >> metadata changes: >> - log pmc sample rate with pmcallocate >> - log proc flags with thread / process logging >> to identify user vs kernel threads >> >> fixes: >> - use log cpuid to translate event id to event name >> >> Implement rudimentary summary command to track sample >> counts by thread and process name within a pmc log. >> >> % make -j4 buildkernel >& /dev/null & >> % sudo pmcstat -S unhalted_core_cycles -S llc-misses -O foo sleep 15 >> % pmc summary foo >> cpu_clk_unhalted.thread_p_any: >> idle: 138108207162 >> clang-6.0: 105336158004 >> sh: 72340108510 >> make: 8642012963 >> kernel: 7754011631 >> longest_lat_cache.miss: >> clang-6.0: 87502625 >> sh: 40901227 >> make: 5500165 >> kernel: 3300099 >> awk: 260 >> >> % pmc summary -f ~/foo >> idx: 278 name: cpu_clk_unhalted.thread_p_any rate: 203 >> idle: 69054 >> clang-6.0: 52668 >> sh: 36170 >> make: 4321 >> kernel: 3877 >> hwpmc: proc(7445): 3319 >> awk: 1289 >> xargs: 357 >> rand_harvestq: 181 >> mtree: 102 >> intr: 53 >> zfskern: 31 >> usb: 7 >> pagedaemon: 4 >> ntpd: 3 >> syslogd: 1 >> acpi_thermal: 1 >> logger: 1 >> syncer: 1 >> snmptrapd: 1 >> sleep: 1 >> idx: 17 name: longest_lat_cache.miss rate: 13 >> clang-6.0: 875 >> sh: 409 >> make: 55 >> kernel: 33 >> awk: 20 >> hwpmc: proc(7445): 14 >> xargs: 9 >> idle: 8 >> intr: 3 >> zfskern: 2 > > Hi Matt, > > I'm not sure if this is due to this commit or one of your others but > it's broken the build. > > Sorry I can't do any more analysis but I need to get dinner on the > table. > > > > > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: http://www.FreeBSD.org > > The need of the many outweighs the greed of the few. > > ___ 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: r334701 - in head: lib/libpmc share/examples/hwpmc sys/dev/hwpmc sys/sys usr.sbin/pmc usr.sbin/pmcstat
In message <201806060353.w563rpg1070...@slippy.cwsent.com>, Cy Schubert writes: > In message <201806060248.w562m9tb083...@repo.freebsd.org>, Matt Macy > writes: > > Author: mmacy > > Date: Wed Jun 6 02:48:09 2018 > > New Revision: 334701 > > URL: https://svnweb.freebsd.org/changeset/base/334701 > > > > Log: > > hwpmc: add summary command and further metadata extensions > > > > metadata changes: > > - log pmc sample rate with pmcallocate > > - log proc flags with thread / process logging > > to identify user vs kernel threads > > > > fixes: > > - use log cpuid to translate event id to event name > > > > Implement rudimentary summary command to track sample > > counts by thread and process name within a pmc log. > > > > % make -j4 buildkernel >& /dev/null & > > % sudo pmcstat -S unhalted_core_cycles -S llc-misses -O foo sleep 15 > > % pmc summary foo > > cpu_clk_unhalted.thread_p_any: > > idle: 138108207162 > > clang-6.0: 105336158004 > > sh: 72340108510 > > make: 8642012963 > > kernel: 7754011631 > > longest_lat_cache.miss: > > clang-6.0: 87502625 > > sh: 40901227 > > make: 5500165 > > kernel: 3300099 > > awk: 260 > > > > % pmc summary -f ~/foo > > idx: 278 name: cpu_clk_unhalted.thread_p_any rate: 203 > > idle: 69054 > > clang-6.0: 52668 > > sh: 36170 > > make: 4321 > > kernel: 3877 > > hwpmc: proc(7445): 3319 > > awk: 1289 > > xargs: 357 > > rand_harvestq: 181 > > mtree: 102 > > intr: 53 > > zfskern: 31 > > usb: 7 > > pagedaemon: 4 > > ntpd: 3 > > syslogd: 1 > > acpi_thermal: 1 > > logger: 1 > > syncer: 1 > > snmptrapd: 1 > > sleep: 1 > > idx: 17 name: longest_lat_cache.miss rate: 13 > > clang-6.0: 875 > > sh: 409 > > make: 55 > > kernel: 33 > > awk: 20 > > hwpmc: proc(7445): 14 > > xargs: 9 > > idle: 8 > > intr: 3 > > zfskern: 2 > > Hi Matt, > > I'm not sure if this is due to this commit or one of your others but > it's broken the build. > > Sorry I can't do any more analysis but I need to get dinner on the > table. Oops, I should have pasted this into my previous email. --- cmd_pmc_filter.o --- /usr/local/bin/ccache cc -target x86_64-unknown-freebsd12.0 --sysroot=/export/obj/opt/src/svn-current/amd64.amd64/tmp -B/export/obj/opt/src/svn-current/amd64.amd64/tmp/usr/bin -O2 -pipe -pipe -g -MD -MF.depend.cmd_pmc_filter.o -MTcmd_pmc_filter.o -std=gnu99 -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments -c /opt/src/svn-current/usr.sbin/pmc/cmd_pmc_filter.c -o cmd_pmc_filter.o cc: error: no such file or directory: '/opt/src/svn-current/usr.sbin/pmc /cmd_pmc_filter.c' cc: error: no input files -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. ___ 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: r334701 - in head: lib/libpmc share/examples/hwpmc sys/dev/hwpmc sys/sys usr.sbin/pmc usr.sbin/pmcstat
In message <201806060248.w562m9tb083...@repo.freebsd.org>, Matt Macy writes: > Author: mmacy > Date: Wed Jun 6 02:48:09 2018 > New Revision: 334701 > URL: https://svnweb.freebsd.org/changeset/base/334701 > > Log: > hwpmc: add summary command and further metadata extensions > > metadata changes: > - log pmc sample rate with pmcallocate > - log proc flags with thread / process logging > to identify user vs kernel threads > > fixes: > - use log cpuid to translate event id to event name > > Implement rudimentary summary command to track sample > counts by thread and process name within a pmc log. > > % make -j4 buildkernel >& /dev/null & > % sudo pmcstat -S unhalted_core_cycles -S llc-misses -O foo sleep 15 > % pmc summary foo > cpu_clk_unhalted.thread_p_any: > idle: 138108207162 > clang-6.0: 105336158004 > sh: 72340108510 > make: 8642012963 > kernel: 7754011631 > longest_lat_cache.miss: > clang-6.0: 87502625 > sh: 40901227 > make: 5500165 > kernel: 3300099 > awk: 260 > > % pmc summary -f ~/foo > idx: 278 name: cpu_clk_unhalted.thread_p_any rate: 203 > idle: 69054 > clang-6.0: 52668 > sh: 36170 > make: 4321 > kernel: 3877 > hwpmc: proc(7445): 3319 > awk: 1289 > xargs: 357 > rand_harvestq: 181 > mtree: 102 > intr: 53 > zfskern: 31 > usb: 7 > pagedaemon: 4 > ntpd: 3 > syslogd: 1 > acpi_thermal: 1 > logger: 1 > syncer: 1 > snmptrapd: 1 > sleep: 1 > idx: 17 name: longest_lat_cache.miss rate: 13 > clang-6.0: 875 > sh: 409 > make: 55 > kernel: 33 > awk: 20 > hwpmc: proc(7445): 14 > xargs: 9 > idle: 8 > intr: 3 > zfskern: 2 Hi Matt, I'm not sure if this is due to this commit or one of your others but it's broken the build. Sorry I can't do any more analysis but I need to get dinner on the table. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. ___ 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: r334671 - in head/sys: net netinet netinet6 netipsec
This appears to have broken the NOINET build. --- ip6_gre.o --- cc -target i386-unknown-freebsd12.0 --sysroot=/home/mmacy/devel/build/home/mmacy/networking/i386.i386/tmp -B/home/mmacy/devel/build/home/mmacy/networking/i386.i386/tmp/usr/bin -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -DHAVE_KERNEL_OPTION_HEADERS -include /home/mmacy/devel/build/home/mmacy/networking/i386.i386/sys/LINT-NOINET/opt_global.h -I. -I/home/mmacy/networking/sys -I/home/mmacy/networking/sys/contrib/ck/include -fno-common -I/home/mmacy/devel/build/home/mmacy/networking/i386.i386/sys/LINT-NOINET -fno-builtin -MD -MF.depend.ip6_gre.o -MTip6_gre.o -mno-mmx -mno-sse -msoft-float -ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-address-of-packed-member -mno-aes -mno-avx -std=iso9899:1999 -c /home/mmacy/networking/sys/netinet6/ip6_gre.c -o ip6_gre.o /home/mmacy/networking/sys/netinet6/ip6_gre.c:125:40: error: invalid application of 'sizeof' to an incomplete type 'struct ip' .min_length = sizeof(struct greip6) + sizeof(struct ip), ^ ~~~ /home/mmacy/networking/sys/netinet6/ip6_gre.c:125:54: note: forward declaration of 'struct ip' .min_length = sizeof(struct greip6) + sizeof(struct ip), ^ 1 error generated. --- if_ath_led.o -- On Tue, Jun 5, 2018 at 1:51 PM, Andrey V. Elsukov wrote: > Author: ae > Date: Tue Jun 5 20:51:01 2018 > New Revision: 334671 > URL: https://svnweb.freebsd.org/changeset/base/334671 > > Log: > Rework IP encapsulation handling code. > > Currently it has several disadvantages: > - it uses single mutex to protect internal structures. It is used by > data- and control- path, thus there are no parallelism at all. > - it uses single list to keep encap handlers for both INET and INET6 > families. > - struct encaptab keeps unneeded information (src, dst, masks, protosw), > that isn't used by code in the source tree. > - matches are prioritized and when many tunneling interfaces are > registered, encapcheck handler of each interface is invoked for each > packet. The search takes O(n) for n interfaces. All this work is done > with exclusive lock held. > > What this patch includes: > - the datapath is converted to be lockless using epoch(9) KPI. > - struct encaptab now linked using CK_LIST. > - all unused fields removed from struct encaptab. Several new fields > addedr: min_length is the minimum packet length, that encapsulation > handler expects to see; exact_match is maximum number of bits, that > can return an encapsulation handler, when it wants to consume a packet. > - IPv6 and IPv4 handlers are stored in separate lists; > - added new "encap_lookup_t" method, that will be used later. It is > targeted to speedup lookup of needed interface, when gif(4)/gre(4) have > many interfaces. > - the need to use protosw structure is eliminated. The only pr_input > method was used from this structure, so I don't see the need to keep > using it. > - encap_input_t method changed to avoid using mbuf tags to store softc > pointer. Now it is passed directly trough encap_input_t method. > encap_getarg() funtions is removed. > - all sockaddr structures and code that uses them removed. We don't have > any code in the tree that uses them. All consumers use encap_attach_func() > method, that relies on invoking of encapcheck() to determine the needed > handler. > - introduced struct encap_config, it contains parameters of encap handler > that is going to be registered by encap_attach() function. > - encap handlers are stored in lists ordered by exact_match value, thus > handlers that need more bits to match will be checked first, and if > encapcheck method returns exact_match value, the search will be stopped. > - all current consumers changed to use new KPI. > > Reviewed by: mmacy > Sponsored by: Yandex LLC > Differential Revision:https://reviews.freebsd.org/D15617 > > Modified: > head/sys/net/if_gif.c > head/sys/net/if_gre.c > head/sys/net/if_gre.h > head/sys/net/if_me.c > head/sys/net/if_stf.c > head/sys/netinet/in_gif.c > head/sys/netinet/ip_encap.c > head/sys/netinet/ip_encap.h > head/sys/netinet/ip_gre.c > head/sys/netinet/ip_mroute.c > head/sys/netinet/pim_var.h > head/sys/netinet6/in6_gif.c > head/sys/netinet6/ip6_gre.c > head/sys/netinet6/ip6_mroute.c > head/sys/netinet6/pim6_var.h >
Re: svn commit: r334669 - head/sys/sys
On Tue, 5 Jun 2018, Eric van Gyzen wrote: On 06/05/2018 15:53, Ian Lepore wrote: On Tue, 2018-06-05 at 20:34 +, Eric van Gyzen wrote: Author: vangyzen Date: Tue Jun\xc2\xa0\xc2\xa05 20:34:11 2018 New Revision: 334669 URL: https://svnweb.freebsd.org/changeset/base/334669 Log: \xc2\xa0 Make Coverity more happy with r334545 \xc2\xa0\xc2\xa0 \xc2\xa0 Coverity complains about: \xc2\xa0\xc2\xa0 \xc2\xa0\xc2\xa0if (((flags) & M_WAITOK) || _malloc_item != NULL) \xc2\xa0\xc2\xa0 \xc2\xa0 saying: \xc2\xa0\xc2\xa0 \xc2\xa0\xc2\xa0The expression \xc2\xa0\xc2\xa01 /* (2 | 0x100) & 2 */ || _malloc_item != NULL \xc2\xa0\xc2\xa0is suspicious because it performs a Boolean operation \xc2\xa0\xc2\xa0on a constant other than 0 or 1. \xc2\xa0\xc2\xa0 \xc2\xa0 Although the code is correct, add "!= 0" to make it slightly \xc2\xa0 more legible and to silence hundreds(?) of Coverity warnings. \xc2\xa0\xc2\xa0 This is a sad sad thing. Treating (bits & flagconstants) as boolean has a long long history in C. Surely there are literally thousand of occurrances in freebsd code already, so why did this one get flagged? Indded, it is a bug in Coverity. However, it is BSD style (counting instances in 4.4BSD kern, explicit comparison of the results of mask tests with 0 so as to convert to boolean are much more common if the test is for == 0 and slightly more common if the test is for != 0). However, this rule is violated in thousands if not millions of cases. It is most commonly violated for 'if (error)' which is not a natural boolean test so it needs the explicit comparison with 0 much more than a mask test. I agree, and I tend to avoid adding "!= 0" unnecessarily, but I don't feel very strongly about it. This macro is expanded in many locations, I used to feel very strongly that doing '!= 0' and '== 0' for mask tests was a style bug. Then I got used to BSD style and now don't mind '== 0' and merely don't like '!= 0'. In BSD style, it is doing the inverse mask tests as a boolean using '!' instead of using '== 0' that is the style bug. This makes a lot of sense -- the result of the expression (foo & MASK) is an integer, and the best way to convert that to boolean with negative logic is to compare it with '== 0'. Thus more common non-BSD style of !(foo & MASK) involves implicit conversion of an integer to a boolean. The bug in Coverity should cause a warning about that too. I still feel very strongly about 'if (error)' and 'if (!error)' for non- boolean error, so I think it is not a bug for Coverity to warn about these. However, the conversion for !error is the same as for !(foo & MASK). If this is not a bug in Coverity, then it is a bug in Coverity to not warn about implicit narrowing conversions from integer to bool (and implicit narrowing conversions generally). It is very convenient and usually safest to not have to use a cast for these. However, such conversions aren't very clear and have runtime costs. E.g, the 'if (error)' test can be written as 'bool e; e = error; if (e)'. If all the code is visible to the compiler, then it can optimize away the conversion and generate the same code. Otherwise, it must produce extra code to convert to 0 or 1. so the number of Coverity warnings increased by hundreds in the most recent run. I care about that more than avoiding "!= 0". I don't There are currently 736 instances if 'if (error)' in kern. Do you really wish to fix them all? There are currently only 659 instances of 'if (error != 0)' in kern, so the worse style is still more common for this. In kern in 4.4BSD, there were 68 instances of 'if (error)' and zero instances of 'if (error != 0)'. This shows both the bloat in -current and its drift from old styles. The total file size is only 8 times larger. Mask tests are harder to grep for. sprinkle crap all over the code just to appease Coverity, but this one seemed perfectly reasonable. It makes the code slightly more clear and legible for some readers, and I imagine it doesn't hurt the others. Yes, there are probably many old occurrences of this, and there might be many old corresponding warnings, but I tend to focus on the recently added ones, just because they're more likely relevant. /me opens the static analysis can of worms...again Parts related to style should be separate and optional and usually not enabled by default. Bruce ___ 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: r334701 - in head: lib/libpmc share/examples/hwpmc sys/dev/hwpmc sys/sys usr.sbin/pmc usr.sbin/pmcstat
Author: mmacy Date: Wed Jun 6 02:48:09 2018 New Revision: 334701 URL: https://svnweb.freebsd.org/changeset/base/334701 Log: hwpmc: add summary command and further metadata extensions metadata changes: - log pmc sample rate with pmcallocate - log proc flags with thread / process logging to identify user vs kernel threads fixes: - use log cpuid to translate event id to event name Implement rudimentary summary command to track sample counts by thread and process name within a pmc log. % make -j4 buildkernel >& /dev/null & % sudo pmcstat -S unhalted_core_cycles -S llc-misses -O foo sleep 15 % pmc summary foo cpu_clk_unhalted.thread_p_any: idle: 138108207162 clang-6.0: 105336158004 sh: 72340108510 make: 8642012963 kernel: 7754011631 longest_lat_cache.miss: clang-6.0: 87502625 sh: 40901227 make: 5500165 kernel: 3300099 awk: 260 % pmc summary -f ~/foo idx: 278 name: cpu_clk_unhalted.thread_p_any rate: 203 idle: 69054 clang-6.0: 52668 sh: 36170 make: 4321 kernel: 3877 hwpmc: proc(7445): 3319 awk: 1289 xargs: 357 rand_harvestq: 181 mtree: 102 intr: 53 zfskern: 31 usb: 7 pagedaemon: 4 ntpd: 3 syslogd: 1 acpi_thermal: 1 logger: 1 syncer: 1 snmptrapd: 1 sleep: 1 idx: 17 name: longest_lat_cache.miss rate: 13 clang-6.0: 875 sh: 409 make: 55 kernel: 33 awk: 20 hwpmc: proc(7445): 14 xargs: 9 idle: 8 intr: 3 zfskern: 2 Added: head/usr.sbin/pmc/cmd_pmc_summary.cc (contents, props changed) Modified: head/lib/libpmc/libpmc.c head/lib/libpmc/libpmc_pmu_util.c (contents, props changed) head/lib/libpmc/pmc.h head/lib/libpmc/pmclog.c head/lib/libpmc/pmclog.h head/share/examples/hwpmc/overhead.c head/sys/dev/hwpmc/hwpmc_logging.c head/sys/dev/hwpmc/hwpmc_mod.c head/sys/sys/pmc.h head/sys/sys/pmclog.h head/usr.sbin/pmc/Makefile (contents, props changed) head/usr.sbin/pmc/cmd_pmc.h (contents, props changed) head/usr.sbin/pmc/cmd_pmc_filter.cc head/usr.sbin/pmc/cmd_pmc_stat.c (contents, props changed) head/usr.sbin/pmc/pmc.c (contents, props changed) head/usr.sbin/pmcstat/pmcstat.c Modified: head/lib/libpmc/libpmc.c == --- head/lib/libpmc/libpmc.cWed Jun 6 01:51:05 2018(r334700) +++ head/lib/libpmc/libpmc.cWed Jun 6 02:48:09 2018(r334701) @@ -1007,7 +1007,8 @@ pmc_mdep_is_compatible_class(enum pmc_class pc) int pmc_allocate(const char *ctrspec, enum pmc_mode mode, -uint32_t flags, int cpu, pmc_id_t *pmcid) +uint32_t flags, int cpu, pmc_id_t *pmcid, +uint64_t count) { size_t n; int retval; @@ -1030,6 +1031,7 @@ pmc_allocate(const char *ctrspec, enum pmc_mode mode, pmc_config.pm_cpu = cpu; pmc_config.pm_mode = mode; pmc_config.pm_flags = flags; + pmc_config.pm_count = count; if (PMC_IS_SAMPLING_MODE(mode)) pmc_config.pm_caps |= PMC_CAP_INTERRUPT; /* Modified: head/lib/libpmc/libpmc_pmu_util.c == --- head/lib/libpmc/libpmc_pmu_util.c Wed Jun 6 01:51:05 2018 (r334700) +++ head/lib/libpmc/libpmc_pmu_util.c Wed Jun 6 02:48:09 2018 (r334701) @@ -162,13 +162,13 @@ pmc_pmu_idx_get_by_event(const char *cpuid, const char } const char * -pmc_pmu_event_get_by_idx(int idx) +pmc_pmu_event_get_by_idx(const char *cpuid, int idx) { const struct pmu_events_map *pme; const struct pmu_event *pe; int i; - if ((pme = pmu_events_map_get(NULL)) == NULL) + if ((pme = pmu_events_map_get(cpuid)) == NULL) return (NULL); for (i = 0, pe = pme->table; (pe->name || pe->desc || pe->event) && i < idx; pe++, i++); return (pe->name); @@ -470,7 +470,7 @@ pmc_pmu_pmcallocate(const char *e __unused, struct pmc } const char * -pmc_pmu_event_get_by_idx(int idx __unused) +pmc_pmu_event_get_by_idx(const char *c __unused, int idx __unused) { return (NULL); } Modified: head/lib/libpmc/pmc.h == --- head/lib/libpmc/pmc.h Wed Jun 6 01:51:05 2018(r334700) +++ head/lib/libpmc/pmc.h Wed Jun 6 02:48:09 2018(r334701) @@ -75,7 +75,7 @@ struct pmc_pmcinfo { __BEGIN_DECLS intpmc_allocate(const char *_ctrspec, enum pmc_mode _mode, uint32_t _flags, -int _cpu, pmc_id_t *_pmcid); +int _cpu, pmc_id_t *_pmcid, uint64_t count); intpmc_attach(pmc_id_t _pmcid, pid_t _pid); intpmc_capabilities(pmc_id_t _pmc, uint32_t *_caps); intpmc_configure_logfile(int _fd); @@ -120,7 +120,7 @@ void pmc_pmu_print_counter_desc_long(const char *); void pmc_pmu_print_counter_full(const char *); uint64_t
svn commit: r334700 - in head/etc: rc.d sendmail
Author: brd Date: Wed Jun 6 01:51:05 2018 New Revision: 334700 URL: https://svnweb.freebsd.org/changeset/base/334700 Log: Only create /var/log/sendmail.st if start sendmail. For those of us that never use or start sendmail, it is unneeded. Approved by: bapt (mentor) Modified: head/etc/rc.d/sendmail head/etc/sendmail/Makefile Modified: head/etc/rc.d/sendmail == --- head/etc/rc.d/sendmail Wed Jun 6 01:30:48 2018(r334699) +++ head/etc/rc.d/sendmail Wed Jun 6 01:51:05 2018(r334700) @@ -197,6 +197,10 @@ sendmail_precmd() sendmail_cert_create fi fi + + if [ ! -f /var/log/sendmail.st ]; then + /usr/bin/install -m 640 -o root -g wheel /dev/null /var/log/sendmail.st + fi } run_rc_command "$1" Modified: head/etc/sendmail/Makefile == --- head/etc/sendmail/Makefile Wed Jun 6 01:30:48 2018(r334699) +++ head/etc/sendmail/Makefile Wed Jun 6 01:51:05 2018(r334700) @@ -70,8 +70,6 @@ distribution: ${.CURDIR}/freebsd.submit.mc freebsd.submit.cf ${DESTDIR}/etc/mail ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ ${SMDIR}/helpfile ${DESTDIR}/etc/mail - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 640 \ - /dev/null ${DESTDIR}/var/log/sendmail.st .if defined(INSTALL_CF) ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${INSTALL_CF} ${DEST_CF} ___ 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: r334699 - stable/10/sys/fs/nfsserver
Author: rmacklem Date: Wed Jun 6 01:30:48 2018 New Revision: 334699 URL: https://svnweb.freebsd.org/changeset/base/334699 Log: MFC: r334396 Strengthen locking for the NFSv4.1 server DestroySession operation. If a client did a DestroySession on a session while it was still in use, the server might try to use the session structure after it is free'd. I think the client has violated RFC5661 if it does this, but this patch makes DestroySession block all other nfsd threads so no thread could be using the session when it is free'd. After the DestroySession, nfsd threads will not be able to find the session. The patch also adds a check for nd_sessionid being set, although if that was not the case it would have been all 0s and unlikely to have a false match. This might fix the crashes described in PR#228497 for the FreeNAS server. PR: 228497 Modified: stable/10/sys/fs/nfsserver/nfs_nfsdstate.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsserver/nfs_nfsdstate.c == --- stable/10/sys/fs/nfsserver/nfs_nfsdstate.c Wed Jun 6 01:21:33 2018 (r334698) +++ stable/10/sys/fs/nfsserver/nfs_nfsdstate.c Wed Jun 6 01:30:48 2018 (r334699) @@ -5938,17 +5938,32 @@ nfsrv_findsession(uint8_t *sessionid) int nfsrv_destroysession(struct nfsrv_descript *nd, uint8_t *sessionid) { - int error, samesess; + int error, igotlock, samesess; samesess = 0; - if (!NFSBCMP(sessionid, nd->nd_sessionid, NFSX_V4SESSIONID)) { + if (!NFSBCMP(sessionid, nd->nd_sessionid, NFSX_V4SESSIONID) && + (nd->nd_flag & ND_HASSEQUENCE) != 0) { samesess = 1; if ((nd->nd_flag & ND_LASTOP) == 0) return (NFSERR_BADSESSION); } + + /* Lock out other nfsd threads */ + NFSLOCKV4ROOTMUTEX(); + nfsv4_relref(_lock); + do { + igotlock = nfsv4_lock(_lock, 1, NULL, + NFSV4ROOTLOCKMUTEXPTR, NULL); + } while (igotlock == 0); + NFSUNLOCKV4ROOTMUTEX(); + error = nfsrv_freesession(NULL, sessionid); if (error == 0 && samesess != 0) nd->nd_flag &= ~ND_HASSEQUENCE; + + NFSLOCKV4ROOTMUTEX(); + nfsv4_unlock(_lock, 1); + NFSUNLOCKV4ROOTMUTEX(); 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: r334698 - stable/11/sys/fs/nfsserver
Author: rmacklem Date: Wed Jun 6 01:21:33 2018 New Revision: 334698 URL: https://svnweb.freebsd.org/changeset/base/334698 Log: MFC: r334396 Strengthen locking for the NFSv4.1 server DestroySession operation. If a client did a DestroySession on a session while it was still in use, the server might try to use the session structure after it is free'd. I think the client has violated RFC5661 if it does this, but this patch makes DestroySession block all other nfsd threads so no thread could be using the session when it is free'd. After the DestroySession, nfsd threads will not be able to find the session. The patch also adds a check for nd_sessionid being set, although if that was not the case it would have been all 0s and unlikely to have a false match. This might fix the crashes described in PR#228497 for the FreeNAS server. PR: 228497 Modified: stable/11/sys/fs/nfsserver/nfs_nfsdstate.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nfsserver/nfs_nfsdstate.c == --- stable/11/sys/fs/nfsserver/nfs_nfsdstate.c Wed Jun 6 00:59:43 2018 (r334697) +++ stable/11/sys/fs/nfsserver/nfs_nfsdstate.c Wed Jun 6 01:21:33 2018 (r334698) @@ -5946,17 +5946,32 @@ nfsrv_findsession(uint8_t *sessionid) int nfsrv_destroysession(struct nfsrv_descript *nd, uint8_t *sessionid) { - int error, samesess; + int error, igotlock, samesess; samesess = 0; - if (!NFSBCMP(sessionid, nd->nd_sessionid, NFSX_V4SESSIONID)) { + if (!NFSBCMP(sessionid, nd->nd_sessionid, NFSX_V4SESSIONID) && + (nd->nd_flag & ND_HASSEQUENCE) != 0) { samesess = 1; if ((nd->nd_flag & ND_LASTOP) == 0) return (NFSERR_BADSESSION); } + + /* Lock out other nfsd threads */ + NFSLOCKV4ROOTMUTEX(); + nfsv4_relref(_lock); + do { + igotlock = nfsv4_lock(_lock, 1, NULL, + NFSV4ROOTLOCKMUTEXPTR, NULL); + } while (igotlock == 0); + NFSUNLOCKV4ROOTMUTEX(); + error = nfsrv_freesession(NULL, sessionid); if (error == 0 && samesess != 0) nd->nd_flag &= ~ND_HASSEQUENCE; + + NFSLOCKV4ROOTMUTEX(); + nfsv4_unlock(_lock, 1); + NFSUNLOCKV4ROOTMUTEX(); 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: r334697 - stable/11/sys/vm
Author: markj Date: Wed Jun 6 00:59:43 2018 New Revision: 334697 URL: https://svnweb.freebsd.org/changeset/base/334697 Log: MFC r334389: Typo. PR: 228533 Modified: stable/11/sys/vm/vm_fault.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_fault.c == --- stable/11/sys/vm/vm_fault.c Tue Jun 5 22:27:36 2018(r334696) +++ stable/11/sys/vm/vm_fault.c Wed Jun 6 00:59:43 2018(r334697) @@ -1647,7 +1647,7 @@ vm_fault_copy_entry(vm_map_t dst_map, vm_map_t src_map * range, copying each page from the source object to the * destination object. Since the source is wired, those pages * must exist. In contrast, the destination is pageable. -* Since the destination object does share any backing storage +* Since the destination object doesn't share any backing storage * with the source object, all of its pages must be dirtied, * regardless of whether they can be written. */ ___ 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: r334650 - head/sys/dev/usb
On 5 June 2018 at 07:01, Kevin Lo wrote: > On Tue, Jun 05, 2018 at 09:52:38AM +, Eitan Adler wrote: >> Author: eadler >> Date: Tue Jun 5 09:52:38 2018 >> New Revision: 334650 >> URL: https://svnweb.freebsd.org/changeset/base/334650 >> >> Log: >> usbdevs: sync from NetBSD >> >> This adds several vendors from NetBSD's copy of the same file (r1.749). >> Prefer longer more "canonical" names where the names differed. >> >> Sort while here. >> >> Modified: >> head/sys/dev/usb/usbdevs >> >> Modified: head/sys/dev/usb/usbdevs >> == >> --- head/sys/dev/usb/usbdevs Tue Jun 5 05:24:42 2018(r334649) >> +++ head/sys/dev/usb/usbdevs Tue Jun 5 09:52:38 2018(r334650) >> @@ -60,7 +60,7 @@ vendor UNKNOWN2 0x0105 Unknown vendor >> vendor EGALAX2 0x0123 eGalax, Inc. >> vendor CHIPSBANK 0x0204 Chipsbank Microelectronics Co. >> vendor HUMAX 0x02ad HUMAX >> -vendor INTENSO 0x2109 INTENSO >> +vendor QUAN 0x01e1 Quan > > Doesn't sort. > > [snip] > >> +vendor INTENSO 0x2109 INTENSO >> vendor VIALABS 0x2109 VIA Labs > > INTENSO has the same vendor id as VIALABS? This doesn't look right. >From the origin (NetBSD): vendor INTENSO 0x2109 INTENSO vendor VIALABS 0x2109 VIA Labs I noticed this earlier and thought it might relate to vendor renames or the like. I'll try and spend more time on it. I have quite a few replies-to-commits to catch up on: I've spent too much time on "new" things and have to deal with the other stuff I've touched now. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams ___ 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: r334545 - in head/sys: contrib/zstd/lib/freebsd kern netinet/libalias sys
On Wed, Jun 6, 2018 at 12:52 AM, Gleb Smirnoff wrote: > On Tue, Jun 05, 2018 at 06:35:37PM +0200, Mateusz Guzik wrote: > M> > On 06/02/2018 17:20, Mateusz Guzik wrote: > M> > > +#ifdef _KERNEL > M> > > +#define malloc(size, type, flags) ({ > \ > M> > > + void *_malloc_item; >\ > M> > > + size_t _size = (size); > \ > M> > > + if (__builtin_constant_p(size) && __builtin_constant_p(flags) > &&\ > M> > > + ((flags) & M_ZERO)) { >\ > M> > > + _malloc_item = malloc(_size, type, (flags) &~ > M_ZERO); \ > M> > > + if (((flags) & M_WAITOK) || _malloc_item != NULL) >\ > M> > > + bzero(_malloc_item, _size); >\ > M> > > + } else { > \ > M> > > + _malloc_item = malloc(_size, type, flags); > \ > M> > > + } >\ > M> > > + _malloc_item; >\ > M> > > +}) > M> > > +#endif > M> > > M> > Mateusz, > M> > > M> > Thank you for this and for all of your performance work. It is all > very > M> > interesting stuff. > M> > > M> > > M> Thank you for the kind words. It is positive feedback like this which > M> keeps me going! > > Btw, what was the point of checking flags || result? Most places in kernel > ignore flags and just test result regerdless of M_WAITOK/M_NOWAIT. > > The result is already in a register, why do you think checking for absense > of M_WAITOK is faster that checking for !NULL _malloc_item? > This part is only reachable if flags are known at compilation time. If they contain M_WAITOK, the flag check will get elided along (we know for a fact it passes) and subsequently the NULL check will be short circuited, iow for known M_WAITOK|M_ZERO flags this is: _malloc_item = malloc(_size, type, flags & ~ M_ZERO); bzero(_malloc_item, _size); -- Mateusz Guzik ___ 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: r334696 - releng/11.2/release/doc/en_US.ISO8859-1/relnotes
Author: gjb Date: Tue Jun 5 22:27:36 2018 New Revision: 334696 URL: https://svnweb.freebsd.org/changeset/base/334696 Log: Fix two grammatical errors. Reported by: adamw Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 22:13:45 2018(r334695) +++ releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 22:27:36 2018(r334696) @@ -800,7 +800,7 @@ EC2 infrastructure. The -memory stick image installer have been changed +memory stick image installers have been changed to use the MBR partitioning scheme, which addresses a boot issue from a GPT partition scheme in non-UEFI mode. @@ -814,7 +814,7 @@ a CD image. The -memory stick image installer have been changed +memory stick image installers have been changed to use the MBR partitioning scheme, which addresses a boot issue from a GPT partition scheme in non-UEFI mode. ___ 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: r334669 - head/sys/sys
On 06/06/2018 00:07, Eric van Gyzen wrote: > On 06/05/2018 15:53, Ian Lepore wrote: >> This is a sad sad thing. Treating (bits & flagconstants) as boolean has >> a long long history in C. Surely there are literally thousand of >> occurrances in freebsd code already, so why did this one get flagged? > > I agree, and I tend to avoid adding "!= 0" unnecessarily, but I don't > feel very strongly about it. I am not sure what parts of code you work on, but turning bit operations into logical operations within conditions is the predominant FreeBSD style. Please accept it. -- Andriy Gapon ___ 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: r334695 - in head/stand: common i386/libi386 uboot/lib userboot/userboot zfs
Author: ian Date: Tue Jun 5 22:13:45 2018 New Revision: 334695 URL: https://svnweb.freebsd.org/changeset/base/334695 Log: Remove comments and assertions that are no longer valid after r330809. r330809 replaced duplication of devdesc struct fields with an embedded copy of the devdesc struct, to avoid fragility. That means all the scattered comments indicating that structs must match are no longer valid. Likewise asserts that attempted to mitigate some of the old fragility. Reviewed by: imp@ Modified: head/stand/common/disk.h head/stand/i386/libi386/biosdisk.c head/stand/i386/libi386/libi386.h head/stand/uboot/lib/libuboot.h head/stand/userboot/userboot/main.c head/stand/zfs/libzfs.h Modified: head/stand/common/disk.h == --- head/stand/common/disk.hTue Jun 5 21:55:40 2018(r334694) +++ head/stand/common/disk.hTue Jun 5 22:13:45 2018(r334695) @@ -81,9 +81,8 @@ #ifndef_DISK_H #define_DISK_H -/* Note: Must match the 'struct devdesc' in stand.h */ struct disk_devdesc { - struct devdesc dd; + struct devdesc dd; /* Must be first. */ int d_slice; int d_partition; uint64_td_offset; Modified: head/stand/i386/libi386/biosdisk.c == --- head/stand/i386/libi386/biosdisk.c Tue Jun 5 21:55:40 2018 (r334694) +++ head/stand/i386/libi386/biosdisk.c Tue Jun 5 22:13:45 2018 (r334695) @@ -78,8 +78,6 @@ struct ptable { #include "geliboot.c" #endif /* LOADER_GELI_SUPPORT */ -CTASSERT(sizeof(struct i386_devdesc) >= sizeof(struct disk_devdesc)); - #define BIOS_NUMDRIVES 0x475 #define BIOSDISK_SECSIZE 512 #define BUFSIZE(1 * BIOSDISK_SECSIZE) Modified: head/stand/i386/libi386/libi386.h == --- head/stand/i386/libi386/libi386.h Tue Jun 5 21:55:40 2018 (r334694) +++ head/stand/i386/libi386/libi386.h Tue Jun 5 22:13:45 2018 (r334695) @@ -29,11 +29,9 @@ /* * i386 fully-qualified device descriptor. - * Note, this must match struct zfs_devdesc for zfs support. */ -/* Note: Must match the 'struct devdesc' in stand.h */ struct i386_devdesc { -struct devdesc dd; +struct devdesc dd; /* Must be first. */ union { struct Modified: head/stand/uboot/lib/libuboot.h == --- head/stand/uboot/lib/libuboot.h Tue Jun 5 21:55:40 2018 (r334694) +++ head/stand/uboot/lib/libuboot.h Tue Jun 5 22:13:45 2018 (r334695) @@ -27,9 +27,8 @@ * $FreeBSD$ */ -/* Note: Must match the 'struct devdesc' in stand.h */ struct uboot_devdesc { - struct devdesc dd; + struct devdesc dd; /* Must be first. */ union { struct { int slice; Modified: head/stand/userboot/userboot/main.c == --- head/stand/userboot/userboot/main.c Tue Jun 5 21:55:40 2018 (r334694) +++ head/stand/userboot/userboot/main.c Tue Jun 5 22:13:45 2018 (r334695) @@ -159,7 +159,6 @@ extract_currdev(void) #if defined(USERBOOT_ZFS_SUPPORT) struct zfs_devdesc zdev; - CTASSERT(sizeof(struct disk_devdesc) >= sizeof(struct zfs_devdesc)); if (userboot_zfs_found) { /* Leave the pool/root guid's unassigned */ Modified: head/stand/zfs/libzfs.h == --- head/stand/zfs/libzfs.h Tue Jun 5 21:55:40 2018(r334694) +++ head/stand/zfs/libzfs.h Tue Jun 5 22:13:45 2018(r334695) @@ -33,12 +33,9 @@ /* * ZFS fully-qualified device descriptor. - * Arch-specific device descriptors should be binary compatible with this - * structure if they are to support ZFS. */ -/* Note: Must match the 'struct devdesc' in stand.h */ struct zfs_devdesc { - struct devdesc dd; + struct devdesc dd; /* Must be first. */ uint64_tpool_guid; uint64_troot_guid; }; ___ 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: r334694 - releng/11.2/release/doc/en_US.ISO8859-1/relnotes
Author: gjb Date: Tue Jun 5 21:55:40 2018 New Revision: 334694 URL: https://svnweb.freebsd.org/changeset/base/334694 Log: Add xml:id to the article tag for diff reduction when regenerating the relnotes page. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:26 2018(r334693) +++ releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:55:40 2018(r334694) @@ -11,7 +11,9 @@ ]> http://docbook.org/ns/docbook; - xmlns:xlink="http://www.w3.org/1999/xlink; version="5.0"> + xmlns:xlink="http://www.w3.org/1999/xlink; + xml:id="article" + version="5.0"> Release Notes ___ 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: r334693 - releng/11.2/release/doc/en_US.ISO8859-1/relnotes
Author: gjb Date: Tue Jun 5 21:41:26 2018 New Revision: 334693 URL: https://svnweb.freebsd.org/changeset/base/334693 Log: Document r43, ixl(4) version 1.9.9-k. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:25 2018(r334692) +++ releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:26 2018(r334693) @@ -583,6 +583,10 @@ HBAs LPe15004 and LPe160XX, and Emulex32/16GFCGEN6 HBAs LPe3100X and LPe3200X. + + The driver has been updated + to version 1.9.9-k. ___ 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: r334692 - releng/11.2/release/doc/en_US.ISO8859-1/relnotes
Author: gjb Date: Tue Jun 5 21:41:25 2018 New Revision: 334692 URL: https://svnweb.freebsd.org/changeset/base/334692 Log: Adjust wording for r33 to be more consistent with the text for i386 memstick images. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:24 2018(r334691) +++ releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:25 2018(r334692) @@ -808,12 +808,10 @@ a CD image. The - / memory stick installation images have been - changed to use the MBR partitioning scheme - instead of GPT in order to address issues - with some BIOSes that cannot boot from - GPT in non-UEFI - mode. +memory stick image installer have been changed + to use the MBR partitioning scheme, which + addresses a boot issue from a GPT partition + scheme in non-UEFI mode. ___ 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: r334691 - releng/11.2/release/doc/en_US.ISO8859-1/relnotes
Author: gjb Date: Tue Jun 5 21:41:24 2018 New Revision: 334691 URL: https://svnweb.freebsd.org/changeset/base/334691 Log: Document r333417, smartpqi(4) addition. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:23 2018(r334690) +++ releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:24 2018(r334691) @@ -630,6 +630,10 @@ The driver has been marked as deprecated, and will be removed in 12. + + The driver has been + added, providing support for Microsemi + SCSI controllers. ___ 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: r334681 - releng/11.2/release/doc/en_US.ISO8859-1/relnotes
Author: gjb Date: Tue Jun 5 21:41:14 2018 New Revision: 334681 URL: https://svnweb.freebsd.org/changeset/base/334681 Log: Document r324175, ng_iface(4) system crash fix. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:13 2018(r334680) +++ releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:14 2018(r334681) @@ -517,7 +517,8 @@ Kernel Bug Fixes - + The driver has been + updated to prevent a possible system crash. ___ 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: r334689 - releng/11.2/release/doc/en_US.ISO8859-1/relnotes
Author: gjb Date: Tue Jun 5 21:41:22 2018 New Revision: 334689 URL: https://svnweb.freebsd.org/changeset/base/334689 Log: Document r33, amd64 memstick images now use MBR instead of GPT. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:21 2018(r334688) +++ releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:22 2018(r334689) @@ -798,6 +798,14 @@ EFI. The ISO image can now be written to a memory stick as well as being used as a CD image. + + The + / memory stick installation images have been + changed to use the MBR partitioning scheme + instead of GPT in order to address issues + with some BIOSes that cannot boot from + GPT in non-UEFI + mode. ___ 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: r334684 - releng/11.2/release/doc/en_US.ISO8859-1/relnotes
Author: gjb Date: Tue Jun 5 21:41:17 2018 New Revision: 334684 URL: https://svnweb.freebsd.org/changeset/base/334684 Log: Document r329010, loader(8) quote parsing improvements. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:16 2018(r334683) +++ releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:17 2018(r334684) @@ -683,6 +683,10 @@ is not considered as a bootable pool, and a diagnostic message is printed to the console. + The has been updated to + improve quotation parsing, distinguishing between single- and + double-quotes, and check for terminating quotes. + The length of GELI passphrases entered when booting a system with encrypted disks is now hidden by default. See the configuration options in ___ 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: r334690 - releng/11.2/release/doc/en_US.ISO8859-1/relnotes
Author: gjb Date: Tue Jun 5 21:41:23 2018 New Revision: 334690 URL: https://svnweb.freebsd.org/changeset/base/334690 Log: Document r333166, Apollo Lake boot issue fix. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:22 2018(r334689) +++ releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:23 2018(r334690) @@ -523,6 +523,10 @@ The packet filter has been updated to identify layer-2 and layer-3 packets, fixing AQM packet marking. + + An issue causing boot issues with +Apollo Lake CPUs has been + fixed. ___ 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: r334682 - releng/11.2/release/doc/en_US.ISO8859-1/relnotes
Author: gjb Date: Tue Jun 5 21:41:15 2018 New Revision: 334682 URL: https://svnweb.freebsd.org/changeset/base/334682 Log: Document r325730, ipfw(4) Dummynet AQM packet marking L2/L3. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:14 2018(r334681) +++ releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:15 2018(r334682) @@ -519,6 +519,10 @@ The driver has been updated to prevent a possible system crash. + + The packet filter has been + updated to identify layer-2 and layer-3 packets, fixing +AQM packet marking. ___ 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: r334688 - releng/11.2/release/doc/en_US.ISO8859-1/relnotes
Author: gjb Date: Tue Jun 5 21:41:21 2018 New Revision: 334688 URL: https://svnweb.freebsd.org/changeset/base/334688 Log: Document r334458, libxo(3) version 0.9.0. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:20 2018(r334687) +++ releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:21 2018(r334688) @@ -398,9 +398,6 @@ The library has been updated to version 3.3.2. - The library has been - updated to version 0.8.4. - Subversion has been updated to version 1.9.7. @@ -447,6 +444,9 @@ Timezone data files have been updated to version 2018e. + + The library has been + updated to version 0.9.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: r334683 - releng/11.2/release/doc/en_US.ISO8859-1/relnotes
Author: gjb Date: Tue Jun 5 21:41:16 2018 New Revision: 334683 URL: https://svnweb.freebsd.org/changeset/base/334683 Log: Document r327920, SW_WATCHDOG is now dynamic. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:15 2018(r334682) +++ releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:16 2018(r334683) @@ -528,7 +528,10 @@ Kernel Configuration - + The facility has been + updated to make SW_WATCHDOG dynamic, + enabling the software option whenever + a hardware watchdog is not 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: r334687 - releng/11.2/release/doc/en_US.ISO8859-1/relnotes
Author: gjb Date: Tue Jun 5 21:41:20 2018 New Revision: 334687 URL: https://svnweb.freebsd.org/changeset/base/334687 Log: Document r332040, ocs_fc(4) addition. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:19 2018(r334686) +++ releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:20 2018(r334687) @@ -572,6 +572,13 @@ sponsor="">The driver has been updated to firmware version 1.16.63.0 for T4, T5, and T6 network adapters. + + The driver has been added, + supporting Emulex16/8GFCGEN5 + HBAs LPe15004 and LPe160XX, and + Emulex32/16GFCGEN6 + HBAs LPe3100X and LPe3200X. ___ 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: r334679 - releng/11.2/release/doc/en_US.ISO8859-1/relnotes
Author: gjb Date: Tue Jun 5 21:41:12 2018 New Revision: 334679 URL: https://svnweb.freebsd.org/changeset/base/334679 Log: Document r322340, fdescfs(5) updates for Linux-specific /dev/fd and /proc/self/fd behavior. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:11 2018(r334678) +++ releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:12 2018(r334679) @@ -504,6 +504,11 @@ The ABI compaibility layer has been updated to include support for musl consumers. + + The filesystem has been + updated to support -specific + /dev/fd and + /proc/self/fd behavior. ___ 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: r334685 - releng/11.2/release/doc/en_US.ISO8859-1/relnotes
Author: gjb Date: Tue Jun 5 21:41:18 2018 New Revision: 334685 URL: https://svnweb.freebsd.org/changeset/base/334685 Log: Document r329581, fix to ICMPv6 redirects. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:17 2018(r334684) +++ releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:18 2018(r334685) @@ -709,7 +709,9 @@ General Network Changes - + The protocol has been + updated to fix ICMPv6 redirects. ___ 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: r334686 - releng/11.2/release/doc/en_US.ISO8859-1/relnotes
Author: gjb Date: Tue Jun 5 21:41:19 2018 New Revision: 334686 URL: https://svnweb.freebsd.org/changeset/base/334686 Log: Document r331058, ng_pppoe(4) user-supplied Host-Uniq tag support. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:18 2018(r334685) +++ releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:19 2018(r334686) @@ -559,6 +559,10 @@ Device Drivers + The driver has been + updated to add support for user-supplied + Host-Uniq tags. + The driver has been added, providing an interface to manage supported Connect-X4 ___ 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: r334677 - releng/11.2/release/doc/en_US.ISO8859-1/relnotes
Author: gjb Date: Tue Jun 5 21:41:10 2018 New Revision: 334677 URL: https://svnweb.freebsd.org/changeset/base/334677 Log: Document r321007, msul support in Linuxulator. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:09 2018(r334676) +++ releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:10 2018(r334677) @@ -501,7 +501,9 @@ General Kernel Changes - + The ABI + compaibility layer has been updated to include support for + musl consumers. ___ 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: r334678 - releng/11.2/release/doc/en_US.ISO8859-1/relnotes
Author: gjb Date: Tue Jun 5 21:41:11 2018 New Revision: 334678 URL: https://svnweb.freebsd.org/changeset/base/334678 Log: Document r321519, boot code and loader check for unsupported ZFS feature flags. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:10 2018(r334677) +++ releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:11 2018(r334678) @@ -661,6 +661,12 @@ Boot Loader Changes + The boot code and have + been updated to check for unsupported ZFS + feature flags. If unsupported features are active, the pool + is not considered as a bootable pool, and a diagnostic message + is printed to the console. + The length of GELI passphrases entered when booting a system with encrypted disks is now hidden by default. See the configuration options in ___ 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: r334676 - releng/11.2/release/doc/en_US.ISO8859-1/relnotes
Author: gjb Date: Tue Jun 5 21:41:09 2018 New Revision: 334676 URL: https://svnweb.freebsd.org/changeset/base/334676 Log: Document r330733, zfsd(8) updated to work with any GEOM provider. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:08 2018(r334675) +++ releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:09 2018(r334676) @@ -337,6 +337,12 @@ allow the @ and ! characters in the GECOS field. + The utility has been + updated to work with any type of GEOM + provider, including , , , + and . + The utility has been updated to include a jail keyword, which when used will list the name of a instead of the numeric ___ 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: r334680 - releng/11.2/release/doc/en_US.ISO8859-1/relnotes
Author: gjb Date: Tue Jun 5 21:41:13 2018 New Revision: 334680 URL: https://svnweb.freebsd.org/changeset/base/334680 Log: Document r323447, support for multiple realtime clocks. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:12 2018(r334679) +++ releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:13 2018(r334680) @@ -509,6 +509,9 @@ updated to support -specific /dev/fd and /proc/self/fd behavior. + + Support for multiple realtime clocks has + been added. ___ 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: r334675 - releng/11.2/release/doc/en_US.ISO8859-1/relnotes
Author: gjb Date: Tue Jun 5 21:41:08 2018 New Revision: 334675 URL: https://svnweb.freebsd.org/changeset/base/334675 Log: Fix missing "_max" in the r326322 entry. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:06 2018(r334674) +++ releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:08 2018(r334675) @@ -521,8 +521,8 @@ The - p1003_1b.aio_listio has been - changed to a runtime-configurable tunable. + p1003_1b.aio_listio_max has + been changed to a runtime-configurable tunable. ___ 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: r334674 - releng/11.2/release/doc/en_US.ISO8859-1/relnotes
Author: gjb Date: Tue Jun 5 21:41:06 2018 New Revision: 334674 URL: https://svnweb.freebsd.org/changeset/base/334674 Log: Document r326322, p1003_1b.aio_listio_max is now a tunable. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:24:59 2018(r334673) +++ releng/11.2/release/doc/en_US.ISO8859-1/relnotes/article.xmlTue Jun 5 21:41:06 2018(r334674) @@ -519,7 +519,10 @@ System Tuning and Controls - + The + p1003_1b.aio_listio has been + changed to a runtime-configurable tunable. ___ 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: r334673 - in head: share/man/man4 sys/net sys/netinet sys/netinet6
Author: ae Date: Tue Jun 5 21:24:59 2018 New Revision: 334673 URL: https://svnweb.freebsd.org/changeset/base/334673 Log: Rework if_gif(4) to use new encap_lookup_t method to speedup lookup of needed interface when many gif interfaces are present. Remove rmlock from gif_softc, use epoch(9) and CK_LIST instead. Move more AF-related code into AF-related locations. Use hash table to speedup lookup of needed softc. Interfaces with GIF_IGNORE_SOURCE flag are stored in plain CK_LIST. Sysctl net.link.gif.parallel_tunnels is removed. The removal was planed 16 years ago, and actually it could work only for outbound direction. Each protocol, that can be handled by if_gif(4) interface is registered by separate encap handler, this helps avoid invoking the handler for unrelated protocols (GRE, PIM, etc.). This change allows dramatically improve performance when many gif(4) interfaces are used. Sponsored by: Yandex LLC Modified: head/share/man/man4/gif.4 head/sys/net/if_gif.c head/sys/net/if_gif.h head/sys/netinet/in_gif.c head/sys/netinet6/in6_gif.c Modified: head/share/man/man4/gif.4 == --- head/share/man/man4/gif.4 Tue Jun 5 20:54:29 2018(r334672) +++ head/share/man/man4/gif.4 Tue Jun 5 21:24:59 2018(r334673) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 10, 2015 +.Dd June 5, 2018 .Dt GIF 4 .Os .Sh NAME @@ -169,14 +169,6 @@ This behavior may be modified at runtime by setting th variable .Va net.link.gif.max_nesting to the desired level of nesting. -Additionally, -.Nm -tunnels are restricted to one per pair of end points. -Parallel tunnels may be enabled by setting the -.Xr sysctl 8 -variable -.Va net.link.gif.parallel_tunnels -to 1. .Sh SEE ALSO .Xr gre 4 , .Xr inet 4 , Modified: head/sys/net/if_gif.c == --- head/sys/net/if_gif.c Tue Jun 5 20:54:29 2018(r334672) +++ head/sys/net/if_gif.c Tue Jun 5 21:24:59 2018(r334673) @@ -2,6 +2,7 @@ * SPDX-License-Identifier: BSD-3-Clause * * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. + * Copyright (c) 2018 Andrey V. Elsukov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -39,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -85,8 +84,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include #endif /* INET6 */ #include @@ -98,32 +95,17 @@ __FBSDID("$FreeBSD$"); static const char gifname[] = "gif"; -/* - * gif_mtx protects a per-vnet gif_softc_list. - */ -static VNET_DEFINE(struct mtx, gif_mtx); -#defineV_gif_mtx VNET(gif_mtx) -static MALLOC_DEFINE(M_GIF, "gif", "Generic Tunnel Interface"); -static VNET_DEFINE(LIST_HEAD(, gif_softc), gif_softc_list); -#defineV_gif_softc_listVNET(gif_softc_list) +MALLOC_DEFINE(M_GIF, "gif", "Generic Tunnel Interface"); static struct sx gif_ioctl_sx; SX_SYSINIT(gif_ioctl_sx, _ioctl_sx, "gif_ioctl"); -#defineGIF_LIST_LOCK_INIT(x) mtx_init(_gif_mtx, "gif_mtx", \ - NULL, MTX_DEF) -#defineGIF_LIST_LOCK_DESTROY(x)mtx_destroy(_gif_mtx) -#defineGIF_LIST_LOCK(x)mtx_lock(_gif_mtx) -#defineGIF_LIST_UNLOCK(x) mtx_unlock(_gif_mtx) - void (*ng_gif_input_p)(struct ifnet *ifp, struct mbuf **mp, int af); void (*ng_gif_input_orphan_p)(struct ifnet *ifp, struct mbuf *m, int af); void (*ng_gif_attach_p)(struct ifnet *ifp); void (*ng_gif_detach_p)(struct ifnet *ifp); static int gif_check_nesting(struct ifnet *, struct mbuf *); -static int gif_set_tunnel(struct ifnet *, struct sockaddr *, -struct sockaddr *); -static voidgif_delete_tunnel(struct ifnet *); +static voidgif_delete_tunnel(struct gif_softc *); static int gif_ioctl(struct ifnet *, u_long, caddr_t); static int gif_transmit(struct ifnet *, struct mbuf *); static voidgif_qflush(struct ifnet *); @@ -132,8 +114,6 @@ static void gif_clone_destroy(struct ifnet *); static VNET_DEFINE(struct if_clone *, gif_cloner); #defineV_gif_clonerVNET(gif_cloner) -static int gifmodevent(module_t, int, void *); - SYSCTL_DECL(_net_link); static SYSCTL_NODE(_net_link, IFT_GIF, gif, CTLFLAG_RW, 0, "Generic Tunnel Interface"); @@ -153,21 +133,6 @@ static VNET_DEFINE(int, max_gif_nesting) = MAX_GIF_NES SYSCTL_INT(_net_link_gif, OID_AUTO, max_nesting, CTLFLAG_VNET | CTLFLAG_RW, _NAME(max_gif_nesting), 0, "Max nested tunnels"); -/* - * By default, we disallow creation of multiple tunnels between the same - * pair of addresses. Some applications require this
Re: svn commit: r334669 - head/sys/sys
On 06/05/2018 15:53, Ian Lepore wrote: > On Tue, 2018-06-05 at 20:34 +, Eric van Gyzen wrote: >> Author: vangyzen >> Date: Tue Jun  5 20:34:11 2018 >> New Revision: 334669 >> URL: https://svnweb.freebsd.org/changeset/base/334669 >> >> Log: >>  Make Coverity more happy with r334545 >>   >>  Coverity complains about: >>   >>   if (((flags) & M_WAITOK) || _malloc_item != NULL) >>   >>  saying: >>   >>   The expression >>   1 /* (2 | 0x100) & 2 */ || _malloc_item != NULL >>   is suspicious because it performs a Boolean operation >>   on a constant other than 0 or 1. >>   >>  Although the code is correct, add "!= 0" to make it slightly >>  more legible and to silence hundreds(?) of Coverity warnings. >>   > > This is a sad sad thing. Treating (bits & flagconstants) as boolean has > a long long history in C. Surely there are literally thousand of > occurrances in freebsd code already, so why did this one get flagged? I agree, and I tend to avoid adding "!= 0" unnecessarily, but I don't feel very strongly about it. This macro is expanded in many locations, so the number of Coverity warnings increased by hundreds in the most recent run. I care about that more than avoiding "!= 0". I don't sprinkle crap all over the code just to appease Coverity, but this one seemed perfectly reasonable. It makes the code slightly more clear and legible for some readers, and I imagine it doesn't hurt the others. Yes, there are probably many old occurrences of this, and there might be many old corresponding warnings, but I tend to focus on the recently added ones, just because they're more likely relevant. /me opens the static analysis can of worms...again Eric ___ 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: r334669 - head/sys/sys
In message <1528232004.63685.25.ca...@freebsd.org>, Ian Lepore writes: >On Tue, 2018-06-05 at 20:34 +, Eric van Gyzen wrote: >> (((flags) & M_WAITOK) || _malloc_item != NULL) > >This is a sad sad thing. Treating (bits & flagconstants) as boolean has >a long long history in C. Surely there are literally thousand of >occurrances in freebsd code already, so why did this one get flagged? FlexeLint also gets its knickers in a twist about this kind of construct and as far as I can tell the origin of that particular interpretation comes out of the MISRA C rules. In FlexeLint that specific check can be disabled, and I would imagine Coverity has a similar tweakable setting. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 p...@freebsd.org | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. ___ 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: r334669 - head/sys/sys
On Tue, 2018-06-05 at 20:34 +, Eric van Gyzen wrote: > Author: vangyzen > Date: Tue Jun  5 20:34:11 2018 > New Revision: 334669 > URL: https://svnweb.freebsd.org/changeset/base/334669 > > Log: >  Make Coverity more happy with r334545 >   >  Coverity complains about: >   >   if (((flags) & M_WAITOK) || _malloc_item != NULL) >   >  saying: >   >   The expression >   1 /* (2 | 0x100) & 2 */ || _malloc_item != NULL >   is suspicious because it performs a Boolean operation >   on a constant other than 0 or 1. >   >  Although the code is correct, add "!= 0" to make it slightly >  more legible and to silence hundreds(?) of Coverity warnings. >   This is a sad sad thing. Treating (bits & flagconstants) as boolean has a long long history in C. Surely there are literally thousand of occurrances in freebsd code already, so why did this one get flagged? -- Ian ___ 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: r334672 - head/sys/netinet6
Author: ae Date: Tue Jun 5 20:54:29 2018 New Revision: 334672 URL: https://svnweb.freebsd.org/changeset/base/334672 Log: Constify argument of in6_getscope(). Modified: head/sys/netinet6/scope6.c head/sys/netinet6/scope6_var.h Modified: head/sys/netinet6/scope6.c == --- head/sys/netinet6/scope6.c Tue Jun 5 20:51:01 2018(r334671) +++ head/sys/netinet6/scope6.c Tue Jun 5 20:54:29 2018(r334672) @@ -453,7 +453,7 @@ in6_clearscope(struct in6_addr *in6) * Return the scope identifier or zero. */ uint16_t -in6_getscope(struct in6_addr *in6) +in6_getscope(const struct in6_addr *in6) { if (IN6_IS_SCOPE_LINKLOCAL(in6) || IN6_IS_ADDR_MC_INTFACELOCAL(in6)) Modified: head/sys/netinet6/scope6_var.h == --- head/sys/netinet6/scope6_var.h Tue Jun 5 20:51:01 2018 (r334671) +++ head/sys/netinet6/scope6_var.h Tue Jun 5 20:54:29 2018 (r334672) @@ -63,7 +63,7 @@ int sa6_checkzone(struct sockaddr_in6 *); intsa6_checkzone_ifp(struct ifnet *, struct sockaddr_in6 *); intin6_setscope(struct in6_addr *, struct ifnet *, u_int32_t *); intin6_clearscope(struct in6_addr *); -uint16_t in6_getscope(struct in6_addr *); +uint16_t in6_getscope(const struct in6_addr *); uint32_t in6_getscopezone(const struct ifnet *, int); void in6_splitscope(const struct in6_addr *, struct in6_addr *, uint32_t *); struct ifnet* in6_getlinkifnet(uint32_t); ___ 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: r334671 - in head/sys: net netinet netinet6 netipsec
Author: ae Date: Tue Jun 5 20:51:01 2018 New Revision: 334671 URL: https://svnweb.freebsd.org/changeset/base/334671 Log: Rework IP encapsulation handling code. Currently it has several disadvantages: - it uses single mutex to protect internal structures. It is used by data- and control- path, thus there are no parallelism at all. - it uses single list to keep encap handlers for both INET and INET6 families. - struct encaptab keeps unneeded information (src, dst, masks, protosw), that isn't used by code in the source tree. - matches are prioritized and when many tunneling interfaces are registered, encapcheck handler of each interface is invoked for each packet. The search takes O(n) for n interfaces. All this work is done with exclusive lock held. What this patch includes: - the datapath is converted to be lockless using epoch(9) KPI. - struct encaptab now linked using CK_LIST. - all unused fields removed from struct encaptab. Several new fields addedr: min_length is the minimum packet length, that encapsulation handler expects to see; exact_match is maximum number of bits, that can return an encapsulation handler, when it wants to consume a packet. - IPv6 and IPv4 handlers are stored in separate lists; - added new "encap_lookup_t" method, that will be used later. It is targeted to speedup lookup of needed interface, when gif(4)/gre(4) have many interfaces. - the need to use protosw structure is eliminated. The only pr_input method was used from this structure, so I don't see the need to keep using it. - encap_input_t method changed to avoid using mbuf tags to store softc pointer. Now it is passed directly trough encap_input_t method. encap_getarg() funtions is removed. - all sockaddr structures and code that uses them removed. We don't have any code in the tree that uses them. All consumers use encap_attach_func() method, that relies on invoking of encapcheck() to determine the needed handler. - introduced struct encap_config, it contains parameters of encap handler that is going to be registered by encap_attach() function. - encap handlers are stored in lists ordered by exact_match value, thus handlers that need more bits to match will be checked first, and if encapcheck method returns exact_match value, the search will be stopped. - all current consumers changed to use new KPI. Reviewed by: mmacy Sponsored by: Yandex LLC Differential Revision:https://reviews.freebsd.org/D15617 Modified: head/sys/net/if_gif.c head/sys/net/if_gre.c head/sys/net/if_gre.h head/sys/net/if_me.c head/sys/net/if_stf.c head/sys/netinet/in_gif.c head/sys/netinet/ip_encap.c head/sys/netinet/ip_encap.h head/sys/netinet/ip_gre.c head/sys/netinet/ip_mroute.c head/sys/netinet/pim_var.h head/sys/netinet6/in6_gif.c head/sys/netinet6/ip6_gre.c head/sys/netinet6/ip6_mroute.c head/sys/netinet6/pim6_var.h head/sys/netipsec/xform_ipcomp.c Modified: head/sys/net/if_gif.c == --- head/sys/net/if_gif.c Tue Jun 5 20:41:06 2018(r334670) +++ head/sys/net/if_gif.c Tue Jun 5 20:51:01 2018(r334671) @@ -923,12 +923,24 @@ bad: } static void -gif_detach(struct gif_softc *sc) +gif_detach(struct gif_softc *sc, int family) { sx_assert(_ioctl_sx, SA_XLOCKED); - if (sc->gif_ecookie != NULL) - encap_detach(sc->gif_ecookie); + if (sc->gif_ecookie != NULL) { + switch (family) { +#ifdef INET + case AF_INET: + ip_encap_detach(sc->gif_ecookie); + break; +#endif +#ifdef INET6 + case AF_INET6: + ip6_encap_detach(sc->gif_ecookie); + break; +#endif + } + } sc->gif_ecookie = NULL; } @@ -1020,7 +1032,7 @@ gif_set_tunnel(struct ifnet *ifp, struct sockaddr *src } if (sc->gif_family != src->sa_family) - gif_detach(sc); + gif_detach(sc, sc->gif_family); if (sc->gif_family == 0 || sc->gif_family != src->sa_family) error = gif_attach(sc, src->sa_family); @@ -1058,7 +1070,7 @@ gif_delete_tunnel(struct ifnet *ifp) sc->gif_family = 0; GIF_WUNLOCK(sc); if (family != 0) { - gif_detach(sc); + gif_detach(sc, family); free(sc->gif_hdr, M_GIF); } ifp->if_drv_flags &= ~IFF_DRV_RUNNING; Modified: head/sys/net/if_gre.c == --- head/sys/net/if_gre.c Tue Jun 5 20:41:06 2018(r334670) +++ head/sys/net/if_gre.c Tue Jun 5 20:51:01 2018(r334671) @@ -551,12 +551,24 @@ gre_updatehdr(struct gre_softc *sc) } static void -gre_detach(struct gre_softc
Re: svn commit: r334617 - in head: . etc
On Tue, Jun 5, 2018, at 1:28 PM, Konstantin Belousov wrote: > On Wed, Jun 06, 2018 at 01:39:00AM +0700, Eugene Grosbein wrote: > > 06.06.2018 1:26, Konstantin Belousov wrote: > > > > >>> I find it often very useful to do > > >>> (cd src/etc/rc.d && make install) > > >>> Same for defaults and several other directories which in fact > > >>> contains> > >>> non-editable content. Is this planned to keep working ? > > >> > > >> The short answer is, no. All rc.d scripts get moved to the src > > >> of the program they start.> > >> > > >> That said, if there is a big need for this, we can see about > > >> options to keep them working.> > >> > > >> What are you trying to accomplish when you do this? Just verify > > >> the rc.d scripts match your src tree?> > > > > > I avoid mergemaster/etcupdate and whatever else. rc.d and /etc/rc,> > > > > > /etc/rc.subr /etc/rc.network are not suitable to etc, they are > > > binaries> > > provided by the project not for the user editing. > > > > > > When upgrading the host, esp. on HEAD, i usually refresh scripts > > > by this> > > procedure and avoid any editing and implied conflict > > > resolution > > > for real> > > configs. > > > > > > Not being able to easily install clean copies of these scripts > > > would> > > be very inconvenient and time consuming. > > > > I found that "mergemaster -iFUP" deals with unchanged files > > including mentioned rc* scripts just fine.> > That is, it automatically > > refreshes unchanged files without any > > silly questions just for change of $FreeBSD$.> > No, you missed the point. Whatever nice is the handling of > unchanged files,> use of mergemaster forces me to handle changed files, which > is exactly> what I do not want/need to do. Yes, I update crashboxes very > often, and> I want to get all new code, including the startup scripts, when > I update. The startup scripts will be installed as part of installworld. Regards, Brad Davis ___ 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: r334617 - in head: . etc
On Tue, Jun 5, 2018, at 1:07 PM, Renato Botelho wrote: > On 05/06/18 15:26, Konstantin Belousov wrote: > > On Tue, Jun 05, 2018 at 12:13:05PM -0600, Brad Davis wrote: > >> On Tue, Jun 5, 2018, at 10:46 AM, Konstantin Belousov wrote: > >>> I find it often very useful to do > >>> (cd src/etc/rc.d && make install) > >>> Same for defaults and several other directories which in fact > >>> contains> >>> non-editable content. Is this planned to keep working ? > >> > >> The short answer is, no. All rc.d scripts get moved to the src of > >> the program they start.> >> > >> That said, if there is a big need for this, we can see about > >> options to keep them working.> >> > >> What are you trying to accomplish when you do this? Just verify > >> the rc.d scripts match your src tree?> > > > I avoid mergemaster/etcupdate and whatever else. rc.d and /etc/rc, > > /etc/rc.subr /etc/rc.network are not suitable to etc, they are > > binaries> > provided by the project not for the user editing. > > > > When upgrading the host, esp. on HEAD, i usually refresh scripts > > by this> > procedure and avoid any editing and implied conflict resolution > > for real> > configs. > > > > Not being able to easily install clean copies of these scripts would> > be > > very inconvenient and time consuming. > > If I understood what Brad is saying, each rc.d script will be > installed> by the application it belongs to. So when it's installing SSH it > will> also install /etc/rc.d/sshd and you will not need to deal with rc.d > files on mergemaster anymore. > > Is it correct, Brad? Correct. Regards, Brad Davis ___ 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: r334669 - head/sys/sys
Author: vangyzen Date: Tue Jun 5 20:34:11 2018 New Revision: 334669 URL: https://svnweb.freebsd.org/changeset/base/334669 Log: Make Coverity more happy with r334545 Coverity complains about: if (((flags) & M_WAITOK) || _malloc_item != NULL) saying: The expression 1 /* (2 | 0x100) & 2 */ || _malloc_item != NULL is suspicious because it performs a Boolean operation on a constant other than 0 or 1. Although the code is correct, add "!= 0" to make it slightly more legible and to silence hundreds(?) of Coverity warnings. Reported by: Coverity Discussed with: mjg Sponsored by: Dell EMC Modified: head/sys/sys/malloc.h Modified: head/sys/sys/malloc.h == --- head/sys/sys/malloc.h Tue Jun 5 20:13:24 2018(r334668) +++ head/sys/sys/malloc.h Tue Jun 5 20:34:11 2018(r334669) @@ -191,9 +191,9 @@ void*malloc(size_t size, struct malloc_type *type, in void *_malloc_item; \ size_t _size = (size); \ if (__builtin_constant_p(size) && __builtin_constant_p(flags) &&\ - ((flags) & M_ZERO)) { \ + ((flags) & M_ZERO) != 0) { \ _malloc_item = malloc(_size, type, (flags) &~ M_ZERO); \ - if (((flags) & M_WAITOK) || _malloc_item != NULL) \ + if (((flags) & M_WAITOK) != 0 || _malloc_item != NULL) \ bzero(_malloc_item, _size); \ } else {\ _malloc_item = malloc(_size, type, flags); \ ___ 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: r334668 - head/tests/sys/audit
Author: asomers Date: Tue Jun 5 20:13:24 2018 New Revision: 334668 URL: https://svnweb.freebsd.org/changeset/base/334668 Log: audit(4): add tests for open(2) and openat(2) These syscalls are atypical, because each one corresponds to several different audit events, and they each pass several different audit class filters. Submitted by: aniketp MFC after:2 weeks Sponsored by: Google, Inc. (GSoC 2018) Differential Revision:https://reviews.freebsd.org/D15657 Added: head/tests/sys/audit/open.c (contents, props changed) Modified: head/tests/sys/audit/Makefile Modified: head/tests/sys/audit/Makefile == --- head/tests/sys/audit/Makefile Tue Jun 5 19:23:23 2018 (r334667) +++ head/tests/sys/audit/Makefile Tue Jun 5 20:13:24 2018 (r334668) @@ -7,6 +7,7 @@ ATF_TESTS_C+= file-delete ATF_TESTS_C+= file-close ATF_TESTS_C+= file-write ATF_TESTS_C+= file-read +ATF_TESTS_C+= open SRCS.file-create+= file-create.c SRCS.file-create+= utils.c @@ -18,6 +19,8 @@ SRCS.file-write+= file-write.c SRCS.file-write+= utils.c SRCS.file-read+= file-read.c SRCS.file-read+= utils.c +SRCS.open+=open.c +SRCS.open+=utils.c TEST_METADATA+= timeout="30" TEST_METADATA+= required_user="root" Added: head/tests/sys/audit/open.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/audit/open.c Tue Jun 5 20:13:24 2018(r334668) @@ -0,0 +1,191 @@ +/*- + * Copyright (c) 2018 Aniket Pandey + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* + * Note: open(2) and openat(2) have 12 events each for various values of 'flag' + * Please see: contrib/openbsm/etc/audit_event#L261 + * + * 270:AUE_OPENAT_R:openat(2) - read:fr + * 271:AUE_OPENAT_RC:openat(2) - read,creat:fc,fr,fa,fm + * 272:AUE_OPENAT_RT:openat(2) - read,trunc:fd,fr,fa,fm + * 273:AUE_OPENAT_RTC:openat(2) - read,creat,trunc:fc,fd,fr,fa,fm + * 274:AUE_OPENAT_W:openat(2) - write:fw + * 275:AUE_OPENAT_WC:openat(2) - write,creat:fc,fw,fa,fm + * 276:AUE_OPENAT_WT:openat(2) - write,trunc:fd,fw,fa,fm + * 277:AUE_OPENAT_WTC:openat(2) - write,creat,trunc:fc,fd,fw,fa,fm + * 278:AUE_OPENAT_RW:openat(2) - read,write:fr,fw + * 279:AUE_OPENAT_RWC:openat(2) - read,write,create:fc,fw,fr,fa,fm + * 280:AUE_OPENAT_RWT:openat(2) - read,write,trunc:fd,fw,fr,fa,fm + * 281:AUE_OPENAT_RWTC:openat(2) - read,write,creat,trunc:fc,fd,fw,fr,fa,fm + */ + +#include + +#include +#include + +#include "utils.h" + +static struct pollfd fds[1]; +static mode_t o_mode = 0777; +static char extregex[80]; +static const char *path = "fileforaudit"; +static const char *errpath = "adirhasnoname/fileforaudit"; + +/* + * Define test-cases for success and failure modes of both open(2) and openat(2) + */ +#define OPEN_AT_TC_DEFINE(mode, regex, flag, class) \ +ATF_TC_WITH_CLEANUP(open_ ## mode ## _success); \ +ATF_TC_HEAD(open_ ## mode ## _success, tc) \ +{ \ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " \ + "open(2) call with flags = %s", #flag); \ +} \ +ATF_TC_BODY(open_ ## mode ## _success, tc) \ +{ \ + snprintf(extregex, sizeof(extregex), \ + "open.*%s.*fileforaudit.*return,success", regex); \ + /* File needs to exist for successful open(2) invocation */ \ + ATF_REQUIRE(open(path, O_CREAT, o_mode) != -1); \ + FILE *pipefd = setup(fds, class); \ + ATF_REQUIRE(syscall(SYS_open, path, flag) != -1); \ + check_audit(fds, extregex,
Re: svn commit: r334617 - in head: . etc
06.06.2018 2:28, Konstantin Belousov wrote: >> I found that "mergemaster -iFUP" deals with unchanged files including >> mentioned rc* scripts just fine. >> That is, it automatically refreshes unchanged files without any silly >> questions just for change of $FreeBSD$. > > No, you missed the point. Whatever nice is the handling of unchanged files, > use of mergemaster forces me to handle changed files, which is exactly > what I do not want/need to do. Yes, I update crashboxes very often, and > I want to get all new code, including the startup scripts, when I update. "Changed" means "local copy changed by hands", not "changed in the repository". "mergemaster -iFUP" installs all new changes from the repo without questions for files untouched locally since last invocation of such mergemaster, so you get what you want :-) ___ 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: r334617 - in head: . etc
On Wed, Jun 06, 2018 at 01:39:00AM +0700, Eugene Grosbein wrote: > 06.06.2018 1:26, Konstantin Belousov wrote: > > >>> I find it often very useful to do > >>> (cd src/etc/rc.d && make install) > >>> Same for defaults and several other directories which in fact contains > >>> non-editable content. Is this planned to keep working ? > >> > >> The short answer is, no. All rc.d scripts get moved to the src of the > >> program they start. > >> > >> That said, if there is a big need for this, we can see about options to > >> keep them working. > >> > >> What are you trying to accomplish when you do this? Just verify the rc.d > >> scripts match your src tree? > > > > I avoid mergemaster/etcupdate and whatever else. rc.d and /etc/rc, > > /etc/rc.subr /etc/rc.network are not suitable to etc, they are binaries > > provided by the project not for the user editing. > > > > When upgrading the host, esp. on HEAD, i usually refresh scripts by this > > procedure and avoid any editing and implied conflict resolution for real > > configs. > > > > Not being able to easily install clean copies of these scripts would > > be very inconvenient and time consuming. > > I found that "mergemaster -iFUP" deals with unchanged files including > mentioned rc* scripts just fine. > That is, it automatically refreshes unchanged files without any silly > questions just for change of $FreeBSD$. No, you missed the point. Whatever nice is the handling of unchanged files, use of mergemaster forces me to handle changed files, which is exactly what I do not want/need to do. Yes, I update crashboxes very often, and I want to get all new code, including the startup scripts, when I update. ___ 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: r334667 - head/sys/dev/liquidio
Author: ae Date: Tue Jun 5 19:23:23 2018 New Revision: 334667 URL: https://svnweb.freebsd.org/changeset/base/334667 Log: tcp_lro.h requires , include it directly instead of indirect inclusion trough if_gif.h Modified: head/sys/dev/liquidio/lio_bsd.h Modified: head/sys/dev/liquidio/lio_bsd.h == --- head/sys/dev/liquidio/lio_bsd.h Tue Jun 5 18:27:09 2018 (r334666) +++ head/sys/dev/liquidio/lio_bsd.h Tue Jun 5 19:23:23 2018 (r334667) @@ -52,6 +52,7 @@ #include #include +#include #include #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"
Re: svn commit: r334617 - in head: . etc
On 05/06/18 15:26, Konstantin Belousov wrote: > On Tue, Jun 05, 2018 at 12:13:05PM -0600, Brad Davis wrote: >> On Tue, Jun 5, 2018, at 10:46 AM, Konstantin Belousov wrote: >>> I find it often very useful to do >>> (cd src/etc/rc.d && make install) >>> Same for defaults and several other directories which in fact contains >>> non-editable content. Is this planned to keep working ? >> >> The short answer is, no. All rc.d scripts get moved to the src of the >> program they start. >> >> That said, if there is a big need for this, we can see about options to keep >> them working. >> >> What are you trying to accomplish when you do this? Just verify the rc.d >> scripts match your src tree? > > I avoid mergemaster/etcupdate and whatever else. rc.d and /etc/rc, > /etc/rc.subr /etc/rc.network are not suitable to etc, they are binaries > provided by the project not for the user editing. > > When upgrading the host, esp. on HEAD, i usually refresh scripts by this > procedure and avoid any editing and implied conflict resolution for real > configs. > > Not being able to easily install clean copies of these scripts would > be very inconvenient and time consuming. If I understood what Brad is saying, each rc.d script will be installed by the application it belongs to. So when it's installing SSH it will also install /etc/rc.d/sshd and you will not need to deal with rc.d files on mergemaster anymore. Is it correct, Brad? -- Renato Botelho ___ 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: r334617 - in head: . etc
06.06.2018 1:26, Konstantin Belousov wrote: >>> I find it often very useful to do >>> (cd src/etc/rc.d && make install) >>> Same for defaults and several other directories which in fact contains >>> non-editable content. Is this planned to keep working ? >> >> The short answer is, no. All rc.d scripts get moved to the src of the >> program they start. >> >> That said, if there is a big need for this, we can see about options to keep >> them working. >> >> What are you trying to accomplish when you do this? Just verify the rc.d >> scripts match your src tree? > > I avoid mergemaster/etcupdate and whatever else. rc.d and /etc/rc, > /etc/rc.subr /etc/rc.network are not suitable to etc, they are binaries > provided by the project not for the user editing. > > When upgrading the host, esp. on HEAD, i usually refresh scripts by this > procedure and avoid any editing and implied conflict resolution for real > configs. > > Not being able to easily install clean copies of these scripts would > be very inconvenient and time consuming. I found that "mergemaster -iFUP" deals with unchanged files including mentioned rc* scripts just fine. That is, it automatically refreshes unchanged files without any silly questions just for change 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: r334666 - head
Author: emaste Date: Tue Jun 5 18:27:09 2018 New Revision: 334666 URL: https://svnweb.freebsd.org/changeset/base/334666 Log: Handle -DNO_CLEAN builds across brk/sbrk rewrite in r334626 Sponsored by: The FreeBSD Foundation Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Tue Jun 5 17:18:10 2018(r334665) +++ head/Makefile.inc1 Tue Jun 5 18:27:09 2018(r334666) @@ -810,7 +810,8 @@ _cleanobj_fast_depend_hack: .PHONY # 20180406 r332119 setlogin # 20180411 r332443 exect # 20180525 r334224 vadvise -.for f in exect fstat fstatat fstatfs getdirentries getfsstat setlogin shmat sigreturn statfs vadvise +# 20180604 r334626 brk sbrk +.for f in brk exect fstat fstatat fstatfs getdirentries getfsstat sbrk setlogin shmat sigreturn statfs vadvise .if exists(${OBJTOP}/lib/libc/.depend.${f}.o) @if egrep -qw '${f}\.[sS]' \ ${OBJTOP}/lib/libc/.depend.${f}.o; then \ ___ 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: r334617 - in head: . etc
On Tue, Jun 05, 2018 at 12:13:05PM -0600, Brad Davis wrote: > On Tue, Jun 5, 2018, at 10:46 AM, Konstantin Belousov wrote: > > I find it often very useful to do > > (cd src/etc/rc.d && make install) > > Same for defaults and several other directories which in fact contains > > non-editable content. Is this planned to keep working ? > > The short answer is, no. All rc.d scripts get moved to the src of the > program they start. > > That said, if there is a big need for this, we can see about options to keep > them working. > > What are you trying to accomplish when you do this? Just verify the rc.d > scripts match your src tree? I avoid mergemaster/etcupdate and whatever else. rc.d and /etc/rc, /etc/rc.subr /etc/rc.network are not suitable to etc, they are binaries provided by the project not for the user editing. When upgrading the host, esp. on HEAD, i usually refresh scripts by this procedure and avoid any editing and implied conflict resolution for real configs. Not being able to easily install clean copies of these scripts would be very inconvenient and time consuming. ___ 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: r334617 - in head: . etc
On Tue, Jun 5, 2018, at 10:46 AM, Konstantin Belousov wrote: > On Tue, Jun 05, 2018 at 09:24:02AM -0600, Brad Davis wrote: > > On Tue, Jun 5, 2018, at 7:00 AM, Alexander Leidinger wrote: > > > > > > Quoting Brad Davis (from Mon, 04 Jun 2018 12:55:50 > > > -0600): > > > > > > > On Mon, Jun 4, 2018, at 12:47 PM, Rodney W. Grimes wrote: > > > >> [ Charset UTF-8 unsupported, converting... ] > > > >> > On Mon, Jun 4, 2018, at 10:57 AM, Rodney W. Grimes wrote: > > > >> > > > On Mon, Jun 4, 2018, at 9:29 AM, Rodney W. Grimes wrote: > > > > > > >> > > > > I believe there are also other external consumers of this. > > > >> > > > > > > >> > > > Such as? > > > >> > > > > > >> > > Iirc some of the make release stuff calls into here, but that > > > >> > > may of changed to use src/Makefile targets. distrib-dirs comes > > > >> > > to mind. > > > >> > > > > >> > Sure, but those can go away or be updated as needed.. > > > >> > > > >> So again, no plan yet? > > > > > > > > Most of them are gone, I am still in progress on some of it. See > > > > the github branch above. > > > > > > > > My testing is all done by building release VMs and comparing them > > > > against a VM built from the last merge from HEAD. So I will update > > > > the release stuff as I go. It is my responsibility to keep the > > > > release stuff working as I change these. > > > > > > Have you checked mergemaster? IIRC it uses the distribution target. > > > > Yup, this does not affect the distribution target. > > I find it often very useful to do > (cd src/etc/rc.d && make install) > Same for defaults and several other directories which in fact contains > non-editable content. Is this planned to keep working ? The short answer is, no. All rc.d scripts get moved to the src of the program they start. That said, if there is a big need for this, we can see about options to keep them working. What are you trying to accomplish when you do this? Just verify the rc.d scripts match your src tree? Regards, Brad Davis ___ 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: r334656 - head/stand/libsa
(Should be) Fixed in r334665, sorry for the breakage. -- Ian On Tue, 2018-06-05 at 10:24 -0600, Warner Losh wrote: > There is no real reason for these to be different. Especially if it > causes > problems... > > Warner > > On Tue, Jun 5, 2018, 10:18 AM O. Hartmann > wrote: > > > > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA512 > > > > Am Tue, 5 Jun 2018 14:47:13 + (UTC) > > Ian Lepore schrieb: > > > > > > > > Author: ian > > > Date: Tue Jun  5 14:47:13 2018 > > > New Revision: 334656 > > > URL: https://svnweb.freebsd.org/changeset/base/334656 > > > > > > Log: > > >  Add vsnprintf() to libsa.  Alpha-sort the printf prototypes in > > > stand.h. > > > > > >  I'm not sure why the v*printf() functions in libsa return void > > > instead > > of > > > > > >  int, but this maintains that convention for the new function. > > > > > > Modified: > > >  head/stand/libsa/printf.c > > >  head/stand/libsa/stand.h > > > > > > Modified: head/stand/libsa/printf.c > > > > > === > > === > > > > > > --- head/stand/libsa/printf.c Tue Jun  5 13:53:37 > > > 2018(r334655) > > > +++ head/stand/libsa/printf.c Tue Jun  5 14:47:13 > > > 2018(r334656) > > > @@ -141,6 +141,20 @@ snprintf(char *buf, size_t size, const char > > > *cfmt, > > ... > > > > > >  } > > > > > >  void > > > +vsnprintf(char *buf, size_t size, const char *cfmt, va_list ap) > > > +{ > > > + struct print_buf arg; > > > + > > > + arg.buf = buf; > > > + arg.size = size; > > > + > > > + kvprintf(cfmt, _func, , 10, ap); > > > + > > > + if (arg.size >= 1) > > > + *(arg.buf)++ = 0; > > > +} > > > + > > > +void > > >  vsprintf(char *buf, const char *cfmt, va_list ap) > > >  { > > >   int retval; > > > > > > Modified: head/stand/libsa/stand.h > > > > > === > > === > > > > > > --- head/stand/libsa/stand.h  Tue Jun  5 13:53:37 > > > 2018(r334655) > > > +++ head/stand/libsa/stand.h  Tue Jun  5 14:47:13 > > > 2018(r334656) > > > @@ -268,10 +268,11 @@ extern void *reallocf(void *ptr, size_t > > > size); > > >  extern void  mallocstats(void); > > > > > >  extern int   printf(const char *fmt, ...) __printflike(1, 2); > > > -extern void  vprintf(const char *fmt, __va_list); > > >  extern int   sprintf(char *buf, const char *cfmt, ...) > > > __printflike(2, > > 3); > > > > > >  extern int   snprintf(char *buf, size_t size, const char *cfmt, > > > ...) > > > __printflike(3, 4); +extern void  vprintf(const char *fmt, > > __va_list); > > > > > >  extern void  vsprintf(char *buf, const char *cfmt, __va_list); > > > +extern void  vsnprintf(char *buf, size_t size, const char *cfmt, > > __va_list); > > > > > > > > >  extern void  twiddle(u_int callerdiv); > > >  extern void  twiddle_divisor(u_int globaldiv); > > > ___ > > > svn-src-h...@freebsd.org mailing list > > > https://lists.freebsd.org/mailman/listinfo/svn-src-head > > > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebs > > > d.org" > > > > Building world/kernel fails now with the error shown below: > > > > > > [...] > > In file included from /usr/src/stand/efi/boot1/boot1.c:34: > > - --- all_subdir_share --- > > - --- all_subdir_share/i18n/esdb/KAZAKH --- > > ===> share/i18n/esdb/KAZAKH (all) > > - --- all_subdir_stand --- > > /usr/src/stand/efi/boot1/boot_module.h:109:12: error: conflicting > > types > > for 'vsnprintf' > > extern int vsnprintf(char *str, size_t sz, const char *fmt, va_list > > ap); > >    ^ > > /usr/src/stand/libsa/stand.h:275:13: note: previous declaration is > > here > > extern void vsnprintf(char *buf, size_t size, const char *cfmt, > > __va_list); > > ^ > > 1 error generated. > > - --- all_subdir_rescue --- > > - --- depend_subdir_rescue/rescue/routed/rtquery --- > > ===> rescue/rescue/routed/rtquery (depend) > > - --- all_subdir_stand --- > > *** [boot1.o] Error code 1 > > > > make[5]: stopped in /usr/src/stand/efi/boot1 > > .ERROR_TARGET='boot1.o' > > > > .ERROR_META_FILE='/usr/obj/usr/src/amd64.amd64/stand/efi/boot1/boot > > 1.o.meta' > > .MAKE.LEVEL='5' > > MAKEFILE='' > > .MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes > > verbose' > > _ERROR_CMD='cc -target x86_64-unknown-freebsd12.0 > > - --sysroot=/usr/obj/usr/src/amd64.amd64/tmp > > -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin > > - -O2 -pipe -O3 -march=native  -Wformat -fshort-wchar -mno-red-zone > > -nostdinc > > - -I/usr/obj/usr/src/amd64.amd64/stand/libsa -I/usr/src/stand/libsa > > -D_STANDALONE > > - -I/usr/src/sys -Ddouble=jagged-little-pill -Dfloat=floaty- > > mcfloatface > > - -DLOADER_DISK_SUPPORT -ffreestanding -mno-mmx -mno-sse -mno-avx > > -mno-avx2 -msoft-float > > - -fPIC -mno-red-zone -I. -DEFI_ZFS_BOOT > > -I/usr/src/stand/efi/include > > -
svn commit: r334665 - head/stand/libsa
Author: ian Date: Tue Jun 5 17:18:10 2018 New Revision: 334665 URL: https://svnweb.freebsd.org/changeset/base/334665 Log: Make the v*printf() functions in libsa return int instead of void. This makes them compatible with the C standard signatures, avoiding spurious mismatch errors in the places where the oddball requirements of standalone code end up putting two declarations of the same function in play. Modified: head/stand/libsa/printf.c head/stand/libsa/stand.h Modified: head/stand/libsa/printf.c == --- head/stand/libsa/printf.c Tue Jun 5 15:49:35 2018(r334664) +++ head/stand/libsa/printf.c Tue Jun 5 17:18:10 2018(r334665) @@ -80,11 +80,11 @@ printf(const char *fmt, ...) return retval; } -void +int vprintf(const char *fmt, va_list ap) { - kvprintf(fmt, putchar_wrapper, NULL, 10, ap); + return (kvprintf(fmt, putchar_wrapper, NULL, 10, ap)); } int @@ -140,27 +140,32 @@ snprintf(char *buf, size_t size, const char *cfmt, ... return retval; } -void +int vsnprintf(char *buf, size_t size, const char *cfmt, va_list ap) { struct print_buf arg; + int retval; arg.buf = buf; arg.size = size; - kvprintf(cfmt, _func, , 10, ap); + retval = kvprintf(cfmt, _func, , 10, ap); if (arg.size >= 1) *(arg.buf)++ = 0; + + return (retval); } -void +int vsprintf(char *buf, const char *cfmt, va_list ap) { int retval; retval = kvprintf(cfmt, NULL, (void *)buf, 10, ap); buf[retval] = '\0'; + + return (retval); } /* Modified: head/stand/libsa/stand.h == --- head/stand/libsa/stand.hTue Jun 5 15:49:35 2018(r334664) +++ head/stand/libsa/stand.hTue Jun 5 17:18:10 2018(r334665) @@ -270,9 +270,9 @@ extern void mallocstats(void); extern int printf(const char *fmt, ...) __printflike(1, 2); extern int sprintf(char *buf, const char *cfmt, ...) __printflike(2, 3); extern int snprintf(char *buf, size_t size, const char *cfmt, ...) __printflike(3, 4); -extern voidvprintf(const char *fmt, __va_list); -extern voidvsprintf(char *buf, const char *cfmt, __va_list); -extern voidvsnprintf(char *buf, size_t size, const char *cfmt, __va_list); +extern int vprintf(const char *fmt, __va_list); +extern int vsprintf(char *buf, const char *cfmt, __va_list); +extern int vsnprintf(char *buf, size_t size, const char *cfmt, __va_list); extern voidtwiddle(u_int callerdiv); extern voidtwiddle_divisor(u_int globaldiv); ___ 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: r334617 - in head: . etc
On Tue, Jun 05, 2018 at 09:24:02AM -0600, Brad Davis wrote: > On Tue, Jun 5, 2018, at 7:00 AM, Alexander Leidinger wrote: > > > > Quoting Brad Davis (from Mon, 04 Jun 2018 12:55:50 > > -0600): > > > > > On Mon, Jun 4, 2018, at 12:47 PM, Rodney W. Grimes wrote: > > >> [ Charset UTF-8 unsupported, converting... ] > > >> > On Mon, Jun 4, 2018, at 10:57 AM, Rodney W. Grimes wrote: > > >> > > > On Mon, Jun 4, 2018, at 9:29 AM, Rodney W. Grimes wrote: > > > > >> > > > > I believe there are also other external consumers of this. > > >> > > > > > >> > > > Such as? > > >> > > > > >> > > Iirc some of the make release stuff calls into here, but that > > >> > > may of changed to use src/Makefile targets. distrib-dirs comes > > >> > > to mind. > > >> > > > >> > Sure, but those can go away or be updated as needed.. > > >> > > >> So again, no plan yet? > > > > > > Most of them are gone, I am still in progress on some of it. See > > > the github branch above. > > > > > > My testing is all done by building release VMs and comparing them > > > against a VM built from the last merge from HEAD. So I will update > > > the release stuff as I go. It is my responsibility to keep the > > > release stuff working as I change these. > > > > Have you checked mergemaster? IIRC it uses the distribution target. > > Yup, this does not affect the distribution target. I find it often very useful to do (cd src/etc/rc.d && make install) Same for defaults and several other directories which in fact contains non-editable content. Is this planned to keep working ? ___ 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: r334656 - head/stand/libsa
On Tue, 2018-06-05 at 10:24 -0600, Warner Losh wrote: > There is no real reason for these to be different. Especially if it > causes > problems... > > Warner > I'm working on a fix. -- Ian > On Tue, Jun 5, 2018, 10:18 AM O. Hartmann > wrote: > > > > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA512 > > > > Am Tue, 5 Jun 2018 14:47:13 + (UTC) > > Ian Lepore schrieb: > > > > > > > > Author: ian > > > Date: Tue Jun  5 14:47:13 2018 > > > New Revision: 334656 > > > URL: https://svnweb.freebsd.org/changeset/base/334656 > > > > > > Log: > > >  Add vsnprintf() to libsa.  Alpha-sort the printf prototypes in > > > stand.h. > > > > > >  I'm not sure why the v*printf() functions in libsa return void > > > instead > > of > > > > > >  int, but this maintains that convention for the new function. > > > > > > Modified: > > >  head/stand/libsa/printf.c > > >  head/stand/libsa/stand.h > > > > > > Modified: head/stand/libsa/printf.c > > > > > === > > === > > > > > > --- head/stand/libsa/printf.c Tue Jun  5 13:53:37 > > > 2018(r334655) > > > +++ head/stand/libsa/printf.c Tue Jun  5 14:47:13 > > > 2018(r334656) > > > @@ -141,6 +141,20 @@ snprintf(char *buf, size_t size, const char > > > *cfmt, > > ... > > > > > >  } > > > > > >  void > > > +vsnprintf(char *buf, size_t size, const char *cfmt, va_list ap) > > > +{ > > > + struct print_buf arg; > > > + > > > + arg.buf = buf; > > > + arg.size = size; > > > + > > > + kvprintf(cfmt, _func, , 10, ap); > > > + > > > + if (arg.size >= 1) > > > + *(arg.buf)++ = 0; > > > +} > > > + > > > +void > > >  vsprintf(char *buf, const char *cfmt, va_list ap) > > >  { > > >   int retval; > > > > > > Modified: head/stand/libsa/stand.h > > > > > === > > === > > > > > > --- head/stand/libsa/stand.h  Tue Jun  5 13:53:37 > > > 2018(r334655) > > > +++ head/stand/libsa/stand.h  Tue Jun  5 14:47:13 > > > 2018(r334656) > > > @@ -268,10 +268,11 @@ extern void *reallocf(void *ptr, size_t > > > size); > > >  extern void  mallocstats(void); > > > > > >  extern int   printf(const char *fmt, ...) __printflike(1, 2); > > > -extern void  vprintf(const char *fmt, __va_list); > > >  extern int   sprintf(char *buf, const char *cfmt, ...) > > > __printflike(2, > > 3); > > > > > >  extern int   snprintf(char *buf, size_t size, const char *cfmt, > > > ...) > > > __printflike(3, 4); +extern void  vprintf(const char *fmt, > > __va_list); > > > > > >  extern void  vsprintf(char *buf, const char *cfmt, __va_list); > > > +extern void  vsnprintf(char *buf, size_t size, const char *cfmt, > > __va_list); > > > > > > > > >  extern void  twiddle(u_int callerdiv); > > >  extern void  twiddle_divisor(u_int globaldiv); > > > ___ > > > svn-src-h...@freebsd.org mailing list > > > https://lists.freebsd.org/mailman/listinfo/svn-src-head > > > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebs > > > d.org" > > > > Building world/kernel fails now with the error shown below: > > > > > > [...] > > In file included from /usr/src/stand/efi/boot1/boot1.c:34: > > - --- all_subdir_share --- > > - --- all_subdir_share/i18n/esdb/KAZAKH --- > > ===> share/i18n/esdb/KAZAKH (all) > > - --- all_subdir_stand --- > > /usr/src/stand/efi/boot1/boot_module.h:109:12: error: conflicting > > types > > for 'vsnprintf' > > extern int vsnprintf(char *str, size_t sz, const char *fmt, va_list > > ap); > >    ^ > > /usr/src/stand/libsa/stand.h:275:13: note: previous declaration is > > here > > extern void vsnprintf(char *buf, size_t size, const char *cfmt, > > __va_list); > > ^ > > 1 error generated. > > - --- all_subdir_rescue --- > > - --- depend_subdir_rescue/rescue/routed/rtquery --- > > ===> rescue/rescue/routed/rtquery (depend) > > - --- all_subdir_stand --- > > *** [boot1.o] Error code 1 > > > > make[5]: stopped in /usr/src/stand/efi/boot1 > > .ERROR_TARGET='boot1.o' > > > > .ERROR_META_FILE='/usr/obj/usr/src/amd64.amd64/stand/efi/boot1/boot > > 1.o.meta' > > .MAKE.LEVEL='5' > > MAKEFILE='' > > .MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes > > verbose' > > _ERROR_CMD='cc -target x86_64-unknown-freebsd12.0 > > - --sysroot=/usr/obj/usr/src/amd64.amd64/tmp > > -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin > > - -O2 -pipe -O3 -march=native  -Wformat -fshort-wchar -mno-red-zone > > -nostdinc > > - -I/usr/obj/usr/src/amd64.amd64/stand/libsa -I/usr/src/stand/libsa > > -D_STANDALONE > > - -I/usr/src/sys -Ddouble=jagged-little-pill -Dfloat=floaty- > > mcfloatface > > - -DLOADER_DISK_SUPPORT -ffreestanding -mno-mmx -mno-sse -mno-avx > > -mno-avx2 -msoft-float > > - -fPIC -mno-red-zone -I. -DEFI_ZFS_BOOT > > -I/usr/src/stand/efi/include > > - -I/usr/src/stand/efi/include/amd64 > >
Re: svn commit: r334545 - in head/sys: contrib/zstd/lib/freebsd kern netinet/libalias sys
On Tue, Jun 5, 2018 at 5:38 PM, Eric van Gyzen wrote: > On 06/02/2018 17:20, Mateusz Guzik wrote: > > +#ifdef _KERNEL > > +#define malloc(size, type, flags) ({\ > > + void *_malloc_item; \ > > + size_t _size = (size); \ > > + if (__builtin_constant_p(size) && __builtin_constant_p(flags) &&\ > > + ((flags) & M_ZERO)) { \ > > + _malloc_item = malloc(_size, type, (flags) &~ M_ZERO); \ > > + if (((flags) & M_WAITOK) || _malloc_item != NULL) \ > > + bzero(_malloc_item, _size); \ > > + } else {\ > > + _malloc_item = malloc(_size, type, flags); \ > > + } \ > > + _malloc_item; \ > > +}) > > +#endif > > Mateusz, > > Thank you for this and for all of your performance work. It is all very > interesting stuff. > > Thank you for the kind words. It is positive feedback like this which keeps me going! > Coverity complains about this line: > > if (((flags) & M_WAITOK) || _malloc_item != NULL) > > saying: > > The expression > 1 /* (2 | 0x100) & 2 */ || _malloc_item != NULL > is suspicious because it performs a Boolean operation > on a constant other than 0 or 1. > > Would you mind adding != 0 to appease Coverity? > Please go ahead. -- Mateusz Guzik ___ 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: r334656 - head/stand/libsa
There is no real reason for these to be different. Especially if it causes problems... Warner On Tue, Jun 5, 2018, 10:18 AM O. Hartmann wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA512 > > Am Tue, 5 Jun 2018 14:47:13 + (UTC) > Ian Lepore schrieb: > > > Author: ian > > Date: Tue Jun 5 14:47:13 2018 > > New Revision: 334656 > > URL: https://svnweb.freebsd.org/changeset/base/334656 > > > > Log: > > Add vsnprintf() to libsa. Alpha-sort the printf prototypes in stand.h. > > > > I'm not sure why the v*printf() functions in libsa return void instead > of > > int, but this maintains that convention for the new function. > > > > Modified: > > head/stand/libsa/printf.c > > head/stand/libsa/stand.h > > > > Modified: head/stand/libsa/printf.c > > > == > > --- head/stand/libsa/printf.c Tue Jun 5 13:53:37 2018(r334655) > > +++ head/stand/libsa/printf.c Tue Jun 5 14:47:13 2018(r334656) > > @@ -141,6 +141,20 @@ snprintf(char *buf, size_t size, const char *cfmt, > ... > > } > > > > void > > +vsnprintf(char *buf, size_t size, const char *cfmt, va_list ap) > > +{ > > + struct print_buf arg; > > + > > + arg.buf = buf; > > + arg.size = size; > > + > > + kvprintf(cfmt, _func, , 10, ap); > > + > > + if (arg.size >= 1) > > + *(arg.buf)++ = 0; > > +} > > + > > +void > > vsprintf(char *buf, const char *cfmt, va_list ap) > > { > > int retval; > > > > Modified: head/stand/libsa/stand.h > > > == > > --- head/stand/libsa/stand.h Tue Jun 5 13:53:37 2018(r334655) > > +++ head/stand/libsa/stand.h Tue Jun 5 14:47:13 2018(r334656) > > @@ -268,10 +268,11 @@ extern void *reallocf(void *ptr, size_t size); > > extern void mallocstats(void); > > > > extern int printf(const char *fmt, ...) __printflike(1, 2); > > -extern void vprintf(const char *fmt, __va_list); > > extern int sprintf(char *buf, const char *cfmt, ...) __printflike(2, > 3); > > extern int snprintf(char *buf, size_t size, const char *cfmt, ...) > > __printflike(3, 4); +extern void vprintf(const char *fmt, > __va_list); > > extern void vsprintf(char *buf, const char *cfmt, __va_list); > > +extern void vsnprintf(char *buf, size_t size, const char *cfmt, > __va_list); > > > > extern void twiddle(u_int callerdiv); > > extern void twiddle_divisor(u_int globaldiv); > > ___ > > svn-src-h...@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/svn-src-head > > To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org" > > > Building world/kernel fails now with the error shown below: > > > [...] > In file included from /usr/src/stand/efi/boot1/boot1.c:34: > - --- all_subdir_share --- > - --- all_subdir_share/i18n/esdb/KAZAKH --- > ===> share/i18n/esdb/KAZAKH (all) > - --- all_subdir_stand --- > /usr/src/stand/efi/boot1/boot_module.h:109:12: error: conflicting types > for 'vsnprintf' > extern int vsnprintf(char *str, size_t sz, const char *fmt, va_list ap); >^ > /usr/src/stand/libsa/stand.h:275:13: note: previous declaration is here > extern void vsnprintf(char *buf, size_t size, const char *cfmt, > __va_list); > ^ > 1 error generated. > - --- all_subdir_rescue --- > - --- depend_subdir_rescue/rescue/routed/rtquery --- > ===> rescue/rescue/routed/rtquery (depend) > - --- all_subdir_stand --- > *** [boot1.o] Error code 1 > > make[5]: stopped in /usr/src/stand/efi/boot1 > .ERROR_TARGET='boot1.o' > > .ERROR_META_FILE='/usr/obj/usr/src/amd64.amd64/stand/efi/boot1/boot1.o.meta' > .MAKE.LEVEL='5' > MAKEFILE='' > .MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes verbose' > _ERROR_CMD='cc -target x86_64-unknown-freebsd12.0 > - --sysroot=/usr/obj/usr/src/amd64.amd64/tmp > -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin > - -O2 -pipe -O3 -march=native -Wformat -fshort-wchar -mno-red-zone > -nostdinc > - -I/usr/obj/usr/src/amd64.amd64/stand/libsa -I/usr/src/stand/libsa > -D_STANDALONE > - -I/usr/src/sys -Ddouble=jagged-little-pill -Dfloat=floaty-mcfloatface > - -DLOADER_DISK_SUPPORT -ffreestanding -mno-mmx -mno-sse -mno-avx > -mno-avx2 -msoft-float > - -fPIC -mno-red-zone -I. -DEFI_ZFS_BOOT -I/usr/src/stand/efi/include > - -I/usr/src/stand/efi/include/amd64 > -I/usr/src/sys/contrib/dev/acpica/include > - -DEFI_UFS_BOOT -I/usr/src/stand/common -fPIC -DNDEBUG -std=gnu99 > -Wsystem-headers > - -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int > -Wno-unused-const-variable > - -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality > - -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef > - -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum > -Wno-knr-promoted-parameter > - -Wno-parentheses -Wno-format -Qunused-arguments -c >
Re: svn commit: r334656 - head/stand/libsa
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Am Tue, 5 Jun 2018 14:47:13 + (UTC) Ian Lepore schrieb: > Author: ian > Date: Tue Jun 5 14:47:13 2018 > New Revision: 334656 > URL: https://svnweb.freebsd.org/changeset/base/334656 > > Log: > Add vsnprintf() to libsa. Alpha-sort the printf prototypes in stand.h. > > I'm not sure why the v*printf() functions in libsa return void instead of > int, but this maintains that convention for the new function. > > Modified: > head/stand/libsa/printf.c > head/stand/libsa/stand.h > > Modified: head/stand/libsa/printf.c > == > --- head/stand/libsa/printf.c Tue Jun 5 13:53:37 2018(r334655) > +++ head/stand/libsa/printf.c Tue Jun 5 14:47:13 2018(r334656) > @@ -141,6 +141,20 @@ snprintf(char *buf, size_t size, const char *cfmt, ... > } > > void > +vsnprintf(char *buf, size_t size, const char *cfmt, va_list ap) > +{ > + struct print_buf arg; > + > + arg.buf = buf; > + arg.size = size; > + > + kvprintf(cfmt, _func, , 10, ap); > + > + if (arg.size >= 1) > + *(arg.buf)++ = 0; > +} > + > +void > vsprintf(char *buf, const char *cfmt, va_list ap) > { > int retval; > > Modified: head/stand/libsa/stand.h > == > --- head/stand/libsa/stand.h Tue Jun 5 13:53:37 2018(r334655) > +++ head/stand/libsa/stand.h Tue Jun 5 14:47:13 2018(r334656) > @@ -268,10 +268,11 @@ extern void *reallocf(void *ptr, size_t size); > extern void mallocstats(void); > > extern int printf(const char *fmt, ...) __printflike(1, 2); > -extern void vprintf(const char *fmt, __va_list); > extern int sprintf(char *buf, const char *cfmt, ...) __printflike(2, 3); > extern int snprintf(char *buf, size_t size, const char *cfmt, ...) > __printflike(3, 4); +extern void vprintf(const char *fmt, __va_list); > extern void vsprintf(char *buf, const char *cfmt, __va_list); > +extern void vsnprintf(char *buf, size_t size, const char *cfmt, __va_list); > > extern void twiddle(u_int callerdiv); > extern void twiddle_divisor(u_int globaldiv); > ___ > svn-src-h...@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org" Building world/kernel fails now with the error shown below: [...] In file included from /usr/src/stand/efi/boot1/boot1.c:34: - --- all_subdir_share --- - --- all_subdir_share/i18n/esdb/KAZAKH --- ===> share/i18n/esdb/KAZAKH (all) - --- all_subdir_stand --- /usr/src/stand/efi/boot1/boot_module.h:109:12: error: conflicting types for 'vsnprintf' extern int vsnprintf(char *str, size_t sz, const char *fmt, va_list ap); ^ /usr/src/stand/libsa/stand.h:275:13: note: previous declaration is here extern void vsnprintf(char *buf, size_t size, const char *cfmt, __va_list); ^ 1 error generated. - --- all_subdir_rescue --- - --- depend_subdir_rescue/rescue/routed/rtquery --- ===> rescue/rescue/routed/rtquery (depend) - --- all_subdir_stand --- *** [boot1.o] Error code 1 make[5]: stopped in /usr/src/stand/efi/boot1 .ERROR_TARGET='boot1.o' .ERROR_META_FILE='/usr/obj/usr/src/amd64.amd64/stand/efi/boot1/boot1.o.meta' .MAKE.LEVEL='5' MAKEFILE='' .MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes verbose' _ERROR_CMD='cc -target x86_64-unknown-freebsd12.0 - --sysroot=/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin - -O2 -pipe -O3 -march=native -Wformat -fshort-wchar -mno-red-zone -nostdinc - -I/usr/obj/usr/src/amd64.amd64/stand/libsa -I/usr/src/stand/libsa -D_STANDALONE - -I/usr/src/sys -Ddouble=jagged-little-pill -Dfloat=floaty-mcfloatface - -DLOADER_DISK_SUPPORT -ffreestanding -mno-mmx -mno-sse -mno-avx -mno-avx2 -msoft-float - -fPIC -mno-red-zone -I. -DEFI_ZFS_BOOT -I/usr/src/stand/efi/include - -I/usr/src/stand/efi/include/amd64 -I/usr/src/sys/contrib/dev/acpica/include - -DEFI_UFS_BOOT -I/usr/src/stand/common -fPIC -DNDEBUG -std=gnu99 -Wsystem-headers - -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable - -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality - -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef - -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter - -Wno-parentheses -Wno-format -Qunused-arguments -c /usr/src/stand/efi/boot1/boot1.c -o boot1.o; ;' ... Sources are at revision 334664. Kind regards, oh - -- O. Hartmann Ich widerspreche der Nutzung oder Übermittlung meiner Daten für Werbezwecke oder für die Markt- oder Meinungsforschung (§ 28 Abs. 4 BDSG). -BEGIN PGP SIGNATURE- iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCWxa3zgAKCRDS528fyFhY
svn commit: r334664 - in head/sys/compat/linuxkpi/common: include/linux src
Author: hselasky Date: Tue Jun 5 15:49:35 2018 New Revision: 334664 URL: https://svnweb.freebsd.org/changeset/base/334664 Log: Declare and set the global "system_highpri_wq" workqueue structure pointer in the LinuxKPI. Submitted by: Johannes Lundberg MFC after:1 week Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: head/sys/compat/linuxkpi/common/include/linux/workqueue.h head/sys/compat/linuxkpi/common/src/linux_work.c Modified: head/sys/compat/linuxkpi/common/include/linux/workqueue.h == --- head/sys/compat/linuxkpi/common/include/linux/workqueue.h Tue Jun 5 15:46:16 2018(r334663) +++ head/sys/compat/linuxkpi/common/include/linux/workqueue.h Tue Jun 5 15:49:35 2018(r334664) @@ -214,6 +214,7 @@ do { \ extern struct workqueue_struct *system_wq; extern struct workqueue_struct *system_long_wq; extern struct workqueue_struct *system_unbound_wq; +extern struct workqueue_struct *system_highpri_wq; extern struct workqueue_struct *system_power_efficient_wq; extern void linux_init_delayed_work(struct delayed_work *, work_func_t); Modified: head/sys/compat/linuxkpi/common/src/linux_work.c == --- head/sys/compat/linuxkpi/common/src/linux_work.cTue Jun 5 15:46:16 2018(r334663) +++ head/sys/compat/linuxkpi/common/src/linux_work.cTue Jun 5 15:49:35 2018(r334664) @@ -55,6 +55,7 @@ static struct workqueue_struct *linux_system_long_wq; struct workqueue_struct *system_wq; struct workqueue_struct *system_long_wq; struct workqueue_struct *system_unbound_wq; +struct workqueue_struct *system_highpri_wq; struct workqueue_struct *system_power_efficient_wq; static int linux_default_wq_cpus = 4; @@ -598,6 +599,7 @@ linux_work_init(void *arg) system_wq = linux_system_short_wq; system_power_efficient_wq = linux_system_short_wq; system_unbound_wq = linux_system_short_wq; + system_highpri_wq = linux_system_short_wq; } SYSINIT(linux_work_init, SI_SUB_TASKQ, SI_ORDER_THIRD, linux_work_init, NULL); @@ -612,5 +614,6 @@ linux_work_uninit(void *arg) system_wq = NULL; system_power_efficient_wq = NULL; system_unbound_wq = NULL; + system_highpri_wq = NULL; } SYSUNINIT(linux_work_uninit, SI_SUB_TASKQ, SI_ORDER_THIRD, linux_work_uninit, 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: r334663 - head/sys/compat/linuxkpi/common/include/linux
Author: hselasky Date: Tue Jun 5 15:46:16 2018 New Revision: 334663 URL: https://svnweb.freebsd.org/changeset/base/334663 Log: Implement the INIT_DELAYED_WORK_ONSTACK() function macro in the LinuxKPI. Submitted by: Johannes Lundberg MFC after:1 week Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: head/sys/compat/linuxkpi/common/include/linux/workqueue.h Modified: head/sys/compat/linuxkpi/common/include/linux/workqueue.h == --- head/sys/compat/linuxkpi/common/include/linux/workqueue.h Tue Jun 5 15:42:35 2018(r334662) +++ head/sys/compat/linuxkpi/common/include/linux/workqueue.h Tue Jun 5 15:46:16 2018(r334663) @@ -117,6 +117,9 @@ do { \ #defineINIT_DELAYED_WORK(dwork, fn) \ linux_init_delayed_work(dwork, fn) +#defineINIT_DELAYED_WORK_ONSTACK(dwork, fn) \ + linux_init_delayed_work(dwork, fn) + #defineINIT_DEFERRABLE_WORK(dwork, fn) \ INIT_DELAYED_WORK(dwork, fn) ___ 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: r334662 - head/sys/compat/linuxkpi/common/include/linux
Author: hselasky Date: Tue Jun 5 15:42:35 2018 New Revision: 334662 URL: https://svnweb.freebsd.org/changeset/base/334662 Log: Define the __kernel_size_t type in the LinuxKPI. Submitted by: Johannes Lundberg MFC after:1 week Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: head/sys/compat/linuxkpi/common/include/linux/types.h Modified: head/sys/compat/linuxkpi/common/include/linux/types.h == --- head/sys/compat/linuxkpi/common/include/linux/types.h Tue Jun 5 15:40:09 2018(r334661) +++ head/sys/compat/linuxkpi/common/include/linux/types.h Tue Jun 5 15:42:35 2018(r334662) @@ -62,6 +62,8 @@ typedef unsigned long pgoff_t; typedef u64 phys_addr_t; +typedef size_t __kernel_size_t; + #defineDECLARE_BITMAP(n, bits) \ unsigned long n[howmany(bits, sizeof(long) * 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: r334661 - head/sys/compat/linuxkpi/common/include/linux
Author: hselasky Date: Tue Jun 5 15:40:09 2018 New Revision: 334661 URL: https://svnweb.freebsd.org/changeset/base/334661 Log: Implement the task_pid_vnr() function macro in the LinuxKPI. Submitted by: Johannes Lundberg MFC after:1 week Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: head/sys/compat/linuxkpi/common/include/linux/sched.h Modified: head/sys/compat/linuxkpi/common/include/linux/sched.h == --- head/sys/compat/linuxkpi/common/include/linux/sched.h Tue Jun 5 15:37:28 2018(r334660) +++ head/sys/compat/linuxkpi/common/include/linux/sched.h Tue Jun 5 15:40:09 2018(r334661) @@ -89,6 +89,7 @@ struct task_struct { #definetask_pid_group_leader(task) (task)->task_thread->td_proc->p_pid #definetask_pid(task) ((task)->pid) #definetask_pid_nr(task) ((task)->pid) +#definetask_pid_vnr(task) ((task)->pid) #defineget_pid(x) (x) #defineput_pid(x) do { } while (0) #definecurrent_euid() (curthread->td_ucred->cr_uid) ___ 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: r334545 - in head/sys: contrib/zstd/lib/freebsd kern netinet/libalias sys
On 06/02/2018 17:20, Mateusz Guzik wrote: > +#ifdef _KERNEL > +#define malloc(size, type, flags) ({\ > + void *_malloc_item; \ > + size_t _size = (size); \ > + if (__builtin_constant_p(size) && __builtin_constant_p(flags) &&\ > + ((flags) & M_ZERO)) { \ > + _malloc_item = malloc(_size, type, (flags) &~ M_ZERO); \ > + if (((flags) & M_WAITOK) || _malloc_item != NULL) \ > + bzero(_malloc_item, _size); \ > + } else {\ > + _malloc_item = malloc(_size, type, flags); \ > + } \ > + _malloc_item; \ > +}) > +#endif Mateusz, Thank you for this and for all of your performance work. It is all very interesting stuff. Coverity complains about this line: if (((flags) & M_WAITOK) || _malloc_item != NULL) saying: The expression 1 /* (2 | 0x100) & 2 */ || _malloc_item != NULL is suspicious because it performs a Boolean operation on a constant other than 0 or 1. Would you mind adding != 0 to appease Coverity? Thanks, Eric ___ 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: r334660 - head/sys/compat/linuxkpi/common/include/linux
Author: hselasky Date: Tue Jun 5 15:37:28 2018 New Revision: 334660 URL: https://svnweb.freebsd.org/changeset/base/334660 Log: Add "access" function pointer to the "vm_operations_struct" structure in the LinuxKPI. While at it document when to use the "virtual_address" or the "address" field in the "vm_fault" structure. Submitted by: Johannes Lundberg MFC after:1 week Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: head/sys/compat/linuxkpi/common/include/linux/mm.h Modified: head/sys/compat/linuxkpi/common/include/linux/mm.h == --- head/sys/compat/linuxkpi/common/include/linux/mm.h Tue Jun 5 15:30:36 2018(r334659) +++ head/sys/compat/linuxkpi/common/include/linux/mm.h Tue Jun 5 15:37:28 2018(r334660) @@ -120,8 +120,8 @@ struct vm_fault { pgoff_t pgoff; union { /* user-space address */ - void *virtual_address; - unsigned long address; + void *virtual_address; /* < 4.11 */ + unsigned long address; /* >= 4.11 */ }; struct page *page; struct vm_area_struct *vma; @@ -131,6 +131,7 @@ struct vm_operations_struct { void(*open) (struct vm_area_struct *); void(*close) (struct vm_area_struct *); int (*fault) (struct vm_area_struct *, struct vm_fault *); + int (*access) (struct vm_area_struct *, unsigned long, void *, int, 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: r334659 - head/sys/compat/linuxkpi/common/include/linux
Author: hselasky Date: Tue Jun 5 15:30:36 2018 New Revision: 334659 URL: https://svnweb.freebsd.org/changeset/base/334659 Log: Implement mul_u32_u32() function in the LinuxKPI. Submitted by: Johannes Lundberg MFC after:1 week Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: head/sys/compat/linuxkpi/common/include/linux/math64.h Modified: head/sys/compat/linuxkpi/common/include/linux/math64.h == --- head/sys/compat/linuxkpi/common/include/linux/math64.h Tue Jun 5 15:20:20 2018(r334658) +++ head/sys/compat/linuxkpi/common/include/linux/math64.h Tue Jun 5 15:30:36 2018(r334659) @@ -84,4 +84,11 @@ div_u64(uint64_t dividend, uint32_t divisor) return (dividend / divisor); } +static inline uint64_t +mul_u32_u32(uint32_t a, uint32_t b) +{ + + return ((uint64_t)a * b); +} + #endif /* _LINUX_MATH64_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"
Re: svn commit: r334617 - in head: . etc
On Tue, Jun 5, 2018, at 7:00 AM, Alexander Leidinger wrote: > > Quoting Brad Davis (from Mon, 04 Jun 2018 12:55:50 -0600): > > > On Mon, Jun 4, 2018, at 12:47 PM, Rodney W. Grimes wrote: > >> [ Charset UTF-8 unsupported, converting... ] > >> > On Mon, Jun 4, 2018, at 10:57 AM, Rodney W. Grimes wrote: > >> > > > On Mon, Jun 4, 2018, at 9:29 AM, Rodney W. Grimes wrote: > > >> > > > > I believe there are also other external consumers of this. > >> > > > > >> > > > Such as? > >> > > > >> > > Iirc some of the make release stuff calls into here, but that > >> > > may of changed to use src/Makefile targets. distrib-dirs comes > >> > > to mind. > >> > > >> > Sure, but those can go away or be updated as needed.. > >> > >> So again, no plan yet? > > > > Most of them are gone, I am still in progress on some of it. See > > the github branch above. > > > > My testing is all done by building release VMs and comparing them > > against a VM built from the last merge from HEAD. So I will update > > the release stuff as I go. It is my responsibility to keep the > > release stuff working as I change these. > > Have you checked mergemaster? IIRC it uses the distribution target. Yup, this does not affect the distribution target. Regards, Brad Davis ___ 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: r334658 - head/sys/compat/linuxkpi/common/include/linux
Author: hselasky Date: Tue Jun 5 15:20:20 2018 New Revision: 334658 URL: https://svnweb.freebsd.org/changeset/base/334658 Log: Implement timer_setup() and from_timer() function macros in the LinuxKPI. Submitted by: Johannes Lundberg MFC after:1 week Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: head/sys/compat/linuxkpi/common/include/linux/timer.h Modified: head/sys/compat/linuxkpi/common/include/linux/timer.h == --- head/sys/compat/linuxkpi/common/include/linux/timer.h Tue Jun 5 15:05:26 2018(r334657) +++ head/sys/compat/linuxkpi/common/include/linux/timer.h Tue Jun 5 15:20:20 2018(r334658) @@ -39,7 +39,10 @@ struct timer_list { struct callout callout; - void(*function) (unsigned long); + union { + void (*function) (unsigned long); /* < v4.15 */ + void (*function_415) (struct timer_list *); + }; unsigned long data; int expires; }; @@ -47,6 +50,16 @@ struct timer_list { extern unsigned long linux_timer_hz_mask; #defineTIMER_IRQSAFE 0x0001 + +#definefrom_timer(var, arg, field) \ +container_of(arg, typeof(*(var)), field) + +#definetimer_setup(timer, func, flags) do { \ + CTASSERT(((flags) & ~TIMER_IRQSAFE) == 0); \ + (timer)->function_415 = (func); \ + (timer)->data = (unsigned long)(timer); \ + callout_init(&(timer)->callout, 1); \ +} while (0) #definesetup_timer(timer, func, dat) do { \ (timer)->function = (func); \ ___ 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: r334657 - head/sys/dev/ocs_fc
Author: ram Date: Tue Jun 5 15:05:26 2018 New Revision: 334657 URL: https://svnweb.freebsd.org/changeset/base/334657 Log: Issue: Utility hangs when OCS_IOCTL_CMD_MGMT_GET_ALL called in parallel on port 0 and port 1. Fix: Using static structure for results is corrupting the second ioctl request. Removed static for results structure. Approved by: ken MFC after: 3 days Modified: head/sys/dev/ocs_fc/ocs_mgmt.c Modified: head/sys/dev/ocs_fc/ocs_mgmt.c == --- head/sys/dev/ocs_fc/ocs_mgmt.c Tue Jun 5 14:47:13 2018 (r334656) +++ head/sys/dev/ocs_fc/ocs_mgmt.c Tue Jun 5 15:05:26 2018 (r334657) @@ -2373,7 +2373,7 @@ static void get_nv_wwpn(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) { char result_string[24]; - static ocs_mgmt_get_nvparms_result_t result; + ocs_mgmt_get_nvparms_result_t result; ocs_sem_init(&(result.semaphore), 0, "get_nv_wwpn"); @@ -2411,7 +2411,7 @@ static void get_nv_wwnn(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) { char result_string[24]; - static ocs_mgmt_get_nvparms_result_t result; + ocs_mgmt_get_nvparms_result_t result; ocs_sem_init(&(result.semaphore), 0, "get_nv_wwnn"); ___ 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: r334656 - head/stand/libsa
Author: ian Date: Tue Jun 5 14:47:13 2018 New Revision: 334656 URL: https://svnweb.freebsd.org/changeset/base/334656 Log: Add vsnprintf() to libsa. Alpha-sort the printf prototypes in stand.h. I'm not sure why the v*printf() functions in libsa return void instead of int, but this maintains that convention for the new function. Modified: head/stand/libsa/printf.c head/stand/libsa/stand.h Modified: head/stand/libsa/printf.c == --- head/stand/libsa/printf.c Tue Jun 5 13:53:37 2018(r334655) +++ head/stand/libsa/printf.c Tue Jun 5 14:47:13 2018(r334656) @@ -141,6 +141,20 @@ snprintf(char *buf, size_t size, const char *cfmt, ... } void +vsnprintf(char *buf, size_t size, const char *cfmt, va_list ap) +{ + struct print_buf arg; + + arg.buf = buf; + arg.size = size; + + kvprintf(cfmt, _func, , 10, ap); + + if (arg.size >= 1) + *(arg.buf)++ = 0; +} + +void vsprintf(char *buf, const char *cfmt, va_list ap) { int retval; Modified: head/stand/libsa/stand.h == --- head/stand/libsa/stand.hTue Jun 5 13:53:37 2018(r334655) +++ head/stand/libsa/stand.hTue Jun 5 14:47:13 2018(r334656) @@ -268,10 +268,11 @@ extern void *reallocf(void *ptr, size_t size); extern voidmallocstats(void); extern int printf(const char *fmt, ...) __printflike(1, 2); -extern voidvprintf(const char *fmt, __va_list); extern int sprintf(char *buf, const char *cfmt, ...) __printflike(2, 3); extern int snprintf(char *buf, size_t size, const char *cfmt, ...) __printflike(3, 4); +extern voidvprintf(const char *fmt, __va_list); extern voidvsprintf(char *buf, const char *cfmt, __va_list); +extern voidvsnprintf(char *buf, size_t size, const char *cfmt, __va_list); extern voidtwiddle(u_int callerdiv); extern voidtwiddle_divisor(u_int globaldiv); ___ 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: r334650 - head/sys/dev/usb
On Tue, Jun 05, 2018 at 09:52:38AM +, Eitan Adler wrote: > Author: eadler > Date: Tue Jun 5 09:52:38 2018 > New Revision: 334650 > URL: https://svnweb.freebsd.org/changeset/base/334650 > > Log: > usbdevs: sync from NetBSD > > This adds several vendors from NetBSD's copy of the same file (r1.749). > Prefer longer more "canonical" names where the names differed. > > Sort while here. > > Modified: > head/sys/dev/usb/usbdevs > > Modified: head/sys/dev/usb/usbdevs > == > --- head/sys/dev/usb/usbdevs Tue Jun 5 05:24:42 2018(r334649) > +++ head/sys/dev/usb/usbdevs Tue Jun 5 09:52:38 2018(r334650) > @@ -60,7 +60,7 @@ vendor UNKNOWN2 0x0105 Unknown vendor > vendor EGALAX2 0x0123 eGalax, Inc. > vendor CHIPSBANK 0x0204 Chipsbank Microelectronics Co. > vendor HUMAX 0x02ad HUMAX > -vendor INTENSO 0x2109 INTENSO > +vendor QUAN 0x01e1 Quan Doesn't sort. [snip] > +vendor INTENSO 0x2109 INTENSO > vendor VIALABS 0x2109 VIA Labs INTENSO has the same vendor id as VIALABS? This doesn't look right. ___ 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: r334655 - stable/11/lib/libc/stdio
Author: kib Date: Tue Jun 5 13:53:37 2018 New Revision: 334655 URL: https://svnweb.freebsd.org/changeset/base/334655 Log: MFC r334031: Implement printf(3) family %m format string extension. Modified: stable/11/lib/libc/stdio/printf.3 stable/11/lib/libc/stdio/vfprintf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/stdio/printf.3 == --- stable/11/lib/libc/stdio/printf.3 Tue Jun 5 13:46:18 2018 (r334654) +++ stable/11/lib/libc/stdio/printf.3 Tue Jun 5 13:53:37 2018 (r334655) @@ -32,7 +32,7 @@ .\" @(#)printf.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd December 2, 2009 +.Dd May 22, 2018 .Dt PRINTF 3 .Os .Sh NAME @@ -642,6 +642,12 @@ integer indicated by the .Vt "int *" (or variant) pointer argument. No argument is converted. +.It Cm m +Print the string representation of the error code stored in the +.Dv errno +variable at the beginning of the call, as returned by +.Xr strerror 3 . +No argument is taken. .It Cm % A .Ql % @@ -749,6 +755,12 @@ and .Cm \&%U are not standard and are provided only for backward compatibility. +The conversion format +.Cm \&%m +is also not standard and provides the popular extension from the +.Tn GNU C +library. +.Pp The effect of padding the .Cm %p format with zeros (either by the @@ -786,9 +798,11 @@ or the return value would be too large to be represent .El .Sh SEE ALSO .Xr printf 1 , +.Xr errno 2 , .Xr fmtcheck 3 , .Xr scanf 3 , .Xr setlocale 3 , +.Xr strerror 3 , .Xr wprintf 3 .Sh STANDARDS Subject to the caveats noted in the @@ -841,6 +855,12 @@ and .Fn vdprintf functions were added in .Fx 8.0 . +The +.Cm \&%m +format extension first appeared in the +.Tn GNU C +library, and was implemented in +.Fx 12.0 . .Sh BUGS The .Nm Modified: stable/11/lib/libc/stdio/vfprintf.c == --- stable/11/lib/libc/stdio/vfprintf.c Tue Jun 5 13:46:18 2018 (r334654) +++ stable/11/lib/libc/stdio/vfprintf.c Tue Jun 5 13:53:37 2018 (r334655) @@ -315,6 +315,7 @@ __vfprintf(FILE *fp, locale_t locale, const char *fmt0 int ret;/* return value accumulator */ int width; /* width from format (%8d), or 0 */ int prec; /* precision from format; <0 for N/A */ + int saved_errno; char sign; /* sign prefix (' ', '+', '-', or \0) */ struct grouping_state gs; /* thousands' grouping info */ @@ -464,6 +465,7 @@ __vfprintf(FILE *fp, locale_t locale, const char *fmt0 savserr = fp->_flags & __SERR; fp->_flags &= ~__SERR; + saved_errno = errno; convbuf = NULL; fmt = (char *)fmt0; argtable = NULL; @@ -774,6 +776,11 @@ fp_common: } break; #endif /* !NO_FLOATING_POINT */ + case 'm': + cp = strerror(saved_errno); + size = (prec >= 0) ? strnlen(cp, prec) : strlen(cp); + sign = '\0'; + break; case 'n': /* * Assignment-like behavior is specified if the ___ 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: r334654 - in stable/11: include lib/libc/softfloat/bits64 lib/msun lib/msun/man lib/msun/src
Author: kib Date: Tue Jun 5 13:46:18 2018 New Revision: 334654 URL: https://svnweb.freebsd.org/changeset/base/334654 Log: MFC r333577: Add implementations for clog(3), clogf(3), and clogl(3). PR: 216863 Added: stable/11/lib/msun/man/clog.3 - copied unchanged from r333577, head/lib/msun/man/clog.3 stable/11/lib/msun/src/s_clog.c - copied unchanged from r333577, head/lib/msun/src/s_clog.c stable/11/lib/msun/src/s_clogf.c - copied unchanged from r333577, head/lib/msun/src/s_clogf.c stable/11/lib/msun/src/s_clogl.c - copied unchanged from r333577, head/lib/msun/src/s_clogl.c Modified: stable/11/include/complex.h stable/11/lib/libc/softfloat/bits64/softfloat-macros stable/11/lib/msun/Makefile stable/11/lib/msun/Symbol.map stable/11/lib/msun/man/complex.3 stable/11/lib/msun/src/math_private.h Directory Properties: stable/11/ (props changed) Modified: stable/11/include/complex.h == --- stable/11/include/complex.h Tue Jun 5 13:06:06 2018(r334653) +++ stable/11/include/complex.h Tue Jun 5 13:46:18 2018(r334654) @@ -87,6 +87,10 @@ float complexcexpf(float complex); double cimag(double complex) __pure2; float cimagf(float complex) __pure2; long doublecimagl(long double complex) __pure2; +double complex clog(double complex); +float complex clogf(float complex); +long double complex + clogl(long double complex); double complex conj(double complex) __pure2; float complex conjf(float complex) __pure2; long double complex Modified: stable/11/lib/libc/softfloat/bits64/softfloat-macros == --- stable/11/lib/libc/softfloat/bits64/softfloat-macrosTue Jun 5 13:06:06 2018(r334653) +++ stable/11/lib/libc/softfloat/bits64/softfloat-macrosTue Jun 5 13:46:18 2018(r334654) @@ -157,7 +157,7 @@ INLINE void z0 = a0>>count; } else { -z1 = ( count < 64 ) ? ( a0>>( count & 63 ) ) : 0; +z1 = ( count < 128 ) ? ( a0>>( count & 63 ) ) : 0; z0 = 0; } *z1Ptr = z1; Modified: stable/11/lib/msun/Makefile == --- stable/11/lib/msun/Makefile Tue Jun 5 13:06:06 2018(r334653) +++ stable/11/lib/msun/Makefile Tue Jun 5 13:46:18 2018(r334654) @@ -57,7 +57,7 @@ COMMON_SRCS= b_exp.c b_log.c b_tgamma.c \ k_cos.c k_cosf.c k_exp.c k_expf.c k_rem_pio2.c k_sin.c k_sinf.c \ k_tan.c k_tanf.c \ s_asinh.c s_asinhf.c s_atan.c s_atanf.c s_carg.c s_cargf.c s_cargl.c \ - s_cbrt.c s_cbrtf.c s_ceil.c s_ceilf.c \ + s_cbrt.c s_cbrtf.c s_ceil.c s_ceilf.c s_clog.c s_clogf.c \ s_copysign.c s_copysignf.c s_cos.c s_cosf.c \ s_csqrt.c s_csqrtf.c s_erf.c s_erff.c \ s_exp2.c s_exp2f.c s_expm1.c s_expm1f.c s_fabsf.c s_fdim.c \ @@ -101,7 +101,8 @@ COMMON_SRCS+= catrigl.c \ e_lgammal.c e_lgammal_r.c \ e_remainderl.c e_sinhl.c e_sqrtl.c \ invtrig.c k_cosl.c k_sinl.c k_tanl.c \ - s_asinhl.c s_atanl.c s_cbrtl.c s_ceill.c s_cosl.c s_cprojl.c \ + s_asinhl.c s_atanl.c s_cbrtl.c s_ceill.c \ + s_clogl.c s_cosl.c s_cprojl.c \ s_csqrtl.c s_erfl.c s_exp2l.c s_expl.c s_floorl.c s_fmal.c \ s_fmaxl.c s_fminl.c s_frexpl.c s_logbl.c s_logl.c s_nanl.c \ s_nextafterl.c s_nexttoward.c s_remquol.c s_rintl.c s_roundl.c \ @@ -133,7 +134,8 @@ INCS+= fenv.h math.h MAN= acos.3 acosh.3 asin.3 asinh.3 atan.3 atan2.3 atanh.3 \ ceil.3 cacos.3 ccos.3 ccosh.3 cexp.3 \ - cimag.3 copysign.3 cos.3 cosh.3 csqrt.3 erf.3 exp.3 fabs.3 fdim.3 \ + cimag.3 clog.3 copysign.3 cos.3 cosh.3 csqrt.3 erf.3 \ + exp.3 fabs.3 fdim.3 \ feclearexcept.3 feenableexcept.3 fegetenv.3 \ fegetround.3 fenv.3 floor.3 \ fma.3 fmax.3 fmod.3 hypot.3 ieee.3 ieee_test.3 ilogb.3 j0.3 \ @@ -166,6 +168,7 @@ MLINKS+=cimag.3 cimagf.3 cimag.3 cimagl.3 \ cimag.3 conj.3 cimag.3 conjf.3 cimag.3 conjl.3 \ cimag.3 cproj.3 cimag.3 cprojf.3 cimag.3 cprojl.3 \ cimag.3 creal.3 cimag.3 crealf.3 cimag.3 creall.3 +MLINKS+=clog.3 clogf.3 clog.3 clogl.3 MLINKS+=copysign.3 copysignf.3 copysign.3 copysignl.3 MLINKS+=cos.3 cosf.3 cos.3 cosl.3 MLINKS+=cosh.3 coshf.3 cosh.3 coshl.3 Modified: stable/11/lib/msun/Symbol.map == --- stable/11/lib/msun/Symbol.map Tue Jun 5 13:06:06 2018 (r334653) +++ stable/11/lib/msun/Symbol.map Tue Jun 5 13:46:18 2018 (r334654) @@ -294,6 +294,9 @@ FBSD_1.5 { casinl; catanl; catanhl; + clog; + clogf; + clogl; sincos; sincosf; sincosl; Copied: stable/11/lib/msun/man/clog.3 (from r333577,
Re: svn commit: r334626 - in head: lib/libc/amd64 lib/libc/amd64/sys lib/libc/arm lib/libc/arm/sys lib/libc/i386 lib/libc/i386/sys lib/libc/mips lib/libc/mips/sys lib/libc/powerpc lib/libc/powerpc/sys
On Tue, Jun 05, 2018 at 03:50:12PM +0800, Ganbold Tsagaankhuu wrote: > On Tue, Jun 5, 2018 at 3:35 AM, Mark Johnston wrote: > > > Author: markj > > Date: Mon Jun 4 19:35:15 2018 > > New Revision: 334626 > > URL: https://svnweb.freebsd.org/changeset/base/334626 > > > > Log: > > Reimplement brk() and sbrk() to avoid the use of _end. > > > > Previously, libc.so would initialize its notion of the break address > > using _end, a special symbol emitted by the static linker following > > the bss section. Compatibility issues between lld and ld.bfd could > > cause the wrong definition of _end (libc.so's definition rather than > > that of the executable) to be used, breaking the brk()/sbrk() > > interface. > > > > Avoid this problem and future interoperability issues by simply not > > relying on _end. Instead, modify the break() system call to return > > the kernel's view of the current break address, and have libc > > initialize its state using an extra syscall upon the first use of the > > interface. As a side effect, this appears to fix brk()/sbrk() usage > > in executables run with rtld direct exec, since the kernel and libc.so > > no longer maintain separate views of the process' break address. > > > > > Maybe it is not really related, or I'm doing something wrong, but when I > try to run release.sh script on FreeBSD 11.0-RELEASE-p9 to build pine64 > image, it stops with error: r334653 should fix that, sorry. ___ 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: r334653 - head/lib/libc/tests/sys
Author: markj Date: Tue Jun 5 13:06:06 2018 New Revision: 334653 URL: https://svnweb.freebsd.org/changeset/base/334653 Log: Don't build brk_test on platforms that don't support brk(). X-MFC with: r334626 Modified: head/lib/libc/tests/sys/Makefile Modified: head/lib/libc/tests/sys/Makefile == --- head/lib/libc/tests/sys/MakefileTue Jun 5 12:00:55 2018 (r334652) +++ head/lib/libc/tests/sys/MakefileTue Jun 5 13:06:06 2018 (r334653) @@ -4,7 +4,9 @@ PACKAGE=tests .include +.if ${MACHINE_CPUARCH} != "aarch64" && ${MACHINE_CPUARCH} != "riscv" ATF_TESTS_C+= brk_test +.endif ATF_TESTS_C+= queue_test # TODO: clone, lwp_create, lwp_ctl, posix_fadvise, recvmmsg, ___ 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: r334617 - in head: . etc
Quoting Brad Davis (from Mon, 04 Jun 2018 12:55:50 -0600): On Mon, Jun 4, 2018, at 12:47 PM, Rodney W. Grimes wrote: [ Charset UTF-8 unsupported, converting... ] > On Mon, Jun 4, 2018, at 10:57 AM, Rodney W. Grimes wrote: > > > On Mon, Jun 4, 2018, at 9:29 AM, Rodney W. Grimes wrote: > > > > I believe there are also other external consumers of this. > > > > > > Such as? > > > > Iirc some of the make release stuff calls into here, but that > > may of changed to use src/Makefile targets. distrib-dirs comes > > to mind. > > Sure, but those can go away or be updated as needed.. So again, no plan yet? Most of them are gone, I am still in progress on some of it. See the github branch above. My testing is all done by building release VMs and comparing them against a VM built from the last merge from HEAD. So I will update the release stuff as I go. It is my responsibility to keep the release stuff working as I change these. Have you checked mergemaster? IIRC it uses the distribution target. Bye, Alexander. -- http://www.Leidinger.net alexan...@leidinger.net: PGP 0x8F31830F9F2772BF http://www.FreeBSD.orgnetch...@freebsd.org : PGP 0x8F31830F9F2772BF pgpef93PHwsd7.pgp Description: Digitale PGP-Signatur
Re: svn commit: r334626 - in head: lib/libc/amd64 lib/libc/amd64/sys lib/libc/arm lib/libc/arm/sys lib/libc/i386 lib/libc/i386/sys lib/libc/mips lib/libc/mips/sys lib/libc/powerpc lib/libc/powerpc/
In message , Ganbold Tsagaankhuu writes: > On Tue, Jun 5, 2018 at 3:35 AM, Mark Johnston wrote: > > > Author: markj > > Date: Mon Jun 4 19:35:15 2018 > > New Revision: 334626 > > URL: https://svnweb.freebsd.org/changeset/base/334626 > > > > Log: > > Reimplement brk() and sbrk() to avoid the use of _end. > > > > Previously, libc.so would initialize its notion of the break address > > using _end, a special symbol emitted by the static linker following > > the bss section. Compatibility issues between lld and ld.bfd could > > cause the wrong definition of _end (libc.so's definition rather than > > that of the executable) to be used, breaking the brk()/sbrk() > > interface. > > > > Avoid this problem and future interoperability issues by simply not > > relying on _end. Instead, modify the break() system call to return > > the kernel's view of the current break address, and have libc > > initialize its state using an extra syscall upon the first use of the > > interface. As a side effect, this appears to fix brk()/sbrk() usage > > in executables run with rtld direct exec, since the kernel and libc.so > > no longer maintain separate views of the process' break address. > > > > > Maybe it is not really related, or I'm doing something wrong, but when I > try to run release.sh script on FreeBSD 11.0-RELEASE-p9 to build pine64 > image, it stops with error: > ... > /usr/obj/usr/src/arm64.aarch64/tmp/usr/bin/ld: error: undefined symbol: brk > >>> referenced by brk_test.c:52 (/usr/src/lib/libc/tests/sys/brk_test.c:52) > >>> brk_test.o:(atfu_brk_basic_body) > > /usr/obj/usr/src/arm64.aarch64/tmp/usr/bin/ld: error: undefined symbol: sbrk > >>> referenced by brk_test.c:55 (/usr/src/lib/libc/tests/sys/brk_test.c:55) > >>> brk_test.o:(atfu_brk_basic_body) > > /usr/obj/usr/src/arm64.aarch64/tmp/usr/bin/ld: error: undefined symbol: brk > >>> referenced by brk_test.c:59 (/usr/src/lib/libc/tests/sys/brk_test.c:59) > >>> brk_test.o:(atfu_brk_basic_body) > > /usr/obj/usr/src/arm64.aarch64/tmp/usr/bin/ld: error: undefined symbol: brk > >>> referenced by brk_test.c:65 (/usr/src/lib/libc/tests/sys/brk_test.c:65) > >>> brk_test.o:(atfu_brk_basic_body) > > /usr/obj/usr/src/arm64.aarch64/tmp/usr/bin/ld: error: undefined symbol: sbrk > >>> referenced by brk_test.c:67 (/usr/src/lib/libc/tests/sys/brk_test.c:67) > >>> brk_test.o:(atfu_brk_basic_body) > > /usr/obj/usr/src/arm64.aarch64/tmp/usr/bin/ld: error: undefined symbol: sbrk > >>> referenced by brk_test.c:82 (/usr/src/lib/libc/tests/sys/brk_test.c:82) > >>> brk_test.o:(atfu_sbrk_basic_body) > ... > > Ganbold Do a clean build or at the very least remove all libc objects and depends, the while directory in /usr/obj, and build again. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. ___ 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: r334651 - head/sys/cam/mmc
Author: kibab Date: Tue Jun 5 11:03:24 2018 New Revision: 334651 URL: https://svnweb.freebsd.org/changeset/base/334651 Log: Enable high-speed on the card before increasing frequency on the controller Increasing operating frequency without telling card to switch to high-speed mode first upsets some cards and generates CRC errors. While here, deselect / reselect cards after CMD6 and SCR fetch, as in original code. Approved by: imp (mentor) Differential Revision:https://reviews.freebsd.org/D15568 Modified: head/sys/cam/mmc/mmc_da.c Modified: head/sys/cam/mmc/mmc_da.c == --- head/sys/cam/mmc/mmc_da.c Tue Jun 5 09:52:38 2018(r334650) +++ head/sys/cam/mmc/mmc_da.c Tue Jun 5 11:03:24 2018(r334651) @@ -171,7 +171,7 @@ static void sdda_start_init_task(void *context, int pe static void sdda_process_mmc_partitions(struct cam_periph *periph, union ccb *start_ccb); static uint32_t sdda_get_host_caps(struct cam_periph *periph, union ccb *ccb); static void sdda_init_switch_part(struct cam_periph *periph, union ccb *start_ccb, u_int part); - +static int mmc_select_card(struct cam_periph *periph, union ccb *ccb, uint32_t rca); static inline uint32_t mmc_get_sector_size(struct cam_periph *periph) {return MMC_SECTOR_SIZE;} /* TODO: actually issue GET_TRAN_SETTINGS to get R/O status */ @@ -901,6 +901,38 @@ mmc_switch_fill_mmcio(union ccb *ccb, } static int +mmc_select_card(struct cam_periph *periph, union ccb *ccb, uint32_t rca) +{ + int flags; + + flags = (rca ? MMC_RSP_R1B : MMC_RSP_NONE) | MMC_CMD_AC; + cam_fill_mmcio(>mmcio, + /*retries*/ 0, + /*cbfcnp*/ NULL, + /*flags*/ CAM_DIR_IN, + /*mmc_opcode*/ MMC_SELECT_CARD, + /*mmc_arg*/ rca << 16, + /*mmc_flags*/ flags, + /*mmc_data*/ NULL, + /*timeout*/ 0); + + cam_periph_runccb(ccb, sddaerror, CAM_FLAG_NONE, /*sense_flags*/0, NULL); + + if (((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP)) { + if (ccb->mmcio.cmd.error != 0) { + CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_PERIPH, + ("%s: MMC_SELECT command failed", __func__)); + return EIO; + } + return 0; /* Normal return */ + } else { + CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_PERIPH, + ("%s: CAM request failed\n", __func__)); + return EIO; + } +} + +static int mmc_switch(struct cam_periph *periph, union ccb *ccb, uint8_t set, uint8_t index, uint8_t value, u_int timeout) { @@ -953,18 +985,24 @@ mmc_sd_switch(struct cam_periph *periph, union ccb *cc uint8_t *res) { struct mmc_data mmc_d; + uint32_t arg; memset(res, 0, 64); mmc_d.len = 64; mmc_d.data = res; mmc_d.flags = MMC_DATA_READ; + arg = mode << 31; /* 0 - check, 1 - set */ + arg |= 0x00FF; + arg &= ~(0xF << (grp * 4)); + arg |= value << (grp * 4); + cam_fill_mmcio(>mmcio, /*retries*/ 0, /*cbfcnp*/ NULL, /*flags*/ CAM_DIR_IN, /*mmc_opcode*/ SD_SWITCH_FUNC, - /*mmc_arg*/ mode << 31, + /*mmc_arg*/ arg, /*mmc_flags*/ MMC_RSP_R1 | MMC_CMD_ADTC, /*mmc_data*/ _d, /*timeout*/ 0); @@ -1273,6 +1311,19 @@ sdda_start_init(void *context, union ccb *start_ccb) CAM_DEBUG(periph->path, CAM_DEBUG_PERIPH, ("Card supports HS\n")); softc->card_f_max = SD_HS_MAX; } + + /* +* We deselect then reselect the card here. Some cards +* become unselected and timeout with the above two +* commands, although the state tables / diagrams in the +* standard suggest they go back to the transfer state. +* Other cards don't become deselected, and if we +* attempt to blindly re-select them, we get timeout +* errors from some controllers. So we deselect then +* reselect to handle all situations. +*/ + mmc_select_card(periph, start_ccb, 0); + mmc_select_card(periph, start_ccb, get_rca(periph)); } else {
Re: svn commit: r334595 - in head: sys/dev/hwpmc sys/kern sys/sys usr.sbin/pmcstat
On Mon, Jun 04, 2018 at 10:27:21AM -0700, Matthew Macy wrote: > On Mon, Jun 4, 2018 at 5:08 AM, Konstantin Belousov > wrote: > > On Mon, Jun 04, 2018 at 01:10:23AM +, Matt Macy wrote: > >> @@ -2214,6 +2236,11 @@ pmc_hook_handler(struct thread *td, int function, > >> void > >> > >> pmc_capture_user_callchain(PCPU_GET(cpuid), PMC_HR, > >> (struct trapframe *) arg); > >> + > >> + KASSERT(td->td_pinned == 1, > >> + ("[pmc,%d] invalid td_pinned value", __LINE__)); > >> + sched_unpin(); /* Can migrate safely now. */ > > sched_pin() is called from pmc_post_callchain_callback(), which is > > called from userret(). userret() is executed with interrupts and > > preemption enabled, so there is a non-trivial chance that the thread > > already migrated. > > > > In fact, I do not see a need to disable migration for the thread if user > > callchain is planned to be gathered. You only need to remember the cpu > > where the interrupt occured, to match it against the request. Or are > > per-cpu PMC registers still accessed during callchain collection ? > > The buffers are pcpu. Although it would in principle be safe in this > case since I > don't modify the read/write indices. However, I'd have to add another field > for > the CPU and it doesn't handle the case of multiple migrations. > You already moved the collection to userret(), thanks. So the only reason to sched_pin() in pmc_process_thread_userret() is to make pmc_capture_user_callchain() to operate on the stable cpu ? May be, add a comment there, and move the assert that td_pinned > 0, into pmc_capture_user_callchain() ? > > > >> +int > >> +pmc_process_interrupt(int cpu, int ring, struct pmc *pm, struct trapframe > >> *tf, > >> +int inuserspace) > >> +{ > >> + struct thread *td; > >> + > >> + td = curthread; > >> + if ((pm->pm_flags & PMC_F_USERCALLCHAIN) && > >> + td && td->td_proc && > >> + (td->td_proc->p_flag & P_KPROC) == 0 && > >> + !inuserspace) { > > I am curious why a lot of the pmc code checks for curthread != NULL and, > > like this fragment, for curproc != NULL. I am sure that at least on x86, > > we never let curthread point to the garbage, even during the context > > switches. NMI handler has the same cargo-cult check, BTW. > > I didn't think they could be NULL, but have been cargo culting the > existing code. You already cleaned this, thanks. > > > Also, please fix the indentation of the conditions block. > > > > > >> + atomic_add_int(>td_pmcpend, 1); > > You can use atomic_store_int() there, I believe, Then there would be > > no locked op executed at all, on x86. > > Storing a 1 would enable me to early terminate the loop. > > > > >> @@ -375,6 +375,7 @@ struct thread { > >> void*td_lkpi_task; /* LinuxKPI task struct pointer */ > >> TAILQ_ENTRY(thread) td_epochq; /* (t) Epoch queue. */ > >> epoch_section_t td_epoch_section; /* (t) epoch section object */ > >> + int td_pmcpend; > > Why this member was not put into the zeroed region ? Wouldn't a garbage > > there cause uneccessary ASTs ? > > It would cause _1_ unnecessary check for callchains after initial > creation. Putting it in the zero area would break the ABI. We do not care about KBI stability on HEAD. If you care about it more than usual, you can bump __FreeBSD_version to prevent older modules from load, when struct thread layout changed. Practically we change KBI as needed without special measures. ___ 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: r334650 - head/sys/dev/usb
Author: eadler Date: Tue Jun 5 09:52:38 2018 New Revision: 334650 URL: https://svnweb.freebsd.org/changeset/base/334650 Log: usbdevs: sync from NetBSD This adds several vendors from NetBSD's copy of the same file (r1.749). Prefer longer more "canonical" names where the names differed. Sort while here. Modified: head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsTue Jun 5 05:24:42 2018(r334649) +++ head/sys/dev/usb/usbdevsTue Jun 5 09:52:38 2018(r334650) @@ -60,7 +60,7 @@ vendor UNKNOWN2 0x0105 Unknown vendor vendor EGALAX2 0x0123 eGalax, Inc. vendor CHIPSBANK 0x0204 Chipsbank Microelectronics Co. vendor HUMAX 0x02ad HUMAX -vendor INTENSO 0x2109 INTENSO +vendor QUAN0x01e1 Quan vendor LTS 0x0386 LTS vendor BWCT0x03da Bernd Walter Computer Technology vendor AOX 0x03e8 AOX @@ -92,7 +92,7 @@ vendor FUJITSU2 0x0407 Fujitsu Personal Systems vendor QUANTA 0x0408 Quanta vendor NEC 0x0409 NEC vendor KODAK 0x040a Eastman Kodak -vendor WELTREND0x040b Weltrend +vendor WELTREND0x040b Weltrend Semiconductor vendor VIA 0x040d VIA vendor MCCI0x040e MCCI vendor MELCO 0x0411 Melco @@ -145,7 +145,7 @@ vendor LUCENT 0x047e Lucent vendor PLANTRONICS 0x047f Plantronics vendor KYOCERA 0x0482 Kyocera Wireless Corp. vendor STMICRO 0x0483 STMicroelectronics -vendor FOXCONN 0x0489 Foxconn +vendor FOXCONN 0x0489 Foxconn / Hon Hai vendor MEIZU 0x0492 Meizu Electronics vendor YAMAHA 0x0499 YAMAHA vendor COMPAQ 0x049f Compaq @@ -197,7 +197,7 @@ vendor TOKYOELECTRON0x04ec Tokyo Electron vendor ANNABOOKS 0x04ed Annabooks vendor JVC 0x04f1 JVC vendor CHICONY 0x04f2 Chicony Electronics -vendor ELAN0x04f3 Elan +vendor ELAN0x04f3 ELAN Microelectronics vendor NEWNEX 0x04f7 Newnex vendor BROTHER 0x04f9 Brother Industries vendor DALLAS 0x04fa Dallas Semiconductor @@ -254,6 +254,7 @@ vendor HAUPPAUGE0x0573 Hauppauge Computer Works vendor BAFO0x0576 BAFO/Quality Computer Accessories vendor YEDATA 0x057b Y-E Data vendor AVM 0x057c AVM +vendor NINTENDO0x057e Nintendo vendor QUICKSHOT 0x057f Quickshot vendor ROLAND 0x0582 Roland vendor ROCKFIRE0x0583 Rockfire @@ -311,6 +312,7 @@ vendor AOC 0x05f6 AOC International vendor CHIC0x05fe Chic Technology vendor BARCO 0x0600 Barco Display Systems vendor BRIDGE 0x0607 Bridge Information +vendor SMK 0x0609 SMK vendor SOLIDYEAR 0x060b Solid Year vendor BIORAD 0x0614 Bio-Rad Laboratories vendor MACALLY 0x0618 Macally @@ -365,6 +367,7 @@ vendor IMATION 0x0718 Imation vendor TECLAST 0x071b Teclast vendor SONYERICSSON0x0731 Sony Ericsson vendor EICON 0x0734 Eicon Networks +vendor MADCATZ 0x0738 Mad Catz, Inc. vendor SYNTECH 0x0745 Syntech Information vendor DIGITALSTREAM 0x074e Digital Stream vendor AUREAL 0x0755 Aureal Semiconductor @@ -394,6 +397,7 @@ vendor MICROTECH0x07af Microtech vendor GENERALINSTMNTS 0x07b2 General Instruments (Motorola) vendor OLYMPUS 0x07b4 Olympus vendor ABOCOM 0x07b8 AboCom Systems +vendor KINGSUN 0x07c0 KingSun vendor KEISOKUGIKEN0x07c1 Keisokugiken vendor ONSPEC 0x07c4 OnSpec vendor APG 0x07c5 APG Cash Drawer @@ -407,11 +411,13 @@ vendor APTIO 0x07d2 Aptio Products vendor ARASAN 0x07da Arasan Chip Systems vendor ALLIEDCABLE 0x07e6 Allied Cable vendor STSN0x07ef STSN +vendor BEWAN 0x07fa Bewan vendor CENTURY 0x07f7 Century Corp vendor NEWLINK 0x07ff NEWlink vendor MAGTEK 0x0801 Mag-Tek vendor ZOOM0x0803 Zoom Telephonics vendor PCS 0x0810 Personal Communication Systems +vendor SYNET 0x0812 Synet Electronics vendor ALPHASMART 0x081e AlphaSmart, Inc. vendor BROADLOGIC 0x0827 BroadLogic vendor HANDSPRING 0x082d Handspring @@ -469,8 +475,10 @@ vendor ACERW 0x0967 Acer vendor ADIRONDACK 0x0976 Adirondack Wire & Cable vendor BECKHOFF0x0978 Beckhoff vendor MINDSATWORK 0x097a Minds At Work +vendor ZIPPY 0x099a Zippy Technology Corporation vendor POINTCHIPS 0x09a6 PointChips vendor INTERSIL0x09aa Intersil +vendor TRIPPLITE2 0x09ae Tripp Lite vendor ALTIUS
Re: svn commit: r334626 - in head: lib/libc/amd64 lib/libc/amd64/sys lib/libc/arm lib/libc/arm/sys lib/libc/i386 lib/libc/i386/sys lib/libc/mips lib/libc/mips/sys lib/libc/powerpc lib/libc/powerpc/sys
On Tue, Jun 5, 2018 at 3:35 AM, Mark Johnston wrote: > Author: markj > Date: Mon Jun 4 19:35:15 2018 > New Revision: 334626 > URL: https://svnweb.freebsd.org/changeset/base/334626 > > Log: > Reimplement brk() and sbrk() to avoid the use of _end. > > Previously, libc.so would initialize its notion of the break address > using _end, a special symbol emitted by the static linker following > the bss section. Compatibility issues between lld and ld.bfd could > cause the wrong definition of _end (libc.so's definition rather than > that of the executable) to be used, breaking the brk()/sbrk() > interface. > > Avoid this problem and future interoperability issues by simply not > relying on _end. Instead, modify the break() system call to return > the kernel's view of the current break address, and have libc > initialize its state using an extra syscall upon the first use of the > interface. As a side effect, this appears to fix brk()/sbrk() usage > in executables run with rtld direct exec, since the kernel and libc.so > no longer maintain separate views of the process' break address. > Maybe it is not really related, or I'm doing something wrong, but when I try to run release.sh script on FreeBSD 11.0-RELEASE-p9 to build pine64 image, it stops with error: ... /usr/obj/usr/src/arm64.aarch64/tmp/usr/bin/ld: error: undefined symbol: brk >>> referenced by brk_test.c:52 (/usr/src/lib/libc/tests/sys/brk_test.c:52) >>> brk_test.o:(atfu_brk_basic_body) /usr/obj/usr/src/arm64.aarch64/tmp/usr/bin/ld: error: undefined symbol: sbrk >>> referenced by brk_test.c:55 (/usr/src/lib/libc/tests/sys/brk_test.c:55) >>> brk_test.o:(atfu_brk_basic_body) /usr/obj/usr/src/arm64.aarch64/tmp/usr/bin/ld: error: undefined symbol: brk >>> referenced by brk_test.c:59 (/usr/src/lib/libc/tests/sys/brk_test.c:59) >>> brk_test.o:(atfu_brk_basic_body) /usr/obj/usr/src/arm64.aarch64/tmp/usr/bin/ld: error: undefined symbol: brk >>> referenced by brk_test.c:65 (/usr/src/lib/libc/tests/sys/brk_test.c:65) >>> brk_test.o:(atfu_brk_basic_body) /usr/obj/usr/src/arm64.aarch64/tmp/usr/bin/ld: error: undefined symbol: sbrk >>> referenced by brk_test.c:67 (/usr/src/lib/libc/tests/sys/brk_test.c:67) >>> brk_test.o:(atfu_brk_basic_body) /usr/obj/usr/src/arm64.aarch64/tmp/usr/bin/ld: error: undefined symbol: sbrk >>> referenced by brk_test.c:82 (/usr/src/lib/libc/tests/sys/brk_test.c:82) >>> brk_test.o:(atfu_sbrk_basic_body) ... Ganbold > > PR: 228574 > Reviewed by: kib (previous version) > MFC after:2 months > Differential Revision:https://reviews.freebsd.org/D15663 > > Added: > head/lib/libc/sys/brk.c (contents, props changed) > head/lib/libc/tests/sys/brk_test.c (contents, props changed) > Deleted: > head/lib/libc/amd64/sys/brk.S > head/lib/libc/amd64/sys/sbrk.S > head/lib/libc/arm/sys/brk.S > head/lib/libc/arm/sys/sbrk.S > head/lib/libc/i386/sys/brk.S > head/lib/libc/i386/sys/sbrk.S > head/lib/libc/mips/sys/brk.S > head/lib/libc/mips/sys/sbrk.S > head/lib/libc/powerpc/sys/brk.S > head/lib/libc/powerpc/sys/sbrk.S > head/lib/libc/powerpc64/sys/brk.S > head/lib/libc/powerpc64/sys/sbrk.S > head/lib/libc/sparc64/sys/brk.S > head/lib/libc/sparc64/sys/sbrk.S > Modified: > head/lib/libc/amd64/Symbol.map > head/lib/libc/amd64/sys/Makefile.inc > head/lib/libc/arm/Symbol.map > head/lib/libc/arm/sys/Makefile.inc > head/lib/libc/i386/Symbol.map > head/lib/libc/i386/sys/Makefile.inc > head/lib/libc/mips/Symbol.map > head/lib/libc/mips/sys/Makefile.inc > head/lib/libc/powerpc/Symbol.map > head/lib/libc/powerpc/sys/Makefile.inc > head/lib/libc/powerpc64/Symbol.map > head/lib/libc/powerpc64/sys/Makefile.inc > head/lib/libc/riscv/sys/Makefile.inc > head/lib/libc/sparc64/Symbol.map > head/lib/libc/sparc64/sys/Makefile.inc > head/lib/libc/sys/Makefile.inc > head/lib/libc/sys/brk.2 > head/lib/libc/tests/sys/Makefile > head/sys/compat/freebsd32/syscalls.master > head/sys/kern/syscalls.master > head/sys/vm/vm_unix.c > > Modified: head/lib/libc/amd64/Symbol.map > > == > --- head/lib/libc/amd64/Symbol.map Mon Jun 4 18:51:06 2018 > (r334625) > +++ head/lib/libc/amd64/Symbol.map Mon Jun 4 19:35:15 2018 > (r334626) > @@ -63,7 +63,6 @@ FBSDprivate_1.0 { > signalcontext; > __siglongjmp; > _brk; > - _end; > __sys_vfork; > _vfork; > }; > > Modified: head/lib/libc/amd64/sys/Makefile.inc > > == > --- head/lib/libc/amd64/sys/Makefile.incMon Jun 4 18:51:06 2018 > (r334625) > +++ head/lib/libc/amd64/sys/Makefile.incMon Jun 4 19:35:15 2018 > (r334626) > @@ -8,7 +8,7 @@ SRCS+= \ > amd64_set_fsbase.c \ >