Re: svn commit: r284198 - head/bin/ls
On Sat, Jun 13, 2015 at 05:40:59PM -0700, Craig Rodrigues wrote: On Sat, Jun 13, 2015 at 5:26 PM, Steve Kargl s...@troutmask.apl.washington.edu wrote: Given the horrid state of the manpages, which I showed in March, one can only wonder about the internals of the libxo itself. Are you talking about this comment you made? https://lists.freebsd.org/pipermail/freebsd-current/2015-March/054899.html I can't make heads or tails of what you wrote, other than you seemed very angry. I wasn't very angry. I'm simply pointing out that the libxo manpages, which should document what libxo is/does, are horrible documentation. If the quality of the manpages matches the quality of library, and the brokeness that we have been witnesses bears this out, should be questioned. % cd src/contrib/libxo/libxo % grep Nd *.3 | grep formatted xo_attr.3:.Nd emit formatted output based on format string and arguments xo_create.3:.Nd emit formatted output based on format string and arguments xo_emit.3:.Nd emit formatted output based on format string and arguments xo_finish.3:.Nd emit formatted output based on format string and arguments xo_flush.3:.Nd emit formatted output based on format string and arguments xo_open_list.3:.Nd emit formatted output based on format string and arguments xo_set_allocator.3:.Nd emit formatted output based on format string and arguments xo_set_flags.3:.Nd emit formatted output based on format string and arguments xo_set_info.3:.Nd emit formatted output based on format string and arguments xo_set_style.3:.Nd emit formatted output based on format string and arguments xo_set_writer.3:.Nd emit formatted output based on format string and arguments Do you really believe that the Nd entries for these manpages are correct? -- Steve ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r284365 - in stable/10: sbin/ifconfig share/man/man4 sys/conf sys/modules sys/modules/if_vxlan sys/net sys/sys
Author: bryanv Date: Sun Jun 14 03:14:45 2015 New Revision: 284365 URL: https://svnweb.freebsd.org/changeset/base/284365 Log: MFC r273331, r273371, r275851: - Add vxlan interface - Use the size of the Ethernet address, not the entire header, when copying into forwarding entry. - Prefix all the vxlan ifconfig commands so they are unique Added: stable/10/sbin/ifconfig/ifvxlan.c - copied, changed from r273331, head/sbin/ifconfig/ifvxlan.c stable/10/share/man/man4/vxlan.4 - copied, changed from r273331, head/share/man/man4/vxlan.4 stable/10/sys/modules/if_vxlan/ - copied from r273331, head/sys/modules/if_vxlan/ stable/10/sys/net/if_vxlan.c - copied, changed from r273331, head/sys/net/if_vxlan.c stable/10/sys/net/if_vxlan.h - copied unchanged from r273331, head/sys/net/if_vxlan.h Modified: stable/10/sbin/ifconfig/Makefile stable/10/sbin/ifconfig/ifconfig.8 stable/10/share/man/man4/Makefile stable/10/sys/conf/NOTES stable/10/sys/conf/files stable/10/sys/modules/Makefile stable/10/sys/sys/priv.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ifconfig/Makefile == --- stable/10/sbin/ifconfig/MakefileSun Jun 14 02:21:19 2015 (r284364) +++ stable/10/sbin/ifconfig/MakefileSun Jun 14 03:14:45 2015 (r284365) @@ -31,6 +31,7 @@ SRCS+=ifmac.c # MAC support SRCS+= ifmedia.c # SIOC[GS]IFMEDIA support SRCS+= iffib.c # non-default FIB support SRCS+= ifvlan.c# SIOC[GS]ETVLAN support +SRCS+= ifvxlan.c # VXLAN support SRCS+= ifgre.c # GRE keys etc SRCS+= ifgif.c # GIF reversed header workaround Modified: stable/10/sbin/ifconfig/ifconfig.8 == --- stable/10/sbin/ifconfig/ifconfig.8 Sun Jun 14 02:21:19 2015 (r284364) +++ stable/10/sbin/ifconfig/ifconfig.8 Sun Jun 14 03:14:45 2015 (r284365) @@ -2586,6 +2586,76 @@ argument is useless and hence deprecated .El .Pp The following parameters are used to configure +.Xr vxlan 4 +interfaces. +.Bl -tag -width indent +.It Cm vxlanid Ar identifier +This value is a 24-bit VXLAN Network Identifier (VNI) that identifies the +virtual network segment membership of the interface. +.It Cm vxlanlocal Ar address +The source address used in the encapsulating IPv4/IPv6 header. +The address should already be assigned to an existing interface. +When the interface is configured in unicast mode, the listening socket +is bound to this address. +.It Cm vxlanremote Ar address +The interface can be configured in a unicast, or point-to-point, mode +to create a tunnel between two hosts. +This is the IP address of the remote end of the tunnel. +.It Cm vxlangroup Ar address +The interface can be configured in a multicast mode +to create a virtual network of hosts. +This is the IP multicast group address the interface will join. +.It Cm vxlanlocalport Ar port +The port number the interface will listen on. +The default port number is 4789. +.It Cm vxlanremoteport Ar port +The destination port number used in the encapsulating IPv4/IPv6 header. +The remote host should be listening on this port. +The default port number is 4789. +Note some other implementations, such as Linux, +do not default to the IANA assigned port, +but instead listen on port 8472. +.It Cm vxlanportrange Ar low high +The range of source ports used in the encapsulating IPv4/IPv6 header. +The port selected within the range is based on a hash of the inner frame. +A range is useful to provide entropy within the outer IP header +for more effective load balancing. +The default range is between the +.Xr sysctl 8 +variables +.Va net.inet.ip.portrange.first +and +.Va net.inet.ip.portrange.last +.It Cm vxlantimeout Ar timeout +The maximum time, in seconds, before an entry in the forwarding table +is pruned. +The default is 1200 seconds (20 minutes). +.It Cm vxlanmaxaddr Ar max +The maximum number of entries in the forwarding table. +The default is 2000. +.It Cm vxlandev Ar dev +When the interface is configured in multicast mode, the +.Cm dev +interface is used to transmit IP multicast packets. +.It Cm vxlanttl Ar ttl +The TTL used in the encapsulating IPv4/IPv6 header. +The default is 64. +.It Cm vxlanlearn +The source IP address and inner source Ethernet MAC address of +received packets are used to dynamically populate the forwarding table. +When in multicast mode, an entry in the forwarding table allows the +interface to send the frame directly to the remote host instead of +broadcasting the frame to the multicast group. +This is the default. +.It Fl vxlanlearn +The forwarding table is not populated by recevied packets. +.It Cm vxlanflush +Delete all dynamically-learned addresses from the forwarding table. +.It Cm vxlanflushall +Delete
svn commit: r284375 - stable/10/sys/ufs/ffs
Author: kib Date: Sun Jun 14 05:12:48 2015 New Revision: 284375 URL: https://svnweb.freebsd.org/changeset/base/284375 Log: MFC r283832: Remove unused variable. Modified: stable/10/sys/ufs/ffs/ffs_softdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ufs/ffs/ffs_softdep.c == --- stable/10/sys/ufs/ffs/ffs_softdep.c Sun Jun 14 03:34:09 2015 (r284374) +++ stable/10/sys/ufs/ffs/ffs_softdep.c Sun Jun 14 05:12:48 2015 (r284375) @@ -7208,7 +7208,6 @@ deallocate_dependencies(bp, freeblks, of { struct indirdep *indirdep; struct pagedep *pagedep; - struct allocdirect *adp; struct worklist *wk, *wkn; struct ufsmount *ump; @@ -7255,7 +7254,6 @@ deallocate_dependencies(bp, freeblks, of break; case D_ALLOCDIRECT: - adp = WK_ALLOCDIRECT(wk); if (off != 0) continue; /* FALLTHROUGH */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r284198 - head/bin/ls
On Sat, Jun 13, 2015 at 6:00 PM, Adrian Chadd adr...@freebsd.org wrote: I guarantee that no matter what you've worked on, there's approximately five orders of magnitude of shipping devices whose entire storage space can be measured in 1 digit megabytes. Each year. (And yes - there's an appreciable set of them for which freebsd boots, runs and keeps running on them.0 You can buy em too, some of them even under $60. Can FreeBSD now not run on these systems because of libxo? -- Craig ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r284198 - head/bin/ls
Hey Marcel, I hope that the current discussion thread doesn't dishearten you and Phil *too* much, and that you continue with the libxo work in FreeBSD. I think libxo is cool stuff. I've talked to a few people who are not FreeBSD users (they do Linux mostly), and they also think that libxo is pretty cool, because it makes it easier to obtain system-level information from FreeBSD, and analyze and present the info using the tools of the trade. The people I talk to use scripting languages like Python or Ruby, and devops frameworks like Ansible, Saltstack, Puppet, and Chef. They may do some quick prototyping and UI work with Javascript and HTML/CSS. Being able to generate JSON directly from system-level tools, and then analyze that in a Python script, or splash it on a Javascript/HTML 5 web page quite easily is really cool. For people who are trying to build FreeBSD-based embedded products with modern web UI's, this is *really* useful. It's unfortunate that some libxo commits broke some stuff. Are there ATF-style tests in either C or Bourne shell that we could add to the system as more utilities are converted over? It's not perfect, and a lot of the existing utilities do not have existing tests, so this might be tough, but anything we do which can help would be nice. Thanks for your work. -- Craig ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r284198 - head/bin/ls
On Sat, Jun 13, 2015 at 05:13:31PM -0700, Craig Rodrigues wrote: For people who are trying to build FreeBSD-based embedded products with modern web UI's, this is *really* useful. Given the bloat caused by libxo, which I showed in March, I don't see how people working on embedded products could be thrilled with this. Given the horrid state of the manpages, which I showed in March, one can only wonder about the internals of the libxo itself. -- Steve ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r284356 - head/usr.sbin/crunch/crunchgen
tsk, this broke some stuff (nostdlibs?) .. let me fix this. Sorry! -a ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r284363 - head/usr.sbin/crunch/crunchgen
Author: adrian Date: Sun Jun 14 00:31:22 2015 New Revision: 284363 URL: https://svnweb.freebsd.org/changeset/base/284363 Log: Fix typo - this upsets llvm/gcc-4.9, but not gcc-4.2 for some reason. Modified: head/usr.sbin/crunch/crunchgen/crunchgen.c Modified: head/usr.sbin/crunch/crunchgen/crunchgen.c == --- head/usr.sbin/crunch/crunchgen/crunchgen.c Sat Jun 13 23:12:06 2015 (r284362) +++ head/usr.sbin/crunch/crunchgen/crunchgen.c Sun Jun 14 00:31:22 2015 (r284363) @@ -1110,7 +1110,7 @@ prog_makefile_rules(FILE *outmk, prog_t fprintf(outmk, $(%s_LIBS), p-ident); fprintf(outmk, \n); - fprintf(outmk, \t$(CC) -nostdlibs -dc -r -o %s.lo %s_stub.o $(%s_OBJPATHS), + fprintf(outmk, \t$(CC) -nostdlib -dc -r -o %s.lo %s_stub.o $(%s_OBJPATHS), p-name, p-name, p-ident); if (p-libs) fprintf(outmk, $(%s_LIBS), p-ident); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r284198 - head/bin/ls
On Sat, Jun 13, 2015 at 5:26 PM, Steve Kargl s...@troutmask.apl.washington.edu wrote: On Sat, Jun 13, 2015 at 05:13:31PM -0700, Craig Rodrigues wrote: For people who are trying to build FreeBSD-based embedded products with modern web UI's, this is *really* useful. Given the bloat caused by libxo, which I showed in March, I don't see how people working on embedded products could be thrilled with this. Steve, For people building embedded products these days, storage of gigabytes and even terabytes is often available, so the space increase that libxo provides is not that big a problem, at least for the last few products that I have worked on in the past few years. Given the horrid state of the manpages, which I showed in March, one can only wonder about the internals of the libxo itself. Are you talking about this comment you made? https://lists.freebsd.org/pipermail/freebsd-current/2015-March/054899.html I can't make heads or tails of what you wrote, other than you seemed very angry. -- Craig ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r284373 - head/gnu/usr.bin/binutils/libbfd
Author: sjg Date: Sun Jun 14 03:33:27 2015 New Revision: 284373 URL: https://svnweb.freebsd.org/changeset/base/284373 Log: Avoid circular dependency with nm Modified: head/gnu/usr.bin/binutils/libbfd/Makefile Modified: head/gnu/usr.bin/binutils/libbfd/Makefile == --- head/gnu/usr.bin/binutils/libbfd/Makefile Sun Jun 14 03:32:49 2015 (r284372) +++ head/gnu/usr.bin/binutils/libbfd/Makefile Sun Jun 14 03:33:27 2015 (r284373) @@ -103,4 +103,7 @@ elf32-target.h: elfxx-target.h elf64-target.h: elfxx-target.h sed -e s/NN/64/g ${.ALLSRC} ${.TARGET} +# avoid cicular dependency +GENDIRDEPS_FILTER+= N*/nm + .include bsd.lib.mk ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r284372 - head/usr.bin/xlint/llib
Author: sjg Date: Sun Jun 14 03:32:49 2015 New Revision: 284372 URL: https://svnweb.freebsd.org/changeset/base/284372 Log: Need to provide -I for meta mode Modified: head/usr.bin/xlint/llib/Makefile Modified: head/usr.bin/xlint/llib/Makefile == --- head/usr.bin/xlint/llib/MakefileSun Jun 14 03:31:23 2015 (r284371) +++ head/usr.bin/xlint/llib/MakefileSun Jun 14 03:32:49 2015 (r284372) @@ -8,6 +8,8 @@ FILESDIR= ${LINTLIBDIR} CLEANFILES+= ${LIBS} + + llib-lposix.ln: llib-lposix ${LINT} ${LINTFLAGS} -Cposix ${.ALLSRC} @@ -15,3 +17,7 @@ llib-lstdc.ln: llib-lstdc ${LINT} ${LINTFLAGS} -Cstdc ${.ALLSRC} .include bsd.prog.mk + +.if ${MK_META_MODE} == yes +LINTFLAGS+= -I${STAGE_INCLUDEDIR} +.endif ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r284374 - in head/usr.bin: mkcsmapper_static mkesdb_static
Author: sjg Date: Sun Jun 14 03:34:09 2015 New Revision: 284374 URL: https://svnweb.freebsd.org/changeset/base/284374 Log: NO_WARNS when building for host Modified: head/usr.bin/mkcsmapper_static/Makefile head/usr.bin/mkesdb_static/Makefile Modified: head/usr.bin/mkcsmapper_static/Makefile == --- head/usr.bin/mkcsmapper_static/Makefile Sun Jun 14 03:33:27 2015 (r284373) +++ head/usr.bin/mkcsmapper_static/Makefile Sun Jun 14 03:34:09 2015 (r284374) @@ -7,6 +7,9 @@ SRCS= citrus_bcs.c citrus_db_factory.c c citrus_lookup_factory.c citrus_pivot_factory.c MAN= NO_SHARED= yes +.if ${MACHINE} == host +NO_WARNS= yes +.endif build-tools: mkcsmapper_static Modified: head/usr.bin/mkesdb_static/Makefile == --- head/usr.bin/mkesdb_static/Makefile Sun Jun 14 03:33:27 2015 (r284373) +++ head/usr.bin/mkesdb_static/Makefile Sun Jun 14 03:34:09 2015 (r284374) @@ -7,6 +7,9 @@ SRCS= citrus_bcs.c citrus_db_factory.c c citrus_lookup_factory.c MAN= NO_SHARED= yes +.if ${MACHINE} == host +NO_WARNS= yes +.endif build-tools: mkesdb_static ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r284345 - in head: . bin/cat bin/chflags bin/chio bin/chmod bin/cp bin/csh bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/expr bin/freebsd-version bin/getfacl bin/hostname b
On Sat, Jun 13, 2015 at 3:34 PM, Craig Rodrigues rodr...@freebsd.org wrote: On Sat, Jun 13, 2015 at 12:20 PM, Simon J. Gerraty s...@freebsd.org wrote: Author: sjg Date: Sat Jun 13 19:20:56 2015 New Revision: 284345 URL: https://svnweb.freebsd.org/changeset/base/284345 Log: Add META_MODE support. Simon, Can you take a look at this: https://jenkins.freebsd.org/job/FreeBSD_HEAD/2860/ The console output is showing this: + make -j 4 buildworld __MAKE_CONF=/builds/FreeBSD_HEAD/make.conf make: /builds/FreeBSD_HEAD/Makefile line 102: Malformed conditional (${MK_META_MODE} == yes) make: Fatal errors encountered -- cannot continue make: stopped in /builds/FreeBSD_HEAD Build step 'Execute shell' marked build as failure This is using a FreeBSD 10.1 host to build HEAD. I can reproduce the problem pretty quickly. I did this on a FreeBSD-CURRENT host: # svn co svn://svn.freebsd.org/base/head src # cd src # make -V MK_META_MODE no I did this on a FreeBSD 10.1-R host: # svn co svn://svn.freebsd.org/base/head src # cd src # make -V MK_META_MODE make: /root/src/Makefile line 102: Malformed conditional (${MK_META_MODE} == yes) make: Fatal errors encountered -- cannot continue make: stopped in /root/src FreeBSD 10.1 is using bmake as /usr/bin/make so fmake is not an issue here. I think the issue is that on FreeBSD 10.1, the /usr/share/mk files do not have the logic to define MK_META_MODE. I am not sure if this is the right fix, but I did this: Index: Makefile === --- Makefile (revision 284374) +++ Makefile (working copy) @@ -99,7 +99,7 @@ # # For more information, see the build(7) manual page. # -.if ${MK_META_MODE} == yes +.if !empty(MK_META_MODE) ${MK_META_MODE} == yes # targets/Makefile plays the role of top-level .include targets/Makefile .else and that made things work for me on FreeBSD 10.1-R. -- Craig ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r284376 - head/sys/vm
Author: alc Date: Sun Jun 14 05:23:39 2015 New Revision: 284376 URL: https://svnweb.freebsd.org/changeset/base/284376 Log: As the next step in eliminating PG_CACHE pages, free rather than cache pages in vm_pageout_scan(). The reactivation rate of cache pages created by vm_pageout_scan() is extremely low; typically no more than 0.5% to 2.25% of the pages are ever reactivated. At the same time, caching pages is more expensive than freeing them. For example, in a test with PostgreSQL, this change reduced the amount of time spent in the inactive queue scan by 1/6. Differential Revision:https://reviews.freebsd.org/D2805 Reviewed by: kib Sponsored by: EMC / Isilon Storage Division Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c == --- head/sys/vm/vm_pageout.cSun Jun 14 05:12:48 2015(r284375) +++ head/sys/vm/vm_pageout.cSun Jun 14 05:23:39 2015(r284376) @@ -1233,10 +1233,10 @@ vm_pageout_scan(struct vm_domain *vmd, i --page_shortage; } else if (m-dirty == 0) { /* -* Clean pages can be placed onto the cache queue. -* This effectively frees them. +* Clean pages can be freed. */ - vm_page_cache(m); + vm_page_free(m); + PCPU_INC(cnt.v_dfree); --page_shortage; } else if ((m-flags PG_WINATCFLS) == 0 pass 2) { /* ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r284198 - head/bin/ls
On Sat, Jun 13, 2015 at 6:29 PM, Steve Kargl s...@troutmask.apl.washington.edu wrote: Are you talking about this comment you made? https://lists.freebsd.org/pipermail/freebsd-current/2015-March/054899.html I can't make heads or tails of what you wrote, other than you seemed very angry. I wasn't very angry. It's hard for me to tell, really, since you submitted patches with FUBAR in them, so you seemed pretty angry in that e-mail. I'm simply pointing out that the libxo manpages, which should document what libxo is/does, are horrible documentation. If the quality of the manpages matches the quality of library, and the brokeness that we have been witnesses bears this out, should be questioned. I can't comment on the quality of the code, since I haven't looked at it in detail. I have read the discussions on arch@, and understand what libxo is trying to accomplish, and am eager to have this because I will definitely use it in stuff I am working on. I have also worked with Marcel and Phil, and respect them both quite a bit. It's a shame that some of the libxo commits broke some things, but if I was doing this type of work, I would probably make some mistakes and break things too, since this is low-level stuff covering many utilities in Unix. Hopefully, we can fix these things can quickly, and we move on. Do you really believe that the Nd entries for these manpages are correct? I'm not an expert on the mdoc format, so I couldn't tell you. If you can think of some patches to fix things, in the man pages, would you be able to submit the patches to Phil, and have them incorporated into the software to make it better? libxo is maintained at https://github.com/Juniper/libxo . I don't know if you are willing/able to submit patches to the libxo project on Github, to help fix things. That would be great if you could do that and help out. -- Craig ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r284345 - in head: . bin/cat bin/chflags bin/chio bin/chmod bin/cp bin/csh bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/expr bin/freebsd-version bin/getfacl bin/hostname b
On Sat, Jun 13, 2015 at 3:37 PM, Garrett Cooper yaneurab...@gmail.com wrote: On Jun 13, 2015, at 15:34, Craig Rodrigues rodr...@freebsd.org wrote: On Sat, Jun 13, 2015 at 12:20 PM, Simon J. Gerraty s...@freebsd.org wrote: Author: sjg Date: Sat Jun 13 19:20:56 2015 New Revision: 284345 URL: https://svnweb.freebsd.org/changeset/base/284345 Log: Add META_MODE support. Simon, Can you take a look at this: https://jenkins.freebsd.org/job/FreeBSD_HEAD/2860/ The console output is showing this: + make -j 4 buildworld __MAKE_CONF=/builds/FreeBSD_HEAD/make.conf make: /builds/FreeBSD_HEAD/Makefile line 102: Malformed conditional (${MK_META_MODE} == yes) make: Fatal errors encountered -- cannot continue make: stopped in /builds/FreeBSD_HEAD Build step 'Execute shell' marked build as failure This is using a FreeBSD 10.1 host to build HEAD. The problem is that the bootstrapping capability has been broken with fmake. The quick fix would probably be to add MK_META_MODE?= yes to the Makefile. According to this commit: https://svnweb.freebsd.org/base?view=revisionrevision=250699 /usr/bin/make is bmake in FreeBSD 10.1-R. Can you clarify to me why bootstrapping HEAD on a FreeBSD 10.1 host now does not work? How is fmake involved? Thanks. -- Craig ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r284345 - in head: . bin/cat bin/chflags bin/chio bin/chmod bin/cp bin/csh bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/expr bin/freebsd-version bin/getfacl bin/hostname b
On Jun 13, 2015, at 15:46, Garrett Cooper yaneurab...@gmail.com wrote: On Jun 13, 2015, at 15:37, Garrett Cooper yaneurab...@gmail.com wrote: On Jun 13, 2015, at 15:34, Craig Rodrigues rodr...@freebsd.org wrote: On Sat, Jun 13, 2015 at 12:20 PM, Simon J. Gerraty s...@freebsd.org wrote: Author: sjg Date: Sat Jun 13 19:20:56 2015 New Revision: 284345 URL: https://svnweb.freebsd.org/changeset/base/284345 Log: Add META_MODE support. Simon, Can you take a look at this: https://jenkins.freebsd.org/job/FreeBSD_HEAD/2860/ The console output is showing this: + make -j 4 buildworld __MAKE_CONF=/builds/FreeBSD_HEAD/make.conf make: /builds/FreeBSD_HEAD/Makefile line 102: Malformed conditional (${MK_META_MODE} == yes) make: Fatal errors encountered -- cannot continue make: stopped in /builds/FreeBSD_HEAD Build step 'Execute shell' marked build as failure This is using a FreeBSD 10.1 host to build HEAD. The problem is that the bootstrapping capability has been broken with fmake. The quick fix would probably be to add MK_META_MODE?= yes to the Makefile. We should probably keep the MK_ pollution in Makefile down to a minimum because of bootstrapping issues like this though. Great. More breakage: $ fmake buildworld -- Building an up-to-date bmake(1) -- /usr/share/mk/bsd.links.mk, line 10: missing `in' in for t in ${LINKS} /usr/share/mk/bsd.links.mk, line 13: for-less endfor /usr/share/mk/bsd.links.mk, line 14: missing `in' in for t in ${SYMLINKS} /usr/share/mk/bsd.links.mk, line 17: for-less endfor fmake: fatal errors encountered -- cannot continue *** [bmake] Error code 1 Stop in /usr/src.svn. *** [upgrade_checks] Error code 1 Stop in /usr/src.svn. This has been broken for a while with fmake: r280122 | bapt | 2015-03-15 14:50:58 -0700 (Sun, 15 Mar 2015) | 8 lines Symplify links installation by using multi variable for loop Using multi variable for loop not only simplify the code, it also ensures that the LINKS and SYMLINKS input have the right number of words Differential Revision: https://reviews.freebsd.org/D2069 Reviewed by:imp signature.asc Description: Message signed with OpenPGP using GPGMail
Re: svn commit: r284345 - in head: . bin/cat bin/chflags bin/chio bin/chmod bin/cp bin/csh bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/expr bin/freebsd-version bin/getfacl bin/hostname b
On Jun 13, 2015, at 19:06, Craig Rodrigues rodr...@freebsd.org wrote: On Sat, Jun 13, 2015 at 3:37 PM, Garrett Cooper yaneurab...@gmail.com wrote: On Jun 13, 2015, at 15:34, Craig Rodrigues rodr...@freebsd.org wrote: On Sat, Jun 13, 2015 at 12:20 PM, Simon J. Gerraty s...@freebsd.org wrote: Author: sjg Date: Sat Jun 13 19:20:56 2015 New Revision: 284345 URL: https://svnweb.freebsd.org/changeset/base/284345 Log: Add META_MODE support. Simon, Can you take a look at this: https://jenkins.freebsd.org/job/FreeBSD_HEAD/2860/ The console output is showing this: + make -j 4 buildworld __MAKE_CONF=/builds/FreeBSD_HEAD/make.conf make: /builds/FreeBSD_HEAD/Makefile line 102: Malformed conditional (${MK_META_MODE} == yes) make: Fatal errors encountered -- cannot continue make: stopped in /builds/FreeBSD_HEAD Build step 'Execute shell' marked build as failure This is using a FreeBSD 10.1 host to build HEAD. The problem is that the bootstrapping capability has been broken with fmake. The quick fix would probably be to add MK_META_MODE?= yes to the Makefile. According to this commit: https://svnweb.freebsd.org/base?view=revisionrevision=250699 /usr/bin/make is bmake in FreeBSD 10.1-R. Can you clarify to me why bootstrapping HEAD on a FreeBSD 10.1 host now does not work? How is fmake involved? Not 100% sure yet, but that's what repros the issue for me... ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r284366 - head/share/mk
Author: sjg Date: Sun Jun 14 03:27:22 2015 New Revision: 284366 URL: https://svnweb.freebsd.org/changeset/base/284366 Log: Avoid anoying warning Modified: head/share/mk/bsd.init.mk Modified: head/share/mk/bsd.init.mk == --- head/share/mk/bsd.init.mk Sun Jun 14 03:14:45 2015(r284365) +++ head/share/mk/bsd.init.mk Sun Jun 14 03:27:22 2015(r284366) @@ -20,7 +20,7 @@ __bsd.init.mk__: # this tells lib.mk and prog.mk to not actually build anything _SKIP_BUILD = not building at level 0 .endif -.if !empty(_SKIP_BUILD) +.if ${.MAKE.LEVEL} 0 !empty(_SKIP_BUILD) .warning ${_SKIP_BUILD} .endif ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r284368 - head/share/mk
Author: sjg Date: Sun Jun 14 03:28:48 2015 New Revision: 284368 URL: https://svnweb.freebsd.org/changeset/base/284368 Log: Avoid trailing white-space Modified: head/share/mk/local.gendirdeps.mk Modified: head/share/mk/local.gendirdeps.mk == --- head/share/mk/local.gendirdeps.mk Sun Jun 14 03:28:25 2015 (r284367) +++ head/share/mk/local.gendirdeps.mk Sun Jun 14 03:28:48 2015 (r284368) @@ -1,7 +1,7 @@ # $FreeBSD$ # we need a keyword, this noise is to prevent it being expanded -GENDIRDEPS_HEADER= echo '\# ${FreeBSD:L:@v@$$$v$$ @} '; +GENDIRDEPS_HEADER= echo '\# ${FreeBSD:L:@v@$$$v$$ @:M*F*}'; # supress optional/auto dependecies # local.dirdeps.mk will put them in if necessary ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r284367 - head/share/mk
Author: sjg Date: Sun Jun 14 03:28:25 2015 New Revision: 284367 URL: https://svnweb.freebsd.org/changeset/base/284367 Log: Watch out for bin/cat in host stage tree Modified: head/share/mk/local.dirdeps.mk Modified: head/share/mk/local.dirdeps.mk == --- head/share/mk/local.dirdeps.mk Sun Jun 14 03:27:22 2015 (r284366) +++ head/share/mk/local.dirdeps.mk Sun Jun 14 03:28:25 2015 (r284367) @@ -50,6 +50,7 @@ DIRDEPS_FILTER.host = \ DIRDEPS_FILTER+= \ + Nbin/cat.host \ ${DIRDEPS_FILTER.xtras:U} .endif ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r284198 - head/bin/ls
On 06/13/2015 15:16, Gleb Smirnoff wrote: On Sat, Jun 13, 2015 at 11:38:11AM -0400, David Chisnall wrote: D If you would have told me a year ago that you had a simple scheme that D could make 30 years of experience maintaining code for unix-like systems D completely worthless I would have been skeptical, but it seems we're D well on our way. D D There is a lot of heckling and unhelpful hyperbole in this thread. Reading the xo_emit format strings takes a little bit of getting used to, but the same is true of printf - it’s just that we’re already used to printf. The structured parts (xo_open_container, xo_close_container and friends) are clear and descriptive. The changes are fairly invasive, but the benefits are also very large for anyone who is wanting to automate administration of FreeBSD systems. D D If you have suggestions for how the libxo APIs could be improved, then please let us know - Phil is very reception to suggestions but objections along the lines of ‘it’s not what I’m used to and changes sometimes break things so we should never have changes’ are not helpful. I would agree with David. After xo_emit format is learned, reading sources of converted programs isn't a big deal. All the problems with converted utilities are due to very bad quality of initial conversion commits. Can this whole conversation be moved out of the commits list and onto arch@ where it belongs? Best, George ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r284198 - head/bin/ls
On 13 June 2015 at 17:58, Adrian Chadd adr...@freebsd.org wrote: Hi craig, I guarantee that no matter what you've worked on, there's approximately five orders of magnitude of shipping devices whose entire storage space can be measured in 1 digit megabytes. Each year. (And yes - there's an appreciable set of them for which freebsd boots, runs and keeps running on them.0 You can buy em too, some of them even under $60. -adrian ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r284198 - head/bin/ls
Hi craig, I guarantee that no matter what you've worked on, there's approximately five orders of magnitude of shipping devices whose entire storage space can be measured in 1 digit megabytes. Each year. -adrian ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r284198 - head/bin/ls
On 13 June 2015 at 18:22, Craig Rodrigues rodr...@freebsd.org wrote: On Sat, Jun 13, 2015 at 6:00 PM, Adrian Chadd adr...@freebsd.org wrote: I guarantee that no matter what you've worked on, there's approximately five orders of magnitude of shipping devices whose entire storage space can be measured in 1 digit megabytes. Each year. (And yes - there's an appreciable set of them for which freebsd boots, runs and keeps running on them.0 You can buy em too, some of them even under $60. Can FreeBSD now not run on these systems because of libxo? It's a tight squeeze as it is. Running in 8MB of flash (even if it's compressed) is still an exercise in what can you cut out. My point isn't that it isn't running because of libxo; my point is that arguing about embedded involving lots of storage is woefully incorrect and will continue to be until those gigabytes of storage are available for a penny. Which yes, I'm guessing will happen in my career - but it's also quite likely code bloat will continue to chase that upward. -adrian ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r284336 - head/sys/dev/acpi_support
On Sat, Jun 13, 2015 at 03:31:16PM -0700, Garrett Cooper wrote: On Jun 13, 2015, at 4:30, Marcelo Araujo araujobsdp...@gmail.com wrote: +1. Fixed (r284357/r284358). Thanks! I doubt that anything is fixed. From a little information I can gather from the r284336 commit message, there was some NULL pointer dereference (may be not, FWIW). The r284336 papered over it, just ignoring the chunk of code when bith env variables are _not_ NULL. Now, the condition is reversed, and since r284336 hide the bug, it is arguable that both env vars were not NULL on the problematic machines. The consequence is that the check is a nop now, since machines do have valid SMBIOS info, and a bug, whatever it is, is not fixed, and probably not even diagnosed. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r284370 - head/usr.bin/kdump
Author: sjg Date: Sun Jun 14 03:30:39 2015 New Revision: 284370 URL: https://svnweb.freebsd.org/changeset/base/284370 Log: Create proper targets for linux*syscalls.c Modified: head/usr.bin/kdump/Makefile Modified: head/usr.bin/kdump/Makefile == --- head/usr.bin/kdump/Makefile Sun Jun 14 03:29:24 2015(r284369) +++ head/usr.bin/kdump/Makefile Sun Jun 14 03:30:39 2015(r284370) @@ -25,9 +25,17 @@ CLEANFILES= ioctl.c kdump_subr.c kdump_s .if (${MACHINE_ARCH} == amd64 || ${MACHINE_ARCH} == i386) CLEANFILES+= linux_syscalls.c +kdump.o: linux_syscalls.c +linux_syscalls.c: linux_syscalls.conf + sh ${.CURDIR}/../../sys/kern/makesyscalls.sh \ + ${.CURDIR}/../../sys/${MACHINE_ARCH}/linux/syscalls.master ${.CURDIR}/linux_syscalls.conf .endif .if (${MACHINE_ARCH} == amd64) CLEANFILES+= linux32_syscalls.c +kdump.o: linux32_syscalls.c +linux32_syscalls.c: linux32_syscalls.conf + sh ${.CURDIR}/../../sys/kern/makesyscalls.sh \ + ${.CURDIR}/../../sys/${MACHINE_ARCH}/linux32/syscalls.master ${.CURDIR}/linux32_syscalls.conf .endif ioctl.c: mkioctls @@ -40,13 +48,5 @@ kdump_subr.h: mksubr kdump_subr.c: mksubr kdump_subr.h sh ${.CURDIR}/mksubr ${DESTDIR}${INCLUDEDIR} ${.TARGET} -.if (${MACHINE_ARCH} == amd64 || ${MACHINE_ARCH} == i386) - sh ${.CURDIR}/../../sys/kern/makesyscalls.sh \ - ${.CURDIR}/../../sys/${MACHINE_ARCH}/linux/syscalls.master ${.CURDIR}/linux_syscalls.conf -.endif -.if (${MACHINE_ARCH} == amd64) - sh ${.CURDIR}/../../sys/kern/makesyscalls.sh \ - ${.CURDIR}/../../sys/${MACHINE_ARCH}/linux32/syscalls.master ${.CURDIR}/linux32_syscalls.conf -.endif .include bsd.prog.mk ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r284369 - head/targets/pseudo/userland
Author: sjg Date: Sun Jun 14 03:29:24 2015 New Revision: 284369 URL: https://svnweb.freebsd.org/changeset/base/284369 Log: We cannot build makewhatis and mandoc Modified: head/targets/pseudo/userland/Makefile.depend Modified: head/targets/pseudo/userland/Makefile.depend == --- head/targets/pseudo/userland/Makefile.dependSun Jun 14 03:28:48 2015(r284368) +++ head/targets/pseudo/userland/Makefile.dependSun Jun 14 03:29:24 2015(r284369) @@ -2,9 +2,17 @@ # This file is not autogenerated - take care! +.if !defined(MK_MANDOCDB) +.include src.opts.mk +.endif + DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,} -DIRDEPS = \ +DIRDEPS= +.if ${MK_MANDOCDB} == no +DIRDEPS+= usr.bin/makewhatis +.endif +DIRDEPS+= \ bin/cat \ bin/chflags \ bin/chio \ @@ -271,7 +279,6 @@ DIRDEPS = \ usr.bin/lzmainfo \ usr.bin/m4 \ usr.bin/mail \ - usr.bin/makewhatis \ usr.bin/man \ usr.bin/mandoc \ usr.bin/mesg \ @@ -777,4 +784,5 @@ DIRDEPS.powerpc= \ DIRDEPS+= ${DIRDEPS.${MACHINE}:U} + .include dirdeps.mk ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r284371 - head/libexec/ftpd
Author: sjg Date: Sun Jun 14 03:31:23 2015 New Revision: 284371 URL: https://svnweb.freebsd.org/changeset/base/284371 Log: Needs libxo Modified: head/libexec/ftpd/Makefile.depend Modified: head/libexec/ftpd/Makefile.depend == --- head/libexec/ftpd/Makefile.depend Sun Jun 14 03:30:39 2015 (r284370) +++ head/libexec/ftpd/Makefile.depend Sun Jun 14 03:31:23 2015 (r284371) @@ -15,6 +15,7 @@ DIRDEPS = \ lib/libopie \ lib/libpam/libpam \ lib/libutil \ + lib/libxo \ lib/msun \ usr.bin/yacc.host \ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r284339 - head/contrib/elftoolchain/elfcopy
Author: emaste Date: Sat Jun 13 14:24:31 2015 New Revision: 284339 URL: https://svnweb.freebsd.org/changeset/base/284339 Log: elfcopy: Handle objects without a .shstrtab section string table As of LLVM revision 238073, LLVM stores symbols and section names in the same string table. From the upstream commit mesage: With the scheme of naming sections like .text.foo where foo is a symbol, there is a big potential saving in using a single one. This is a cherry-pick of ELF Tool Chain revision 3225. Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/elfcopy/sections.c Modified: head/contrib/elftoolchain/elfcopy/sections.c == --- head/contrib/elftoolchain/elfcopy/sections.cSat Jun 13 07:31:50 2015(r284338) +++ head/contrib/elftoolchain/elfcopy/sections.cSat Jun 13 14:24:31 2015(r284339) @@ -1349,6 +1349,14 @@ set_shstrtab(struct elfcopy *ecp) s = ecp-shstrtab; + if (s-os == NULL) { + /* Input object does not contain .shstrtab section */ + if ((s-os = elf_newscn(ecp-eout)) == NULL) + errx(EXIT_FAILURE, elf_newscn failed: %s, + elf_errmsg(-1)); + insert_to_sec_list(ecp, s, 1); + } + if (gelf_getshdr(s-os, sh) == NULL) errx(EXIT_FAILURE, 692 gelf_getshdr() failed: %s, elf_errmsg(-1)); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r284198 - head/bin/ls
On Jun 13, 2015, at 10:26 AM, Julian Elischer jul...@freebsd.org wrote: On 6/13/15 10:49 AM, Steve Kargl wrote: On Fri, Jun 12, 2015 at 08:43:09PM -0400, Alexander Kabaev wrote: On Wed, 10 Jun 2015 01:27:39 + (UTC) Marcel Moolenaar mar...@freebsd.org wrote: Author: marcel Date: Wed Jun 10 01:27:38 2015 New Revision: 284198 URL: https://svnweb.freebsd.org/changeset/base/284198 Log: Convert ls(1) to use libxo(3). Obtained from:Phil Shafer p...@juniper.net Sponsored by:Juniper Networks, Inc. SKIP This broke all code that pipes output of the ls command to pipeline, such as 'ls | wc -l'. ls never exits and never output anything. Is there any purpose to libxo other than breaking stuff, which it achieves so splendidly? -1 for libxo, which also makes code almost unreadable. +1 of the -1 my personal vote is to revert all libxo changes and banish it from /usr/src. not the way to solve the problem in question. It isn’t even wrong…. I think that we shouldn’t integrate any more libxo stuff until all the known bugs in the stuff that’s already been converted is fixed. For example, gstat’s ‘q’ function now needs a bleeping carriage return before it will quit. That’s insane. And the twisty maze of modifications has made it rather an uber-pita to figure out WTF I need to do to un-F this up. But back to the topic at hand. libxo for ls? Really? WTF were you thinking? I know the cat -v paper is a bit of an extreme viewpoint, but all the libxo integration can be used a poster child for Pike’s worries… Warner signature.asc Description: Message signed with OpenPGP using GPGMail
Re: svn commit: r284198 - head/bin/ls
On 6/13/15 10:49 AM, Steve Kargl wrote: On Fri, Jun 12, 2015 at 08:43:09PM -0400, Alexander Kabaev wrote: On Wed, 10 Jun 2015 01:27:39 + (UTC) Marcel Moolenaar mar...@freebsd.org wrote: Author: marcel Date: Wed Jun 10 01:27:38 2015 New Revision: 284198 URL: https://svnweb.freebsd.org/changeset/base/284198 Log: Convert ls(1) to use libxo(3). Obtained from: Phil Shafer p...@juniper.net Sponsored by:Juniper Networks, Inc. SKIP This broke all code that pipes output of the ls command to pipeline, such as 'ls | wc -l'. ls never exits and never output anything. Is there any purpose to libxo other than breaking stuff, which it achieves so splendidly? -1 for libxo, which also makes code almost unreadable. +1 of the -1 my personal vote is to revert all libxo changes and banish it from /usr/src. not the way to solve the problem in question. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r284338 - in stable/10/sys: amd64/amd64 amd64/include i386/i386 i386/include x86/x86
Author: kib Date: Sat Jun 13 07:31:50 2015 New Revision: 284338 URL: https://svnweb.freebsd.org/changeset/base/284338 Log: MFC r284104: Updates from SDM rev. 55. Modified: stable/10/sys/amd64/amd64/initcpu.c stable/10/sys/amd64/include/md_var.h stable/10/sys/i386/i386/initcpu.c stable/10/sys/i386/include/md_var.h stable/10/sys/x86/x86/identcpu.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/initcpu.c == --- stable/10/sys/amd64/amd64/initcpu.c Sat Jun 13 06:09:00 2015 (r284337) +++ stable/10/sys/amd64/amd64/initcpu.c Sat Jun 13 07:31:50 2015 (r284338) @@ -74,6 +74,7 @@ u_int cpu_fxsr; /* SSE enabled */ u_int cpu_mxcsr_mask; /* Valid bits in mxcsr */ u_int cpu_clflush_line_size = 32; u_int cpu_stdext_feature; +u_int cpu_stdext_feature2; u_int cpu_max_ext_state_size; u_int cpu_mon_mwait_flags;/* MONITOR/MWAIT flags (CPUID.05H.ECX) */ u_int cpu_mon_min_size; /* MONITOR minimum range size, bytes */ Modified: stable/10/sys/amd64/include/md_var.h == --- stable/10/sys/amd64/include/md_var.hSat Jun 13 06:09:00 2015 (r284337) +++ stable/10/sys/amd64/include/md_var.hSat Jun 13 07:31:50 2015 (r284338) @@ -49,6 +49,7 @@ externu_int via_feature_rng; extern u_int via_feature_xcrypt; extern u_int cpu_clflush_line_size; extern u_int cpu_stdext_feature; +extern u_int cpu_stdext_feature2; extern u_int cpu_fxsr; extern u_int cpu_high; extern u_int cpu_id; Modified: stable/10/sys/i386/i386/initcpu.c == --- stable/10/sys/i386/i386/initcpu.c Sat Jun 13 06:09:00 2015 (r284337) +++ stable/10/sys/i386/i386/initcpu.c Sat Jun 13 07:31:50 2015 (r284338) @@ -102,6 +102,7 @@ u_int cpu_mxcsr_mask; /* Valid bits in #endif u_int cpu_clflush_line_size = 32; u_int cpu_stdext_feature; +u_int cpu_stdext_feature2; u_int cpu_max_ext_state_size; u_int cpu_mon_mwait_flags;/* MONITOR/MWAIT flags (CPUID.05H.ECX) */ u_int cpu_mon_min_size; /* MONITOR minimum range size, bytes */ Modified: stable/10/sys/i386/include/md_var.h == --- stable/10/sys/i386/include/md_var.h Sat Jun 13 06:09:00 2015 (r284337) +++ stable/10/sys/i386/include/md_var.h Sat Jun 13 07:31:50 2015 (r284338) @@ -49,6 +49,7 @@ externu_int via_feature_rng; extern u_int via_feature_xcrypt; extern u_int cpu_clflush_line_size; extern u_int cpu_stdext_feature; +extern u_int cpu_stdext_feature2; extern u_int cpu_fxsr; extern u_int cpu_high; extern u_int cpu_id; Modified: stable/10/sys/x86/x86/identcpu.c == --- stable/10/sys/x86/x86/identcpu.cSat Jun 13 06:09:00 2015 (r284337) +++ stable/10/sys/x86/x86/identcpu.cSat Jun 13 07:31:50 2015 (r284338) @@ -903,6 +903,9 @@ printcpuinfo(void) \013INVPCID /* Restricted Transactional Memory */ \014RTM + \015PQM + \016NFPUSG + \020PQE /* Intel Memory Protection Extensions */ \017MPX /* AVX512 Foundation */ @@ -922,6 +925,16 @@ printcpuinfo(void) ); } + if (cpu_stdext_feature2 != 0) { + printf(\n Structured Extended Features2=0x%b, + cpu_stdext_feature2, + \020 + \001PREFETCHWT1 + \004PKU + \005OSPKE + ); + } + if ((cpu_feature2 CPUID2_XSAVE) != 0) { cpuid_count(0xd, 0x1, regs); if (regs[0] != 0) { @@ -1361,6 +1374,7 @@ identify_cpu(void) cpu_stdext_disable = 0; TUNABLE_INT_FETCH(hw.cpu_stdext_disable, cpu_stdext_disable); cpu_stdext_feature = ~cpu_stdext_disable; + cpu_stdext_feature2 = regs[2]; } #ifdef __i386__ @@ -1705,18 +1719,39 @@ print_INTEL_TLB(u_int data) case 0x8: printf(1st-level instruction cache: 16 KB, 4-way set associative, 32 byte line size\n); break; +
Re: svn commit: r284336 - head/sys/dev/acpi_support
On Sat, Jun 13, 2015 at 12:37 AM, Konstantin Belousov kostik...@gmail.com wrote: On Sat, Jun 13, 2015 at 05:55:26AM +, Allan Jude wrote: Author: allanjude (doc committer) Date: Sat Jun 13 05:55:26 2015 New Revision: 284336 URL: https://svnweb.freebsd.org/changeset/base/284336 Log: acpi_ibm.ko panics if SMBIOS information is not available Add a check for NULL before strcmp on smbios information incase it is not populated Differential Revision: https://reviews.freebsd.org/D2750 Reviewed by:ngie, jhb Approved by:rpaulo Sponsored by: ScaleEngine Inc. Modified: head/sys/dev/acpi_support/acpi_ibm.c Modified: head/sys/dev/acpi_support/acpi_ibm.c == --- head/sys/dev/acpi_support/acpi_ibm.c Sat Jun 13 01:28:19 2015 (r284335) +++ head/sys/dev/acpi_support/acpi_ibm.c Sat Jun 13 05:55:26 2015 (r284336) @@ -485,6 +485,9 @@ acpi_ibm_attach(device_t dev) /* Enable per-model events. */ maker = kern_getenv(smbios.system.maker); product = kern_getenv(smbios.system.product); + if (maker != NULL product != NULL) + goto nosmbios; This looks reversed. I would expect the condition to be if (maker == NULL || product == NULL) goto ...; +1 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r284337 - head/sys/mips/conf
Author: allanjude (doc committer) Date: Sat Jun 13 06:09:00 2015 New Revision: 284337 URL: https://svnweb.freebsd.org/changeset/base/284337 Log: Add if_vlan, ipfw{,_nat}.ko, and libalias to the AR934X kernel config This makes the TP-Link WDR3600 routers more useful Differential Revision:https://reviews.freebsd.org/D2780 Approved by: adrian Sponsored by: ScaleEngine Inc. Modified: head/sys/mips/conf/AR934X_BASE Modified: head/sys/mips/conf/AR934X_BASE == --- head/sys/mips/conf/AR934X_BASE Sat Jun 13 05:55:26 2015 (r284336) +++ head/sys/mips/conf/AR934X_BASE Sat Jun 13 06:09:00 2015 (r284337) @@ -20,7 +20,7 @@ files ../atheros/files.ar71xx hints AR934X_BASE.hints makeoptionsDEBUG=-g#Build kernel with gdb(1) debug symbols -makeoptionsMODULES_OVERRIDE=random gpio ar71xx if_gif if_gre if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr ath ath_ahb hwpmc +makeoptionsMODULES_OVERRIDE=random gpio ar71xx if_gif if_gre if_vlan if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr ath ath_ahb hwpmc ipfw ipfw_nat libalias # makeoptions MODULES_OVERRIDE= optionsDDB ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r284336 - head/sys/dev/acpi_support
On Sat, Jun 13, 2015 at 05:55:26AM +, Allan Jude wrote: Author: allanjude (doc committer) Date: Sat Jun 13 05:55:26 2015 New Revision: 284336 URL: https://svnweb.freebsd.org/changeset/base/284336 Log: acpi_ibm.ko panics if SMBIOS information is not available Add a check for NULL before strcmp on smbios information incase it is not populated Differential Revision: https://reviews.freebsd.org/D2750 Reviewed by:ngie, jhb Approved by:rpaulo Sponsored by: ScaleEngine Inc. Modified: head/sys/dev/acpi_support/acpi_ibm.c Modified: head/sys/dev/acpi_support/acpi_ibm.c == --- head/sys/dev/acpi_support/acpi_ibm.c Sat Jun 13 01:28:19 2015 (r284335) +++ head/sys/dev/acpi_support/acpi_ibm.c Sat Jun 13 05:55:26 2015 (r284336) @@ -485,6 +485,9 @@ acpi_ibm_attach(device_t dev) /* Enable per-model events. */ maker = kern_getenv(smbios.system.maker); product = kern_getenv(smbios.system.product); + if (maker != NULL product != NULL) + goto nosmbios; This looks reversed. I would expect the condition to be if (maker == NULL || product == NULL) goto ...; + for (i = 0; i nitems(acpi_ibm_models); i++) { if (strcmp(maker, acpi_ibm_models[i].maker) == 0 strcmp(product, acpi_ibm_models[i].product) == 0) { @@ -494,6 +497,8 @@ acpi_ibm_attach(device_t dev) ACPI_SERIAL_END(ibm); } } + +nosmbios: freeenv(maker); freeenv(product); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r284198 - head/bin/ls
On 13/06/2015 16:38, David Chisnall wrote: On 13 Jun 2015, at 11:17, Ian Lepore i...@freebsd.org wrote: If you would have told me a year ago that you had a simple scheme that could make 30 years of experience maintaining code for unix-like systems completely worthless I would have been skeptical, but it seems we're well on our way. There is a lot of heckling and unhelpful hyperbole in this thread. Agree -- teething trouble. I am trying to push something out right now based on 8.x, and all the little gotchas (e.g. vmstat -z not using a uniform delimiter set) are like little landmines on the highway in front of my Pursuit Special. Personally I prefer the new formats, they're less ambiguous, and closer to the analytics where they actually get used. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r284342 - head/sys/dev/virtio/network
Author: bryanv Date: Sat Jun 13 16:13:31 2015 New Revision: 284342 URL: https://svnweb.freebsd.org/changeset/base/284342 Log: Fix typo when deregistering the VLAN unconfig event handler Submitted by: Masao Uebayashi uebay...@tombiinc.com MFC after:3 days Modified: head/sys/dev/virtio/network/if_vtnet.c Modified: head/sys/dev/virtio/network/if_vtnet.c == --- head/sys/dev/virtio/network/if_vtnet.c Sat Jun 13 15:36:13 2015 (r284341) +++ head/sys/dev/virtio/network/if_vtnet.c Sat Jun 13 16:13:31 2015 (r284342) @@ -443,7 +443,7 @@ vtnet_detach(device_t dev) sc-vtnet_vlan_attach = NULL; } if (sc-vtnet_vlan_detach != NULL) { - EVENTHANDLER_DEREGISTER(vlan_unconfg, sc-vtnet_vlan_detach); + EVENTHANDLER_DEREGISTER(vlan_unconfig, sc-vtnet_vlan_detach); sc-vtnet_vlan_detach = NULL; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r284340 - head/contrib/libxo/libxo
Author: kan Date: Sat Jun 13 15:14:39 2015 New Revision: 284340 URL: https://svnweb.freebsd.org/changeset/base/284340 Log: Unbreak libxo's handling of characters not representable in current locale The xo_format_string_direct function loops forever never advancing the processed string pointer when it encounters a character that makes mbrtowc fail. Make it emit '?' character instead, as it seems this is what the code intent was, sans bugs. Differential Revision: https://reviews.freebsd.org/D2802 Reviewed by: marcel Modified: head/contrib/libxo/libxo/libxo.c Modified: head/contrib/libxo/libxo/libxo.c == --- head/contrib/libxo/libxo/libxo.cSat Jun 13 14:24:31 2015 (r284339) +++ head/contrib/libxo/libxo/libxo.cSat Jun 13 15:14:39 2015 (r284340) @@ -2077,7 +2077,8 @@ xo_format_string_direct (xo_handle_t *xo ilen = mbrtowc(wc, cp, ilen, xop-xo_mbstate); if (ilen 0) { /* Invalid data; skip */ xo_failure(xop, invalid mbs char: %02hhx, *cp); - continue; + wc = L'?'; + ilen = 1; } if (ilen == 0) {/* Hit a wide NUL character */ len = 0; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r284198 - head/bin/ls
I think the experience so far has been ok, this way isn't working well, maybe it's time we made all our statistics gathering binaries thin layers on top of .so 's that implement the variation in output. It's been valuable to (re)learn that, but .. -adrian ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r284198 - head/bin/ls
On 13 Jun 2015, at 11:17, Ian Lepore i...@freebsd.org wrote: If you would have told me a year ago that you had a simple scheme that could make 30 years of experience maintaining code for unix-like systems completely worthless I would have been skeptical, but it seems we're well on our way. There is a lot of heckling and unhelpful hyperbole in this thread. Reading the xo_emit format strings takes a little bit of getting used to, but the same is true of printf - it’s just that we’re already used to printf. The structured parts (xo_open_container, xo_close_container and friends) are clear and descriptive. The changes are fairly invasive, but the benefits are also very large for anyone who is wanting to automate administration of FreeBSD systems. If you have suggestions for how the libxo APIs could be improved, then please let us know - Phil is very reception to suggestions but objections along the lines of ‘it’s not what I’m used to and changes sometimes break things so we should never have changes’ are not helpful. David ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r284198 - head/bin/ls
On Jun 13, 2015, at 11:47 AM, Ian Lepore i...@freebsd.org wrote: On Sat, 2015-06-13 at 11:38 -0400, David Chisnall wrote: On 13 Jun 2015, at 11:17, Ian Lepore i...@freebsd.org wrote: If you would have told me a year ago that you had a simple scheme that could make 30 years of experience maintaining code for unix-like systems completely worthless I would have been skeptical, but it seems we're well on our way. There is a lot of heckling and unhelpful hyperbole in this thread. Reading the xo_emit format strings takes a little bit of getting used to, but the same is true of printf - it’s just that we’re already used to printf. The structured parts (xo_open_container, xo_close_container and friends) are clear and descriptive. The changes are fairly invasive, but the benefits are also very large for anyone who is wanting to automate administration of FreeBSD systems. If you have suggestions for how the libxo APIs could be improved, then please let us know - Phil is very reception to suggestions but objections along the lines of ‘it’s not what I’m used to and changes sometimes break things so we should never have changes’ are not helpful. This is a piece of crap that needs to be excised from the system and done a different way is useful input whether you agree with it or not. Actually: no. Not only does one not demonstrate an understanding of the problem by calling it “crap” and thus leaving the recipient to wonder whether it’s worth his or her time to even respond; the sentence also lack a concrete suggestion and, last but not least, is utter after this was all discussed on arch@, making it very much one of “too little, too late”. So, not useful at all. -- Marcel Moolenaar mar...@xcllnt.net signature.asc Description: Message signed with OpenPGP using GPGMail
Re: svn commit: r284198 - head/bin/ls
On Jun 13, 2015, at 12:35 PM, Adrian Chadd adr...@freebsd.org wrote: Hi, I think we're at the point now where it's worth doing that re-evaluation. I don't think it's worth backing everything out; just whether the current approach of overriding printing the way it's done is the right way. So, how about that happens nowish before more things are converted? What do you suggest we do instead? -- Marcel Moolenaar mar...@xcllnt.net signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r284344 - stable/10/sys/dev/virtio/block
Author: bryanv Date: Sat Jun 13 17:40:33 2015 New Revision: 284344 URL: https://svnweb.freebsd.org/changeset/base/284344 Log: MFC r277788: Rework vtblk dump handling of in flight requests Previously, the driver resets the device and abandon the requests that are caught in flight when the dump was initiated. This was problematic if the system is resumed after the dump is completed. While that is probably not the typical action, it is simple to rework the driver to very likely have the device usable after the dump without making it more likely for the dump to fail. The in flight requests are simply queued for completion once the dump is finished. Modified: stable/10/sys/dev/virtio/block/virtio_blk.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/virtio/block/virtio_blk.c == --- stable/10/sys/dev/virtio/block/virtio_blk.c Sat Jun 13 16:15:43 2015 (r284343) +++ stable/10/sys/dev/virtio/block/virtio_blk.c Sat Jun 13 17:40:33 2015 (r284344) @@ -76,9 +76,8 @@ struct vtblk_softc { #define VTBLK_FLAG_READONLY0x0002 #define VTBLK_FLAG_DETACH 0x0004 #define VTBLK_FLAG_SUSPEND 0x0008 -#define VTBLK_FLAG_DUMPING 0x0010 -#define VTBLK_FLAG_BARRIER 0x0020 -#define VTBLK_FLAG_WC_CONFIG 0x0040 +#define VTBLK_FLAG_BARRIER 0x0010 +#define VTBLK_FLAG_WC_CONFIG 0x0020 struct virtqueue*vtblk_vq; struct sglist *vtblk_sglist; @@ -95,6 +94,7 @@ struct vtblk_softc { int vtblk_request_count; enum vtblk_cache_modevtblk_write_cache; + struct bio_queue vtblk_dump_queue; struct vtblk_request vtblk_dump_request; }; @@ -162,7 +162,7 @@ static void vtblk_queue_completed(struct struct bio_queue *); static voidvtblk_done_completed(struct vtblk_softc *, struct bio_queue *); -static voidvtblk_drain_vq(struct vtblk_softc *, int); +static voidvtblk_drain_vq(struct vtblk_softc *); static voidvtblk_drain(struct vtblk_softc *); static voidvtblk_startio(struct vtblk_softc *); @@ -177,9 +177,10 @@ static int vtblk_quiesce(struct vtblk_so static voidvtblk_vq_intr(void *); static voidvtblk_stop(struct vtblk_softc *); -static voidvtblk_dump_prepare(struct vtblk_softc *); +static voidvtblk_dump_quiesce(struct vtblk_softc *); static int vtblk_dump_write(struct vtblk_softc *, void *, off_t, size_t); static int vtblk_dump_flush(struct vtblk_softc *); +static voidvtblk_dump_complete(struct vtblk_softc *); static voidvtblk_set_write_cache(struct vtblk_softc *, int); static int vtblk_write_cache_enabled(struct vtblk_softc *sc, @@ -301,6 +302,7 @@ vtblk_attach(device_t dev) sc-vtblk_dev = dev; VTBLK_LOCK_INIT(sc, device_get_nameunit(dev)); bioq_init(sc-vtblk_bioq); + TAILQ_INIT(sc-vtblk_dump_queue); TAILQ_INIT(sc-vtblk_req_free); TAILQ_INIT(sc-vtblk_req_ready); @@ -505,25 +507,19 @@ vtblk_dump(void *arg, void *virtual, vm_ int error; dp = arg; + error = 0; if ((sc = dp-d_drv1) == NULL) return (ENXIO); VTBLK_LOCK(sc); - if ((sc-vtblk_flags VTBLK_FLAG_DUMPING) == 0) { - vtblk_dump_prepare(sc); - sc-vtblk_flags |= VTBLK_FLAG_DUMPING; - } + vtblk_dump_quiesce(sc); if (length 0) error = vtblk_dump_write(sc, virtual, offset, length); - else if (virtual == NULL offset == 0) - error = vtblk_dump_flush(sc); - else { - error = EINVAL; - sc-vtblk_flags = ~VTBLK_FLAG_DUMPING; - } + if (error || (virtual == NULL offset == 0)) + vtblk_dump_complete(sc); VTBLK_UNLOCK(sc); @@ -996,7 +992,7 @@ vtblk_done_completed(struct vtblk_softc } static void -vtblk_drain_vq(struct vtblk_softc *sc, int skip_done) +vtblk_drain_vq(struct vtblk_softc *sc) { struct virtqueue *vq; struct vtblk_request *req; @@ -1006,9 +1002,7 @@ vtblk_drain_vq(struct vtblk_softc *sc, i last = 0; while ((req = virtqueue_drain(vq, last)) != NULL) { - if (!skip_done) - vtblk_bio_done(sc, req-vbr_bp, ENXIO); - + vtblk_bio_done(sc, req-vbr_bp, ENXIO); vtblk_request_enqueue(sc, req); } @@ -1031,7 +1025,7 @@ vtblk_drain(struct vtblk_softc *sc) vtblk_queue_completed(sc, queue); vtblk_done_completed(sc, queue); - vtblk_drain_vq(sc, 0); + vtblk_drain_vq(sc); } while ((req = vtblk_request_next_ready(sc)) != NULL) { @@ -1256,31 +1250,16 @@ vtblk_stop(struct vtblk_softc *sc) } static void -vtblk_dump_prepare(struct vtblk_softc *sc)
svn commit: r284341 - head/share/mk
Author: sjg Date: Sat Jun 13 15:36:13 2015 New Revision: 284341 URL: https://svnweb.freebsd.org/changeset/base/284341 Log: Use ${CRUNCHGEN} rather than bare word. Reviewed by: brooks Modified: head/share/mk/bsd.crunchgen.mk Modified: head/share/mk/bsd.crunchgen.mk == --- head/share/mk/bsd.crunchgen.mk Sat Jun 13 15:14:39 2015 (r284340) +++ head/share/mk/bsd.crunchgen.mk Sat Jun 13 15:36:13 2015 (r284341) @@ -106,11 +106,12 @@ $(CONF): Makefile .endfor .endfor +CRUNCHGEN?= crunchgen # XXX Make sure we don't pass -P to crunchgen(1). .MAKEFLAGS:= ${.MAKEFLAGS:N-P} .ORDER: $(OUTPUTS) objs -$(OUTPUTS): $(CONF) - MAKE=${MAKE} MAKEOBJDIRPREFIX=${CRUNCHOBJS} crunchgen -fq -m $(OUTMK) \ +$(OUTPUTS): $(CONF) .META + MAKE=${MAKE} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${CRUNCHGEN} -fq -m $(OUTMK) \ -c $(OUTC) $(CONF) $(PROG): $(OUTPUTS) objs ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r284198 - head/bin/ls
On Sat, 2015-06-13 at 11:38 -0400, David Chisnall wrote: On 13 Jun 2015, at 11:17, Ian Lepore i...@freebsd.org wrote: If you would have told me a year ago that you had a simple scheme that could make 30 years of experience maintaining code for unix-like systems completely worthless I would have been skeptical, but it seems we're well on our way. There is a lot of heckling and unhelpful hyperbole in this thread. Reading the xo_emit format strings takes a little bit of getting used to, but the same is true of printf - it’s just that we’re already used to printf. The structured parts (xo_open_container, xo_close_container and friends) are clear and descriptive. The changes are fairly invasive, but the benefits are also very large for anyone who is wanting to automate administration of FreeBSD systems. If you have suggestions for how the libxo APIs could be improved, then please let us know - Phil is very reception to suggestions but objections along the lines of ‘it’s not what I’m used to and changes sometimes break things so we should never have changes’ are not helpful. This is a piece of crap that needs to be excised from the system and done a different way is useful input whether you agree with it or not. The idea that someone does not have the right to point out a huge mistake simply because they don't have a patchset in hand is pure BS. But, this is what you get when a disagreement about design is solved by someone pointing out that project policy has always been he who commits first wins the design discussion and that's pretty much what happened when all of this was being discussed. -- Ian ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r284343 - in stable: 10/sys/kern 10/sys/sys 9/sys/kern 9/sys/sys
Author: jhb Date: Sat Jun 13 16:15:43 2015 New Revision: 284343 URL: https://svnweb.freebsd.org/changeset/base/284343 Log: MFC 283546: Add KTR tracing for some MI ptrace events. Modified: stable/10/sys/kern/kern_exit.c stable/10/sys/kern/kern_fork.c stable/10/sys/kern/kern_sig.c stable/10/sys/kern/sys_process.c stable/10/sys/sys/ktr.h Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/kern/kern_exit.c stable/9/sys/kern/kern_fork.c stable/9/sys/kern/kern_sig.c stable/9/sys/kern/sys_process.c stable/9/sys/sys/ktr.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/10/sys/kern/kern_exit.c == --- stable/10/sys/kern/kern_exit.c Sat Jun 13 16:13:31 2015 (r284342) +++ stable/10/sys/kern/kern_exit.c Sat Jun 13 16:15:43 2015 (r284343) @@ -531,6 +531,8 @@ exit1(struct thread *td, int rv) */ while ((q = LIST_FIRST(p-p_orphans)) != NULL) { PROC_LOCK(q); + CTR2(KTR_PTRACE, exit: pid %d, clearing orphan %d, p-p_pid, + q-p_pid); clear_orphan(q); PROC_UNLOCK(q); } @@ -865,6 +867,9 @@ proc_reap(struct thread *td, struct proc t = proc_realparent(p); PROC_LOCK(t); PROC_LOCK(p); + CTR2(KTR_PTRACE, + wait: traced child %d moved back to parent %d, p-p_pid, + t-p_pid); proc_reparent(p, t); p-p_oppid = 0; PROC_UNLOCK(p); @@ -1219,6 +1224,10 @@ loop: PROC_UNLOCK(q); } + CTR4(KTR_PTRACE, + wait: returning trapped pid %d status %#x (xstat %d) xthread %d, + p-p_pid, W_STOPCODE(p-p_xstat), p-p_xstat, + p-p_xthread != NULL ? p-p_xthread-td_tid : -1); PROC_UNLOCK(p); return (0); } Modified: stable/10/sys/kern/kern_fork.c == --- stable/10/sys/kern/kern_fork.c Sat Jun 13 16:13:31 2015 (r284342) +++ stable/10/sys/kern/kern_fork.c Sat Jun 13 16:15:43 2015 (r284343) @@ -1056,6 +1056,9 @@ fork_return(struct thread *td, struct tr dbg = p-p_pptr-p_pptr; p-p_flag |= P_TRACED; p-p_oppid = p-p_pptr-p_pid; + CTR2(KTR_PTRACE, + fork_return: attaching to new child pid %d: oppid %d, + p-p_pid, p-p_oppid); proc_reparent(p, dbg); sx_xunlock(proctree_lock); td-td_dbgflags |= TDB_CHILD; Modified: stable/10/sys/kern/kern_sig.c == --- stable/10/sys/kern/kern_sig.c Sat Jun 13 16:13:31 2015 (r284342) +++ stable/10/sys/kern/kern_sig.c Sat Jun 13 16:15:43 2015 (r284343) @@ -2484,6 +2484,8 @@ ptracestop(struct thread *td, int sig) td-td_dbgflags |= TDB_XSIG; td-td_xsig = sig; + CTR4(KTR_PTRACE, ptracestop: tid %d (pid %d) flags %#x sig %d, + td-td_tid, p-p_pid, td-td_dbgflags, sig); PROC_SLOCK(p); while ((p-p_flag P_TRACED) (td-td_dbgflags TDB_XSIG)) { if (p-p_flag P_SINGLE_EXIT) { Modified: stable/10/sys/kern/sys_process.c == --- stable/10/sys/kern/sys_process.cSat Jun 13 16:13:31 2015 (r284342) +++ stable/10/sys/kern/sys_process.cSat Jun 13 16:15:43 2015 (r284343) @@ -432,6 +432,9 @@ ptrace_vm_entry(struct thread *td, struc free(freepath, M_TEMP); } } + if (error == 0) + CTR3(KTR_PTRACE, PT_VM_ENTRY: pid %d, entry %d, start %p, + p-p_pid, pve-pve_entry, pve-pve_start); return (error); } @@ -826,6 +829,7 @@ kern_ptrace(struct thread *td, int req, if (p-p_flag P_PPWAIT) p-p_flag |= P_PPTRACE; p-p_oppid = p-p_pptr-p_pid; + CTR1(KTR_PTRACE, PT_TRACE_ME: pid %d, p-p_pid); break; case PT_ATTACH: @@ -845,17 +849,25 @@ kern_ptrace(struct thread *td, int req, proc_reparent(p, td-td_proc); } data = SIGSTOP; + CTR2(KTR_PTRACE, PT_ATTACH: pid %d, oppid %d, p-p_pid, + p-p_oppid); goto sendsig; /* in PT_CONTINUE below */ case PT_CLEARSTEP: + CTR2(KTR_PTRACE,
svn commit: r284343 - in stable: 10/sys/kern 10/sys/sys 9/sys/kern 9/sys/sys
Author: jhb Date: Sat Jun 13 16:15:43 2015 New Revision: 284343 URL: https://svnweb.freebsd.org/changeset/base/284343 Log: MFC 283546: Add KTR tracing for some MI ptrace events. Modified: stable/9/sys/kern/kern_exit.c stable/9/sys/kern/kern_fork.c stable/9/sys/kern/kern_sig.c stable/9/sys/kern/sys_process.c stable/9/sys/sys/ktr.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/kern/kern_exit.c stable/10/sys/kern/kern_fork.c stable/10/sys/kern/kern_sig.c stable/10/sys/kern/sys_process.c stable/10/sys/sys/ktr.h Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/kern/kern_exit.c == --- stable/9/sys/kern/kern_exit.c Sat Jun 13 16:13:31 2015 (r284342) +++ stable/9/sys/kern/kern_exit.c Sat Jun 13 16:15:43 2015 (r284343) @@ -457,6 +457,8 @@ exit1(struct thread *td, int rv) */ while ((q = LIST_FIRST(p-p_orphans)) != NULL) { PROC_LOCK(q); + CTR2(KTR_PTRACE, exit: pid %d, clearing orphan %d, p-p_pid, + q-p_pid); clear_orphan(q); PROC_UNLOCK(q); } @@ -788,6 +790,9 @@ proc_reap(struct thread *td, struct proc */ if (p-p_oppid (t = pfind(p-p_oppid)) != NULL) { PROC_LOCK(p); + CTR2(KTR_PTRACE, + wait: traced child %d moved back to parent %d, p-p_pid, + t-p_pid); proc_reparent(p, t); p-p_oppid = 0; PROC_UNLOCK(p); @@ -1143,6 +1148,10 @@ loop: PROC_UNLOCK(q); } + CTR4(KTR_PTRACE, + wait: returning trapped pid %d status %#x (xstat %d) xthread %d, + p-p_pid, W_STOPCODE(p-p_xstat), p-p_xstat, + p-p_xthread != NULL ? p-p_xthread-td_tid : -1); PROC_UNLOCK(p); return (0); } Modified: stable/9/sys/kern/kern_fork.c == --- stable/9/sys/kern/kern_fork.c Sat Jun 13 16:13:31 2015 (r284342) +++ stable/9/sys/kern/kern_fork.c Sat Jun 13 16:15:43 2015 (r284343) @@ -1034,6 +1034,9 @@ fork_return(struct thread *td, struct tr dbg = p-p_pptr-p_pptr; p-p_flag |= P_TRACED; p-p_oppid = p-p_pptr-p_pid; + CTR2(KTR_PTRACE, + fork_return: attaching to new child pid %d: oppid %d, + p-p_pid, p-p_oppid); proc_reparent(p, dbg); sx_xunlock(proctree_lock); td-td_dbgflags |= TDB_CHILD; Modified: stable/9/sys/kern/kern_sig.c == --- stable/9/sys/kern/kern_sig.cSat Jun 13 16:13:31 2015 (r284342) +++ stable/9/sys/kern/kern_sig.cSat Jun 13 16:15:43 2015 (r284343) @@ -2442,6 +2442,8 @@ ptracestop(struct thread *td, int sig) td-td_dbgflags |= TDB_XSIG; td-td_xsig = sig; + CTR4(KTR_PTRACE, ptracestop: tid %d (pid %d) flags %#x sig %d, + td-td_tid, p-p_pid, td-td_dbgflags, sig); PROC_SLOCK(p); while ((p-p_flag P_TRACED) (td-td_dbgflags TDB_XSIG)) { if (p-p_flag P_SINGLE_EXIT) { Modified: stable/9/sys/kern/sys_process.c == --- stable/9/sys/kern/sys_process.c Sat Jun 13 16:13:31 2015 (r284342) +++ stable/9/sys/kern/sys_process.c Sat Jun 13 16:15:43 2015 (r284343) @@ -435,6 +435,9 @@ ptrace_vm_entry(struct thread *td, struc free(freepath, M_TEMP); } } + if (error == 0) + CTR3(KTR_PTRACE, PT_VM_ENTRY: pid %d, entry %d, start %p, + p-p_pid, pve-pve_entry, pve-pve_start); return (error); } @@ -829,6 +832,7 @@ kern_ptrace(struct thread *td, int req, if (p-p_flag P_PPWAIT) p-p_flag |= P_PPTRACE; p-p_oppid = p-p_pptr-p_pid; + CTR1(KTR_PTRACE, PT_TRACE_ME: pid %d, p-p_pid); break; case PT_ATTACH: @@ -848,17 +852,25 @@ kern_ptrace(struct thread *td, int req, proc_reparent(p, td-td_proc); } data = SIGSTOP; + CTR2(KTR_PTRACE, PT_ATTACH: pid %d, oppid %d, p-p_pid, + p-p_oppid); goto sendsig; /* in PT_CONTINUE below */ case PT_CLEARSTEP: + CTR2(KTR_PTRACE,
Re: svn commit: r284198 - head/bin/ls
On Fri, 2015-06-12 at 19:49 -0700, Steve Kargl wrote: On Fri, Jun 12, 2015 at 08:43:09PM -0400, Alexander Kabaev wrote: On Wed, 10 Jun 2015 01:27:39 + (UTC) Marcel Moolenaar mar...@freebsd.org wrote: Author: marcel Date: Wed Jun 10 01:27:38 2015 New Revision: 284198 URL: https://svnweb.freebsd.org/changeset/base/284198 Log: Convert ls(1) to use libxo(3). Obtained from: Phil Shafer p...@juniper.net Sponsored by: Juniper Networks, Inc. SKIP This broke all code that pipes output of the ls command to pipeline, such as 'ls | wc -l'. ls never exits and never output anything. Is there any purpose to libxo other than breaking stuff, which it achieves so splendidly? -1 for libxo, which also makes code almost unreadable. s/unreadable/unmaintainable/ If you would have told me a year ago that you had a simple scheme that could make 30 years of experience maintaining code for unix-like systems completely worthless I would have been skeptical, but it seems we're well on our way. -- Ian ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r284198 - head/bin/ls
Hi, I think we're at the point now where it's worth doing that re-evaluation. I don't think it's worth backing everything out; just whether the current approach of overriding printing the way it's done is the right way. So, how about that happens nowish before more things are converted? -adrian ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r284198 - head/bin/ls
On 6/13/15 11:38 PM, David Chisnall wrote: On 13 Jun 2015, at 11:17, Ian Lepore i...@freebsd.org wrote: If you would have told me a year ago that you had a simple scheme that could make 30 years of experience maintaining code for unix-like systems completely worthless I would have been skeptical, but it seems we're well on our way. There is a lot of heckling and unhelpful hyperbole in this thread. Reading the xo_emit format strings takes a little bit of getting used to, but the same is true of printf - it’s just that we’re already used to printf. The structured parts (xo_open_container, xo_close_container and friends) are clear and descriptive. The changes are fairly invasive, but the benefits are also very large for anyone who is wanting to automate administration of FreeBSD systems. If you have suggestions for how the libxo APIs could be improved, then please let us know - Phil is very reception to suggestions but objections along the lines of ‘it’s not what I’m used to and changes sometimes break things so we should never have changes’ are not helpful. David I made a suggestion for an alternate path in the previous thread. https://lists.freebsd.org/pipermail/freebsd-current/2015-March/054855.html but I have a job and kids so I can't object if I'm not listened to.. (no time to actually follow my own advice and produce working code.) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r284336 - head/sys/dev/acpi_support
+1. On Jun 13, 2015 3:42 PM, NGie Cooper yaneurab...@gmail.com wrote: On Sat, Jun 13, 2015 at 12:37 AM, Konstantin Belousov kostik...@gmail.com wrote: On Sat, Jun 13, 2015 at 05:55:26AM +, Allan Jude wrote: Author: allanjude (doc committer) Date: Sat Jun 13 05:55:26 2015 New Revision: 284336 URL: https://svnweb.freebsd.org/changeset/base/284336 Log: acpi_ibm.ko panics if SMBIOS information is not available Add a check for NULL before strcmp on smbios information incase it is not populated Differential Revision: https://reviews.freebsd.org/D2750 Reviewed by:ngie, jhb Approved by:rpaulo Sponsored by: ScaleEngine Inc. Modified: head/sys/dev/acpi_support/acpi_ibm.c Modified: head/sys/dev/acpi_support/acpi_ibm.c == --- head/sys/dev/acpi_support/acpi_ibm.c Sat Jun 13 01:28:19 2015 (r284335) +++ head/sys/dev/acpi_support/acpi_ibm.c Sat Jun 13 05:55:26 2015 (r284336) @@ -485,6 +485,9 @@ acpi_ibm_attach(device_t dev) /* Enable per-model events. */ maker = kern_getenv(smbios.system.maker); product = kern_getenv(smbios.system.product); + if (maker != NULL product != NULL) + goto nosmbios; This looks reversed. I would expect the condition to be if (maker == NULL || product == NULL) goto ...; +1 ___ svn-src-h...@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r284198 - head/bin/ls
On 13 June 2015 at 10:06, Marcel Moolenaar mar...@xcllnt.net wrote: On Jun 13, 2015, at 12:35 PM, Adrian Chadd adr...@freebsd.org wrote: Hi, I think we're at the point now where it's worth doing that re-evaluation. I don't think it's worth backing everything out; just whether the current approach of overriding printing the way it's done is the right way. So, how about that happens nowish before more things are converted? What do you suggest we do instead? So a lot of these things are table driven. Having manual printing for tabular data is plain stupid. The libbsdstat library for doing basic statistics output with now and time series is what I'm playing with right now. It's only used by sam's wifi utilities, but I'm going to try and extend it for other utilities too (like netstat, vmstat, etc style output.) That way what's expressed in code is organised as such: * a bit of code fetches statistics * a bit of code sets up what the name of each field is, and what the units are * a bit of code handles any odd corner cases with data representations * libbsdstat takes care of recording the samples into the time-series or 'now' section, figuring out which fields need to be printed in which order, what the formatting is, etc. * .. I'm extending it to print out json for its table outputs versus just plain text. Having arbitrary formatting, arbitrary printing, random places where statistics are fetched, etc is actually the terrible problem that we could do better, without losing our minds by overcomplicating it with C++, templating, grammars, etc - and ending up with what look like five layers of nested java classes that do Setter(ToString(Getter()) in layers. -adrian ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r284198 - head/bin/ls
.. and, since libbsdstat is mostly in the small sandpit of wifi statistics tools, I'm going to do this /anyway/. Then people can evaluate if it's useful to convert other tools to use libbsdstat. -adrian ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r284198 - head/bin/ls
On Sat, Jun 13, 2015 at 11:38:11AM -0400, David Chisnall wrote: D If you would have told me a year ago that you had a simple scheme that D could make 30 years of experience maintaining code for unix-like systems D completely worthless I would have been skeptical, but it seems we're D well on our way. D D There is a lot of heckling and unhelpful hyperbole in this thread. Reading the xo_emit format strings takes a little bit of getting used to, but the same is true of printf - it’s just that we’re already used to printf. The structured parts (xo_open_container, xo_close_container and friends) are clear and descriptive. The changes are fairly invasive, but the benefits are also very large for anyone who is wanting to automate administration of FreeBSD systems. D D If you have suggestions for how the libxo APIs could be improved, then please let us know - Phil is very reception to suggestions but objections along the lines of ‘it’s not what I’m used to and changes sometimes break things so we should never have changes’ are not helpful. I would agree with David. After xo_emit format is learned, reading sources of converted programs isn't a big deal. All the problems with converted utilities are due to very bad quality of initial conversion commits. -- Totus tuus, Glebius. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r284345 - in head: . bin/cat bin/chflags bin/chio bin/chmod bin/cp bin/csh bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/expr bin/freebsd-version bin/getfacl bin/hostname bi...
Author: sjg Date: Sat Jun 13 19:20:56 2015 New Revision: 284345 URL: https://svnweb.freebsd.org/changeset/base/284345 Log: Add META_MODE support. Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Added: head/bin/cat/Makefile.depend (contents, props changed) head/bin/chflags/Makefile.depend (contents, props changed) head/bin/chio/Makefile.depend (contents, props changed) head/bin/chmod/Makefile.depend (contents, props changed) head/bin/cp/Makefile.depend (contents, props changed) head/bin/csh/Makefile.depend (contents, props changed) head/bin/date/Makefile.depend (contents, props changed) head/bin/dd/Makefile.depend (contents, props changed) head/bin/df/Makefile.depend (contents, props changed) head/bin/domainname/Makefile.depend (contents, props changed) head/bin/echo/Makefile.depend (contents, props changed) head/bin/ed/Makefile.depend (contents, props changed) head/bin/expr/Makefile.depend (contents, props changed) head/bin/freebsd-version/Makefile.depend (contents, props changed) head/bin/getfacl/Makefile.depend (contents, props changed) head/bin/hostname/Makefile.depend (contents, props changed) head/bin/kenv/Makefile.depend (contents, props changed) head/bin/kill/Makefile.depend (contents, props changed) head/bin/ln/Makefile.depend (contents, props changed) head/bin/ls/Makefile.depend (contents, props changed) head/bin/mkdir/Makefile.depend (contents, props changed) head/bin/mv/Makefile.depend (contents, props changed) head/bin/pax/Makefile.depend (contents, props changed) head/bin/pkill/Makefile.depend (contents, props changed) head/bin/ps/Makefile.depend (contents, props changed) head/bin/pwait/Makefile.depend (contents, props changed) head/bin/pwd/Makefile.depend (contents, props changed) head/bin/rcp/Makefile.depend (contents, props changed) head/bin/realpath/Makefile.depend (contents, props changed) head/bin/rm/Makefile.depend (contents, props changed) head/bin/rmail/Makefile.depend (contents, props changed) head/bin/rmdir/Makefile.depend (contents, props changed) head/bin/setfacl/Makefile.depend (contents, props changed) head/bin/sh/Makefile.depend (contents, props changed) head/bin/sleep/Makefile.depend (contents, props changed) head/bin/stty/Makefile.depend (contents, props changed) head/bin/sync/Makefile.depend (contents, props changed) head/bin/test/Makefile.depend (contents, props changed) head/bin/uuidgen/Makefile.depend (contents, props changed) head/cddl/lib/drti/Makefile.depend (contents, props changed) head/cddl/lib/libavl/Makefile.depend (contents, props changed) head/cddl/lib/libctf/Makefile.depend (contents, props changed) head/cddl/lib/libdtrace/Makefile.depend (contents, props changed) head/cddl/lib/libnvpair/Makefile.depend (contents, props changed) head/cddl/lib/libumem/Makefile.depend (contents, props changed) head/cddl/lib/libuutil/Makefile.depend (contents, props changed) head/cddl/lib/libzfs/Makefile.depend (contents, props changed) head/cddl/lib/libzfs_core/Makefile.depend (contents, props changed) head/cddl/lib/libzpool/Makefile.depend (contents, props changed) head/cddl/sbin/zfs/Makefile.depend (contents, props changed) head/cddl/sbin/zpool/Makefile.depend (contents, props changed) head/cddl/usr.bin/ctfconvert/Makefile.depend (contents, props changed) head/cddl/usr.bin/ctfdump/Makefile.depend (contents, props changed) head/cddl/usr.bin/ctfmerge/Makefile.depend (contents, props changed) head/cddl/usr.bin/sgsmsg/Makefile.depend (contents, props changed) head/cddl/usr.bin/zinject/Makefile.depend (contents, props changed) head/cddl/usr.bin/zstreamdump/Makefile.depend (contents, props changed) head/cddl/usr.bin/ztest/Makefile.depend (contents, props changed) head/cddl/usr.sbin/dtrace/Makefile.depend (contents, props changed) head/cddl/usr.sbin/dtruss/Makefile.depend (contents, props changed) head/cddl/usr.sbin/lockstat/Makefile.depend (contents, props changed) head/cddl/usr.sbin/zdb/Makefile.depend (contents, props changed) head/cddl/usr.sbin/zhack/Makefile.depend (contents, props changed) head/etc/sendmail/Makefile.depend (contents, props changed) head/games/caesar/Makefile.depend (contents, props changed) head/games/factor/Makefile.depend (contents, props changed) head/games/fortune/datfiles/Makefile.depend (contents, props changed) head/games/fortune/fortune/Makefile.depend (contents, props changed) head/games/fortune/strfile/Makefile.depend (contents, props changed) head/games/fortune/unstr/Makefile.depend (contents, props changed) head/games/grdc/Makefile.depend
Re: svn commit: r284345 - in head: . bin/cat bin/chflags bin/chio bin/chmod bin/cp bin/csh bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/expr bin/freebsd-version bin/getfacl bin/hostname b
On Jun 13, 2015, at 15:20, Simon J. Gerraty s...@freebsd.org wrote: Author: sjg Date: Sat Jun 13 19:20:56 2015 New Revision: 284345 URL: https://svnweb.freebsd.org/changeset/base/284345 Log: Add META_MODE support. Thanks!! Is anything remaining from the projects/bmake branch? ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r284349 - head/share/mk
Author: sjg Date: Sat Jun 13 19:52:35 2015 New Revision: 284349 URL: https://svnweb.freebsd.org/changeset/base/284349 Log: We no longer need CSU_DIR.i386 and until there is an alternative we need MK_INSTALL_AS_USER=yes Modified: head/share/mk/local.meta.sys.mk Modified: head/share/mk/local.meta.sys.mk == --- head/share/mk/local.meta.sys.mk Sat Jun 13 19:39:21 2015 (r284348) +++ head/share/mk/local.meta.sys.mk Sat Jun 13 19:52:35 2015 (r284349) @@ -4,6 +4,9 @@ # XXX some of this should be in meta.sys.mk # we assume that MK_META_MODE=yes +# we need this until there is an alternative +MK_INSTALL_AS_USER= yes + .if empty(OBJROOT) || ${.MAKE.LEVEL} == 0 .if !empty(SB) SB_OBJROOT ?= ${SB}/obj/ @@ -30,7 +33,6 @@ TARGET_ARCHES_powerpc?= powerpc powerpc6 TARGET_ARCHES_pc98?=i386 # some corner cases -CSU_DIR.i386 = csu/i386-elf BOOT_MACHINE_DIR.amd64 = boot/i386 MACHINE_ARCH.host = ${_HOST_ARCH} ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r284350 - head/bin/cat
Author: sjg Date: Sat Jun 13 19:53:24 2015 New Revision: 284350 URL: https://svnweb.freebsd.org/changeset/base/284350 Log: removed extra keyword Modified: head/bin/cat/Makefile.depend Modified: head/bin/cat/Makefile.depend == --- head/bin/cat/Makefile.dependSat Jun 13 19:52:35 2015 (r284349) +++ head/bin/cat/Makefile.dependSat Jun 13 19:53:24 2015 (r284350) @@ -1,4 +1,3 @@ -# $FreeBSD$ # $FreeBSD$ # Autogenerated - do NOT edit! ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r284353 - head/usr.bin/sockstat
Author: tuexen Date: Sat Jun 13 20:05:20 2015 New Revision: 284353 URL: https://svnweb.freebsd.org/changeset/base/284353 Log: Allow more than one local or remote address per socket. This is needed to support SCTP (and MPTCP in the future). No functional change for existing protocols. MFC after: 3 days Modified: head/usr.bin/sockstat/sockstat.c Modified: head/usr.bin/sockstat/sockstat.c == --- head/usr.bin/sockstat/sockstat.cSat Jun 13 20:01:54 2015 (r284352) +++ head/usr.bin/sockstat/sockstat.cSat Jun 13 20:05:20 2015 (r284353) @@ -84,6 +84,11 @@ static int *ports; #define SET_PORT(p) do { ports[p / INT_BIT] |= 1 (p % INT_BIT); } while (0) #define CHK_PORT(p) (ports[p / INT_BIT] (1 (p % INT_BIT))) +struct addr { + struct sockaddr_storage address; + struct addr *next; +}; + struct sock { void *socket; void *pcb; @@ -92,8 +97,8 @@ struct sock { int family; int proto; const char *protoname; - struct sockaddr_storage laddr; - struct sockaddr_storage faddr; + struct addr *laddr; + struct addr *faddr; struct sock *next; }; @@ -257,6 +262,7 @@ gather_inet(int proto) struct inpcb *inp; struct xsocket *so; struct sock *sock; + struct addr *laddr, *faddr; const char *varname, *protoname; size_t len, bufsize; void *buf; @@ -368,21 +374,29 @@ gather_inet(int proto) } if ((sock = calloc(1, sizeof *sock)) == NULL) err(1, malloc()); + if ((laddr = calloc(1, sizeof *laddr)) == NULL) + err(1, malloc()); + if ((faddr = calloc(1, sizeof *faddr)) == NULL) + err(1, malloc()); sock-socket = so-xso_so; sock-proto = proto; if (inp-inp_vflag INP_IPV4) { sock-family = AF_INET; - sockaddr(sock-laddr, sock-family, + sockaddr(laddr-address, sock-family, inp-inp_laddr, inp-inp_lport); - sockaddr(sock-faddr, sock-family, + sockaddr(faddr-address, sock-family, inp-inp_faddr, inp-inp_fport); } else if (inp-inp_vflag INP_IPV6) { sock-family = AF_INET6; - sockaddr(sock-laddr, sock-family, + sockaddr(laddr-address, sock-family, inp-in6p_laddr, inp-inp_lport); - sockaddr(sock-faddr, sock-family, + sockaddr(faddr-address, sock-family, inp-in6p_faddr, inp-inp_fport); } + laddr-next = NULL; + faddr-next = NULL; + sock-laddr = laddr; + sock-faddr = faddr; sock-vflag = inp-inp_vflag; sock-protoname = protoname; hash = (int)((uintptr_t)sock-socket % HASHSIZE); @@ -399,6 +413,7 @@ gather_unix(int proto) struct xunpgen *xug, *exug; struct xunpcb *xup; struct sock *sock; + struct addr *laddr, *faddr; const char *varname, *protoname; size_t len, bufsize; void *buf; @@ -457,16 +472,24 @@ gather_unix(int proto) continue; if ((sock = calloc(1, sizeof *sock)) == NULL) err(1, malloc()); + if ((laddr = calloc(1, sizeof *laddr)) == NULL) + err(1, malloc()); + if ((faddr = calloc(1, sizeof *faddr)) == NULL) + err(1, malloc()); sock-socket = xup-xu_socket.xso_so; sock-pcb = xup-xu_unpp; sock-proto = proto; sock-family = AF_UNIX; sock-protoname = protoname; if (xup-xu_unp.unp_addr != NULL) - sock-laddr = + laddr-address = *(struct sockaddr_storage *)(void *)xup-xu_addr; else if (xup-xu_unp.unp_conn != NULL) - *(void **)sock-faddr = xup-xu_unp.unp_conn; + *(void **)(faddr-address) = xup-xu_unp.unp_conn; + laddr-next = NULL; + faddr-next = NULL; + sock-laddr = laddr; + sock-faddr = faddr; hash = (int)((uintptr_t)sock-socket % HASHSIZE); sock-next = sockhash[hash]; sockhash[hash] = sock; @@ -575,23 +598,28 @@ static int check_ports(struct sock *s) { int port; + struct addr *addr; if (ports == NULL) return (1); if ((s-family != AF_INET) (s-family != AF_INET6)) return (1); - if
svn commit: r284354 - head/usr.bin/sockstat
Author: tuexen Date: Sat Jun 13 20:11:02 2015 New Revision: 284354 URL: https://svnweb.freebsd.org/changeset/base/284354 Log: Add support for SCTP. MFC after: 3 days Modified: head/usr.bin/sockstat/sockstat.c Modified: head/usr.bin/sockstat/sockstat.c == --- head/usr.bin/sockstat/sockstat.cSat Jun 13 20:05:20 2015 (r284353) +++ head/usr.bin/sockstat/sockstat.cSat Jun 13 20:11:02 2015 (r284354) @@ -43,6 +43,7 @@ __FBSDID($FreeBSD$); #include netinet/in.h #include netinet/in_pcb.h +#include netinet/sctp.h #include netinet/tcp.h #include netinet/tcp_seq.h #include netinet/tcp_var.h @@ -71,7 +72,7 @@ static int opt_v; /* Verbose mode */ /* * Default protocols to use if no -P was defined. */ -static const char *default_protos[] = {tcp, udp, divert }; +static const char *default_protos[] = {sctp, tcp, udp, divert }; static size_t default_numprotos = sizeof(default_protos) / sizeof(default_protos[0]); @@ -254,6 +255,241 @@ sockaddr(struct sockaddr_storage *sa, in } static void +gather_sctp(void) +{ + struct sock *sock; + struct addr *laddr, *prev_laddr, *faddr, *prev_faddr; + struct xsctp_inpcb *xinpcb; + struct xsctp_tcb *xstcb; + struct xsctp_raddr *xraddr; + struct xsctp_laddr *xladdr; + const char *varname; + size_t len, offset; + char *buf; + int hash, vflag; + int no_stcb, local_all_loopback, foreign_all_loopback; + + vflag = 0; + if (opt_4) + vflag |= INP_IPV4; + if (opt_6) + vflag |= INP_IPV6; + + varname = net.inet.sctp.assoclist; + if (sysctlbyname(varname, 0, len, 0, 0) 0) { + if (errno != ENOENT) + err(1, sysctlbyname()); + return; + } + if ((buf = (char *)malloc(len)) == NULL) { + err(1, malloc()); + return; + } + if (sysctlbyname(varname, buf, len, 0, 0) 0) { + err(1, sysctlbyname()); + free(buf); + return; + } + xinpcb = (struct xsctp_inpcb *)(void *)buf; + offset = sizeof(struct xsctp_inpcb); + while ((offset len) (xinpcb-last == 0)) { + if ((sock = calloc(1, sizeof *sock)) == NULL) + err(1, malloc()); + sock-socket = xinpcb-socket; + sock-proto = IPPROTO_SCTP; + sock-protoname = sctp; + if (xinpcb-flags SCTP_PCB_FLAGS_BOUND_V6) { + sock-family = AF_INET6; + sock-vflag = INP_IPV6; + } else { + sock-family = AF_INET; + sock-vflag = INP_IPV4; + } + prev_laddr = NULL; + local_all_loopback = 1; + while (offset len) { + xladdr = (struct xsctp_laddr *)(void *)(buf + offset); + offset += sizeof(struct xsctp_laddr); + if (xladdr-last == 1) + break; + if ((laddr = calloc(1, sizeof(struct addr))) == NULL) + err(1, malloc()); + switch (xladdr-address.sa.sa_family) { + case AF_INET: +#define __IN_IS_ADDR_LOOPBACK(pina) \ + ((ntohl((pina)-s_addr) IN_CLASSA_NSHIFT) == IN_LOOPBACKNET) + if (!__IN_IS_ADDR_LOOPBACK(xladdr-address.sin.sin_addr)) + local_all_loopback = 0; +#undef __IN_IS_ADDR_LOOPBACK + sockaddr(laddr-address, +AF_INET, +xladdr-address.sin.sin_addr, +htons(xinpcb-local_port)); + break; + case AF_INET6: + if (!IN6_IS_ADDR_LOOPBACK(xladdr-address.sin6.sin6_addr)) + local_all_loopback = 0; + sockaddr(laddr-address, +AF_INET6, +xladdr-address.sin6.sin6_addr, +htons(xinpcb-local_port)); + break; + default: + errx(1, adress family %d not supported, +xladdr-address.sa.sa_family); + } + laddr-next = NULL; + if (prev_laddr == NULL) + sock-laddr = laddr; + else + prev_laddr-next = laddr; + prev_laddr = laddr; + } + if (sock-laddr ==
Re: svn commit: r284198 - head/bin/ls
On Sun, Jun 14, 2015 at 01:19:27AM +0800, Julian Elischer wrote: On 6/13/15 11:38 PM, David Chisnall wrote: On 13 Jun 2015, at 11:17, Ian Lepore i...@freebsd.org wrote: If you would have told me a year ago that you had a simple scheme that could make 30 years of experience maintaining code for unix-like systems completely worthless I would have been skeptical, but it seems we're well on our way. There is a lot of heckling and unhelpful hyperbole in this thread. Reading the xo_emit format strings takes a little bit of getting used to, but the same is true of printf - it???s just that we???re already used to printf. The structured parts (xo_open_container, xo_close_container and friends) are clear and descriptive. The changes are fairly invasive, but the benefits are also very large for anyone who is wanting to automate administration of FreeBSD systems. If you have suggestions for how the libxo APIs could be improved, then please let us know - Phil is very reception to suggestions but objections along the lines of ???it???s not what I???m used to and changes sometimes break things so we should never have changes??? are not helpful. David I made a suggestion for an alternate path in the previous thread. https://lists.freebsd.org/pipermail/freebsd-current/2015-March/054855.html but I have a job and kids so I can't object if I'm not listened to.. (no time to actually follow my own advice and produce working code.) I also pointed out the bloat https://lists.freebsd.org/pipermail/freebsd-current/2015-March/054917.html and the poor documentation https://lists.freebsd.org/pipermail/freebsd-current/2015-March/054899.html -- Steve ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r284198 - head/bin/ls
On Jun 13, 2015, at 12:25 PM, Marcel Moolenaar mar...@xcllnt.net wrote: On Jun 13, 2015, at 11:47 AM, Ian Lepore i...@freebsd.org wrote: On Sat, 2015-06-13 at 11:38 -0400, David Chisnall wrote: On 13 Jun 2015, at 11:17, Ian Lepore i...@freebsd.org wrote: If you would have told me a year ago that you had a simple scheme that could make 30 years of experience maintaining code for unix-like systems completely worthless I would have been skeptical, but it seems we're well on our way. There is a lot of heckling and unhelpful hyperbole in this thread. Reading the xo_emit format strings takes a little bit of getting used to, but the same is true of printf - it’s just that we’re already used to printf. The structured parts (xo_open_container, xo_close_container and friends) are clear and descriptive. The changes are fairly invasive, but the benefits are also very large for anyone who is wanting to automate administration of FreeBSD systems. If you have suggestions for how the libxo APIs could be improved, then please let us know - Phil is very reception to suggestions but objections along the lines of ‘it’s not what I’m used to and changes sometimes break things so we should never have changes’ are not helpful. This is a piece of crap that needs to be excised from the system and done a different way is useful input whether you agree with it or not. Actually: no. Not only does one not demonstrate an understanding of the problem by calling it “crap” and thus leaving the recipient to wonder whether it’s worth his or her time to even respond; the sentence also lack a concrete suggestion and, last but not least, is utter after this was all discussed on arch@, making it very much one of “too little, too late”. So, not useful at all. My complaints have been specific: libxo conversion broke things, but didn’t fix them before going on to convert more things (which broke more things). This suggests a lack of competent testing as a standard operating procedure and pointing it out is helpful. And specifically about ls: it was already way overloaded. Overloading it further seemed to be unwise: a new program would have been better since it is a thin interface to fts(3). I didn’t recall seeing a specific discussion about ls, but the original thread in arch grew to be quite large and maybe I missed something. While I dislike libxo in general, I do understand why it is being done. I see the use in general, and the benefits. I have nothing better to offer. I object to the execution in small aspects. Warner signature.asc Description: Message signed with OpenPGP using GPGMail
Re: svn commit: r284198 - head/bin/ls
On 13.06.2015 17:26, Julian Elischer wrote: On 6/13/15 10:49 AM, Steve Kargl wrote: On Fri, Jun 12, 2015 at 08:43:09PM -0400, Alexander Kabaev wrote: On Wed, 10 Jun 2015 01:27:39 + (UTC) Marcel Moolenaar mar...@freebsd.org wrote: Author: marcel Date: Wed Jun 10 01:27:38 2015 New Revision: 284198 URL: https://svnweb.freebsd.org/changeset/base/284198 Log: Convert ls(1) to use libxo(3). Obtained from:Phil Shafer p...@juniper.net Sponsored by:Juniper Networks, Inc. SKIP This broke all code that pipes output of the ls command to pipeline, such as 'ls | wc -l'. ls never exits and never output anything. Is there any purpose to libxo other than breaking stuff, which it achieves so splendidly? -1 for libxo, which also makes code almost unreadable. +1 of the -1 my personal vote is to revert all libxo changes and banish it from /usr/src. I already express my opinion in another thread, so just repeat it here. When libxo starts to break things at very early stage, I perceive the rest of the way to hell. Proper way to do this thing is to back out all changes and write completely separate templates-based parser - xml/json/etc. writer. If somebody love libxo code, use it in that parser/writer. -- http://ache.vniz.net/ -- http://vniz.net/ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r284198 - head/bin/ls
On Jun 13, 2015, at 1:19 PM, Julian Elischer jul...@freebsd.org wrote: On 6/13/15 11:38 PM, David Chisnall wrote: On 13 Jun 2015, at 11:17, Ian Lepore i...@freebsd.org wrote: If you would have told me a year ago that you had a simple scheme that could make 30 years of experience maintaining code for unix-like systems completely worthless I would have been skeptical, but it seems we're well on our way. There is a lot of heckling and unhelpful hyperbole in this thread. Reading the xo_emit format strings takes a little bit of getting used to, but the same is true of printf - it’s just that we’re already used to printf. The structured parts (xo_open_container, xo_close_container and friends) are clear and descriptive. The changes are fairly invasive, but the benefits are also very large for anyone who is wanting to automate administration of FreeBSD systems. If you have suggestions for how the libxo APIs could be improved, then please let us know - Phil is very reception to suggestions but objections along the lines of ‘it’s not what I’m used to and changes sometimes break things so we should never have changes’ are not helpful. David I made a suggestion for an alternate path in the previous thread. https://lists.freebsd.org/pipermail/freebsd-current/2015-March/054855.html but I have a job and kids so I can't object if I'm not listened to.. (no time to actually follow my own advice and produce working code.) Not wanting to change all programs and instead write grammars for all programs seems like a worse solution. The scope is the same (same number of programs), but since the grammars and programs are two distinct entities, it’s actually fairly hard to make sure both are changed at the same time when so needed. It’s also not at all a given that screen scrubbing is always easy enough to do that it isn’t causing some sort of problems in specific situations. If one wants to output JSON, XML and HTML you find that screen scrubbing doesn’t even give you all the information you need. It’s very natural to come to the conclusion that it’s easier to get the data from the source and skip the entire non-lossless translation phase. -- Marcel Moolenaar mar...@xcllnt.net signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r284347 - stable/10/sbin/ifconfig
Author: bryanv Date: Sat Jun 13 19:36:32 2015 New Revision: 284347 URL: https://svnweb.freebsd.org/changeset/base/284347 Log: MFC r271603: Add DEF_CLONE_CMD_ARG2 Modified: stable/10/sbin/ifconfig/ifconfig.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ifconfig/ifconfig.h == --- stable/10/sbin/ifconfig/ifconfig.h Sat Jun 13 19:26:48 2015 (r284346) +++ stable/10/sbin/ifconfig/ifconfig.h Sat Jun 13 19:36:32 2015 (r284347) @@ -74,6 +74,7 @@ void callback_register(callback_func *, #defineDEF_CMD_ARG2(name, func){ name, NEXTARG2, { .c_func2 = func }, 0, NULL } #defineDEF_CLONE_CMD(name, param, func) { name, param, { .c_func = func }, 1, NULL } #defineDEF_CLONE_CMD_ARG(name, func) { name, NEXTARG, { .c_func = func }, 1, NULL } +#defineDEF_CLONE_CMD_ARG2(name, func) { name, NEXTARG2, { .c_func2 = func }, 1, NULL } struct ifaddrs; struct addrinfo; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r284355 - head/usr.bin/sockstat
Author: tuexen Date: Sat Jun 13 20:15:44 2015 New Revision: 284355 URL: https://svnweb.freebsd.org/changeset/base/284355 Log: When using -L the code skips a socket if the local or foreign address is loopback. So it is shown if both are not loopback. The man page says that it is shown if the local or foreign address is not loopback. Change the man page to reflect the code. MFC after: 3 days Modified: head/usr.bin/sockstat/sockstat.1 Modified: head/usr.bin/sockstat/sockstat.1 == --- head/usr.bin/sockstat/sockstat.1Sat Jun 13 20:11:02 2015 (r284354) +++ head/usr.bin/sockstat/sockstat.1Sat Jun 13 20:15:44 2015 (r284355) @@ -27,7 +27,7 @@ .\ .\ $FreeBSD$ .\ -.Dd April 7, 2015 +.Dd June 13, 2015 .Dt SOCKSTAT 1 .Os .Sh NAME @@ -61,7 +61,7 @@ Show connected sockets. .It Fl j Ar jid Show only sockets belonging to the specified jail ID. .It Fl L -Only show Internet sockets if the local or foreign addresses are not +Only show Internet sockets if the local and foreign addresses are not in the loopback network prefix .Li 127.0.0.0/8 , or do not contain the IPv6 loopback address ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r284346 - head/lib/libfetch
Author: dim Date: Sat Jun 13 19:26:48 2015 New Revision: 284346 URL: https://svnweb.freebsd.org/changeset/base/284346 Log: Fix the following clang 3.7.0 warnings in lib/libfetch/http.c: lib/libfetch/http.c:1628:26: error: address of array 'purl-user' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] aparams.user = purl-user ? ~~^~~~ ~ lib/libfetch/http.c:1630:30: error: address of array 'purl-pwd' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] aparams.password = purl-pwd? ~~^~~~ lib/libfetch/http.c:1657:25: error: address of array 'url-user' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] aparams.user = url-user ? ~^~~~ ~ lib/libfetch/http.c:1659:29: error: address of array 'url-pwd' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] aparams.password = url-pwd ? ~^~~ ~ lib/libfetch/http.c:1669:25: error: address of array 'url-user' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] aparams.user = url-user ? ~^~~~ ~ lib/libfetch/http.c:1671:29: error: address of array 'url-pwd' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] aparams.password = url-pwd ? ~^~~ ~ Since url-user and url-pwd are arrays, they can never be NULL, so the checks can be removed. Reviewed by: bapt MFC after:3 days Differential Revision: https://reviews.freebsd.org/D2673 Modified: head/lib/libfetch/http.c Modified: head/lib/libfetch/http.c == --- head/lib/libfetch/http.cSat Jun 13 19:20:56 2015(r284345) +++ head/lib/libfetch/http.cSat Jun 13 19:26:48 2015(r284346) @@ -1625,10 +1625,8 @@ http_request_body(struct url *URL, const http_auth_params_t aparams; init_http_auth_params(aparams); if (*purl-user || *purl-pwd) { - aparams.user = purl-user ? - strdup(purl-user) : strdup(); - aparams.password = purl-pwd? - strdup(purl-pwd) : strdup(); + aparams.user = strdup(purl-user); + aparams.password = strdup(purl-pwd); } else if ((p = getenv(HTTP_PROXY_AUTH)) != NULL *p != '\0') { if (http_authfromenv(p, aparams) 0) { @@ -1654,10 +1652,8 @@ http_request_body(struct url *URL, const http_auth_params_t aparams; init_http_auth_params(aparams); if (*url-user || *url-pwd) { - aparams.user = url-user ? - strdup(url-user) : strdup(); - aparams.password = url-pwd ? - strdup(url-pwd) : strdup(); + aparams.user = strdup(url-user); + aparams.password = strdup(url-pwd); } else if ((p = getenv(HTTP_AUTH)) != NULL *p != '\0') { if (http_authfromenv(p, aparams) 0) { @@ -1666,10 +1662,8 @@ http_request_body(struct url *URL, const } } else if (fetchAuthMethod fetchAuthMethod(url) == 0) { - aparams.user = url-user ? - strdup(url-user) : strdup(); - aparams.password = url-pwd ? - strdup(url-pwd) : strdup(); + aparams.user = strdup(url-user); + aparams.password = strdup(url-pwd); } else { http_seterr(HTTP_NEED_AUTH); goto ouch; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r284348 - in head/sys: dev/virtio/network net
Author: kp Date: Sat Jun 13 19:39:21 2015 New Revision: 284348 URL: https://svnweb.freebsd.org/changeset/base/284348 Log: Fix panic when adding vtnet interfaces to a bridge vtnet interfaces are always in promiscuous mode (at least if the VIRTIO_NET_F_CTRL_RX feature is not negotiated with the host). if_promisc() on a vtnet interface returned ENOTSUP although it has IFF_PROMISC set. This confused the bridge code. Instead we now accept all enable/disable promiscuous commands (and always keep IFF_PROMISC set). There are also two issues with the if_bridge error handling. If if_promisc() fails it uses bridge_delete_member() to clean up. This tries to disable promiscuous mode on the interface. That runs into an assert, because promiscuous mode was never set in the first place. (That's the panic reported in PR 200210.) We can only unset promiscuous mode if the interface actually is promiscuous. This goes against the reference counting done by if_promisc(), but only the first/last if_promic() calls can actually fail, so this is safe. A second issue is a double free of bif. It's already freed by bridge_delete_member(). PR: 200210 Differential Revision:https://reviews.freebsd.org/D2804 Reviewed by: philip (mentor) Modified: head/sys/dev/virtio/network/if_vtnet.c head/sys/net/if_bridge.c Modified: head/sys/dev/virtio/network/if_vtnet.c == --- head/sys/dev/virtio/network/if_vtnet.c Sat Jun 13 19:36:32 2015 (r284347) +++ head/sys/dev/virtio/network/if_vtnet.c Sat Jun 13 19:39:21 2015 (r284348) @@ -1080,8 +1080,12 @@ vtnet_ioctl(struct ifnet *ifp, u_long cm (IFF_PROMISC | IFF_ALLMULTI)) { if (sc-vtnet_flags VTNET_FLAG_CTRL_RX) vtnet_rx_filter(sc); - else - error = ENOTSUP; + else { + ifp-if_flags |= IFF_PROMISC; + if ((ifp-if_flags ^ sc-vtnet_if_flags) +IFF_ALLMULTI) + error = ENOTSUP; + } } } else vtnet_init_locked(sc); Modified: head/sys/net/if_bridge.c == --- head/sys/net/if_bridge.cSat Jun 13 19:36:32 2015(r284347) +++ head/sys/net/if_bridge.cSat Jun 13 19:39:21 2015(r284348) @@ -1033,9 +1033,12 @@ bridge_delete_member(struct bridge_softc case IFT_ETHER: case IFT_L2VLAN: /* -* Take the interface out of promiscuous mode. +* Take the interface out of promiscuous mode, but only +* if it was promiscuous in the first place. It might +* not be if we're in the bridge_ioctl_add() error path. */ - (void) ifpromisc(ifs, 0); + if (ifs-if_flags IFF_PROMISC) + (void) ifpromisc(ifs, 0); break; case IFT_GIF: @@ -1203,10 +1206,8 @@ bridge_ioctl_add(struct bridge_softc *sc break; } - if (error) { + if (error) bridge_delete_member(sc, bif, 0); - free(bif, M_DEVBUF); - } return (error); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r284351 - head/usr.bin/sockstat
Author: tuexen Date: Sat Jun 13 19:56:04 2015 New Revision: 284351 URL: https://svnweb.freebsd.org/changeset/base/284351 Log: Simplify printaddr(). No functional change. MFC after: 3 days Modified: head/usr.bin/sockstat/sockstat.c Modified: head/usr.bin/sockstat/sockstat.c == --- head/usr.bin/sockstat/sockstat.cSat Jun 13 19:53:24 2015 (r284350) +++ head/usr.bin/sockstat/sockstat.cSat Jun 13 19:56:04 2015 (r284351) @@ -496,14 +496,14 @@ getfiles(void) } static int -printaddr(int af, struct sockaddr_storage *ss) +printaddr(struct sockaddr_storage *ss) { char addrstr[INET6_ADDRSTRLEN] = { '\0', '\0' }; struct sockaddr_un *sun; void *addr = NULL; /* Keep compiler happy. */ int off, port = 0; - switch (af) { + switch (ss-ss_family) { case AF_INET: addr = ((struct sockaddr_in *)ss)-sin_addr; if (inet_lnaof(*(struct in_addr *)addr) == INADDR_ANY) @@ -522,7 +522,7 @@ printaddr(int af, struct sockaddr_storag return (xprintf(%.*s, sun-sun_len - off, sun-sun_path)); } if (addrstr[0] == '\0') - inet_ntop(af, addr, addrstr, sizeof addrstr); + inet_ntop(ss-ss_family, addr, addrstr, sizeof addrstr); if (port == 0) return xprintf(%s:*, addrstr); else @@ -613,17 +613,17 @@ displaysock(struct sock *s, int pos) switch (s-family) { case AF_INET: case AF_INET6: - pos += printaddr(s-family, s-laddr); + pos += printaddr(s-laddr); if (s-family == AF_INET6 pos = 58) pos += xprintf( ); while (pos 58) pos += xprintf( ); - pos += printaddr(s-family, s-faddr); + pos += printaddr(s-faddr); break; case AF_UNIX: /* server */ if (s-laddr.ss_len 0) { - pos += printaddr(s-family, s-laddr); + pos += printaddr(s-laddr); break; } /* client */ @@ -643,7 +643,7 @@ displaysock(struct sock *s, int pos) if (s == NULL || s-laddr.ss_len == 0) pos += xprintf(??); else - pos += printaddr(s-family, s-laddr); + pos += printaddr(s-laddr); break; default: abort(); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r284352 - head/usr.bin/sockstat
Author: tuexen Date: Sat Jun 13 20:01:54 2015 New Revision: 284352 URL: https://svnweb.freebsd.org/changeset/base/284352 Log: Allow more than one socket entry for a file descriptor. This is needed for supporting 1-to-many style SCTP sockets. For other sochets, there is no functional change. MFC after: 3 days Modified: head/usr.bin/sockstat/sockstat.c Modified: head/usr.bin/sockstat/sockstat.c == --- head/usr.bin/sockstat/sockstat.cSat Jun 13 19:56:04 2015 (r284351) +++ head/usr.bin/sockstat/sockstat.cSat Jun 13 20:01:54 2015 (r284352) @@ -669,29 +669,28 @@ display(void) if (opt_j = 0 opt_j != getprocjid(xf-xf_pid)) continue; hash = (int)((uintptr_t)xf-xf_data % HASHSIZE); - for (s = sockhash[hash]; s != NULL; s = s-next) - if ((void *)s-socket == xf-xf_data) - break; - if (s == NULL) - continue; - if (!check_ports(s)) - continue; - s-shown = 1; - pos = 0; - if ((pwd = getpwuid(xf-xf_uid)) == NULL) - pos += xprintf(%lu , (u_long)xf-xf_uid); - else - pos += xprintf(%s , pwd-pw_name); - while (pos 9) - pos += xprintf( ); - pos += xprintf(%.10s, getprocname(xf-xf_pid)); - while (pos 20) - pos += xprintf( ); - pos += xprintf(%lu , (u_long)xf-xf_pid); - while (pos 26) - pos += xprintf( ); - pos += xprintf(%d , xf-xf_fd); - displaysock(s, pos); + for (s = sockhash[hash]; s != NULL; s = s-next) { + if ((void *)s-socket != xf-xf_data) + continue; + if (!check_ports(s)) + continue; + s-shown = 1; + pos = 0; + if ((pwd = getpwuid(xf-xf_uid)) == NULL) + pos += xprintf(%lu , (u_long)xf-xf_uid); + else + pos += xprintf(%s , pwd-pw_name); + while (pos 9) + pos += xprintf( ); + pos += xprintf(%.10s, getprocname(xf-xf_pid)); + while (pos 20) + pos += xprintf( ); + pos += xprintf(%lu , (u_long)xf-xf_pid); + while (pos 26) + pos += xprintf( ); + pos += xprintf(%d , xf-xf_fd); + displaysock(s, pos); + } } if (opt_j = 0) return; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn: head/sys/boot: common uboot/common uboot/lib
Just in case, my debug code and proposed fix can be found here: https://github.com/sobomax/FreeBSD.arm/commit/48509790f82352cb455d0f5029291b917afb985b Unless I hear from you I am going to push it into the repository in the next few days (modulo printf() debug stuff). Thanks! On Thu, Jun 11, 2015 at 6:21 AM, Maxim Sobolev sobo...@freebsd.org wrote: Hi Ian, there is some issues with that commit that I've run into when trying to get FreeBSD booting on my Xilinx Zinq 7010-based board. Basically, the instructions we have on Wiki suggests that the ubldr loading address to be 0x10. That makes ubldr panic with not enough DRAM error. I've added some debug code into the for loop, you can find the output below. As you can see the code is not handling the case when ubldr is below 2MB and as such sblock == eubldr. On top of that, this_block and this_size may be left uninitialized causing loading at some random address and panicing then, instead of DRAM is too small panic. kernel_addr=0x10 ubldr_addr=0x10 dtb_addr=0x1000 dtb_name=system.dtb uenvcmd=echo Booting FreeBSD from SD...; mmcinfo fatload mmc 0 ${ubldr_addr} ubldr fatload mmc 0 ${dtb_addr} ${dtb_name} fdt addr ${dtb_addr} bootelf ${ubldr_addr} ## Starting application at 0x00080094 ... Consoles: U-Boot console Compatible U-Boot API signature found @1f35d338 FreeBSD/armv6 U-Boot loader, Revision 1.2 (r...@van01.sippysoft.com, Wed Jun 10 19:19:05 PDT 2015) DRAM: 512MB Number of U-Boot devices: 1 U-Boot env: loaderdev not set, will probe all devices. Found U-Boot device: disk Probing all disk devices... Checking unit=0 slice=auto partition=auto... good. / subldr=0, eubldr=2097152 si-mr[0]: .flags=2, .start=0, .size=536870912 sblock=2097152, eblock=536870912 this_block=16, this_size=723100 si-mr[1]: .flags=0, .start=0, .size=0 si-mr[2]: .flags=0, .start=0, .size=0 si-mr[3]: .flags=0, .start=0, .size=0 si-mr[4]: .flags=0, .start=0, .size=0 si-mr[5]: .flags=0, .start=0, .size=0 si-mr[6]: .flags=0, .start=0, .size=0 si-mr[7]: .flags=0, .start=0, .size=0 si-mr[8]: .flags=0, .start=0, .size=0 si-mr[9]: .flags=0, .start=0, .size=0 si-mr[10]: .flags=0, .start=0, .size=0 si-mr[11]: .flags=0, .start=0, .size=0 si-mr[12]: .flags=0, .start=0, .size=0 si-mr[13]: .flags=0, .start=0, .size=0 si-mr[14]: .flags=0, .start=0, .size=0 si-mr[15]: .flags=0, .start=0, .size=0 /boot/kernel/kernel data=0x589e5c+0x3e1a4 data abort pc : [00080108] lr : [e351] sp : 1f35c488 ip : 1a33 fp : 1f35c490 r10: 000cbfd0 r9 : r8 : r7 : 00030360 r6 : 0010 r5 : 000af048 r4 : 002d r3 : r2 : 1f35c48f r1 : r0 : 0002 Flags: nzCv IRQs off FIQs off Mode SVC_32 Resetting CPU ... On Sun, May 17, 2015 at 12:59 PM, Ian Lepore i...@freebsd.org wrote: Author: ian Date: Sun May 17 19:59:05 2015 New Revision: 283035 URL: https://svnweb.freebsd.org/changeset/base/283035 Log: An ARM kernel can be loaded at any 2MB boundary, make ubldr aware of that. Previously, ubldr would use the virtual addresses in the elf headers by masking off the high bits and assuming the result was a physical address where the kernel should be loaded. That would sometimes discard significant bits of the physical address, but the effects of that were undone by archsw copy code that would find a large block of memory and apply an offset to the source/dest copy addresses. The result was that things were loaded at a different physical address than requested by the higher code layers, but that worked because other adjustments were applied later (such as when jumping to the entry point). Very confusing, and somewhat fragile. Now the archsw copy routines are just simple copies, and instead archsw.arch_loadaddr is implemented to choose a load address. The new routine uses some of the code from the old offset-translation routine to find the largest block of ram, but it excludes ubldr itself from that range, and also excludes If ubldr splits the largest block of ram in two, the kernel is loaded into the bottom of whichever resulting block is larger. As part of eliminating ubldr itself from the ram ranges, export the heap start/end addresses in a pair of new global variables. This change means that the virtual addresses in the arm kernel elf headers now have no meaning at all, except for the entry point address. There is an implicit assumption that the entry point is in the first text page, and that the address in the the header can be turned into an offset by masking it with PAGE_MASK. In the future we can link all arm kernels at a virtual address of 0xC000 with no need to use any low-order part of the address to influence where in ram the kernel gets loaded. Modified: head/sys/boot/common/load_elf.c head/sys/boot/uboot/common/main.c
svn commit: r284356 - head/usr.sbin/crunch/crunchgen
Author: adrian Date: Sat Jun 13 22:01:21 2015 New Revision: 284356 URL: https://svnweb.freebsd.org/changeset/base/284356 Log: Fix up crunchgen binary generation to work with external cross-build tools. * Allow STRIP to be overridden by the environment * Use CC to tie things together, not LD Tested: * i386, mips32 Submitted by: kan Modified: head/usr.sbin/crunch/crunchgen/crunchgen.c Modified: head/usr.sbin/crunch/crunchgen/crunchgen.c == --- head/usr.sbin/crunch/crunchgen/crunchgen.c Sat Jun 13 20:15:44 2015 (r284355) +++ head/usr.sbin/crunch/crunchgen/crunchgen.c Sat Jun 13 22:01:21 2015 (r284356) @@ -980,6 +980,7 @@ top_makefile_rules(FILE *outmk) prog_t *p; fprintf(outmk, LD?= ld\n); + fprintf(outmk, STRIP?= strip\n); if ( subtract_strlst(libs, libs_so) ) fprintf(outmk, # NOTE: Some LIBS declarations below overridden by LIBS_SO\n); @@ -1027,7 +1028,7 @@ top_makefile_rules(FILE *outmk) fprintf(outmk, \t$(CC) -static -o %s %s.o $(CRUNCHED_OBJS) $(LIBS)\n, execfname, execfname); fprintf(outmk, .endif\n); - fprintf(outmk, \tstrip %s\n, execfname); + fprintf(outmk, \t$(STRIP) %s\n, execfname); fprintf(outmk, realclean: clean subclean\n); fprintf(outmk, clean:\n\trm -f %s *.lo *.o *_stub.c\n, execfname); fprintf(outmk, subclean: $(SUBCLEAN_TARGETS)\n); @@ -1109,7 +1110,7 @@ prog_makefile_rules(FILE *outmk, prog_t fprintf(outmk, $(%s_LIBS), p-ident); fprintf(outmk, \n); - fprintf(outmk, \t$(LD) -dc -r -o %s.lo %s_stub.o $(%s_OBJPATHS), + fprintf(outmk, \t$(CC) -nostdlibs -dc -r -o %s.lo %s_stub.o $(%s_OBJPATHS), p-name, p-name, p-ident); if (p-libs) fprintf(outmk, $(%s_LIBS), p-ident); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r284357 - head/sys/dev/acpi_support
Author: ngie Date: Sat Jun 13 22:27:59 2015 New Revision: 284357 URL: https://svnweb.freebsd.org/changeset/base/284357 Log: Fix inverted check by skipping over the model-specific checks if the maker or product is NULL, not if they are both not NULL Reported by: araujo, kib X-MFC with: r283678, r284336 Pointyhat to: allanjude Modified: head/sys/dev/acpi_support/acpi_ibm.c Modified: head/sys/dev/acpi_support/acpi_ibm.c == --- head/sys/dev/acpi_support/acpi_ibm.cSat Jun 13 22:01:21 2015 (r284356) +++ head/sys/dev/acpi_support/acpi_ibm.cSat Jun 13 22:27:59 2015 (r284357) @@ -485,7 +485,7 @@ acpi_ibm_attach(device_t dev) /* Enable per-model events. */ maker = kern_getenv(smbios.system.maker); product = kern_getenv(smbios.system.product); - if (maker != NULL product != NULL) + if (maker == NULL product == NULL) goto nosmbios; for (i = 0; i nitems(acpi_ibm_models); i++) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r284358 - head/sys/dev/acpi_support
Author: ngie Date: Sat Jun 13 22:29:43 2015 New Revision: 284358 URL: https://svnweb.freebsd.org/changeset/base/284358 Log: Fix previous commit (r284357) I forgot to convert the to a || Pointyhat to: ngie X-MFC with: r283678, r284336, r284357 Modified: head/sys/dev/acpi_support/acpi_ibm.c Modified: head/sys/dev/acpi_support/acpi_ibm.c == --- head/sys/dev/acpi_support/acpi_ibm.cSat Jun 13 22:27:59 2015 (r284357) +++ head/sys/dev/acpi_support/acpi_ibm.cSat Jun 13 22:29:43 2015 (r284358) @@ -485,7 +485,7 @@ acpi_ibm_attach(device_t dev) /* Enable per-model events. */ maker = kern_getenv(smbios.system.maker); product = kern_getenv(smbios.system.product); - if (maker == NULL product == NULL) + if (maker == NULL || product == NULL) goto nosmbios; for (i = 0; i nitems(acpi_ibm_models); i++) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r284336 - head/sys/dev/acpi_support
On Jun 13, 2015, at 4:30, Marcelo Araujo araujobsdp...@gmail.com wrote: +1. Fixed (r284357/r284358). Thanks! signature.asc Description: Message signed with OpenPGP using GPGMail
Re: svn commit: r284345 - in head: . bin/cat bin/chflags bin/chio bin/chmod bin/cp bin/csh bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/expr bin/freebsd-version bin/getfacl bin/hostname b
On Sat, Jun 13, 2015 at 12:20 PM, Simon J. Gerraty s...@freebsd.org wrote: Author: sjg Date: Sat Jun 13 19:20:56 2015 New Revision: 284345 URL: https://svnweb.freebsd.org/changeset/base/284345 Log: Add META_MODE support. Simon, Can you take a look at this: https://jenkins.freebsd.org/job/FreeBSD_HEAD/2860/ The console output is showing this: + make -j 4 buildworld __MAKE_CONF=/builds/FreeBSD_HEAD/make.conf make: /builds/FreeBSD_HEAD/Makefile line 102: Malformed conditional (${MK_META_MODE} == yes) make: Fatal errors encountered -- cannot continue make: stopped in /builds/FreeBSD_HEAD Build step 'Execute shell' marked build as failure This is using a FreeBSD 10.1 host to build HEAD. -- Craig ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r284345 - in head: . bin/cat bin/chflags bin/chio bin/chmod bin/cp bin/csh bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/expr bin/freebsd-version bin/getfacl bin/hostname b
On Jun 13, 2015, at 15:34, Craig Rodrigues rodr...@freebsd.org wrote: On Sat, Jun 13, 2015 at 12:20 PM, Simon J. Gerraty s...@freebsd.org wrote: Author: sjg Date: Sat Jun 13 19:20:56 2015 New Revision: 284345 URL: https://svnweb.freebsd.org/changeset/base/284345 Log: Add META_MODE support. Simon, Can you take a look at this: https://jenkins.freebsd.org/job/FreeBSD_HEAD/2860/ The console output is showing this: + make -j 4 buildworld __MAKE_CONF=/builds/FreeBSD_HEAD/make.conf make: /builds/FreeBSD_HEAD/Makefile line 102: Malformed conditional (${MK_META_MODE} == yes) make: Fatal errors encountered -- cannot continue make: stopped in /builds/FreeBSD_HEAD Build step 'Execute shell' marked build as failure This is using a FreeBSD 10.1 host to build HEAD. The problem is that the bootstrapping capability has been broken with fmake. The quick fix would probably be to add MK_META_MODE?= yes to the Makefile. We should probably keep the MK_ pollution in Makefile down to a minimum because of bootstrapping issues like this though. signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r284359 - head/share/mk
Author: adrian Date: Sat Jun 13 22:36:42 2015 New Revision: 284359 URL: https://svnweb.freebsd.org/changeset/base/284359 Log: Fix incorrect library path. Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk == --- head/share/mk/src.libnames.mk Sat Jun 13 22:29:43 2015 (r284358) +++ head/share/mk/src.libnames.mk Sat Jun 13 22:36:42 2015 (r284359) @@ -338,7 +338,7 @@ LIBIPFDIR= ${ROOTOBJDIR}/sbin/ipf/libipf LIBIPF?= ${LIBIPFDIR}/libipf.a LIBTELNETDIR= ${ROOTOBJDIR}/lib/libtelnet -LIBTELNET?=${LIBIPFDIR}/libtelnet.a +LIBTELNET?=${LIBTELNETDIR}/libtelnet.a LIBCRONDIR=${ROOTOBJDIR}/usr.sbin/cron/lib LIBCRON?= ${LIBCRONDIR}/libcron.a ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r284345 - in head: . bin/cat bin/chflags bin/chio bin/chmod bin/cp bin/csh bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/expr bin/freebsd-version bin/getfacl bin/hostname b
On Jun 13, 2015, at 15:37, Garrett Cooper yaneurab...@gmail.com wrote: On Jun 13, 2015, at 15:34, Craig Rodrigues rodr...@freebsd.org wrote: On Sat, Jun 13, 2015 at 12:20 PM, Simon J. Gerraty s...@freebsd.org wrote: Author: sjg Date: Sat Jun 13 19:20:56 2015 New Revision: 284345 URL: https://svnweb.freebsd.org/changeset/base/284345 Log: Add META_MODE support. Simon, Can you take a look at this: https://jenkins.freebsd.org/job/FreeBSD_HEAD/2860/ The console output is showing this: + make -j 4 buildworld __MAKE_CONF=/builds/FreeBSD_HEAD/make.conf make: /builds/FreeBSD_HEAD/Makefile line 102: Malformed conditional (${MK_META_MODE} == yes) make: Fatal errors encountered -- cannot continue make: stopped in /builds/FreeBSD_HEAD Build step 'Execute shell' marked build as failure This is using a FreeBSD 10.1 host to build HEAD. The problem is that the bootstrapping capability has been broken with fmake. The quick fix would probably be to add MK_META_MODE?= yes to the Makefile. We should probably keep the MK_ pollution in Makefile down to a minimum because of bootstrapping issues like this though. Great. More breakage: $ fmake buildworld -- Building an up-to-date bmake(1) -- /usr/share/mk/bsd.links.mk, line 10: missing `in' in for t in ${LINKS} /usr/share/mk/bsd.links.mk, line 13: for-less endfor /usr/share/mk/bsd.links.mk, line 14: missing `in' in for t in ${SYMLINKS} /usr/share/mk/bsd.links.mk, line 17: for-less endfor fmake: fatal errors encountered -- cannot continue *** [bmake] Error code 1 Stop in /usr/src.svn. *** [upgrade_checks] Error code 1 Stop in /usr/src.svn. signature.asc Description: Message signed with OpenPGP using GPGMail