Re: svn commit: r368523 - head/sys/vm
On 12/15/2020 7:04 AM, Mark Johnston wrote: > On Tue, Dec 15, 2020 at 03:33:09PM +0100, Hans Petter Selasky wrote: >> On 12/15/20 3:27 PM, Mark Johnston wrote: >>>> I'm seeing the following panic: >>>> >>>> panic("vm_wait in early boot") >>>> vm_wait_domain() >>>> kmem_alloc_contig_pages() >>>> kmem_alloc_contig_domainset() >>>> kmem_alloc_contig() >>>> contigmalloc() >>>> x86bios_alloc() >>>> vesa_configure() >>>> vesa_mod_event() >>>> vesa_module_register_init() >>>> mi_startup() >>> Is it on a NUMA system? I see that the new logic won't work properly if >>> there are empty domains, so this suggests that we really do need a >>> special contig iterator as discussed in the review. >> >> Yes, this is a numa system. >> >> I just noticed, that before r368523 "flags" was updated by >> _vm_domainset_iter_policy_init() to always contain M_NOWAIT and that >> avoids the wait logic, but I think x86bios_alloc() doesn't get its >> memory then. > > Yes, but note that vm_domainset_iter_policy() will also call > vm_wait_doms() if a M_NOWAIT allocation from each domain fails. > x86bios_alloc() requests memory from the first 1MB of physical memory, > but because contigmalloc() uses a round-robin iterator initialized from > per-thread state it may try from the "wrong" domain first. So really a > different solution to the original problem is needed. > >> I'm not sure if x86bios_alloc() needs to be attached a bit later anyway? >> >> --HPS I have reverted the change in r368673 until we come up with a more comprehensive fix. -- Regards, Bryan Drewery OpenPGP_signature Description: OpenPGP digital signature
svn commit: r368673 - head/sys/vm
Author: bdrewery Date: Tue Dec 15 19:38:16 2020 New Revision: 368673 URL: https://svnweb.freebsd.org/changeset/base/368673 Log: Revert r368523 which fixed contig allocs waiting forever. This needs to account for empty NUMA domains or domains which do not satisfy the requested range. Discussed with: markj Modified: head/sys/vm/vm_kern.c Modified: head/sys/vm/vm_kern.c == --- head/sys/vm/vm_kern.c Tue Dec 15 18:51:11 2020(r368672) +++ head/sys/vm/vm_kern.c Tue Dec 15 19:38:16 2020(r368673) @@ -264,15 +264,9 @@ kmem_alloc_attr_domainset(struct domainset *ds, vm_siz { struct vm_domainset_iter di; vm_offset_t addr; - int domain, iflags; + int domain; - /* -* Do not allow the domainset iterator to override wait flags. The -* contiguous memory allocator defines special semantics for M_WAITOK -* that do not match the iterator's implementation. -*/ - iflags = (flags & ~M_WAITOK) | M_NOWAIT; - vm_domainset_iter_policy_init(, ds, , ); + vm_domainset_iter_policy_init(, ds, , ); do { addr = kmem_alloc_attr_domain(domain, size, flags, low, high, memattr); @@ -352,15 +346,9 @@ kmem_alloc_contig_domainset(struct domainset *ds, vm_s { struct vm_domainset_iter di; vm_offset_t addr; - int domain, iflags; + int domain; - /* -* Do not allow the domainset iterator to override wait flags. The -* contiguous memory allocator defines special semantics for M_WAITOK -* that do not match the iterator's implementation. -*/ - iflags = (flags & ~M_WAITOK) | M_NOWAIT; - vm_domainset_iter_policy_init(, ds, , ); + vm_domainset_iter_policy_init(, ds, , ); do { addr = kmem_alloc_contig_domain(domain, size, flags, low, high, alignment, boundary, memattr); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r368524 - head/sys/compat/linuxkpi/common/src
Author: bdrewery Date: Thu Dec 10 20:45:08 2020 New Revision: 368524 URL: https://svnweb.freebsd.org/changeset/base/368524 Log: linux_dma: Ensure proper flags pass to allocators. Possibly fixes the wrong flags being passed to the kernel allocators in linux_dma_alloc_coherent() and linux_dma_pool_alloc(). Reviewed by: hps MFC after:2 weeks Sponsored by: Dell EMC Differential Revision:https://reviews.freebsd.org/D27508 Modified: head/sys/compat/linuxkpi/common/src/linux_pci.c Modified: head/sys/compat/linuxkpi/common/src/linux_pci.c == --- head/sys/compat/linuxkpi/common/src/linux_pci.c Thu Dec 10 20:44:29 2020(r368523) +++ head/sys/compat/linuxkpi/common/src/linux_pci.c Thu Dec 10 20:45:08 2020(r368524) @@ -625,8 +625,8 @@ linux_dma_alloc_coherent(struct device *dev, size_t si else high = BUS_SPACE_MAXADDR; align = PAGE_SIZE << get_order(size); - mem = (void *)kmem_alloc_contig(size, flag, 0, high, align, 0, - VM_MEMATTR_DEFAULT); + mem = (void *)kmem_alloc_contig(size, flag & GFP_NATIVE_MASK, 0, high, + align, 0, VM_MEMATTR_DEFAULT); if (mem != NULL) { *dma_handle = linux_dma_map_phys(dev, vtophys(mem), size); if (*dma_handle == 0) { @@ -932,7 +932,7 @@ linux_dma_pool_alloc(struct dma_pool *pool, gfp_t mem_ { struct linux_dma_obj *obj; - obj = uma_zalloc_arg(pool->pool_zone, pool, mem_flags); + obj = uma_zalloc_arg(pool->pool_zone, pool, mem_flags & GFP_NATIVE_MASK); if (obj == NULL) return (NULL); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r368523 - head/sys/vm
Author: bdrewery Date: Thu Dec 10 20:44:29 2020 New Revision: 368523 URL: https://svnweb.freebsd.org/changeset/base/368523 Log: contig allocs: Don't retry forever on M_WAITOK. This restores behavior from before domain iterators were added in r327895 and r327896. The vm_domainset_iter_policy() will do a vm_wait_doms() and then restart its iterator when M_WAITOK is set. It will also force the containing loop to have M_NOWAIT. So we get an unbounded retry loop rather than the intended bounded retries that kmem_alloc_contig_pages() already handles. This also restores M_WAITOK to the vmem_alloc() call in kmem_alloc_attr_domain() and kmem_alloc_contig_domain(). Reviewed by: markj, kib MFC after:2 weeks Sponsored by: Dell EMC Differential Revision:https://reviews.freebsd.org/D27507 Modified: head/sys/vm/vm_kern.c Modified: head/sys/vm/vm_kern.c == --- head/sys/vm/vm_kern.c Thu Dec 10 20:44:05 2020(r368522) +++ head/sys/vm/vm_kern.c Thu Dec 10 20:44:29 2020(r368523) @@ -264,9 +264,15 @@ kmem_alloc_attr_domainset(struct domainset *ds, vm_siz { struct vm_domainset_iter di; vm_offset_t addr; - int domain; + int domain, iflags; - vm_domainset_iter_policy_init(, ds, , ); + /* +* Do not allow the domainset iterator to override wait flags. The +* contiguous memory allocator defines special semantics for M_WAITOK +* that do not match the iterator's implementation. +*/ + iflags = (flags & ~M_WAITOK) | M_NOWAIT; + vm_domainset_iter_policy_init(, ds, , ); do { addr = kmem_alloc_attr_domain(domain, size, flags, low, high, memattr); @@ -346,9 +352,15 @@ kmem_alloc_contig_domainset(struct domainset *ds, vm_s { struct vm_domainset_iter di; vm_offset_t addr; - int domain; + int domain, iflags; - vm_domainset_iter_policy_init(, ds, , ); + /* +* Do not allow the domainset iterator to override wait flags. The +* contiguous memory allocator defines special semantics for M_WAITOK +* that do not match the iterator's implementation. +*/ + iflags = (flags & ~M_WAITOK) | M_NOWAIT; + vm_domainset_iter_policy_init(, ds, , ); do { addr = kmem_alloc_contig_domain(domain, size, flags, low, high, alignment, boundary, memattr); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r368467 - in head: bin/chflags bin/chmod bin/cp bin/ls bin/rm bin/setfacl contrib/mtree usr.bin/du usr.bin/grep usr.bin/gzip usr.sbin/chown usr.sbin/ckdist usr.sbin/fmtree usr.sbin/setfmac
Author: bdrewery Date: Tue Dec 8 23:38:26 2020 New Revision: 368467 URL: https://svnweb.freebsd.org/changeset/base/368467 Log: fts_read: Handle error from a NULL return better. This is addressing cases such as fts_read(3) encountering an [EIO] from fchdir(2) when FTS_NOCHDIR is not set. That would otherwise be seen as a successful traversal in some of these cases while silently discarding expected work. As noted in r264201, fts_read() does not set errno to 0 on a successful EOF so it needs to be set before calling it. Otherwise we might see a random error from one of the iterations. gzip is ignoring most errors and could be improved separately. Reviewed by: vangyzen Sponsored by: Dell EMC Differential Revision:https://reviews.freebsd.org/D27184 Modified: head/bin/chflags/chflags.c head/bin/chmod/chmod.c head/bin/cp/cp.c head/bin/ls/ls.c head/bin/rm/rm.c head/bin/setfacl/setfacl.c head/contrib/mtree/create.c head/contrib/mtree/verify.c head/usr.bin/du/du.c head/usr.bin/grep/util.c head/usr.bin/gzip/gzip.c head/usr.sbin/chown/chown.c head/usr.sbin/ckdist/ckdist.c head/usr.sbin/fmtree/create.c head/usr.sbin/fmtree/verify.c head/usr.sbin/setfmac/setfmac.c Modified: head/bin/chflags/chflags.c == --- head/bin/chflags/chflags.c Tue Dec 8 22:37:30 2020(r368466) +++ head/bin/chflags/chflags.c Tue Dec 8 23:38:26 2020(r368467) @@ -163,7 +163,7 @@ main(int argc, char *argv[]) if ((ftsp = fts_open(++argv, fts_options , 0)) == NULL) err(1, NULL); - for (rval = 0; (p = fts_read(ftsp)) != NULL;) { + for (rval = 0; errno = 0, (p = fts_read(ftsp)) != NULL;) { int atflag; if ((fts_options & FTS_LOGICAL) || Modified: head/bin/chmod/chmod.c == --- head/bin/chmod/chmod.c Tue Dec 8 22:37:30 2020(r368466) +++ head/bin/chmod/chmod.c Tue Dec 8 23:38:26 2020(r368467) @@ -164,7 +164,7 @@ done: argv += optind; if ((ftsp = fts_open(++argv, fts_options, 0)) == NULL) err(1, "fts_open"); - for (rval = 0; (p = fts_read(ftsp)) != NULL;) { + for (rval = 0; errno = 0, (p = fts_read(ftsp)) != NULL;) { int atflag; if ((fts_options & FTS_LOGICAL) || Modified: head/bin/cp/cp.c == --- head/bin/cp/cp.cTue Dec 8 22:37:30 2020(r368466) +++ head/bin/cp/cp.cTue Dec 8 23:38:26 2020(r368467) @@ -282,7 +282,8 @@ copy(char *argv[], enum op type, int fts_options) if ((ftsp = fts_open(argv, fts_options, NULL)) == NULL) err(1, "fts_open"); - for (badcp = rval = 0; (curr = fts_read(ftsp)) != NULL; badcp = 0) { + for (badcp = rval = 0; errno = 0, (curr = fts_read(ftsp)) != NULL; +badcp = 0) { switch (curr->fts_info) { case FTS_NS: case FTS_DNR: Modified: head/bin/ls/ls.c == --- head/bin/ls/ls.cTue Dec 8 22:37:30 2020(r368466) +++ head/bin/ls/ls.cTue Dec 8 23:38:26 2020(r368467) @@ -645,7 +645,7 @@ traverse(int argc, char *argv[], int options) ch_options = !f_recursive && !f_label && options & FTS_NOSTAT ? FTS_NAMEONLY : 0; - while ((p = fts_read(ftsp)) != NULL) + while (errno = 0, (p = fts_read(ftsp)) != NULL) switch (p->fts_info) { case FTS_DC: warnx("%s: directory causes a cycle", p->fts_name); Modified: head/bin/rm/rm.c == --- head/bin/rm/rm.cTue Dec 8 22:37:30 2020(r368466) +++ head/bin/rm/rm.cTue Dec 8 23:38:26 2020(r368467) @@ -207,7 +207,7 @@ rm_tree(char **argv) return; err(1, "fts_open"); } - while ((p = fts_read(fts)) != NULL) { + while (errno = 0, (p = fts_read(fts)) != NULL) { switch (p->fts_info) { case FTS_DNR: if (!fflag || p->fts_errno != ENOENT) { Modified: head/bin/setfacl/setfacl.c == --- head/bin/setfacl/setfacl.c Tue Dec 8 22:37:30 2020(r368466) +++ head/bin/setfacl/setfacl.c Tue Dec 8 23:38:26 2020(r368467) @@ -498,8 +498,10 @@ main(int argc, char *argv[]) /* Open all files. */ if ((ftsp = fts_open(files_list, fts_options | FTS_NOSTAT, 0)) == NULL) err(1, "fts_open"); - while ((file = fts_read(ftsp)) != NULL) + while (errno = 0, (file = fts_read(ftsp)) != NULL)
svn commit: r367910 - in head: . share/man/man7
Author: bdrewery Date: Fri Nov 20 20:11:59 2020 New Revision: 367910 URL: https://svnweb.freebsd.org/changeset/base/367910 Log: Add lists for customizing legacy and bootstrap-tools. Reviewed by: arichardson Sponsored by: Dell EMC Differential Revision:https://reviews.freebsd.org/D27200 Modified: head/Makefile.inc1 head/share/man/man7/build.7 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Fri Nov 20 19:36:34 2020(r367909) +++ head/Makefile.inc1 Fri Nov 20 20:11:59 2020(r367910) @@ -20,8 +20,12 @@ # LOCAL_LIB_DIRS="list of dirs" to add additional dirs to libraries target # LOCAL_MTREE="list of mtree files" to process to allow local directories # to be created before files are installed +# LOCAL_LEGACY_DIRS="list of dirs" to add additional dirs to the legacy +# target +# LOCAL_BSTOOL_DIRS="list of dirs" to add additional dirs to the +# bootstrap-tools target # LOCAL_TOOL_DIRS="list of dirs" to add additional dirs to the build-tools -# list +# target # LOCAL_XTOOL_DIRS="list of dirs" to add additional dirs to the # cross-tools target # METALOG="path to metadata log" to write permission and ownership @@ -2127,7 +2131,9 @@ legacy: .PHONY false .endif -.for _tool in tools/build +.for _tool in \ + tools/build \ + ${LOCAL_LEGACY_DIRS} ${_+_}@${ECHODIR} "===> ${_tool} (obj,includes,all,install)"; \ cd ${.CURDIR}/${_tool}; \ if [ -z "${NO_OBJWALK}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \ @@ -2458,7 +2464,8 @@ bootstrap-tools: ${_bt}-links .PHONY ${_crunchgen} \ ${_nmtree} \ ${_vtfontcvt} \ -${_localedef} +${_localedef} \ +${LOCAL_BSTOOL_DIRS} ${_bt}-${_tool}: ${_bt}-links .PHONY .MAKE ${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \ cd ${.CURDIR}/${_tool}; \ Modified: head/share/man/man7/build.7 == --- head/share/man/man7/build.7 Fri Nov 20 19:36:34 2020(r367909) +++ head/share/man/man7/build.7 Fri Nov 20 20:11:59 2020(r367910) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 3, 2020 +.Dd November 12, 2020 .Dt BUILD 7 .Os .Sh NAME @@ -571,6 +571,16 @@ may also be used as needed elsewhere within the list. If set, this variable supplies a list of additional mtrees relative to the root of the source tree to use as part of the .Cm hierarchy +target. +.It Va LOCAL_LEGACY_DIRS +If set, this variable supplies a list of additional directories relative to +the root of the source tree to build as part of the +.Cm legacy +target. +.It Va LOCAL_BSTOOL_DIRS +If set, this variable supplies a list of additional directories relative to +the root of the source tree to build as part of the +.Cm bootstrap-tools target. .It Va LOCAL_TOOL_DIRS If set, this variable supplies a list of additional directories relative to ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r367570 - head/share/mk
Author: bdrewery Date: Tue Nov 10 18:05:17 2020 New Revision: 367570 URL: https://svnweb.freebsd.org/changeset/base/367570 Log: makeman: Don't require filemon with MK_DIRDEPS_BUILD. MFC after:2 weeks Reviewed by: sjg, dim (tested earlier version) Sponsored by: Dell EMC Differential Revision:https://reviews.freebsd.org/D27134 Modified: head/share/mk/local.meta.sys.mk Modified: head/share/mk/local.meta.sys.mk == --- head/share/mk/local.meta.sys.mk Tue Nov 10 14:23:46 2020 (r367569) +++ head/share/mk/local.meta.sys.mk Tue Nov 10 18:05:17 2020 (r367570) @@ -178,6 +178,10 @@ LDFLAGS_LAST+= -L${STAGE_LIBDIR} # we can use this but should not update it. UPDATE_DEPENDFILE= NO .endif +# Don't require filemon for makeman. +.if make(showconfig) +UPDATE_DEPENDFILE= NO +.endif # define the list of places that contain files we are responsible for .MAKE.META.BAILIWICK = ${SB} ${OBJROOT} ${STAGE_ROOT} ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r367459 - head/usr.sbin/syslogd
Thanks. I had the commit in a branch that had a debug commit after. The brace was rebased wrong. On 11/7/2020 11:17 AM, Cy Schubert wrote: > Author: cy > Date: Sat Nov 7 19:17:37 2020 > New Revision: 367459 > URL: https://svnweb.freebsd.org/changeset/base/367459 > > Log: > Fix build post-r367455. > > MFC after: 2 weeks > X-MFC with: r367455 > > Modified: > head/usr.sbin/syslogd/syslogd.c > > Modified: head/usr.sbin/syslogd/syslogd.c > == > --- head/usr.sbin/syslogd/syslogd.c Sat Nov 7 18:15:29 2020 > (r367458) > +++ head/usr.sbin/syslogd/syslogd.c Sat Nov 7 19:17:37 2020 > (r367459) > @@ -1873,7 +1873,7 @@ fprintlog_write(struct filed *f, struct iovlist *il, i > continue; > if (sl->sl_sa == NULL || > sl->sl_family == AF_UNSPEC || > - sl->sl_family == AF_LOCAL) { > + sl->sl_family == AF_LOCAL) > continue; > lsent = sendmsg(sl->sl_socket, , 0); > if (lsent == (ssize_t)il->totalsize) > -- Regards, Bryan Drewery OpenPGP_signature Description: OpenPGP digital signature
svn commit: r367455 - head/usr.sbin/syslogd
Author: bdrewery Date: Sat Nov 7 17:18:44 2020 New Revision: 367455 URL: https://svnweb.freebsd.org/changeset/base/367455 Log: syslogd: Stop trying to send remote messages through special sockets Specifically this was causing the /dev/klog fd and the signal pipe handling fd to get a sendmsg(2) called on them and always returned [ENOTSOCK]. r310350 combined these sockets into the main socket list and properly skipped AF_UNSPEC at the sendmsg(2) call but later in r344739 it was broken such that these special sockets were no longer excluded since the AF_UNSPEC check specifically excluded these special sockets. Only these special sockets have sl_sa = NULL. The sl_family checks should be redundant now but are left in case of future changes so the intent is clearer. MFC after:2 weeks Modified: head/usr.sbin/syslogd/syslogd.c Modified: head/usr.sbin/syslogd/syslogd.c == --- head/usr.sbin/syslogd/syslogd.c Sat Nov 7 16:58:38 2020 (r367454) +++ head/usr.sbin/syslogd/syslogd.c Sat Nov 7 17:18:44 2020 (r367455) @@ -1871,9 +1871,9 @@ fprintlog_write(struct filed *f, struct iovlist *il, i STAILQ_FOREACH(sl, , next) { if (sl->sl_socket < 0) continue; - if (sl->sl_sa != NULL && - (sl->sl_family == AF_LOCAL || -sl->sl_family == AF_UNSPEC)) + if (sl->sl_sa == NULL || + sl->sl_family == AF_UNSPEC || + sl->sl_family == AF_LOCAL) { continue; lsent = sendmsg(sl->sl_socket, , 0); if (lsent == (ssize_t)il->totalsize) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r366594 - in head/sys: kern sys vm
Author: bdrewery Date: Fri Oct 9 23:49:42 2020 New Revision: 366594 URL: https://svnweb.freebsd.org/changeset/base/366594 Log: Use unlocked page lookup for inmem() to avoid object lock contention Reviewed By: kib, markj Submitted by: mlaier Sponsored by: Dell EMC Differential Revision:https://reviews.freebsd.org/D26653 Modified: head/sys/kern/vfs_bio.c head/sys/sys/buf.h head/sys/vm/vm_page.c head/sys/vm/vm_page.h Modified: head/sys/kern/vfs_bio.c == --- head/sys/kern/vfs_bio.c Fri Oct 9 23:02:09 2020(r366593) +++ head/sys/kern/vfs_bio.c Fri Oct 9 23:49:42 2020(r366594) @@ -154,7 +154,6 @@ caddr_t __read_mostly unmapped_buf; /* Used below and for softdep flushing threads in ufs/ffs/ffs_softdep.c */ struct proc *bufdaemonproc; -static int inmem(struct vnode *vp, daddr_t blkno); static void vm_hold_free_pages(struct buf *bp, int newbsize); static void vm_hold_load_pages(struct buf *bp, vm_offset_t from, vm_offset_t to); @@ -3585,48 +3584,54 @@ incore(struct bufobj *bo, daddr_t blkno) * associated VM object. This is like incore except * it also hunts around in the VM system for the data. */ - -static int +bool inmem(struct vnode * vp, daddr_t blkno) { vm_object_t obj; vm_offset_t toff, tinc, size; - vm_page_t m; + vm_page_t m, n; vm_ooffset_t off; + int valid; ASSERT_VOP_LOCKED(vp, "inmem"); if (incore(>v_bufobj, blkno)) - return 1; + return (true); if (vp->v_mount == NULL) - return 0; + return (false); obj = vp->v_object; if (obj == NULL) - return (0); + return (false); size = PAGE_SIZE; if (size > vp->v_mount->mnt_stat.f_iosize) size = vp->v_mount->mnt_stat.f_iosize; off = (vm_ooffset_t)blkno * (vm_ooffset_t)vp->v_mount->mnt_stat.f_iosize; - VM_OBJECT_RLOCK(obj); for (toff = 0; toff < vp->v_mount->mnt_stat.f_iosize; toff += tinc) { - m = vm_page_lookup(obj, OFF_TO_IDX(off + toff)); - if (!m) - goto notinmem; + m = vm_page_lookup_unlocked(obj, OFF_TO_IDX(off + toff)); +recheck: + if (m == NULL) + return (false); + tinc = size; if (tinc > PAGE_SIZE - ((toff + off) & PAGE_MASK)) tinc = PAGE_SIZE - ((toff + off) & PAGE_MASK); - if (vm_page_is_valid(m, - (vm_offset_t) ((toff + off) & PAGE_MASK), tinc) == 0) - goto notinmem; + /* +* Consider page validity only if page mapping didn't change +* during the check. +*/ + valid = vm_page_is_valid(m, + (vm_offset_t)((toff + off) & PAGE_MASK), tinc); + n = vm_page_lookup_unlocked(obj, OFF_TO_IDX(off + toff)); + if (m != n) { + m = n; + goto recheck; + } + if (!valid) + return (false); } - VM_OBJECT_RUNLOCK(obj); - return 1; - -notinmem: - VM_OBJECT_RUNLOCK(obj); - return (0); + return (true); } /* Modified: head/sys/sys/buf.h == --- head/sys/sys/buf.h Fri Oct 9 23:02:09 2020(r366593) +++ head/sys/sys/buf.h Fri Oct 9 23:49:42 2020(r366594) @@ -549,6 +549,7 @@ int vfs_bio_awrite(struct buf *); void vfs_busy_pages_acquire(struct buf *bp); void vfs_busy_pages_release(struct buf *bp); struct buf *incore(struct bufobj *, daddr_t); +bool inmem(struct vnode *, daddr_t); struct buf *gbincore(struct bufobj *, daddr_t); struct buf *gbincore_unlocked(struct bufobj *, daddr_t); struct buf *getblk(struct vnode *, daddr_t, int, int, int, int); Modified: head/sys/vm/vm_page.c == --- head/sys/vm/vm_page.c Fri Oct 9 23:02:09 2020(r366593) +++ head/sys/vm/vm_page.c Fri Oct 9 23:49:42 2020(r366594) @@ -1698,6 +1698,21 @@ vm_page_lookup(vm_object_t object, vm_pindex_t pindex) } /* + * vm_page_lookup_unlocked: + * + * Returns the page associated with the object/offset pair specified; + * if none is found, NULL is returned. The page may be no longer be + * present in the object at the time that this function returns. Only + * useful for opportunistic checks such as inmem(). + */ +vm_page_t +vm_page_lookup_unlocked(vm_object_t object, vm_pindex_t pindex) +{ + + return (vm_radix_lookup_unlocked(>rtree, pindex)); +} + +/* * vm_page_relookup: * * Returns a page that must already have been
svn commit: r366343 - head/sys/kern
Author: bdrewery Date: Thu Oct 1 20:08:27 2020 New Revision: 366343 URL: https://svnweb.freebsd.org/changeset/base/366343 Log: Revert r366340. CR wasn't finished and it breaks the build. Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c == --- head/sys/kern/vfs_bio.c Thu Oct 1 19:56:38 2020(r366342) +++ head/sys/kern/vfs_bio.c Thu Oct 1 20:08:27 2020(r366343) @@ -154,7 +154,7 @@ caddr_t __read_mostly unmapped_buf; /* Used below and for softdep flushing threads in ufs/ffs/ffs_softdep.c */ struct proc *bufdaemonproc; -static bool inmem(struct vnode *vp, daddr_t blkno); +static int inmem(struct vnode *vp, daddr_t blkno); static void vm_hold_free_pages(struct buf *bp, int newbsize); static void vm_hold_load_pages(struct buf *bp, vm_offset_t from, vm_offset_t to); @@ -3586,21 +3586,20 @@ incore(struct bufobj *bo, daddr_t blkno) * it also hunts around in the VM system for the data. */ -static bool +static int inmem(struct vnode * vp, daddr_t blkno) { vm_object_t obj; vm_offset_t toff, tinc, size; - vm_page_t m, n; + vm_page_t m; vm_ooffset_t off; - int valid; ASSERT_VOP_LOCKED(vp, "inmem"); if (incore(>v_bufobj, blkno)) - return (1); + return 1; if (vp->v_mount == NULL) - return (0); + return 0; obj = vp->v_object; if (obj == NULL) return (0); @@ -3610,30 +3609,24 @@ inmem(struct vnode * vp, daddr_t blkno) size = vp->v_mount->mnt_stat.f_iosize; off = (vm_ooffset_t)blkno * (vm_ooffset_t)vp->v_mount->mnt_stat.f_iosize; + VM_OBJECT_RLOCK(obj); for (toff = 0; toff < vp->v_mount->mnt_stat.f_iosize; toff += tinc) { - m = vm_page_lookup_unlocked(obj, OFF_TO_IDX(off + toff)); -recheck: - if (m == NULL) - return (0); - /* -* Consider page validity only if page mapping didn't change -* during the check. -*/ - valid = vm_page_is_valid(m, - (vm_offset_t)((toff + off) & PAGE_MASK), tinc); - n = vm_page_lookup_unlocked(obj, OFF_TO_IDX(off + toff)); - if (m != n) { - m = n; - goto recheck; - } - if (!valid) - return (0); - + m = vm_page_lookup(obj, OFF_TO_IDX(off + toff)); + if (!m) + goto notinmem; tinc = size; if (tinc > PAGE_SIZE - ((toff + off) & PAGE_MASK)) tinc = PAGE_SIZE - ((toff + off) & PAGE_MASK); + if (vm_page_is_valid(m, + (vm_offset_t) ((toff + off) & PAGE_MASK), tinc) == 0) + goto notinmem; } - return (1); + VM_OBJECT_RUNLOCK(obj); + return 1; + +notinmem: + VM_OBJECT_RUNLOCK(obj); + return (0); } /* ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r366340 - head/sys/kern
Author: bdrewery Date: Thu Oct 1 19:17:03 2020 New Revision: 366340 URL: https://svnweb.freebsd.org/changeset/base/366340 Log: Use unlocked page lookup for inmem() to avoid object lock contention Reviewed By: kib, markj Sponsored by: Dell EMC Isilon Submitted by: mlaier Differential Revision:https://reviews.freebsd.org/D26597 Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c == --- head/sys/kern/vfs_bio.c Thu Oct 1 19:06:07 2020(r366339) +++ head/sys/kern/vfs_bio.c Thu Oct 1 19:17:03 2020(r366340) @@ -154,7 +154,7 @@ caddr_t __read_mostly unmapped_buf; /* Used below and for softdep flushing threads in ufs/ffs/ffs_softdep.c */ struct proc *bufdaemonproc; -static int inmem(struct vnode *vp, daddr_t blkno); +static bool inmem(struct vnode *vp, daddr_t blkno); static void vm_hold_free_pages(struct buf *bp, int newbsize); static void vm_hold_load_pages(struct buf *bp, vm_offset_t from, vm_offset_t to); @@ -3586,20 +3586,21 @@ incore(struct bufobj *bo, daddr_t blkno) * it also hunts around in the VM system for the data. */ -static int +static bool inmem(struct vnode * vp, daddr_t blkno) { vm_object_t obj; vm_offset_t toff, tinc, size; - vm_page_t m; + vm_page_t m, n; vm_ooffset_t off; + int valid; ASSERT_VOP_LOCKED(vp, "inmem"); if (incore(>v_bufobj, blkno)) - return 1; + return (1); if (vp->v_mount == NULL) - return 0; + return (0); obj = vp->v_object; if (obj == NULL) return (0); @@ -3609,24 +3610,30 @@ inmem(struct vnode * vp, daddr_t blkno) size = vp->v_mount->mnt_stat.f_iosize; off = (vm_ooffset_t)blkno * (vm_ooffset_t)vp->v_mount->mnt_stat.f_iosize; - VM_OBJECT_RLOCK(obj); for (toff = 0; toff < vp->v_mount->mnt_stat.f_iosize; toff += tinc) { - m = vm_page_lookup(obj, OFF_TO_IDX(off + toff)); - if (!m) - goto notinmem; + m = vm_page_lookup_unlocked(obj, OFF_TO_IDX(off + toff)); +recheck: + if (m == NULL) + return (0); + /* +* Consider page validity only if page mapping didn't change +* during the check. +*/ + valid = vm_page_is_valid(m, + (vm_offset_t)((toff + off) & PAGE_MASK), tinc); + n = vm_page_lookup_unlocked(obj, OFF_TO_IDX(off + toff)); + if (m != n) { + m = n; + goto recheck; + } + if (!valid) + return (0); + tinc = size; if (tinc > PAGE_SIZE - ((toff + off) & PAGE_MASK)) tinc = PAGE_SIZE - ((toff + off) & PAGE_MASK); - if (vm_page_is_valid(m, - (vm_offset_t) ((toff + off) & PAGE_MASK), tinc) == 0) - goto notinmem; } - VM_OBJECT_RUNLOCK(obj); - return 1; - -notinmem: - VM_OBJECT_RUNLOCK(obj); - return (0); + return (1); } /* ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r364223 - head/lib/libc/gen
Author: bdrewery Date: Fri Aug 14 00:18:18 2020 New Revision: 364223 URL: https://svnweb.freebsd.org/changeset/base/364223 Log: syslog(3): Send proper NILVALUE if gethostname(3) fails. RFC5424 defines NILVALUE as '-'. Replace its usage with a macro and separate out the fields to be more clear. fputs(3) is used in some places to avoid hiding possible format string problems in a macro. Reviewed by: cem, vangyzen (earlier version) Sponsored by: Dell EMC Modified: head/lib/libc/gen/syslog.c Modified: head/lib/libc/gen/syslog.c == --- head/lib/libc/gen/syslog.c Thu Aug 13 23:13:05 2020(r364222) +++ head/lib/libc/gen/syslog.c Fri Aug 14 00:18:18 2020(r364223) @@ -75,6 +75,9 @@ static pthread_mutex_tsyslog_mutex = PTHREAD_MUTEX_IN if (__isthreaded) _pthread_mutex_unlock(_mutex); \ } while(0) +/* RFC5424 defined value. */ +#define NILVALUE "-" + static voiddisconnectlog(void); /* disconnect from syslogd */ static voidconnectlog(void); /* (re)connect to syslogd */ static voidopenlog_unlocked(const char *, int, int); @@ -190,25 +193,30 @@ vsyslog1(int pri, const char *fmt, va_list ap) tm.tm_hour, tm.tm_min, tm.tm_sec, now.tv_usec, tz_sign, tz_offset / 3600, (tz_offset % 3600) / 60); } else - (void)fprintf(fp, "- "); + (void)fputs(NILVALUE " ", fp); /* Hostname. */ (void)gethostname(hostname, sizeof(hostname)); - (void)fprintf(fp, "%s ", hostname); + (void)fprintf(fp, "%s ", + hostname[0] == '\0' ? NILVALUE : hostname); if (LogStat & LOG_PERROR) { /* Transfer to string buffer */ (void)fflush(fp); stdp = tbuf + (sizeof(tbuf) - tbuf_cookie.left); } + /* Application name. */ + if (LogTag == NULL) + LogTag = _getprogname(); + (void)fprintf(fp, "%s ", LogTag == NULL ? NILVALUE : LogTag); /* -* Application name, process ID, message ID and structured data. * Provide the process ID regardless of whether LOG_PID has been * specified, as it provides valuable information. Many * applications tend not to use this, even though they should. */ - if (LogTag == NULL) - LogTag = _getprogname(); - (void)fprintf(fp, "%s %d - - ", - LogTag == NULL ? "-" : LogTag, getpid()); + (void)fprintf(fp, "%d ", getpid()); + /* Message ID. */ + (void)fputs(NILVALUE " ", fp); + /* Structured data. */ + (void)fputs(NILVALUE " ", fp); /* Check to see if we can skip expanding the %m */ if (strstr(fmt, "%m")) { @@ -251,6 +259,7 @@ vsyslog1(int pri, const char *fmt, va_list ap) fmt = fmt_cpy; } + /* Message. */ (void)vfprintf(fp, fmt, ap); (void)fclose(fp); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r364221 - in head/lib/libbsnmp: . tests
Author: bdrewery Date: Thu Aug 13 22:42:24 2020 New Revision: 364221 URL: https://svnweb.freebsd.org/changeset/base/364221 Log: Add test to for FreeBSD-SA-19:20.bsnmp Submitted by: Darrick Lew Reviewed by: cem Sponsored by: Dell EMC Differential Revision:https://reviews.freebsd.org/D26037 Added: head/lib/libbsnmp/tests/ head/lib/libbsnmp/tests/Makefile (contents, props changed) head/lib/libbsnmp/tests/bsnmpd_test.c (contents, props changed) Modified: head/lib/libbsnmp/Makefile Modified: head/lib/libbsnmp/Makefile == --- head/lib/libbsnmp/Makefile Thu Aug 13 22:06:27 2020(r364220) +++ head/lib/libbsnmp/Makefile Thu Aug 13 22:42:24 2020(r364221) @@ -1,5 +1,6 @@ # $FreeBSD$ SUBDIR=libbsnmp +SUBDIR.${MK_TESTS}+= tests .include Added: head/lib/libbsnmp/tests/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libbsnmp/tests/MakefileThu Aug 13 22:42:24 2020 (r364221) @@ -0,0 +1,11 @@ +# $FreeBSD$ + +.include + +ATF_TESTS_C+= bsnmpd_test + +SRCS.bsmpd_test= bsnmpd_test.c + +LIBADD+= bsnmp + +.include Added: head/lib/libbsnmp/tests/bsnmpd_test.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libbsnmp/tests/bsnmpd_test.c Thu Aug 13 22:42:24 2020 (r364221) @@ -0,0 +1,53 @@ +/*- + * Copyright (c) 2020 Dell EMC + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include + +#include + +ATF_TC_WITHOUT_HEAD(sa_19_20_bsnmp_test); +ATF_TC_BODY(sa_19_20_bsnmp_test, tc) +{ + struct asn_buf b = {}; + char test_buf[] = { 0x25, 0x7f }; + enum asn_err err; + asn_len_t len; + u_char type; + + b.asn_cptr = test_buf; + b.asn_len = sizeof(test_buf); + + err = asn_get_header(, , ); + ATF_CHECK_EQ(ASN_ERR_EOBUF, err); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, sa_19_20_bsnmp_test); + return (atf_no_error()); +} ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r364220 - head/sys/net
Author: bdrewery Date: Thu Aug 13 22:06:27 2020 New Revision: 364220 URL: https://svnweb.freebsd.org/changeset/base/364220 Log: lagg: Avoid adding a port to a lagg device being destroyed. The lagg_clone_destroy() handles detach and waiting for ifconfig callers to drain already. This narrows the race for 2 panics that the tests triggered. Both were a consequence of adding a port to the lagg device after it had already detached from all of its ports. The link state task would run after lagg_clone_destroy() free'd the lagg softc. kernel:trap_fatal+0xa4 kernel:trap_pfault+0x61 kernel:trap+0x316 kernel:witness_checkorder+0x6d kernel:_sx_xlock+0x72 if_lagg.ko:lagg_port_state+0x3b kernel:if_down+0x144 kernel:if_detach+0x659 if_tap.ko:tap_destroy+0x46 kernel:if_clone_destroyif+0x1b7 kernel:if_clone_destroy+0x8d kernel:ifioctl+0x29c kernel:kern_ioctl+0x2bd kernel:sys_ioctl+0x16d kernel:amd64_syscall+0x337 kernel:trap_fatal+0xa4 kernel:trap_pfault+0x61 kernel:trap+0x316 kernel:witness_checkorder+0x6d kernel:_sx_xlock+0x72 if_lagg.ko:lagg_port_state+0x3b kernel:do_link_state_change+0x9b kernel:taskqueue_run_locked+0x10b kernel:taskqueue_run+0x49 kernel:ithread_loop+0x19c kernel:fork_exit+0x83 PR: 244168 Reviewed by: markj MFC after:2 weeks Sponsored by: Dell EMC Differential Revision:https://reviews.freebsd.org/D25284 Modified: head/sys/net/if_lagg.c Modified: head/sys/net/if_lagg.c == --- head/sys/net/if_lagg.c Thu Aug 13 20:48:14 2020(r364219) +++ head/sys/net/if_lagg.c Thu Aug 13 22:06:27 2020(r364220) @@ -679,6 +679,9 @@ lagg_port_create(struct lagg_softc *sc, struct ifnet * return (EINVAL); } + if (sc->sc_destroying == 1) + return (ENXIO); + /* Limit the maximal number of lagg ports */ if (sc->sc_count >= LAGG_MAX_PORTS) return (ENOSPC); @@ -1190,6 +1193,8 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data int count, buflen, len, error = 0, oldmtu; bzero(, sizeof(rpbuf)); + + /* XXX: This can race with lagg_clone_destroy. */ switch (cmd) { case SIOCGLAGG: ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r363463 - head/tests/sys/geom/class/mirror
Author: bdrewery Date: Thu Jul 23 23:29:50 2020 New Revision: 363463 URL: https://svnweb.freebsd.org/changeset/base/363463 Log: Limit gmirror failpoint tests to the test worker This avoids injecting errors into the test system's mirrors. gnop seems like a good solution here but it injects errors at the wrong place vs where these tests expect and does not support a 'max global count' like the failpoints do with 'n*' syntax. Reviewed by: cem, vangyzen Sponsored by: Dell EMC Isilon Modified: head/tests/sys/geom/class/mirror/10_test.sh head/tests/sys/geom/class/mirror/11_test.sh head/tests/sys/geom/class/mirror/12_test.sh head/tests/sys/geom/class/mirror/13_test.sh head/tests/sys/geom/class/mirror/9_test.sh head/tests/sys/geom/class/mirror/conf.sh head/tests/sys/geom/class/mirror/sync_error.sh Modified: head/tests/sys/geom/class/mirror/10_test.sh == --- head/tests/sys/geom/class/mirror/10_test.sh Thu Jul 23 22:28:35 2020 (r363462) +++ head/tests/sys/geom/class/mirror/10_test.sh Thu Jul 23 23:29:50 2020 (r363463) @@ -30,7 +30,7 @@ tmp2=$(mktemp $base.XX) EIO=5 # gmirror should retry a failed read from the other mirror. -sysctl ${regreadfp}="1*return(${EIO})" +sysctl ${regreadfp}="1*return(${EIO})[pid $(gmirror_worker_pid)]" dd if=/dev/mirror/$name of=$tmp1 iseek=256 bs=$ddbs count=1 >/dev/null 2>&1 dd if=/dev/$us1 of=$tmp2 iseek=256 bs=$ddbs count=1 >/dev/null 2>&1 sysctl ${regreadfp}='off' Modified: head/tests/sys/geom/class/mirror/11_test.sh == --- head/tests/sys/geom/class/mirror/11_test.sh Thu Jul 23 22:28:35 2020 (r363462) +++ head/tests/sys/geom/class/mirror/11_test.sh Thu Jul 23 23:29:50 2020 (r363463) @@ -31,7 +31,7 @@ tmp2=$(mktemp $base.XX) ENXIO=6 # gmirror has special handling for ENXIO. It does not mark the failed component # as broken, allowing it to rejoin the mirror automatically when it appears. -sysctl ${regreadfp}="1*return(${ENXIO})" +sysctl ${regreadfp}="1*return(${ENXIO})[pid $(gmirror_worker_pid)]" dd if=/dev/mirror/$name of=$tmp1 iseek=512 bs=$ddbs count=1 >/dev/null 2>&1 dd if=/dev/$us1 of=$tmp2 iseek=512 bs=$ddbs count=1 >/dev/null 2>&1 sysctl ${regreadfp}='off' Modified: head/tests/sys/geom/class/mirror/12_test.sh == --- head/tests/sys/geom/class/mirror/12_test.sh Thu Jul 23 22:28:35 2020 (r363462) +++ head/tests/sys/geom/class/mirror/12_test.sh Thu Jul 23 23:29:50 2020 (r363463) @@ -29,7 +29,7 @@ dd if=/dev/random of=$tmp1 bs=$ddbs count=1 >/dev/null EIO=5 # gmirror should kick one of the mirrors out after hitting EIO. -sysctl ${regwritefp}="1*return(${EIO})" +sysctl ${regwritefp}="1*return(${EIO})[pid $(gmirror_worker_pid)]" dd if=$tmp1 of=/dev/mirror/$name bs=$ddbs count=1 >/dev/null 2>&1 dd if=/dev/mirror/$name of=$tmp2 bs=$ddbs count=1 >/dev/null 2>&1 sysctl ${regwritefp}='off' Modified: head/tests/sys/geom/class/mirror/13_test.sh == --- head/tests/sys/geom/class/mirror/13_test.sh Thu Jul 23 22:28:35 2020 (r363462) +++ head/tests/sys/geom/class/mirror/13_test.sh Thu Jul 23 23:29:50 2020 (r363463) @@ -31,7 +31,7 @@ dd if=/dev/random of=$tmp1 bs=$ddbs count=1 >/dev/null ENXIO=6 # gmirror has special handling for ENXIO. It does not mark the failed component # as broken, allowing it to rejoin the mirror automatically when it appears. -sysctl ${regwritefp}="1*return(${ENXIO})" +sysctl ${regwritefp}="1*return(${ENXIO})[pid $(gmirror_worker_pid)]" dd if=$tmp1 of=/dev/mirror/$name bs=$ddbs count=1 >/dev/null 2>&1 dd if=/dev/mirror/$name of=$tmp2 bs=$ddbs count=1 >/dev/null 2>&1 sysctl ${regwritefp}='off' Modified: head/tests/sys/geom/class/mirror/9_test.sh == --- head/tests/sys/geom/class/mirror/9_test.sh Thu Jul 23 22:28:35 2020 (r363462) +++ head/tests/sys/geom/class/mirror/9_test.sh Thu Jul 23 23:29:50 2020 (r363463) @@ -26,7 +26,7 @@ devwait # Break one of the mirrors by forcing a single metadata write error. # When dd closes the mirror provider, gmirror will attempt to mark the mirrors # clean, and will kick one of the mirrors out upon hitting the error. -sysctl debug.fail_point.g_mirror_metadata_write='1*return(5)' || exit 1 +sysctl debug.fail_point.g_mirror_metadata_write="1*return(5)[pid $(gmirror_worker_pid)]" || exit 1 dd if=/dev/random of=/dev/mirror/$name bs=$ddbs count=1 >/dev/null 2>&1 sysctl debug.fail_point.g_mirror_metadata_write='off' || exit 1 Modified: head/tests/sys/geom/class/mirror/conf.sh == --- head/tests/sys/geom/class/mirror/conf.shThu Jul 23
svn commit: r360476 - in head/cddl/usr.sbin/dtrace/tests: . tools
Author: bdrewery Date: Wed Apr 29 21:12:32 2020 New Revision: 360476 URL: https://svnweb.freebsd.org/changeset/base/360476 Log: dtrace tests: Support globbing for excludes Downstream this makes skipping tests like common/ip/tst.*sctp*.ksh simpler. Reviewed by: vangyzen, cem, markj Sponsored by: Dell EMC Differential Revision:https://reviews.freebsd.org/D24608 Modified: head/cddl/usr.sbin/dtrace/tests/dtrace.test.mk head/cddl/usr.sbin/dtrace/tests/tools/exclude.sh Modified: head/cddl/usr.sbin/dtrace/tests/dtrace.test.mk == --- head/cddl/usr.sbin/dtrace/tests/dtrace.test.mk Wed Apr 29 19:28:56 2020(r360475) +++ head/cddl/usr.sbin/dtrace/tests/dtrace.test.mk Wed Apr 29 21:12:32 2020(r360476) @@ -1,7 +1,8 @@ # $FreeBSD$ TESTGROUP= ${.CURDIR:H:T}/${.CURDIR:T} -TESTSRC= ${SRCTOP}/cddl/contrib/opensolaris/cmd/dtrace/test/tst/${TESTGROUP} +TESTBASE= ${SRCTOP}/cddl/contrib/opensolaris/cmd/dtrace/test/tst +TESTSRC= ${TESTBASE}/${TESTGROUP} TESTSDIR= ${TESTSBASE}/cddl/usr.sbin/dtrace/${TESTGROUP} FILESGROUPS+= ${TESTGROUP}EXE @@ -18,7 +19,8 @@ TEST_METADATA.t_dtrace_contrib+= required_user="root" GENTEST?= ${.CURDIR:H:H}/tools/gentest.sh EXCLUDE= ${.CURDIR:H:H}/tools/exclude.sh ${TESTWRAPPER}.sh: ${GENTEST} ${EXCLUDE} ${${PACKAGE}FILES} - sh ${GENTEST} -e ${EXCLUDE} ${TESTGROUP} ${${PACKAGE}FILES:S/ */ /} > ${.TARGET} + env TESTBASE=${TESTBASE:Q} \ + sh ${GENTEST} -e ${EXCLUDE} ${TESTGROUP} ${${PACKAGE}FILES:S/ */ /} > ${.TARGET} CLEANFILES+= ${TESTWRAPPER}.sh Modified: head/cddl/usr.sbin/dtrace/tests/tools/exclude.sh == --- head/cddl/usr.sbin/dtrace/tests/tools/exclude.shWed Apr 29 19:28:56 2020(r360475) +++ head/cddl/usr.sbin/dtrace/tests/tools/exclude.shWed Apr 29 21:12:32 2020(r360476) @@ -23,7 +23,22 @@ exclude() { -eval $1=\"\$$1\\n$2\" +case $2 in +# Handle globbing later +*"*"*) ;; +# No globbing needed +*) +eval $1=\"\$$1\\n$2\" +return +;; +esac +for file in ${TESTBASE}/${2}; do +case ${file} in +# Invalid glob +"${TESTBASE}/${2}") echo "Invalid exclude for $2" >&2; exit 1; ;; +esac +exclude "$1" "${file##${TESTBASE}/}" +done } exclude EXFAIL common/aggs/tst.subr.d ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r360453 - head
Author: bdrewery Date: Wed Apr 29 02:18:39 2020 New Revision: 360453 URL: https://svnweb.freebsd.org/changeset/base/360453 Log: Use universe-toolchain config(8) This is a temporary hack to aid with config(8) changing in r360443. It will not work for all cases. env PATH is used because universe-toolchain is only built when worlds are built, and then only if clang is needed, so it may not exist. universe-toolchain needs to be expanded to always be built, inspected to remove non-cross-build-safe tools, used for buildworld/buildkernel, and potentially incremental build support. Sponsored by: Dell EMC Modified: head/Makefile Modified: head/Makefile == --- head/Makefile Tue Apr 28 20:34:27 2020(r360452) +++ head/Makefile Wed Apr 29 02:18:39 2020(r360453) @@ -711,6 +711,7 @@ KERNCONFS!= cd ${KERNSRCDIR}/${TARGET}/conf && \ universe_kernconfs: universe_kernels_prologue .PHONY .for kernel in ${KERNCONFS} TARGET_ARCH_${kernel}!=cd ${KERNSRCDIR}/${TARGET}/conf && \ + env PATH=${HOST_OBJTOP}/tmp/legacy/bin:${PATH:Q} \ config -m ${KERNSRCDIR}/${TARGET}/conf/${kernel} 2> /dev/null | \ grep -v WARNING: | cut -f 2 .if empty(TARGET_ARCH_${kernel}) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r360444 - head/sys/conf
On 4/28/2020 3:30 PM, John Baldwin wrote: > On 4/28/20 9:09 AM, Bryan Drewery wrote: >> Author: bdrewery >> Date: Tue Apr 28 16:09:25 2020 >> New Revision: 360444 >> URL: https://svnweb.freebsd.org/changeset/base/360444 >> >> Log: >> Don't try ctfconvert on file without debug info. >> >> This was currently an ignored error but will change to a hard error >> eventually. >> >> Differential Revision: https://reviews.freebsd.org/D24536 > > FYI, this just broke make tinderbox entirely for building head on > older head or stable/12. The issue is that 'make tinderbox' uses > the host's config binary to run 'config -m' against each kernel > config file to determine it's MACHINE_ARCH, and when it gets an error > make tinderbox just dies, e.g.: > >> make tinderbox NO_CLEAN=yes JFLAG=-j2 > -- >>>> make universe started on Tue Apr 28 09:27:36 PDT 2020 > -- > -- >> Toolchain bootstrap started on Tue Apr 28 09:27:36 PDT 2020 > -- > -- >> Toolchain bootstrap completed on Tue Apr 28 09:59:35 PDT 2020 > -- >>> amd64 started on Tue Apr 28 09:59:35 PDT 2020 >>> amd64.amd64 buildworld started on Tue Apr 28 09:59:35 PDT 2020 >>> amd64.amd64 buildworld completed on Tue Apr 28 15:28:31 PDT 2020 > make[2]: "/usr/home/john/work/freebsd/clean/Makefile" line 717: "Target > architecture for amd64/conf/GENERIC unknown. config(8) likely too old." > *** Error code 1 > > The real fix is we somehow need to build a config binary as a build > tool and use that instead of the host config binary. I'm not quite > sure where to start on fixing that though. It's already in bootstrap-tools. Ah I see the problem is Makefile. Why isn't this already solved by now? The "universe-toolchain" target should be building it already. Just need to get the PATH right. I'm working on a fix. > > Previously riscv broke this when it bumped the config version for > GENERICSF, but I just reverted that bump yesterday, however riscv > dying meant you still built most of tinderbox before it dies compared > to now. > -- Regards, Bryan Drewery ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r360445 - head/cddl/contrib/opensolaris/tools/ctf/cvt
I did not mean to commit this yet. Likely broke non-x86. Reverting now. On 4/28/2020 9:09 AM, Bryan Drewery wrote: > Author: bdrewery > Date: Tue Apr 28 16:09:28 2020 > New Revision: 360445 > URL: https://svnweb.freebsd.org/changeset/base/360445 > > Log: > ctfmerge: Assert that there is enough room for types. > > Sponsord by:Dell EMC > Differential Revision: https://reviews.freebsd.org/D24537 > > Modified: > head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c > head/cddl/contrib/opensolaris/tools/ctf/cvt/util.c > > Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c > == > --- head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c Tue Apr 28 > 16:09:25 2020(r360444) > +++ head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c Tue Apr 28 > 16:09:28 2020(r360445) > @@ -452,6 +452,10 @@ map_td_tree_post(tdesc_t *ctdp, tdesc_t **ctdpp __unus > if (ed.ed_tgt->t_type == FORWARD && ctdp->t_type != FORWARD) { > int id = mcd->md_tgt->td_nextid++; > > +#ifdef __FreeBSD__ > + if (CTF_TYPE_ISCHILD(id)) > + terminate("No room for additional types\n"); > +#endif > debug(3, "Creating new defn type %d <%x>\n", id, id); > add_mapping(mcd->md_ta, ctdp->t_id, id); > alist_add(mcd->md_fdida, (void *)(ulong_t)ed.ed_tgt, > @@ -473,6 +477,10 @@ map_td_tree_post(tdesc_t *ctdp, tdesc_t **ctdpp __unus > } else { > int id = mcd->md_tgt->td_nextid++; > > +#ifdef __FreeBSD__ > + if (CTF_TYPE_ISCHILD(id)) > + terminate("No room for additional types\n"); > +#endif > debug(3, "Creating new type %d <%x>\n", id, id); > add_mapping(mcd->md_ta, ctdp->t_id, id); > hash_add(mcd->md_tdtba, ctdp); > > Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/util.c > == > --- head/cddl/contrib/opensolaris/tools/ctf/cvt/util.cTue Apr 28 > 16:09:25 2020(r360444) > +++ head/cddl/contrib/opensolaris/tools/ctf/cvt/util.cTue Apr 28 > 16:09:28 2020(r360445) > @@ -148,17 +148,7 @@ terminate(const char *format, ...) > > if (getenv("CTF_ABORT_ON_TERMINATE") != NULL) > abort(); > -#if defined(__FreeBSD__) > -/* > - * For the time being just output the termination message, but don't > - * return an exit status that would cause the build to fail. We need > - * to get as much stuff built as possible before going back and > - * figuring out what is wrong with certain files. > - */ > - exit(0); > -#else > exit(1); > -#endif > } > > /*PRINTFLIKE1*/ > -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r360448 - head/cddl/contrib/opensolaris/tools/ctf/cvt
Author: bdrewery Date: Tue Apr 28 18:53:49 2020 New Revision: 360448 URL: https://svnweb.freebsd.org/changeset/base/360448 Log: Revert r360445 I did not intend to commit this yet as more work is needed for non-amd64 kernels. Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c head/cddl/contrib/opensolaris/tools/ctf/cvt/util.c Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c == --- head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c Tue Apr 28 18:42:30 2020(r360447) +++ head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c Tue Apr 28 18:53:49 2020(r360448) @@ -452,10 +452,6 @@ map_td_tree_post(tdesc_t *ctdp, tdesc_t **ctdpp __unus if (ed.ed_tgt->t_type == FORWARD && ctdp->t_type != FORWARD) { int id = mcd->md_tgt->td_nextid++; -#ifdef __FreeBSD__ - if (CTF_TYPE_ISCHILD(id)) - terminate("No room for additional types\n"); -#endif debug(3, "Creating new defn type %d <%x>\n", id, id); add_mapping(mcd->md_ta, ctdp->t_id, id); alist_add(mcd->md_fdida, (void *)(ulong_t)ed.ed_tgt, @@ -477,10 +473,6 @@ map_td_tree_post(tdesc_t *ctdp, tdesc_t **ctdpp __unus } else { int id = mcd->md_tgt->td_nextid++; -#ifdef __FreeBSD__ - if (CTF_TYPE_ISCHILD(id)) - terminate("No room for additional types\n"); -#endif debug(3, "Creating new type %d <%x>\n", id, id); add_mapping(mcd->md_ta, ctdp->t_id, id); hash_add(mcd->md_tdtba, ctdp); Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/util.c == --- head/cddl/contrib/opensolaris/tools/ctf/cvt/util.c Tue Apr 28 18:42:30 2020(r360447) +++ head/cddl/contrib/opensolaris/tools/ctf/cvt/util.c Tue Apr 28 18:53:49 2020(r360448) @@ -148,7 +148,17 @@ terminate(const char *format, ...) if (getenv("CTF_ABORT_ON_TERMINATE") != NULL) abort(); +#if defined(__FreeBSD__) +/* + * For the time being just output the termination message, but don't + * return an exit status that would cause the build to fail. We need + * to get as much stuff built as possible before going back and + * figuring out what is wrong with certain files. + */ + exit(0); +#else exit(1); +#endif } /*PRINTFLIKE1*/ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r360445 - head/cddl/contrib/opensolaris/tools/ctf/cvt
Author: bdrewery Date: Tue Apr 28 16:09:28 2020 New Revision: 360445 URL: https://svnweb.freebsd.org/changeset/base/360445 Log: ctfmerge: Assert that there is enough room for types. Sponsord by: Dell EMC Differential Revision:https://reviews.freebsd.org/D24537 Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c head/cddl/contrib/opensolaris/tools/ctf/cvt/util.c Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c == --- head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c Tue Apr 28 16:09:25 2020(r360444) +++ head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c Tue Apr 28 16:09:28 2020(r360445) @@ -452,6 +452,10 @@ map_td_tree_post(tdesc_t *ctdp, tdesc_t **ctdpp __unus if (ed.ed_tgt->t_type == FORWARD && ctdp->t_type != FORWARD) { int id = mcd->md_tgt->td_nextid++; +#ifdef __FreeBSD__ + if (CTF_TYPE_ISCHILD(id)) + terminate("No room for additional types\n"); +#endif debug(3, "Creating new defn type %d <%x>\n", id, id); add_mapping(mcd->md_ta, ctdp->t_id, id); alist_add(mcd->md_fdida, (void *)(ulong_t)ed.ed_tgt, @@ -473,6 +477,10 @@ map_td_tree_post(tdesc_t *ctdp, tdesc_t **ctdpp __unus } else { int id = mcd->md_tgt->td_nextid++; +#ifdef __FreeBSD__ + if (CTF_TYPE_ISCHILD(id)) + terminate("No room for additional types\n"); +#endif debug(3, "Creating new type %d <%x>\n", id, id); add_mapping(mcd->md_ta, ctdp->t_id, id); hash_add(mcd->md_tdtba, ctdp); Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/util.c == --- head/cddl/contrib/opensolaris/tools/ctf/cvt/util.c Tue Apr 28 16:09:25 2020(r360444) +++ head/cddl/contrib/opensolaris/tools/ctf/cvt/util.c Tue Apr 28 16:09:28 2020(r360445) @@ -148,17 +148,7 @@ terminate(const char *format, ...) if (getenv("CTF_ABORT_ON_TERMINATE") != NULL) abort(); -#if defined(__FreeBSD__) -/* - * For the time being just output the termination message, but don't - * return an exit status that would cause the build to fail. We need - * to get as much stuff built as possible before going back and - * figuring out what is wrong with certain files. - */ - exit(0); -#else exit(1); -#endif } /*PRINTFLIKE1*/ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r360444 - head/sys/conf
Author: bdrewery Date: Tue Apr 28 16:09:25 2020 New Revision: 360444 URL: https://svnweb.freebsd.org/changeset/base/360444 Log: Don't try ctfconvert on file without debug info. This was currently an ignored error but will change to a hard error eventually. Differential Revision:https://reviews.freebsd.org/D24536 Modified: head/sys/conf/Makefile.amd64 head/sys/conf/files.amd64 Modified: head/sys/conf/Makefile.amd64 == --- head/sys/conf/Makefile.amd64Tue Apr 28 16:09:22 2020 (r360443) +++ head/sys/conf/Makefile.amd64Tue Apr 28 16:09:25 2020 (r360444) @@ -18,7 +18,7 @@ # # Which version of config(8) is required. -%VERSREQ= 600012 +%VERSREQ= 600018 STD8X16FONT?= iso Modified: head/sys/conf/files.amd64 == --- head/sys/conf/files.amd64 Tue Apr 28 16:09:22 2020(r360443) +++ head/sys/conf/files.amd64 Tue Apr 28 16:09:25 2020(r360444) @@ -113,7 +113,8 @@ amd64/amd64/initcpu.c standard amd64/amd64/io.c optionalio amd64/amd64/locore.S standardno-obj amd64/amd64/xen-locore.S optionalxenhvm \ - compile-with "${NORMAL_S} -g0" + compile-with "${NORMAL_S} -g0" \ + no-ctfconvert amd64/amd64/machdep.c standard amd64/amd64/mem.c optionalmem amd64/amd64/minidump_machdep.c standard ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r360443 - head/usr.sbin/config
Author: bdrewery Date: Tue Apr 28 16:09:22 2020 New Revision: 360443 URL: https://svnweb.freebsd.org/changeset/base/360443 Log: config: Add no-ctfconvert support. Bump CONFIGVERS to 600018 for this support. Some files may purposely have debug info disabled or are *source files* that attempt to run ctfconvert on them. Currently ctfconvert ignores these errors but I have a change to make the errors real so we can catch real problems like exceeding type limits. Sponsored by: Dell EMC Reviewed by: imp, cem, kevans Differential Revision:https://reviews.freebsd.org/D24535 Modified: head/usr.sbin/config/config.h head/usr.sbin/config/configvers.h head/usr.sbin/config/mkmakefile.c Modified: head/usr.sbin/config/config.h == --- head/usr.sbin/config/config.h Tue Apr 28 16:09:18 2020 (r360442) +++ head/usr.sbin/config/config.h Tue Apr 28 16:09:22 2020 (r360443) @@ -82,6 +82,7 @@ struct files_name { #define NO_OBJ 2 #define BEFORE_DEPEND 4 #define NOWERROR 16 +#define NO_CTFCONVERT 32 struct device { int d_done; /* processed */ Modified: head/usr.sbin/config/configvers.h == --- head/usr.sbin/config/configvers.h Tue Apr 28 16:09:18 2020 (r360442) +++ head/usr.sbin/config/configvers.h Tue Apr 28 16:09:22 2020 (r360443) @@ -49,7 +49,7 @@ * * $FreeBSD$ */ -#defineCONFIGVERS 600017 +#defineCONFIGVERS 600018 #defineMAJOR_VERS(x) ((x) / 10) /* Last config(8) version to require envmode/hintmode */ Modified: head/usr.sbin/config/mkmakefile.c == --- head/usr.sbin/config/mkmakefile.c Tue Apr 28 16:09:18 2020 (r360442) +++ head/usr.sbin/config/mkmakefile.c Tue Apr 28 16:09:22 2020 (r360443) @@ -397,7 +397,7 @@ read_file(char *fname) char *wd, *this, *compilewith, *depends, *clean, *warning; const char *objprefix; int compile, match, nreqs, std, filetype, not, - imp_rule, no_obj, before_depend, nowerror; + imp_rule, no_ctfconvert, no_obj, before_depend, nowerror; fp = fopen(fname, "r"); if (fp == NULL) @@ -452,6 +452,7 @@ next: warning = 0; std = 0; imp_rule = 0; + no_ctfconvert = 0; no_obj = 0; before_depend = 0; nowerror = 0; @@ -479,6 +480,10 @@ next: nreqs = 0; continue; } + if (eq(wd, "no-ctfconvert")) { + no_ctfconvert++; + continue; + } if (eq(wd, "no-obj")) { no_obj++; continue; @@ -591,8 +596,10 @@ nextparam:; tp->f_srcprefix = "$S/"; if (imp_rule) tp->f_flags |= NO_IMPLCT_RULE; + if (no_ctfconvert) + tp->f_flags |= NO_CTFCONVERT; if (no_obj) - tp->f_flags |= NO_OBJ; + tp->f_flags |= NO_OBJ | NO_CTFCONVERT; if (before_depend) tp->f_flags |= BEFORE_DEPEND; if (nowerror) @@ -805,7 +812,7 @@ do_rules(FILE *f) else fprintf(f, "\t%s\n", compilewith); - if (!(ftp->f_flags & NO_OBJ)) + if (!(ftp->f_flags & NO_CTFCONVERT)) fprintf(f, "\t${NORMAL_CTFCONVERT}\n\n"); else fprintf(f, "\n"); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r360442 - in head/sys/modules: cxgb/cxgb cxgbe/iw_cxgbe rdma/krping sfxge
Author: bdrewery Date: Tue Apr 28 16:09:18 2020 New Revision: 360442 URL: https://svnweb.freebsd.org/changeset/base/360442 Log: None of these use opt_sched.h Modified: head/sys/modules/cxgb/cxgb/Makefile head/sys/modules/cxgbe/iw_cxgbe/Makefile head/sys/modules/rdma/krping/Makefile head/sys/modules/sfxge/Makefile Modified: head/sys/modules/cxgb/cxgb/Makefile == --- head/sys/modules/cxgb/cxgb/Makefile Tue Apr 28 16:07:15 2020 (r360441) +++ head/sys/modules/cxgb/cxgb/Makefile Tue Apr 28 16:09:18 2020 (r360442) @@ -8,7 +8,7 @@ SRCS= cxgb_mc5.c cxgb_vsc8211.c cxgb_ael1002.c cxgb_mv SRCS+= cxgb_xgmac.c cxgb_vsc7323.c cxgb_t3_hw.c cxgb_main.c cxgb_aq100x.c SRCS+= cxgb_sge.c cxgb_tn1010.c SRCS+= device_if.h bus_if.h pci_if.h -SRCS+= opt_inet.h opt_inet6.h opt_sched.h +SRCS+= opt_inet.h opt_inet6.h SRCS+= uipc_mvec.c CFLAGS+= -g -DDEFAULT_JUMBO -I${CXGB} Modified: head/sys/modules/cxgbe/iw_cxgbe/Makefile == --- head/sys/modules/cxgbe/iw_cxgbe/MakefileTue Apr 28 16:07:15 2020 (r360441) +++ head/sys/modules/cxgbe/iw_cxgbe/MakefileTue Apr 28 16:09:18 2020 (r360442) @@ -14,7 +14,7 @@ SRCS+=provider.c SRCS+= qp.c SRCS+= resource.c SRCS+= ${LINUXKPI_GENSRCS} -SRCS+= opt_inet.h opt_inet6.h opt_ktr.h opt_ofed.h opt_sched.h +SRCS+= opt_inet.h opt_inet6.h opt_ktr.h opt_ofed.h CFLAGS+= -I${CXGBE} -I${SRCTOP}/sys/ofed/include -DLINUX_TYPES_DEFINED CFLAGS+= -I${SRCTOP}/sys/ofed/include/uapi Modified: head/sys/modules/rdma/krping/Makefile == --- head/sys/modules/rdma/krping/Makefile Tue Apr 28 16:07:15 2020 (r360441) +++ head/sys/modules/rdma/krping/Makefile Tue Apr 28 16:09:18 2020 (r360442) @@ -4,7 +4,7 @@ KMOD= krping SRCS= krping.c krping_dev.c getopt.c SRCS+= ${LINUXKPI_GENSRCS} -SRCS+= opt_sched.h opt_inet.h opt_inet6.h +SRCS+= opt_inet.h opt_inet6.h CFLAGS+= -I${SRCTOP}/sys/ofed/include CFLAGS+= -I${SRCTOP}/sys/ofed/include/uapi CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include Modified: head/sys/modules/sfxge/Makefile == --- head/sys/modules/sfxge/Makefile Tue Apr 28 16:07:15 2020 (r360441) +++ head/sys/modules/sfxge/Makefile Tue Apr 28 16:09:18 2020 (r360442) @@ -5,7 +5,7 @@ KMOD= sfxge SFXGE= ${SRCTOP}/sys/dev/sfxge SRCS= device_if.h bus_if.h pci_if.h -SRCS+= opt_inet.h opt_inet6.h opt_sched.h opt_rss.h +SRCS+= opt_inet.h opt_inet6.h opt_rss.h .PATH: ${SRCTOP}/sys/dev/sfxge SRCS+= sfxge.c sfxge_dma.c sfxge_ev.c ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r360441 - head/usr.sbin/syslogd
Author: bdrewery Date: Tue Apr 28 16:07:15 2020 New Revision: 360441 URL: https://svnweb.freebsd.org/changeset/base/360441 Log: Restore local kernel "prog" filtering lost in r332099. This behavior is most relevant for ipfw(4) as documented in syslog.conf(5). The recent addition of property-based regex filters in r359327 is a fine workaround for this but the behavior was present since 1997 and documented. This only fixes local matching of the "kernel program". It does not change the forwarded format at all. On the remote side it will still be "kernel: ipfw:" and not be parsed as a kernel message. This matches old behavior. MFC after:2 weeks Reviewed by: markj Relnotes: yes Differential Revision:https://reviews.freebsd.org/D24286 Modified: head/usr.sbin/syslogd/syslogd.c Modified: head/usr.sbin/syslogd/syslogd.c == --- head/usr.sbin/syslogd/syslogd.c Tue Apr 28 16:00:34 2020 (r360440) +++ head/usr.sbin/syslogd/syslogd.c Tue Apr 28 16:07:15 2020 (r360441) @@ -137,6 +137,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -206,6 +207,7 @@ static STAILQ_HEAD(, socklist) shead = STAILQ_HEAD_INI #defineIGN_CONS0x001 /* don't print on console */ #defineSYNC_FILE 0x002 /* do fsync on file after printing */ #defineMARK0x008 /* this message is a mark */ +#defineISKERNEL0x010 /* kernel generated message */ /* Timestamps of log entries. */ struct logtime { @@ -1151,19 +1153,19 @@ parsemsg_rfc5424(const char *from, int pri, char *msg) } /* - * Trims the application name ("TAG" in RFC 3164 terminology) and - * process ID from a message if present. + * Returns the length of the application name ("TAG" in RFC 3164 + * terminology) and process ID from a message if present. */ static void -parsemsg_rfc3164_app_name_procid(char **msg, const char **app_name, -const char **procid) { - char *m, *app_name_begin, *procid_begin; +parsemsg_rfc3164_get_app_name_procid(const char *msg, size_t *app_name_length_p, +ptrdiff_t *procid_begin_offset_p, size_t *procid_length_p) +{ + const char *m, *procid_begin; size_t app_name_length, procid_length; - m = *msg; + m = msg; /* Application name. */ - app_name_begin = m; app_name_length = strspn(m, "abcdefghijklmnopqrstuvwxyz" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" @@ -1191,12 +1193,52 @@ parsemsg_rfc3164_app_name_procid(char **msg, const cha if (m[0] != ':' || m[1] != ' ') goto bad; + *app_name_length_p = app_name_length; + if (procid_begin_offset_p != NULL) + *procid_begin_offset_p = + procid_begin == NULL ? 0 : procid_begin - msg; + if (procid_length_p != NULL) + *procid_length_p = procid_length; + return; +bad: + *app_name_length_p = 0; + if (procid_begin_offset_p != NULL) + *procid_begin_offset_p = 0; + if (procid_length_p != NULL) + *procid_length_p = 0; +} + +/* + * Trims the application name ("TAG" in RFC 3164 terminology) and + * process ID from a message if present. + */ +static void +parsemsg_rfc3164_app_name_procid(char **msg, const char **app_name, +const char **procid) +{ + char *m, *app_name_begin, *procid_begin; + size_t app_name_length, procid_length; + ptrdiff_t procid_begin_offset; + + m = *msg; + app_name_begin = m; + + parsemsg_rfc3164_get_app_name_procid(app_name_begin, _name_length, + _begin_offset, _length); + if (app_name_length == 0) + goto bad; + procid_begin = procid_begin_offset == 0 ? NULL : + app_name_begin + procid_begin_offset; + /* Split strings from input. */ app_name_begin[app_name_length] = '\0'; - if (procid_begin != 0) + m += app_name_length + 1; + if (procid_begin != NULL) { procid_begin[procid_length] = '\0'; + m += procid_length + 2; + } - *msg = m + 2; + *msg = m + 1; *app_name = app_name_begin; *procid = procid_begin; return; @@ -1401,7 +1443,7 @@ printsys(char *msg) long n; int flags, isprintf, pri; - flags = SYNC_FILE; /* fsync after write */ + flags = ISKERNEL | SYNC_FILE; /* fsync after write */ p = msg; pri = DEFSPRI; isprintf = 1; @@ -1551,7 +1593,7 @@ logmsg(int pri, const struct logtime *timestamp, const struct filed *f; size_t savedlen; int fac, prilev; - char saved[MAXSVLINE]; + char saved[MAXSVLINE], kernel_app_name[100]; dprintf("logmsg: pri %o, flags %x, from %s, msg %s\n", pri, flags, hostname, msg); @@ -1576,6
svn commit: r360139 - head/bin/sh
Author: bdrewery Date: Tue Apr 21 00:37:55 2020 New Revision: 360139 URL: https://svnweb.freebsd.org/changeset/base/360139 Log: Fix build with NO_HISTORY set Reviewed by: jilles Differential Revision:https://reviews.freebsd.org/D24458 Modified: head/bin/sh/histedit.c Modified: head/bin/sh/histedit.c == --- head/bin/sh/histedit.c Mon Apr 20 23:32:49 2020(r360138) +++ head/bin/sh/histedit.c Tue Apr 21 00:37:55 2020(r360139) @@ -54,12 +54,12 @@ __FBSDID("$FreeBSD$"); #include "main.h" #include "output.h" #include "mystring.h" +#include "builtins.h" #ifndef NO_HISTORY #include "myhistedit.h" #include "error.h" #include "eval.h" #include "memalloc.h" -#include "builtins.h" #define MAXHISTLOOPS 4 /* max recursions through fc */ #define DEFEDITOR "ed"/* default editor *should* be $EDITOR */ @@ -503,7 +503,7 @@ bindcmd(int argc, char **argv) #include "error.h" int -histcmd(int argc, char **argv) +histcmd(int argc __unused, char **argv __unused) { error("not compiled with history support"); @@ -512,7 +512,7 @@ histcmd(int argc, char **argv) } int -bindcmd(int argc, char **argv) +bindcmd(int argc __unused, char **argv __unused) { error("not compiled with line editing support"); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r359685 - in head: . etc lib/libc/gen share/mk share/termcap usr.bin/login usr.bin/vgrind usr.sbin/services_mkdb
On 4/7/2020 3:37 AM, Rodney W. Grimes wrote: >> Author: sobomax >> Date: Tue Apr 7 02:46:22 2020 >> New Revision: 359685 >> URL: https://svnweb.freebsd.org/changeset/base/359685 >> >> Log: >> Normalize deployment tools usage and definitions by putting into one place >> instead of sprinkling them out over many disjoint files. This is a >> follow-up >> to achieve the same goal in an incomplete rev.348521. > I have concerns that this factoring out of 5 values that have not changed > in 25 years is a pessimization, it is one more file that make has to > open on each invocation. > > The truth is that this additional file read is on top of hundreds of new reads per directory in the past few years. It can suck on NFS but otherwise this 1 change is very minor compared to other additions. One big example is foo.o.depend for each foo.o. Or bmake doing realpath(getcwd()) on every invocation. Improving those, or the bmake job queue, or bmake's overuse of /bin/sh, would go a lot further than the hit from this commit. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
Re: svn commit: r359705 - head/share/mk
On 4/7/2020 10:13 AM, Kyle Evans wrote: > On Tue, Apr 7, 2020 at 12:07 PM Bryan Drewery wrote: >> >> Author: bdrewery >> Date: Tue Apr 7 17:07:04 2020 >> New Revision: 359705 >> URL: https://svnweb.freebsd.org/changeset/base/359705 >> >> Log: >> NO_OBJ: Always fix .OBJDIR regardless of AUTO_OBJ. >> >> Sponsored by: Dell EMC >> MFC after:2 weeks >> >> Modified: >> head/share/mk/bsd.init.mk >> head/share/mk/bsd.obj.mk >> > > Unrelated, but something else that's kinda funky: > > universe13a% make -C stand -V .OBJDIR > /scratch/tmp/kevans/obj/home/kevans/head/amd64.amd64/stand > > But in a buildenv: > universe13a% make TARGET_ARCH=armv7 buildenv > Entering world for armv7:arm > For ZSH you must run: export CPUTYPE= > universe13a% make -C stand -V .OBJDIR > [Creating objdir /scratch/tmp/kevans/obj/home/kevans/head/stand...] > /scratch/tmp/kevans/obj/home/kevans/head/stand > > Using buildenv with BUILDENV_SHELL="make -C stand -V .OBDJIR" > *doesn't* reproduce it (objdir has arm.armv7 in it again). > > I tried with both zsh (and export CPUTYPE=) and /bin/sh, but it seems > to reproduce both ways. > > Thanks, > > Kyle Evans > Discussed with Kyle on IRC. Turned out to be an 'export MAKEOBJDIRPREFIX=/something' in ~/.profile. I suggest something like this in the profile: if [ -n "${BUILDENV}" ]; then PS1="(buildenv) ${PS1}" unset CPUTYPE else export MAKEOBJDIRPREFIX=/whatever fi -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r359705 - head/share/mk
Author: bdrewery Date: Tue Apr 7 17:07:04 2020 New Revision: 359705 URL: https://svnweb.freebsd.org/changeset/base/359705 Log: NO_OBJ: Always fix .OBJDIR regardless of AUTO_OBJ. Sponsored by: Dell EMC MFC after:2 weeks Modified: head/share/mk/bsd.init.mk head/share/mk/bsd.obj.mk Modified: head/share/mk/bsd.init.mk == --- head/share/mk/bsd.init.mk Tue Apr 7 17:06:33 2020(r359704) +++ head/share/mk/bsd.init.mk Tue Apr 7 17:07:04 2020(r359705) @@ -11,11 +11,9 @@ : .include .-include "local.init.mk" -.if ${MK_AUTO_OBJ} == "yes" # This is also done in bsd.obj.mk .if defined(NO_OBJ) && ${.OBJDIR} != ${.CURDIR} .OBJDIR: ${.CURDIR} -.endif .endif .if exists(${.CURDIR}/../Makefile.inc) Modified: head/share/mk/bsd.obj.mk == --- head/share/mk/bsd.obj.mkTue Apr 7 17:06:33 2020(r359704) +++ head/share/mk/bsd.obj.mkTue Apr 7 17:07:04 2020(r359705) @@ -42,16 +42,16 @@ : .include -.if ${MK_AUTO_OBJ} == "yes" -# it is done by now -objwarn: .PHONY -obj: .PHONY -CANONICALOBJDIR= ${.OBJDIR} # This is also done in bsd.init.mk .if defined(NO_OBJ) && ${.OBJDIR} != ${.CURDIR} # but this makefile does not want it! .OBJDIR: ${.CURDIR} .endif +.if ${MK_AUTO_OBJ} == "yes" +# it is done by now +objwarn: .PHONY +obj: .PHONY +CANONICALOBJDIR= ${.OBJDIR} # Handle special case where SRCS is full-pathed and requires # nested objdirs. This duplicates some auto.obj.mk logic. .if (!empty(SRCS:M*/*) || !empty(DPSRCS:M*/*)) && \ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r359681 - in head: . share/mk
not going to be defined here outside of the tree. Adding :Uno will fix it. Keep in mind this current change and the next will affect ports. It looks like by default clang will always get these flags added on. > +CFLAGS+=-nobuiltininc -idirafter ${COMPILER_RESOURCE_DIR}/include > +.endif > +.endif > + > CLANG_OPT_SMALL= -mstack-alignment=8 -mllvm -inline-threshold=3\ >-mllvm -simplifycfg-dup-ret > .if ${COMPILER_VERSION} >= 30500 && ${COMPILER_VERSION} < 30700 > -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r359475 - head/sys/vm
Author: bdrewery Date: Tue Mar 31 01:12:53 2020 New Revision: 359475 URL: https://svnweb.freebsd.org/changeset/base/359475 Log: Remove dead code leftover from r331018. Sponsored by: Dell EMC Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c == --- head/sys/vm/vm_page.c Mon Mar 30 23:29:53 2020(r359474) +++ head/sys/vm/vm_page.c Tue Mar 31 01:12:53 2020(r359475) @@ -2048,8 +2048,6 @@ again: if (vm_object_reserv(object) && (m = vm_reserv_alloc_page(object, pindex, domain, req, mpred)) != NULL) { - domain = vm_phys_domain(m); - vmd = VM_DOMAIN(domain); goto found; } #endif @@ -2248,8 +2246,6 @@ again: if (vm_object_reserv(object) && (m_ret = vm_reserv_alloc_contig(object, pindex, domain, req, mpred, npages, low, high, alignment, boundary)) != NULL) { - domain = vm_phys_domain(m_ret); - vmd = VM_DOMAIN(domain); goto found; } #endif ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r359260 - in head: contrib/kyua etc/mtree lib lib/kyua lib/kyua/cli lib/kyua/drivers lib/kyua/engine lib/kyua/model lib/kyua/store lib/kyua/utils share/mk tools/build/mk usr.bin usr.bi
On 3/23/2020 6:54 PM, Conrad Meyer wrote: > On Mon, Mar 23, 2020 at 6:25 PM Bryan Drewery wrote: >> >> On 3/23/2020 12:01 PM, Brooks Davis wrote: >>> Author: brooks >>> Date: Mon Mar 23 19:01:23 2020 >>> New Revision: 359260 >>> URL: https://svnweb.freebsd.org/changeset/base/359260 >>> >>> Log: >>> Import the kyua test framework. >> >> Dumb question but are we allowed to modify this code without a google >> contributor agreement? I was under the impression that the license was >> restrictive in some regard like that. > > Not a dumb question. Yes, we're allowed to modify the code. The > license is just a boring BSD 3-clause: > https://svnweb.freebsd.org/base/head/contrib/kyua/LICENSE?view=markup > > The restrictions around Google contributor CLA only applied to > submissions to Github.com/jmmv/kyua. FreeBSD no longer considers jmmv > (and thus, Google) upstream for ATF and Kyua. Instead the projects > are forked into the github.com/freebsd/ organization. > Great. I wasn't far off then. Infeasible to modify it pre-fork but now it's not a problem. Thanks. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
Re: svn commit: r359260 - in head: contrib/kyua etc/mtree lib lib/kyua lib/kyua/cli lib/kyua/drivers lib/kyua/engine lib/kyua/model lib/kyua/store lib/kyua/utils share/mk tools/build/mk usr.bin usr.bi
On 3/23/2020 12:01 PM, Brooks Davis wrote: > Author: brooks > Date: Mon Mar 23 19:01:23 2020 > New Revision: 359260 > URL: https://svnweb.freebsd.org/changeset/base/359260 > > Log: > Import the kyua test framework. > > Having kyua in the base system will simplify automated testing in CI and > eliminates bootstrapping issues on new platforms. > > The build of kyua is controlled by WITH(OUT)_TESTS_SUPPORT. > > Reviewed by:emaste > Obtained from: CheriBSD > Sponsored by: DARPA > Differential Revision: https://reviews.freebsd.org/D24103 Dumb question but are we allowed to modify this code without a google contributor agreement? I was under the impression that the license was restrictive in some regard like that. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
Re: svn commit: r359267 - in head: . share/mk
On 3/23/2020 6:09 PM, Emmanuel Vadot wrote: > Author: manu > Date: Tue Mar 24 01:09:04 2020 > New Revision: 359267 > URL: https://svnweb.freebsd.org/changeset/base/359267 > > Log: > bsd.lib.mk: Do not include bsd.incs.mk for INTERNALLIB > > If we're building an internal lib do not bother including bsd.incs.mk so we > will not install the headers. > This also "solves" a problem with pkgbase where a libXXX-development package > is created and due to how packages are created we add a dependency to a > libXXX package that doesn't exists. > > Reported by:pizzamig > Reviewed by:pizzamig bapt emaste > Differential Revision: https://reviews.freebsd.org/D24166 > > Modified: > head/ObsoleteFiles.inc > head/share/mk/bsd.lib.mk > > Modified: head/ObsoleteFiles.inc > == > --- head/ObsoleteFiles.incTue Mar 24 01:08:06 2020(r359266) > +++ head/ObsoleteFiles.incTue Mar 24 01:09:04 2020(r359267) > @@ -36,6 +36,11 @@ > # xargs -n1 | sort | uniq -d; > # done > > +# 20200323: INTERNALLIB don't install headers anymore > +OLD_FILES+=/usr/include/libelftc.h > +OLD_FILES+=/usr/include/libifconfig.h > +OLD_FILES+=/usr/include/libpmcstat.h > + lib/libelftc/Makefile:INCS= libelftc.h lib/libifconfig/Makefile:INCSDIR= ${INCLUDEDIR} lib/libifconfig/Makefile:INCS= libifconfig.h lib/libpmcstat/Makefile:INCS= libpmcstat.h This commit seems incomplete or wrong due to the leftover logic. > # 20200320: cx and ctau drivers retired > OLD_FILES+=usr/share/man/man4/ctau.4.gz > OLD_FILES+=usr/share/man/man4/cx.4.gz > > Modified: head/share/mk/bsd.lib.mk > == > --- head/share/mk/bsd.lib.mk Tue Mar 24 01:08:06 2020(r359266) > +++ head/share/mk/bsd.lib.mk Tue Mar 24 01:09:04 2020(r359267) > @@ -489,7 +489,10 @@ _libinstall: > .include > .include > .include > +#No need to install header for INTERNALLIB > +.if !defined(INTERNALLIB) > .include > +.endif > .endif > > LINKOWN?=${LIBOWN} > -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r357353 - head/sys/conf
Author: bdrewery Date: Fri Jan 31 21:08:33 2020 New Revision: 357353 URL: https://svnweb.freebsd.org/changeset/base/357353 Log: make all is needed to generate .depend.* PR: 241746 X-MFC-With: r357043 MFC after:1 week Modified: head/sys/conf/kern.post.mk Modified: head/sys/conf/kern.post.mk == --- head/sys/conf/kern.post.mk Fri Jan 31 20:30:50 2020(r357352) +++ head/sys/conf/kern.post.mk Fri Jan 31 21:08:33 2020(r357353) @@ -389,7 +389,7 @@ kernel-cleandepend: .PHONY kernel-tags: @ls .depend.* > /dev/null 2>&1 || \ - { echo "you must make depend first"; exit 1; } + { echo "you must make all first"; exit 1; } sh $S/conf/systags.sh kernel-install: .PHONY ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r356827 - head/share/mk
Author: bdrewery Date: Fri Jan 17 14:29:27 2020 New Revision: 356827 URL: https://svnweb.freebsd.org/changeset/base/356827 Log: META_MODE: Allow 'make all install' to work with filemon. Filemon will add the ability to ignore the cookie if the installed file is missing. Without filemon that's not possible though so if the cookie is present an the command unchanged then the install wouldn't run. Sponsored by: DellEMC MFC after:2 weeks Modified: head/share/mk/src.sys.env.mk Modified: head/share/mk/src.sys.env.mk == --- head/share/mk/src.sys.env.mkFri Jan 17 06:10:24 2020 (r356826) +++ head/share/mk/src.sys.env.mkFri Jan 17 14:29:27 2020 (r356827) @@ -61,8 +61,9 @@ MAKEOBJDIRPREFIX:=${_saveMAKEOBJDIRPREFIX} .include # Top-level installs should not use meta mode as it may prevent installing -# based on cookies. -.if make(*install*) && ${.MAKE.LEVEL} == 0 +# based on cookies. It's fine with filemon though. +.if !empty(META_MODE:Mnofilemon) && \ + make(*install*) && ${.MAKE.LEVEL} == 0 META_MODE= normal MK_META_MODE= no .export MK_META_MODE ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r354606 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src lib/libc/stdlib/jemalloc
Do you plan to get this back in soon? I hope to see it before 12.2 if possible. Is there some way I can help? I'm interested in these changes in 5.2.1 (I think) - Properly trigger decay on tcache destroy. (@interwq, @amosbird) - Fix tcache.flush. (@interwq) - Fix a side effect caused by extent_max_active_fit combined with decay-based purging, where freed extents can accumulate and not be reused for an extended period of time. (@interwq, @mpghf) I have a test case where virtual memory was peaking at 275M on 4.x, 1GB on 5.0.0, around 750M on 5.1.0, and finally 275M again on 5.2.0. The 5.0/5.1 versions appeared to be a widespread leak to us. On 11/10/2019 9:06 PM, Jason Evans wrote: > Author: jasone > Date: Mon Nov 11 05:06:49 2019 > New Revision: 354606 > URL: https://svnweb.freebsd.org/changeset/base/354606 > > Log: > Revert r354605: Update jemalloc to version 5.2.1. > > Compilation fails for non-llvm-based platforms. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r356352 - head/tests/sys/aio
Author: bdrewery Date: Sat Jan 4 18:59:46 2020 New Revision: 356352 URL: https://svnweb.freebsd.org/changeset/base/356352 Log: lio_listio_empty_nowait_thread sometimes does *not* hang. The other tests consistently do hang though. Sponsored by: DellEMC Modified: head/tests/sys/aio/lio_test.c Modified: head/tests/sys/aio/lio_test.c == --- head/tests/sys/aio/lio_test.c Sat Jan 4 18:48:13 2020 (r356351) +++ head/tests/sys/aio/lio_test.c Sat Jan 4 18:59:46 2020 (r356352) @@ -189,6 +189,7 @@ ATF_TC_BODY(lio_listio_empty_nowait_thread, tc) struct aiocb *list = NULL; struct sigevent sev; + atf_tc_skip("Sometimes hangs and sometimes passes"); atf_tc_expect_timeout("Bug 220398 - lio_listio(2) never sends" " asynchronous notification if nent==0"); ATF_REQUIRE_EQ(0, sem_init(, false, 0)); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r355609 - head
On 12/11/2019 6:54 AM, Ed Maste wrote: > Author: emaste > Date: Wed Dec 11 14:54:29 2019 > New Revision: 355609 > URL: https://svnweb.freebsd.org/changeset/base/355609 > > Log: > Make NOCLEAN an error instead of a warning > > The warning was added in r289728 (over four years ago) and at that time > NO_CLEAN was already the correct spelling for over a decade. > > Make NOCLEAN an error as the next step to removing these backward > compatibility shims. > > Modified: > head/Makefile.inc1 > > Modified: head/Makefile.inc1 > == > --- head/Makefile.inc1Wed Dec 11 14:28:13 2019(r355608) > +++ head/Makefile.inc1Wed Dec 11 14:54:29 2019(r355609) > @@ -458,8 +458,7 @@ SUBDIR+=etc > .endif # !empty(SUBDIR_OVERRIDE) > > .if defined(NOCLEAN) > -.warning NOCLEAN option is deprecated. Use NO_CLEAN instead. > -NO_CLEAN=${NOCLEAN} > +.error NOCLEAN option is deprecated. Use NO_CLEAN instead. > .endif > .if defined(NO_CLEANDIR) > CLEANDIR=clean cleandepend > What ever happened to POLA? Name 1 good reason this should be an .error?! Or even a .warning for that matter. The argument I keep hearing is "we have to maintain these 3 lines of code", ok, well now it's just an annoyance to maintain with no benefit to the user. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r355588 - head/share/mk
Author: bdrewery Date: Tue Dec 10 18:50:50 2019 New Revision: 355588 URL: https://svnweb.freebsd.org/changeset/base/355588 Log: Fix WITHOUT_CLANG build. This decouples MK_LLVM_TARGET_ALL from MK_CLANG. It is fine if LLVM_TARGET_* are set even if MK_CLANG is disabled. It never made sense to depend MK_LLVM_TARGET_* to MK_CLANG (which I did in r335706). PR: 240507 Reported by: kevans, swills MFC after:2 weeks Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk == --- head/share/mk/src.opts.mk Tue Dec 10 18:15:20 2019(r355587) +++ head/share/mk/src.opts.mk Tue Dec 10 18:50:50 2019(r355588) @@ -128,6 +128,7 @@ __DEFAULT_YES_OPTIONS = \ LIBPTHREAD \ LIBTHR \ LLVM_COV \ +LLVM_TARGET_ALL \ LOADER_GELI \ LOADER_LUA \ LOADER_OFW \ @@ -219,7 +220,6 @@ __DEFAULT_NO_OPTIONS = \ # RIGHT option is disabled. __DEFAULT_DEPENDENT_OPTIONS= \ CLANG_FULL/CLANG \ - LLVM_TARGET_ALL/CLANG \ LOADER_VERIEXEC/BEARSSL \ LOADER_EFI_SECUREBOOT/LOADER_VERIEXEC \ VERIEXEC/BEARSSL \ @@ -281,9 +281,9 @@ __LLVM_TARGETS= \ x86 __LLVM_TARGET_FILT= C/(amd64|i386)/x86/:S/sparc64/sparc/:S/arm64/aarch64/:S/powerpc64/powerpc/ .for __llt in ${__LLVM_TARGETS} -# Default the given TARGET's LLVM_TARGET support to the value of MK_CLANG. +# Default enable the given TARGET's LLVM_TARGET support .if ${__TT:${__LLVM_TARGET_FILT}} == ${__llt} -__DEFAULT_DEPENDENT_OPTIONS+= LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/CLANG +__DEFAULT_YES_OPTIONS+=LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu} # Disable other targets for arm, to work around "relocation truncated # to fit" errors with BFD ld, since libllvm.a will get too large to link. .elif ${__T} == "arm" @@ -291,8 +291,7 @@ __DEFAULT_NO_OPTIONS+=LLVM_TARGET_${__llt:tu} # aarch64 needs arm for -m32 support. .elif ${__TT} == "arm64" && ${__llt} == "arm" __DEFAULT_DEPENDENT_OPTIONS+= LLVM_TARGET_ARM/LLVM_TARGET_AARCH64 -# Default the rest of the LLVM_TARGETs to the value of MK_LLVM_TARGET_ALL -# which is based on MK_CLANG. +# Default the rest of the LLVM_TARGETs to the value of MK_LLVM_TARGET_ALL. .else __DEFAULT_DEPENDENT_OPTIONS+= LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/LLVM_TARGET_ALL .endif ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r355379 - head/usr.sbin/mergemaster
On 12/3/2019 7:55 PM, O. Hartmann wrote: > Am Wed, 4 Dec 2019 03:44:50 + (UTC) > Bryan Drewery schrieb: > >> Author: bdrewery >> Date: Wed Dec 4 03:44:50 2019 >> New Revision: 355379 >> URL: https://svnweb.freebsd.org/changeset/base/355379 > >> Log: >> Run make in parallel. > >> This is mostly targetting the 'installconfig' phase of 'distribution' >> which does a full tree walk. > >> MFC after: 2 weeks > >> Modified: >> head/usr.sbin/mergemaster/mergemaster.sh > >> Modified: head/usr.sbin/mergemaster/mergemaster.sh >> == >> --- head/usr.sbin/mergemaster/mergemaster.sh Wed Dec 4 03:41:55 2019 >> (r355378) >> +++ head/usr.sbin/mergemaster/mergemaster.sh Wed Dec 4 03:44:50 2019 >> (r355379) >> @@ -508,6 +508,7 @@ SOURCEDIR=$(realpath "$SOURCEDIR") > >> # Setup make to use system files from SOURCEDIR >> MM_MAKE="make ${ARCHSTRING} -m ${SOURCEDIR}/share/mk -DNO_FILEMON" >> +MM_MAKE="${MM_MAKE} -j$(sysctl -n hw.ncpu)" > >> # Check DESTDIR against the mergemaster mtree database to see what >> # files the user changed from the reference files. >> ___ >> svn-src-head@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/svn-src-head >> To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org" > > Whatever I do, mergemaster does not work anymore after this commit: > > [...] > # mergemaster > > /usr/sbin/mergemaster: sysctl: not found > *** The directory specified for the temporary root environment, > /var/tmp/temproot, exists. This can be a security risk if untrusted > users have access to the system. > > Use 'd' to delete the old /var/tmp/temproot and continue > Use 't' to select a new temporary root directory > Use 'e' to exit mergemaster > > Default is to use /var/tmp/temproot as is > > How should I deal with this? [Use the existing /var/tmp/temproot] d > >*** Deleting the old /var/tmp/temproot > > *** Creating the temporary root environment in /var/tmp/temproot > *** /var/tmp/temproot ready for use > *** Creating and populating directory structure in /var/tmp/temproot > > make: illegal argument to -j -- must be positive integer! > > *** FATAL ERROR: Cannot 'cd' to /usr/src and install files to > the temproot environment > > > Should be fixed in r355381. Sorry about that and forgetting to mention your report credit. I admit I didn't test this as I was annoyed with my upgrade being stuck in mergemaster and know that each of these invocations is -j safe. What a silly script to not include /sbin in PATH. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r355381 - head/usr.sbin/mergemaster
Author: bdrewery Date: Wed Dec 4 04:01:53 2019 New Revision: 355381 URL: https://svnweb.freebsd.org/changeset/base/355381 Log: Use full path to sysctl(8) since /sbin is not in PATH. X-MFC-With: r355379 MFC after:2 weeks Modified: head/usr.sbin/mergemaster/mergemaster.sh Modified: head/usr.sbin/mergemaster/mergemaster.sh == --- head/usr.sbin/mergemaster/mergemaster.shWed Dec 4 03:51:30 2019 (r355380) +++ head/usr.sbin/mergemaster/mergemaster.shWed Dec 4 04:01:53 2019 (r355381) @@ -508,7 +508,7 @@ SOURCEDIR=$(realpath "$SOURCEDIR") # Setup make to use system files from SOURCEDIR MM_MAKE="make ${ARCHSTRING} -m ${SOURCEDIR}/share/mk -DNO_FILEMON" -MM_MAKE="${MM_MAKE} -j$(sysctl -n hw.ncpu)" +MM_MAKE="${MM_MAKE} -j$(/sbin/sysctl -n hw.ncpu)" # Check DESTDIR against the mergemaster mtree database to see what # files the user changed from the reference files. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r355379 - head/usr.sbin/mergemaster
Author: bdrewery Date: Wed Dec 4 03:44:50 2019 New Revision: 355379 URL: https://svnweb.freebsd.org/changeset/base/355379 Log: Run make in parallel. This is mostly targetting the 'installconfig' phase of 'distribution' which does a full tree walk. MFC after: 2 weeks Modified: head/usr.sbin/mergemaster/mergemaster.sh Modified: head/usr.sbin/mergemaster/mergemaster.sh == --- head/usr.sbin/mergemaster/mergemaster.shWed Dec 4 03:41:55 2019 (r355378) +++ head/usr.sbin/mergemaster/mergemaster.shWed Dec 4 03:44:50 2019 (r355379) @@ -508,6 +508,7 @@ SOURCEDIR=$(realpath "$SOURCEDIR") # Setup make to use system files from SOURCEDIR MM_MAKE="make ${ARCHSTRING} -m ${SOURCEDIR}/share/mk -DNO_FILEMON" +MM_MAKE="${MM_MAKE} -j$(sysctl -n hw.ncpu)" # Check DESTDIR against the mergemaster mtree database to see what # files the user changed from the reference files. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r354859 - head
Author: bdrewery Date: Tue Nov 19 16:40:46 2019 New Revision: 354859 URL: https://svnweb.freebsd.org/changeset/base/354859 Log: WITH_SYSTEM_LINKER: Fix rebuilding lld every time. This is due to LLD_REVISION_STRING being renamed to LLD_REVISION in r351442 and the value being moved to another location in r351965. `make test-system-linker` can be used to see the values being used here. Reported by: ler Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Tue Nov 19 16:29:47 2019(r354858) +++ head/Makefile.inc1 Tue Nov 19 16:40:46 2019(r354859) @@ -289,9 +289,9 @@ WANT_LINKER_TYPE= .if !defined(WANT_LINKER_FREEBSD_VERSION) && !make(showconfig) && \ !make(test-system-compiler) .if ${WANT_LINKER_TYPE} == "lld" -WANT_LINKER_FREEBSD_VERSION_FILE= lib/clang/include/lld/Common/Version.inc +WANT_LINKER_FREEBSD_VERSION_FILE= lib/clang/include/VCSVersion.inc WANT_LINKER_FREEBSD_VERSION!= \ - awk '$$2 == "LLD_REVISION_STRING" {gsub(/"/, "", $$3); print $$3}' \ + awk '$$2 == "LLD_REVISION" {gsub(/"/, "", $$3); print $$3}' \ ${SRCDIR}/${WANT_LINKER_FREEBSD_VERSION_FILE} || echo unknown WANT_LINKER_VERSION_FILE= lib/clang/include/lld/Common/Version.inc WANT_LINKER_VERSION!= \ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r353771 - head/share/mk
Author: bdrewery Date: Sat Oct 19 21:44:33 2019 New Revision: 353771 URL: https://svnweb.freebsd.org/changeset/base/353771 Log: Fix spelling of DPSRCS. Submitted by: vangyzen Sponsored by: DellEMC MFC after:2 weeks Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk == --- head/share/mk/bsd.dep.mkSat Oct 19 20:48:53 2019(r353770) +++ head/share/mk/bsd.dep.mkSat Oct 19 21:44:33 2019(r353771) @@ -195,7 +195,7 @@ DEPEND_FILTER= C,/,_,g DEPENDOBJS+= ${OBJS} .else DEPENDSRCS+= ${SRCS:M*.[cSC]} ${SRCS:M*.cxx} ${SRCS:M*.cpp} ${SRCS:M*.cc} -DEPENDSRCS+= ${DPSRCS:M*.[cSC]} ${SRCS:M*.cxx} ${SRCS:M*.cpp} ${SRCS:M*.cc} +DEPENDSRCS+= ${DPSRCS:M*.[cSC]} ${DPSRCS:M*.cxx} ${DPSRCS:M*.cpp} ${DPSRCS:M*.cc} .if !empty(DEPENDSRCS) DEPENDOBJS+= ${DEPENDSRCS:${OBJS_SRCS_FILTER:ts:}:S,$,.o,} .endif ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r353639 - head/share/mk
On 10/16/2019 10:18 AM, Brooks Davis wrote: > On Wed, Oct 16, 2019 at 01:20:36PM +, Warner Losh wrote: >> Author: imp >> Date: Wed Oct 16 13:20:36 2019 >> New Revision: 353639 >> URL: https://svnweb.freebsd.org/changeset/base/353639 >> >> Log: >> bsd.compat.mk isn't setup to be included outside of Makefile.inc so >> comment it >> out here until that's sorted out. Otherwise the build is broken. when >> TARGET_ARCH isn't defined. > > Thanks for committing this workaround. I forgot to test bare builds (not > buildworld/buildenv/...) because I almost always cross build (either for a > different arch or targeting CURRENT from STABLE). > > I'm currently testing a switch from TARGET_ARCH to MACHINE_ARCH and > TARGET_CPUTYPE to CPUTYPE. > > -- Brooks > As a hack you could do .if defined(SRCTOP) .include .endif Or rename it src.compat.mk and remove from Makefile and do .sinclude -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r352265 - head/contrib/mtree
Author: bdrewery Date: Thu Sep 12 20:46:46 2019 New Revision: 352265 URL: https://svnweb.freebsd.org/changeset/base/352265 Log: mtree -O: Fix not descending on hash collisions MFC after:2 weeks Obtained from:NetBSD (nakayama) Modified: head/contrib/mtree/only.c Modified: head/contrib/mtree/only.c == --- head/contrib/mtree/only.c Thu Sep 12 20:15:04 2019(r352264) +++ head/contrib/mtree/only.c Thu Sep 12 20:46:46 2019(r352265) @@ -1,4 +1,4 @@ -/* $NetBSD: only.c,v 1.2 2013/02/05 00:59:03 christos Exp $*/ +/* $NetBSD: only.c,v 1.3 2017/09/07 04:04:13 nakayama Exp $*/ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: only.c,v 1.2 2013/02/05 00:59:03 christos Exp $"); +__RCSID("$NetBSD: only.c,v 1.3 2017/09/07 04:04:13 nakayama Exp $"); #endif #include @@ -89,11 +89,14 @@ static void hash_insert(char *str, uint32_t h) { struct hentry *e; + char *x; if ((e = malloc(sizeof(*e))) == NULL) mtree_err("memory allocation error"); + if ((x = strdup(str)) == NULL) + mtree_err("memory allocation error"); - e->str = str; + e->str = x; e->hash = h; e->next = table[h]; table[h] = e; @@ -110,10 +113,7 @@ fill(char *str) *ptr = '\0'; if (!hash_find(str, )) { - char *x = strdup(str); - if (x == NULL) - mtree_err("memory allocation error"); - hash_insert(x, h); + hash_insert(str, h); fill(str); } *ptr = '/'; @@ -135,6 +135,7 @@ load_only(const char *fname) err(1, "Duplicate entry %s", line); hash_insert(line, h); fill(line); + free(line); } fclose(fp); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r352262 - head/contrib/mtree
Author: bdrewery Date: Thu Sep 12 18:51:59 2019 New Revision: 352262 URL: https://svnweb.freebsd.org/changeset/base/352262 Log: mtree -c: Fix username logic when getlogin(3) fails. Obtained from:NetBSD (Credit to Sascha Wildner with DragonFlyBSD) MFC after:2 weeks Modified: head/contrib/mtree/create.c Modified: head/contrib/mtree/create.c == --- head/contrib/mtree/create.c Thu Sep 12 18:44:48 2019(r352261) +++ head/contrib/mtree/create.c Thu Sep 12 18:51:59 2019(r352262) @@ -117,7 +117,7 @@ cwalk(FILE *fp) host[sizeof(host) - 1] = '\0'; if ((user = getlogin()) == NULL) { struct passwd *pw; - user = (pw = getpwuid(getuid())) == NULL ? pw->pw_name : + user = (pw = getpwuid(getuid())) != NULL ? pw->pw_name : ""; } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r352261 - in head: contrib/mtree contrib/netbsd-tests/usr.sbin/mtree usr.sbin/fmtree
Author: bdrewery Date: Thu Sep 12 18:44:48 2019 New Revision: 352261 URL: https://svnweb.freebsd.org/changeset/base/352261 Log: mtree: Fix -f -f not considering type changes. This only lists the changed type and not other attributes so that it matches the behavior of -C as done in r66747 for fmtree. The NetBSD -ff implementation was copied from fmtree. Reviewed by: imp MFC after:2 weeks Relnotes: yes Differential Revision:https://reviews.freebsd.org/D21623 Modified: head/contrib/mtree/specspec.c head/contrib/netbsd-tests/usr.sbin/mtree/t_mtree.sh head/usr.sbin/fmtree/specspec.c Modified: head/contrib/mtree/specspec.c == --- head/contrib/mtree/specspec.c Thu Sep 12 18:37:26 2019 (r352260) +++ head/contrib/mtree/specspec.c Thu Sep 12 18:44:48 2019 (r352261) @@ -145,7 +145,7 @@ compare_nodes(NODE *n1, NODE *n2, char const *path) return (1); } if (n1->type != n2->type) { - differs = 0; + differs = F_TYPE; mismatch(n1, n2, differs, path); return (1); } Modified: head/contrib/netbsd-tests/usr.sbin/mtree/t_mtree.sh == --- head/contrib/netbsd-tests/usr.sbin/mtree/t_mtree.sh Thu Sep 12 18:37:26 2019(r352260) +++ head/contrib/netbsd-tests/usr.sbin/mtree/t_mtree.sh Thu Sep 12 18:44:48 2019(r352261) @@ -411,7 +411,42 @@ netbsd6_nonemptydir_body() FLAVOR=netbsd6 nonemptydir_body } +atf_test_case mtree_specspec_type +mtree_specspec_type_head() +{ + atf_set "descr" "Test that spec comparisons detect type changes" +} +mtree_specspec_type_body() +{ + mkdir testdir + + touch testdir/bar + mtree -c -p testdir > mtree1.spec + + if [ ! -f mtree1.spec ]; then + atf_fail "mtree failed" + fi + + rm -f testdir/bar + ln -s foo testdir/bar + # uid change is expected to be ignored as done in -C + chown -h operator testdir/bar + mtree -c -p testdir > mtree2.spec + + if [ ! -f mtree2.spec ]; then + atf_fail "mtree failed" + fi + + atf_check -s ignore -o save:output \ + -x "mtree -f mtree1.spec -f mtree2.spec" + + if ! cut -f 3 output | egrep -q "bar file" || \ + ! cut -f 3 output | egrep -q "bar link"; then + atf_fail "mtree did not detect type change" + fi +} + atf_init_test_cases() { atf_add_test_case mtree_create @@ -423,6 +458,7 @@ atf_init_test_cases() atf_add_test_case mtree_ignore atf_add_test_case mtree_merge atf_add_test_case mtree_nonemptydir + atf_add_test_case mtree_specspec_type atf_add_test_case netbsd6_create atf_add_test_case netbsd6_check Modified: head/usr.sbin/fmtree/specspec.c == --- head/usr.sbin/fmtree/specspec.c Thu Sep 12 18:37:26 2019 (r352260) +++ head/usr.sbin/fmtree/specspec.c Thu Sep 12 18:44:48 2019 (r352261) @@ -132,7 +132,7 @@ compare_nodes(NODE *n1, NODE *n2, char const *path) return (1); } if (n1->type != n2->type) { - differs = 0; + differs = F_TYPE; mismatch(n1, n2, differs, path); return (1); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r351823 - head/share/mk
Author: bdrewery Date: Wed Sep 4 18:32:11 2019 New Revision: 351823 URL: https://svnweb.freebsd.org/changeset/base/351823 Log: PROGS: Build common sources before recursed PROGS_TARGETS as well when building. MFC after:2 weeks Sponsored by: DellEMC Modified: head/share/mk/bsd.progs.mk Modified: head/share/mk/bsd.progs.mk == --- head/share/mk/bsd.progs.mk Wed Sep 4 18:00:54 2019(r351822) +++ head/share/mk/bsd.progs.mk Wed Sep 4 18:32:11 2019(r351823) @@ -92,6 +92,7 @@ $v = # handle being called [bsd.]progs.mk .include +.if !defined(_SKIP_BUILD) # Find common sources among the PROGS to depend on them before building # anything. This allows parallelization without them each fighting over # the same objects. @@ -118,6 +119,7 @@ _PROGS_COMMON_OBJS+= ${_PROGS_COMMON_SRCS:N*.[dhly]:${ !empty(.MAKE.MODE:Mmeta) ${_PROGS_COMMON_OBJS}: .NOMETA .endif +.endif .if !empty(PROGS) && !defined(_RECURSING_PROGS) && !defined(PROG) # tell progs.mk we might want to install things @@ -132,11 +134,6 @@ _PROG_MK.cleanobj= CLEANDEPENDFILES= CLEANDEPENDDIRS= PROGS_TARGETS+=cleandir cleanobj .endif -# Ensure common objects are built before recursing. -.if !empty(_PROGS_COMMON_OBJS) -${PROGS}: ${_PROGS_COMMON_OBJS} -.endif - .for p in ${PROGS} .if defined(PROGS_CXX) && !empty(PROGS_CXX:M$p) # bsd.prog.mk may need to know this @@ -144,7 +141,7 @@ x.$p= PROG_CXX=$p .endif # Main PROG target -$p ${p}_p: .PHONY .MAKE +$p ${p}_p: .PHONY .MAKE ${_PROGS_COMMON_OBJS} (cd ${.CURDIR} && \ DEPENDFILE=.depend.$p \ NO_SUBDIR=1 ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS=t \ @@ -152,7 +149,7 @@ $p ${p}_p: .PHONY .MAKE # Pseudo targets for PROG, such as 'install'. .for t in ${PROGS_TARGETS:O:u} -$p.$t: .PHONY .MAKE +$p.$t: .PHONY .MAKE ${_PROGS_COMMON_OBJS} (cd ${.CURDIR} && \ DEPENDFILE=.depend.$p \ NO_SUBDIR=1 ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS=t \ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r346255 - head/usr.bin/jot
Author: bdrewery Date: Tue Apr 16 00:41:22 2019 New Revision: 346255 URL: https://svnweb.freebsd.org/changeset/base/346255 Log: Fix 'jot -r 0 start end' to work. This allows an endless stream of random data within the given bounds. It already worked if a seed was provided as the 4th argument but not if one was left out. In collaboration with:jhb MFC after:2 weeks Relnotes: yes Modified: head/usr.bin/jot/jot.c Modified: head/usr.bin/jot/jot.c == --- head/usr.bin/jot/jot.c Mon Apr 15 21:20:06 2019(r346254) +++ head/usr.bin/jot/jot.c Tue Apr 16 00:41:22 2019(r346255) @@ -263,12 +263,15 @@ main(int argc, char **argv) mask = 0; break; case HAVE_REPS | HAVE_BEGIN | HAVE_ENDER: - if (reps == 0) - errx(1, "infinite sequences cannot be bounded"); - else if (reps == 1) - s = 0.0; - else - s = (ender - begin) / (reps - 1); + if (!randomize) { + if (reps == 0) + errx(1, "infinite sequences cannot " + "be bounded"); + else if (reps == 1) + s = 0.0; + else + s = (ender - begin) / (reps - 1); + } mask = 0; break; case HAVE_REPS | HAVE_BEGIN | HAVE_ENDER | HAVE_STEP: ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r351151 - head/lib/libsysdecode
Author: bdrewery Date: Fri Aug 16 22:34:10 2019 New Revision: 351151 URL: https://svnweb.freebsd.org/changeset/base/351151 Log: Rework r339635 to fix .depend.tables.h handling. Avoid touching the tables.h file unless it has changed to avoid unneeded rebuilds. Also revert r350301's explicit dependencies. Reviewed by: emaste MFC after:2 weeks X-MFC-With: r339635 (kevans request) PR: 238828 Sponsored by: DellEMC Differential Revision:https://reviews.freebsd.org/D21295 Modified: head/lib/libsysdecode/Makefile head/lib/libsysdecode/mktables Modified: head/lib/libsysdecode/Makefile == --- head/lib/libsysdecode/Makefile Fri Aug 16 21:54:12 2019 (r351150) +++ head/lib/libsysdecode/Makefile Fri Aug 16 22:34:10 2019 (r351151) @@ -107,7 +107,7 @@ MLINKS+=sysdecode_mask.3 sysdecode_accessmode.3 \ sysdecode_mask.3 sysdecode_wait4_options.3 \ sysdecode_mask.3 sysdecode_wait6_options.3 -CLEANFILES= ioctl.c ioctl.c.tmp tables.h tables.h.tmp +CLEANFILES= ioctl.c ioctl.c.tmp tables.h .if defined(COMPAT_32BIT) CPP+= -m32 @@ -123,11 +123,8 @@ CFLAGS.gcc.ioctl.c+= -Wno-redundant-decls CFLAGS.gcc+= ${CFLAGS.gcc.${.IMPSRC}} DEPENDOBJS+= tables.h -incdir=${SYSROOT:U${DESTDIR}}${INCLUDEDIR} -tables.h: mktables ${incdir}/netinet/in.h ${incdir}/netinet/tcp.h \ -${incdir}/netinet6/in6.h - sh ${.CURDIR}/mktables ${incdir} ${.TARGET}.tmp && \ - mv -f ${.TARGET}.tmp ${.TARGET} +tables.h: mktables + sh ${.CURDIR}/mktables ${SYSROOT:U${DESTDIR}}${INCLUDEDIR} ${.TARGET} # mkioctls runs find(1) for headers so needs to rebuild every time. This used # to be a hack only done in buildworld. Modified: head/lib/libsysdecode/mktables == --- head/lib/libsysdecode/mktables Fri Aug 16 21:54:12 2019 (r351150) +++ head/lib/libsysdecode/mktables Fri Aug 16 22:34:10 2019 (r351151) @@ -43,7 +43,8 @@ fi include_dir=$1 if [ -n "$2" ]; then output_file="$2" - exec > "$output_file" + output_tmp=$(mktemp -u) + exec > "$output_tmp" fi all_headers= @@ -167,9 +168,17 @@ fi # Generate a .depend file for our output file if [ -n "$output_file" ]; then - echo "$output_file: \\" > ".depend.$output_file" - echo "$all_headers" | tr ' ' '\n' | sort -u | - sed -e "s,^,$include_dir/," -e 's,$, \\,' >> \ - ".depend.$output_file" - echo >> ".depend.$output_file" + depend_tmp=$(mktemp -u) + { + echo "$output_file: \\" + echo "$all_headers" | tr ' ' '\n' | sort -u | + sed -e "s,^,$include_dir/," -e 's,$, \\,' + echo + } > "$depend_tmp" + if cmp -s "$output_tmp" "$output_file"; then + rm -f "$output_tmp" "$depend_tmp" + else + mv -f "$depend_tmp" ".depend.${output_file}" + mv -f "$output_tmp" "$output_file" + fi fi ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r350005 - head/sys/kern
On 7/31/19 12:42 PM, Konstantin Belousov wrote: > On Wed, Jul 31, 2019 at 10:08:39AM -0700, Bryan Drewery wrote: >> On 7/30/19 10:14 PM, Konstantin Belousov wrote: >>> No, you should create a situation where the python process ends the endless >>> loop, as reported. Then, it should become killable by 9 with the first >>> chunk only applied. >>> >> >> I don't have an easy way to test that. kill -9 inside the loop didn't >> work. Once the loop ended the process was done; it is very short lived >> and the calling code is buried in Python I think. > With only the umtxq_check_susp() chunk applied, you would wait for > python to start looping, then verify that kill -9 works. > > Anyway, I believe that the change is correct, and put the review at > https://reviews.freebsd.org/D21124. I will commit after it get some > sanity checking by mentioned people. > Right. I did that earlier and it did not work. I can try again shortly. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
Re: svn commit: r350005 - head/sys/kern
On 7/30/19 10:14 PM, Konstantin Belousov wrote: > On Tue, Jul 30, 2019 at 08:40:28PM -0700, Bryan Drewery wrote: >> This 2nd change alone (&& count1 == 0) was sufficient to fix the endless >> loop problem. > Good, thank you. > >> >> I am not sure how to test the umtxq_check_susp() change. Do I just need >> to ptrace the process? > > No, you should create a situation where the python process ends the endless > loop, as reported. Then, it should become killable by 9 with the first > chunk only applied. > I don't have an easy way to test that. kill -9 inside the loop didn't work. Once the loop ended the process was done; it is very short lived and the calling code is buried in Python I think. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
Re: svn commit: r350005 - head/sys/kern
On 7/30/19 4:27 PM, Konstantin Belousov wrote: > On Wed, Jul 31, 2019 at 02:13:02AM +0300, Konstantin Belousov wrote: >> On Tue, Jul 30, 2019 at 03:04:57PM -0700, Bryan Drewery wrote: >>> On 7/15/2019 12:18 PM, Konstantin Belousov wrote: >>>> Author: kib >>>> Date: Mon Jul 15 19:18:25 2019 >>>> New Revision: 350005 >>>> URL: https://svnweb.freebsd.org/changeset/base/350005 >>>> >>>> Log: >>>> In do_sem2_wait(), balance umtx_key_get() with umtx_key_release() on >>>> retry. >>>> >>> >>> Is this also needed in do_sem_wait()? A similar pattern seems to be there. >> No, I do not think do_sem_wait() has similar issue, because the again label >> does not re-get the key. >> >>> >>> I ask because of what I referenced on IRC. I have some processes stuck >>> in here from a 10.4 jail. >>> >>>> ~/git/poudriere # procstat -kk 1498 >>>> PIDTID COMMTDNAME KSTACK >>>> 1498 100710 python2.7 - mi_switch+0x174 >>>> sleepq_switch+0x110 sleepq_catch_signals+0x417 sleepq_wait_sig+0xf >>>> _sleep+0x2d0 umtxq_sleep+0x153 do_sem_wait+0x42c __umtx_op_sem_wait+0x6e >>>> amd64_syscall+0x2bb fast_syscall_common+0x101 >>>> 1498 101575 python2.7 - mi_switch+0x174 >>>> sleepq_switch+0x110 sleepq_catch_signals+0x417 sleepq_wait_sig+0xf >>>> _sleep+0x2d0 umtxq_sleep+0x153 do_sem_wait+0x42c __umtx_op_sem_wait+0x6e >>>> amd64_syscall+0x2bb fast_syscall_common+0x101 >>>> 1498 101657 python2.7 - >>> ... >>>> ~/git/poudriere # procstat -kk 1498 >>>> PIDTID COMMTDNAME KSTACK >>>> 1498 100710 python2.7 - mi_switch+0x174 >>>> sleepq_switch+0x110 sleepq_catch_signals+0x417 sleepq_wait_sig+0xf >>>> _sleep+0x2d0 umtxq_sleep+0x153 do_sem_wait+0x42c __umtx_op_sem_wait+0x6e >>>> amd64_syscall+0x2bb fast_syscall_common+0x101 >>>> 1498 101575 python2.7 - mi_switch+0x174 >>>> sleepq_switch+0x110 sleepq_catch_signals+0x417 sleepq_wait_sig+0xf >>>> _sleep+0x2d0 umtxq_sleep+0x153 do_sem_wait+0x42c __umtx_op_sem_wait+0x6e >>>> amd64_syscall+0x2bb fast_syscall_common+0x101 >>>> 1498 101657 python2.7 - do_sem_wait+0x1b6 >>>> __umtx_op_sem_wait+0x6e amd64_syscall+0x2bb fast_syscall_common+0x101 >>> ... >>>> ~/git/poudriere # procstat -kk 94392 >>>> PIDTID COMMTDNAME KSTACK >>>> 94392 101815 python2.7 - mi_switch+0x174 >>>> sleepq_switch+0x110 sleepq_catch_signals+0x417 sleepq_wait_sig+0xf >>>> _sleep+0x2d0 umtxq_sleep+0x153 do_sem_wait+0x42c __umtx_op_sem_wait+0x6e >>>> amd64_syscall+0x2bb fast_syscall_common+0x101 >>>> 94392 101816 python2.7 - >>>> __mtx_lock_sleep+0x118 __mtx_lock_flags+0x102 _sleep+0x334 umtxq_busy+0xb7 >>>> do_sem_wait+0x161 __umtx_op_sem_wait+0x6e amd64_syscall+0x2bb >>>> fast_syscall_common+0x101 >>>> 94392 102076 python2.7 - __mtx_lock_flags+0x94 >>>> do_sem_wait+0x228 __umtx_op_sem_wait+0x6e amd64_syscall+0x2bb >>>> fast_syscall_common+0x101 >> >> Try this. We should only retry casueword if it failed spuriously. >> >> diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c >> index bb998457975..6c914ab6f3e 100644 >> --- a/sys/kern/kern_umtx.c >> +++ b/sys/kern/kern_umtx.c >> @@ -3229,7 +3229,8 @@ do_sem_wait(struct thread *td, struct _usem *sem, >> struct _umtx_time *timeout) >> rv = casueword32(>_has_waiters, 0, , 1); >> if (rv == 0) >> rv1 = fueword32(>_count, ); >> -if (rv == -1 || (rv == 0 && (rv1 == -1 || count != 0)) || rv == 1) { >> +if (rv == -1 || (rv == 0 && (rv1 == -1 || count != 0)) || >> +(rv == 1 && count1 == 0)) { >> umtxq_lock(>uq_key); >> umtxq_unbusy(>uq_key); >> umtxq_remove(uq); > > I think there is another problem, since even despite our intent of looping > just because of casueword returned 1, the umtxq_check_susp() should have > terminated the loop. I believe the following update would fix that. > > If you have time, can you please apply only
Re: svn commit: r350005 - head/sys/kern
On 7/30/2019 4:27 PM, Konstantin Belousov wrote: > On Wed, Jul 31, 2019 at 02:13:02AM +0300, Konstantin Belousov wrote: >> On Tue, Jul 30, 2019 at 03:04:57PM -0700, Bryan Drewery wrote: >>> On 7/15/2019 12:18 PM, Konstantin Belousov wrote: >>>> Author: kib >>>> Date: Mon Jul 15 19:18:25 2019 >>>> New Revision: 350005 >>>> URL: https://svnweb.freebsd.org/changeset/base/350005 >>>> >>>> Log: >>>> In do_sem2_wait(), balance umtx_key_get() with umtx_key_release() on >>>> retry. >>>> >>> >>> Is this also needed in do_sem_wait()? A similar pattern seems to be there. >> No, I do not think do_sem_wait() has similar issue, because the again label >> does not re-get the key. >> >>> >>> I ask because of what I referenced on IRC. I have some processes stuck >>> in here from a 10.4 jail. >>> >>>> ~/git/poudriere # procstat -kk 1498 >>>> PIDTID COMMTDNAME KSTACK >>>> 1498 100710 python2.7 - mi_switch+0x174 >>>> sleepq_switch+0x110 sleepq_catch_signals+0x417 sleepq_wait_sig+0xf >>>> _sleep+0x2d0 umtxq_sleep+0x153 do_sem_wait+0x42c __umtx_op_sem_wait+0x6e >>>> amd64_syscall+0x2bb fast_syscall_common+0x101 >>>> 1498 101575 python2.7 - mi_switch+0x174 >>>> sleepq_switch+0x110 sleepq_catch_signals+0x417 sleepq_wait_sig+0xf >>>> _sleep+0x2d0 umtxq_sleep+0x153 do_sem_wait+0x42c __umtx_op_sem_wait+0x6e >>>> amd64_syscall+0x2bb fast_syscall_common+0x101 >>>> 1498 101657 python2.7 - >>> ... >>>> ~/git/poudriere # procstat -kk 1498 >>>> PIDTID COMMTDNAME KSTACK >>>> 1498 100710 python2.7 - mi_switch+0x174 >>>> sleepq_switch+0x110 sleepq_catch_signals+0x417 sleepq_wait_sig+0xf >>>> _sleep+0x2d0 umtxq_sleep+0x153 do_sem_wait+0x42c __umtx_op_sem_wait+0x6e >>>> amd64_syscall+0x2bb fast_syscall_common+0x101 >>>> 1498 101575 python2.7 - mi_switch+0x174 >>>> sleepq_switch+0x110 sleepq_catch_signals+0x417 sleepq_wait_sig+0xf >>>> _sleep+0x2d0 umtxq_sleep+0x153 do_sem_wait+0x42c __umtx_op_sem_wait+0x6e >>>> amd64_syscall+0x2bb fast_syscall_common+0x101 >>>> 1498 101657 python2.7 - do_sem_wait+0x1b6 >>>> __umtx_op_sem_wait+0x6e amd64_syscall+0x2bb fast_syscall_common+0x101 >>> ... >>>> ~/git/poudriere # procstat -kk 94392 >>>> PIDTID COMMTDNAME KSTACK >>>> 94392 101815 python2.7 - mi_switch+0x174 >>>> sleepq_switch+0x110 sleepq_catch_signals+0x417 sleepq_wait_sig+0xf >>>> _sleep+0x2d0 umtxq_sleep+0x153 do_sem_wait+0x42c __umtx_op_sem_wait+0x6e >>>> amd64_syscall+0x2bb fast_syscall_common+0x101 >>>> 94392 101816 python2.7 - >>>> __mtx_lock_sleep+0x118 __mtx_lock_flags+0x102 _sleep+0x334 umtxq_busy+0xb7 >>>> do_sem_wait+0x161 __umtx_op_sem_wait+0x6e amd64_syscall+0x2bb >>>> fast_syscall_common+0x101 >>>> 94392 102076 python2.7 - __mtx_lock_flags+0x94 >>>> do_sem_wait+0x228 __umtx_op_sem_wait+0x6e amd64_syscall+0x2bb >>>> fast_syscall_common+0x101 >> >> Try this. We should only retry casueword if it failed spuriously. >> >> diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c >> index bb998457975..6c914ab6f3e 100644 >> --- a/sys/kern/kern_umtx.c >> +++ b/sys/kern/kern_umtx.c >> @@ -3229,7 +3229,8 @@ do_sem_wait(struct thread *td, struct _usem *sem, >> struct _umtx_time *timeout) >> rv = casueword32(>_has_waiters, 0, , 1); >> if (rv == 0) >> rv1 = fueword32(>_count, ); >> -if (rv == -1 || (rv == 0 && (rv1 == -1 || count != 0)) || rv == 1) { >> +if (rv == -1 || (rv == 0 && (rv1 == -1 || count != 0)) || >> +(rv == 1 && count1 == 0)) { >> umtxq_lock(>uq_key); >> umtxq_unbusy(>uq_key); >> umtxq_remove(uq); > > I think there is another problem, since even despite our intent of looping > just because of casueword returned 1, the umtxq_check_susp() should have > terminated the loop. I believe the following update would fix that. > > If you have time, can you please apply only the umtxq_c
Re: svn commit: r350005 - head/sys/kern
On 7/15/2019 12:18 PM, Konstantin Belousov wrote: > Author: kib > Date: Mon Jul 15 19:18:25 2019 > New Revision: 350005 > URL: https://svnweb.freebsd.org/changeset/base/350005 > > Log: > In do_sem2_wait(), balance umtx_key_get() with umtx_key_release() on retry. > Is this also needed in do_sem_wait()? A similar pattern seems to be there. I ask because of what I referenced on IRC. I have some processes stuck in here from a 10.4 jail. > ~/git/poudriere # procstat -kk 1498 > PIDTID COMMTDNAME KSTACK > 1498 100710 python2.7 - mi_switch+0x174 > sleepq_switch+0x110 sleepq_catch_signals+0x417 sleepq_wait_sig+0xf > _sleep+0x2d0 umtxq_sleep+0x153 do_sem_wait+0x42c __umtx_op_sem_wait+0x6e > amd64_syscall+0x2bb fast_syscall_common+0x101 > 1498 101575 python2.7 - mi_switch+0x174 > sleepq_switch+0x110 sleepq_catch_signals+0x417 sleepq_wait_sig+0xf > _sleep+0x2d0 umtxq_sleep+0x153 do_sem_wait+0x42c __umtx_op_sem_wait+0x6e > amd64_syscall+0x2bb fast_syscall_common+0x101 > 1498 101657 python2.7 - ... > ~/git/poudriere # procstat -kk 1498 > PIDTID COMMTDNAME KSTACK > 1498 100710 python2.7 - mi_switch+0x174 > sleepq_switch+0x110 sleepq_catch_signals+0x417 sleepq_wait_sig+0xf > _sleep+0x2d0 umtxq_sleep+0x153 do_sem_wait+0x42c __umtx_op_sem_wait+0x6e > amd64_syscall+0x2bb fast_syscall_common+0x101 > 1498 101575 python2.7 - mi_switch+0x174 > sleepq_switch+0x110 sleepq_catch_signals+0x417 sleepq_wait_sig+0xf > _sleep+0x2d0 umtxq_sleep+0x153 do_sem_wait+0x42c __umtx_op_sem_wait+0x6e > amd64_syscall+0x2bb fast_syscall_common+0x101 > 1498 101657 python2.7 - do_sem_wait+0x1b6 > __umtx_op_sem_wait+0x6e amd64_syscall+0x2bb fast_syscall_common+0x101 ... > ~/git/poudriere # procstat -kk 94392 > PIDTID COMMTDNAME KSTACK > 94392 101815 python2.7 - mi_switch+0x174 > sleepq_switch+0x110 sleepq_catch_signals+0x417 sleepq_wait_sig+0xf > _sleep+0x2d0 umtxq_sleep+0x153 do_sem_wait+0x42c __umtx_op_sem_wait+0x6e > amd64_syscall+0x2bb fast_syscall_common+0x101 > 94392 101816 python2.7 - __mtx_lock_sleep+0x118 > __mtx_lock_flags+0x102 _sleep+0x334 umtxq_busy+0xb7 do_sem_wait+0x161 > __umtx_op_sem_wait+0x6e amd64_syscall+0x2bb fast_syscall_common+0x101 > 94392 102076 python2.7 - __mtx_lock_flags+0x94 > do_sem_wait+0x228 __umtx_op_sem_wait+0x6e amd64_syscall+0x2bb > fast_syscall_common+0x101 > Reported by:ler > Bisected and reviewed by: markj > Sponsored by: The FreeBSD Foundation > MFC after: 12 days > > Modified: > head/sys/kern/kern_umtx.c > > Modified: head/sys/kern/kern_umtx.c > == > --- head/sys/kern/kern_umtx.c Mon Jul 15 17:13:32 2019(r350004) > +++ head/sys/kern/kern_umtx.c Mon Jul 15 19:18:25 2019(r350005) > @@ -3316,14 +3316,13 @@ do_sem2_wait(struct thread *td, struct _usem2 *sem, st > > uq = td->td_umtxq; > flags = fuword32(>_flags); > - error = umtx_key_get(sem, TYPE_SEM, GET_SHARE(flags), >uq_key); > - if (error != 0) > - return (error); > - > if (timeout != NULL) > abs_timeout_init2(, timeout); > > again: > + error = umtx_key_get(sem, TYPE_SEM, GET_SHARE(flags), >uq_key); > + if (error != 0) > + return (error); > umtxq_lock(>uq_key); > umtxq_busy(>uq_key); > umtxq_insert(uq); > -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r350119 - head/share/mk
Author: bdrewery Date: Fri Jul 19 00:15:25 2019 New Revision: 350119 URL: https://svnweb.freebsd.org/changeset/base/350119 Log: Rework some multi-output target dependency handling. This reworks my last commit in r301285 to more closely match what was in r241298 (but reverted in r294878). This is addressing "missing .meta file" rebuilds but also ensuring that files are always generated when needed in each case. Note that this is not a complete rework of the problem areas identified in r301285 as most are "good enough" right now as the new pattern is too verbose. It's only worth making this current change where headers may be generated in the INCS list; where missing .meta file rebuilds are spotted. --- Technical details follow --- Several attempts to deal with this problem of multi-output targets, with and without META MODE, were explained in r241298, r294878, and r301285. The general problem is with multi-output targets such as: foo.c foo.h: touch foo.c foo.h foo.c foo.h: touch foo.c touch foo.h foo.c foo.h: foo.in ./generator ${.ALLSRC} This pattern is problematic in jobs mode as both files end up being built concurrently and leads to races. With META MODE it is worse as both targets end up rebuilding if they lack a .meta file. So the generator is force built twice even though it is only needed once. There are also problems in that 'make foo.h' may be ran before 'make foo.c'; The order of make generating the targets is not guaranteed. An older attempted workaround to this (discussed in r294878) was: foo.h: foo.c foo.c: foo.in ./generator ${.ALLSRC} This appears fine except that if foo.h is missing and foo.c exists then foo.h will never be regenerated. This pattern is close to the solution in this commit though: foo.h: foo.c .NOMETA .if !exists(foo.h) foo.c: .PHONY .META .endif foo.c: foo.in ./generator ${.ALLSRC} There's 2 differences here: 1. foo.h will never expect to have a .meta file since the foo.c target will generate both and own the .meta file. 2. If foo.h does not exist then it needs to force foo.c to be rebuilt with .PHONY. That normally disables META MODE though so .META is given to tell bmake we do really expect a .meta file. This pattern cannot work with implicit suffix rules since the .c and .h files may be generated at different times (buildincludes vs depend/all). Sponsored by: Dell EMC MFC after:2 weeks Modified: head/share/mk/bsd.dep.mk head/share/mk/bsd.snmpmod.mk Modified: head/share/mk/bsd.dep.mk == --- head/share/mk/bsd.dep.mkThu Jul 18 21:58:51 2019(r350118) +++ head/share/mk/bsd.dep.mkFri Jul 19 00:15:25 2019(r350119) @@ -121,17 +121,27 @@ CLEANFILES+= ${_LC} SRCS:= ${SRCS:S/${_YSRC}/${_YC}/} CLEANFILES+= ${_YC} .if !empty(YFLAGS:M-d) && !empty(SRCS:My.tab.h) -.ORDER: ${_YC} y.tab.h -y.tab.h: .NOMETA -${_YC} y.tab.h: ${_YSRC} +# Multi-output targets both expect a .meta file and will fight over it. Only +# allow it on the .c file instead. +y.tab.h: ${_YC} .NOMETA +# Force rebuild the .c file if any of its other outputs are missing. +.if !exists(y.tab.h) +${_YC}: .PHONY .META +.endif +${_YC}: ${_YSRC} ${YACC} ${YFLAGS} ${.ALLSRC} cp y.tab.c ${_YC} CLEANFILES+= y.tab.c y.tab.h .elif !empty(YFLAGS:M-d) .for _YH in ${_YC:R}.h -.ORDER: ${_YC} ${_YH} -${_YH}: .NOMETA -${_YC} ${_YH}: ${_YSRC} +# Multi-output targets both expect a .meta file and will fight over it. Only +# allow it on the .c file instead. +${_YH}: ${_YC} .NOMETA +# Force rebuild the .c file if any of its other outputs are missing. +.if !exists(${_YH}) +${_YC}: .PHONY .META +.endif +${_YC}: ${_YSRC} ${YACC} ${YFLAGS} -o ${_YC} ${.ALLSRC} SRCS+= ${_YH} CLEANFILES+= ${_YH} Modified: head/share/mk/bsd.snmpmod.mk == --- head/share/mk/bsd.snmpmod.mkThu Jul 18 21:58:51 2019 (r350118) +++ head/share/mk/bsd.snmpmod.mkFri Jul 19 00:15:25 2019 (r350119) @@ -12,9 +12,14 @@ GENSNMPTREEFLAGS+= -I${SHAREDIR}/snmpdefs ${MOD}_oid.h: ${MOD}_tree.def ${EXTRAMIBDEFS} ${EXTRAMIBSYMS} cat ${.ALLSRC} | gensnmptree ${GENSNMPTREEFLAGS} -e ${XSYM} > ${.TARGET} -.ORDER: ${MOD}_tree.c ${MOD}_tree.h -${MOD}_tree.h: .NOMETA -${MOD}_tree.c ${MOD}_tree.h: ${MOD}_tree.def ${EXTRAMIBDEFS} +# Multi-output targets both expect a .meta file and will fight over it. Only +# allow it on the .c file instead. +${MOD}_tree.h: ${MOD}_tree.c .NOMETA +# Force rebuild the .c file if any of its other outputs are missing. +.if !exists(${MOD}_tree.h) +${MOD}_tree.c: .PHONY .META +.endif
svn commit: r349729 - head/share/mk
Author: bdrewery Date: Thu Jul 4 14:51:44 2019 New Revision: 349729 URL: https://svnweb.freebsd.org/changeset/base/349729 Log: Consider *clean targets as non-build targets as well. MFC after:2 weeks Sponsored by: DellEMC Modified: head/share/mk/bsd.init.mk head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.init.mk == --- head/share/mk/bsd.init.mk Thu Jul 4 14:15:04 2019(r349728) +++ head/share/mk/bsd.init.mk Thu Jul 4 14:51:44 2019(r349729) @@ -58,11 +58,12 @@ $xGRP= ${_gid} # things like 'make all install' or 'make foo install'. # - non-build targets are called .if ${MK_DIRDEPS_BUILD} == "yes" && ${.MAKE.LEVEL:U1} == 0 && \ -${BUILD_AT_LEVEL0:Uyes:tl} == "no" && !make(clean*) +${BUILD_AT_LEVEL0:Uyes:tl} == "no" && !make(clean*) && !make(*clean) _SKIP_BUILD= not building at level 0 .elif !empty(.MAKEFLAGS:M-V${_V_DO_BUILD}) || \ ${.TARGETS:M*install*} == ${.TARGETS} || \ ${.TARGETS:Mclean*} == ${.TARGETS} || \ +${.TARGETS:M*clean} == ${.TARGETS} || \ ${.TARGETS:Mdestroy*} == ${.TARGETS} || \ ${.TARGETS:Mobj} == ${.TARGETS} || \ make(analyze) || make(print-dir) Modified: head/share/mk/bsd.sys.mk == --- head/share/mk/bsd.sys.mkThu Jul 4 14:15:04 2019(r349728) +++ head/share/mk/bsd.sys.mkThu Jul 4 14:51:44 2019(r349729) @@ -284,7 +284,7 @@ PHONY_NOTMAIN = analyze afterdepend afterinstall all b .NOTMAIN: ${PHONY_NOTMAIN:Nall} .if ${MK_STAGING} != "no" -.if defined(_SKIP_BUILD) || (!make(all) && !make(clean*)) +.if defined(_SKIP_BUILD) || (!make(all) && !make(clean*) && !make(*clean)) _SKIP_STAGING?= yes .endif .if ${_SKIP_STAGING:Uno} == "yes" ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r349202 - head/share/mk
Author: bdrewery Date: Wed Jun 19 19:19:37 2019 New Revision: 349202 URL: https://svnweb.freebsd.org/changeset/base/349202 Log: Follow-up r349065: Fix .TARGET flag ambiguity with PROGS which broke MK_TESTS. X-MFC-With: r349065 Sponsored by: DellEMC Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk == --- head/share/mk/bsd.sys.mkWed Jun 19 18:47:44 2019(r349201) +++ head/share/mk/bsd.sys.mkWed Jun 19 19:19:37 2019(r349202) @@ -234,7 +234,6 @@ DEBUG_FILES_CFLAGS?= -g .if ${MK_WARNS} != "no" CFLAGS+= ${CWARNFLAGS:M*} ${CWARNFLAGS.${COMPILER_TYPE}} CFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} -CFLAGS+= ${CWARNFLAGS.${.TARGET:T}} .endif CFLAGS+=${CFLAGS.${COMPILER_TYPE}} @@ -245,14 +244,23 @@ AFLAGS+= ${AFLAGS.${.TARGET:T}} ACFLAGS+= ${ACFLAGS.${.IMPSRC:T}} ACFLAGS+= ${ACFLAGS.${.TARGET:T}} CFLAGS+= ${CFLAGS.${.IMPSRC:T}} -CFLAGS+= ${CFLAGS.${.TARGET:T}} CXXFLAGS+= ${CXXFLAGS.${.IMPSRC:T}} -CXXFLAGS+= ${CXXFLAGS.${.TARGET:T}} LDFLAGS+= ${LDFLAGS.${LINKER_TYPE}} + +# Only allow .TARGET when not using PROGS as it has the same syntax +# per PROG which is ambiguous with this syntax. This is only needed +# for PROG_VARS vars. +.if !defined(_RECURSING_PROGS) +.if ${MK_WARNS} != "no" +CFLAGS+= ${CWARNFLAGS.${.TARGET:T}} +.endif +CFLAGS+= ${CFLAGS.${.TARGET:T}} +CXXFLAGS+= ${CXXFLAGS.${.TARGET:T}} LDFLAGS+= ${LDFLAGS.${.TARGET:T}} LDADD+=${LDADD.${.TARGET:T}} LIBADD+= ${LIBADD.${.TARGET:T}} +.endif .if defined(SRCTOP) # Prevent rebuilding during install to support read-only objdirs. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r349179 - head/share/mk
Author: bdrewery Date: Tue Jun 18 22:00:38 2019 New Revision: 349179 URL: https://svnweb.freebsd.org/changeset/base/349179 Log: Rework r349061: Don't apply guessed dependencies if there is a custom target. This is still targeting bin/sh cyclic dependency issues. Only apply guessed dependencies that are explicitly set for an object (which gnu/lib/cc/cc_tools needs) and if no custom target exists with its own dependencies. This was manifesting as a missing yacc.h in usr.bin/mkesdb_static when built without -j (or -B). No actual yacc.h dependency ordering was defined but with -j it got lucky and built fine. Before r349061 the behavior was different for META_MODE but that logic difference isn't needed. X-MFC-With: r349061 Sponsored by: DellEMC Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk == --- head/share/mk/bsd.dep.mkTue Jun 18 21:05:10 2019(r349178) +++ head/share/mk/bsd.dep.mkTue Jun 18 22:00:38 2019(r349179) @@ -264,7 +264,9 @@ _depfile= ${.OBJDIR}/${_dep_obj} # - For meta mode we still need to know which file to depend on to avoid # ambiguous suffix transformation rules from .PATH. Meta mode does not # use .depend files when filemon is in use. -${__obj}: ${OBJS_DEPEND_GUESS:N*.h} +.if !target(${__obj}) +${__obj}: ${OBJS_DEPEND_GUESS} +.endif ${__obj}: ${OBJS_DEPEND_GUESS.${__obj}} .endif # !exists(${_depfile}) || defined(_meta_filemon) .endfor ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r349099 - head/share/man/man4
Author: bdrewery Date: Sun Jun 16 05:12:17 2019 New Revision: 349099 URL: https://svnweb.freebsd.org/changeset/base/349099 Log: symlinkat(2) is not covered. Modified: head/share/man/man4/filemon.4 Modified: head/share/man/man4/filemon.4 == --- head/share/man/man4/filemon.4 Sun Jun 16 03:06:05 2019 (r349098) +++ head/share/man/man4/filemon.4 Sun Jun 16 05:12:17 2019 (r349099) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 22, 2016 +.Dd June 15, 2019 .Dt FILEMON 4 .Os .Sh NAME @@ -79,8 +79,7 @@ The next log entry may be lacking an absolute path or .It Ql L .Xr link 2 , .Xr linkat 2 , -.Xr symlink 2 , -.Xr symlinkat 2 +.Xr symlink 2 .It Ql M .Xr rename 2 .It Ql R ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r349069 - head/gnu/lib/csu
On 6/15/2019 10:08 AM, Bryan Drewery wrote: > Author: bdrewery > Date: Sat Jun 15 17:08:39 2019 > New Revision: 349069 > URL: https://svnweb.freebsd.org/changeset/base/349069 > > Log: > csu: Add proper .depend tracking for each object. > > This doesn't appear to have ever worked. After a .depend is generated > there will be duplicate .c dependencies so only use the first one. > Oops. This 2nd paragraph was really from r349067 before some rebasing. -- Regards, Bryan Drewery ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r349068 - head/share/mk
Author: bdrewery Date: Sat Jun 15 17:08:35 2019 New Revision: 349068 URL: https://svnweb.freebsd.org/changeset/base/349068 Log: Allow DEPENDOBJS/DEPENDSRCS to work with only OBJS set and no SRCS. Default to tracking .depend.* for OBJS rather than SRCS. This helps cover some special case builds like gnu/lib/csu which do more of a PROGS-like thing with bsd.prog.mk. It is possible this causes out-of-tree Makefiles to have problems if they use this pattern: foo.o: foo.c ${CC} -o ${.TARGET} ${.ALLSRC} This may cause multiple source files to be compiled due to finding the 'foo.o: foo.c' dependency both in the Makefile at the .depend file. Or it may try compiling headers. This can be worked around by either of these: foo.o: foo.c ${CC} -o ${.TARGET} ${.ALLSRC:N*.h:[1]} Or foo.o: foo.c ${CC} -o ${.TARGET} ${.CURDIR}/foo.c In the latter case the ${.CURDIR} may need to be a different path. The first case covers automatically using .PATH. Sponsored by: DellEMC Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk == --- head/share/mk/bsd.dep.mkSat Jun 15 17:08:32 2019(r349067) +++ head/share/mk/bsd.dep.mkSat Jun 15 17:08:35 2019(r349068) @@ -173,19 +173,23 @@ ${_D}.nossppico: ${_DSRC} ${SOBJS:S/^${_D}.nossppico$/ .endif .endfor .endfor +.endif # defined(SRCS) - .if ${MAKE_VERSION} < 20160220 DEPEND_MP?=-MP .endif # Handle OBJS=../somefile.o hacks. Just replace '/' rather than use :T to # avoid collisions. DEPEND_FILTER= C,/,_,g +.if !empty(OBJS) +DEPENDOBJS+= ${OBJS} +.else DEPENDSRCS+= ${SRCS:M*.[cSC]} ${SRCS:M*.cxx} ${SRCS:M*.cpp} ${SRCS:M*.cc} DEPENDSRCS+= ${DPSRCS:M*.[cSC]} ${SRCS:M*.cxx} ${SRCS:M*.cpp} ${SRCS:M*.cc} .if !empty(DEPENDSRCS) DEPENDOBJS+= ${DEPENDSRCS:${OBJS_SRCS_FILTER:ts:}:S,$,.o,} .endif +.endif # !empty(OBJS) .if !empty(DEPENDOBJS) DEPENDFILES+= ${DEPENDOBJS:O:u:${DEPEND_FILTER}:C/^/${DEPENDFILE}./} .endif @@ -215,7 +219,6 @@ CFLAGS+=${${DEPEND_CFLAGS_CONDITION}:?${DEPEND_CFLAGS .endif .endfor .endif # !defined(_meta_filemon) -.endif # defined(SRCS) .if ${MK_DIRDEPS_BUILD} == "yes" && ${.MAKE.DEPENDFILE} != "/dev/null" # Prevent meta.autodep.mk from tracking "local dependencies". ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r349065 - head/share/mk
Author: bdrewery Date: Sat Jun 15 17:08:24 2019 New Revision: 349065 URL: https://svnweb.freebsd.org/changeset/base/349065 Log: Add various CFLAGS/LDADD overrides for the output target file. Sponsored by: DellEMC Modified: head/share/mk/bsd.README head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.README == --- head/share/mk/bsd.READMESat Jun 15 17:08:21 2019(r349064) +++ head/share/mk/bsd.READMESat Jun 15 17:08:24 2019(r349065) @@ -125,10 +125,16 @@ The following variables are common: AFLAGS.${SRC} Flags dependent on source file name. +AFLAGS.${TARGET} + Flags dependent on output file name. ACFLAGS.${SRC} Flags dependent on source file name. +ACFLAGS.${TARGET} + Flags dependent on output file name. CFLAGS.${SRC} Flags dependent on source file name. +CFLAGS.${TARGET} + Flags dependent on output file name. CFLAGS.${COMPILER_TYPE} Flags dependent on compiler added to CFLAGS. CFLAGS.${MACHINE_ARCH} @@ -142,6 +148,8 @@ CXXFLAGS.${MACHINE_ARCH} Architectural flags added to CXXFLAGS. CXXFLAGS.${SRC} Flags dependent on source file name. +CXXFLAGS.${TARGET} + Flags dependent on output file name. COMPILER_FEATURES A list of features that the compiler supports. Zero or more of: @@ -336,13 +344,22 @@ LDADD Additional loader objects. Usually used for li LDADD=-lutil -lcompat +LDADD.${TAREGT} + Loader objects dependent on output file name. + LDFLAGSAdditional loader flags. Passed to the loader via CC, since that's used to link programs as well, so loader specific flags need to be prefixed with -Wl, to work. +LDFLAGS.${TARGET} + Flags dependent on output file name. + LIBADD Additional libraries. This is for base system libraries and is only valid inside of the /usr/src tree. Use LIBADD=name instead of LDADD=-lname. + +LIBADD.${TARGET} + Libraries dependent on output file name. LINKS The list of binary links; should be full pathnames, the linked-to file coming first, followed by the linked Modified: head/share/mk/bsd.sys.mk == --- head/share/mk/bsd.sys.mkSat Jun 15 17:08:21 2019(r349064) +++ head/share/mk/bsd.sys.mkSat Jun 15 17:08:24 2019(r349065) @@ -234,17 +234,25 @@ DEBUG_FILES_CFLAGS?= -g .if ${MK_WARNS} != "no" CFLAGS+= ${CWARNFLAGS:M*} ${CWARNFLAGS.${COMPILER_TYPE}} CFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} +CFLAGS+= ${CWARNFLAGS.${.TARGET:T}} .endif CFLAGS+=${CFLAGS.${COMPILER_TYPE}} CXXFLAGS+= ${CXXFLAGS.${COMPILER_TYPE}} AFLAGS+= ${AFLAGS.${.IMPSRC:T}} +AFLAGS+= ${AFLAGS.${.TARGET:T}} ACFLAGS+= ${ACFLAGS.${.IMPSRC:T}} +ACFLAGS+= ${ACFLAGS.${.TARGET:T}} CFLAGS+= ${CFLAGS.${.IMPSRC:T}} +CFLAGS+= ${CFLAGS.${.TARGET:T}} CXXFLAGS+= ${CXXFLAGS.${.IMPSRC:T}} +CXXFLAGS+= ${CXXFLAGS.${.TARGET:T}} LDFLAGS+= ${LDFLAGS.${LINKER_TYPE}} +LDFLAGS+= ${LDFLAGS.${.TARGET:T}} +LDADD+=${LDADD.${.TARGET:T}} +LIBADD+= ${LIBADD.${.TARGET:T}} .if defined(SRCTOP) # Prevent rebuilding during install to support read-only objdirs. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r349069 - head/gnu/lib/csu
Author: bdrewery Date: Sat Jun 15 17:08:39 2019 New Revision: 349069 URL: https://svnweb.freebsd.org/changeset/base/349069 Log: csu: Add proper .depend tracking for each object. This doesn't appear to have ever worked. After a .depend is generated there will be duplicate .c dependencies so only use the first one. MFC after:2 weeks Sponsored by: DellEMC Modified: head/gnu/lib/csu/Makefile Modified: head/gnu/lib/csu/Makefile == --- head/gnu/lib/csu/Makefile Sat Jun 15 17:08:35 2019(r349068) +++ head/gnu/lib/csu/Makefile Sat Jun 15 17:08:39 2019(r349069) @@ -14,6 +14,7 @@ CCDIR=${SRCTOP}/gnu/usr.bin/cc SRCS= crtstuff.c ${COMMONHDRS} OBJS= crtbegin.o crtend.o crtbeginT.o SOBJS= crtbeginS.o crtendS.o +DEPENDOBJS+= ${OBJS} ${SOBJS} CSTD?= gnu89 CFLAGS+= -DIN_GCC -DHAVE_LD_EH_FRAME_HDR -DDT_CONFIG -D__GLIBC__=3 CFLAGS.gcc+= -finhibit-size-directive -fno-toplevel-reorder ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r349064 - head/share/mk
Author: bdrewery Date: Sat Jun 15 17:08:21 2019 New Revision: 349064 URL: https://svnweb.freebsd.org/changeset/base/349064 Log: Avoid generating DEPENDFILES='.depend.' when there's no DEPENDOBJS. MFC after:2 weeks Sponsored by: DellEMC Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk == --- head/share/mk/bsd.dep.mkSat Jun 15 17:08:18 2019(r349063) +++ head/share/mk/bsd.dep.mkSat Jun 15 17:08:21 2019(r349064) @@ -186,7 +186,9 @@ DEPENDSRCS+=${DPSRCS:M*.[cSC]} ${SRCS:M*.cxx} ${SRCS: .if !empty(DEPENDSRCS) DEPENDOBJS+= ${DEPENDSRCS:${OBJS_SRCS_FILTER:ts:}:S,$,.o,} .endif +.if !empty(DEPENDOBJS) DEPENDFILES+= ${DEPENDOBJS:O:u:${DEPEND_FILTER}:C/^/${DEPENDFILE}./} +.endif .if defined(_SKIP_DEPEND) # Don't bother statting any .meta files for .depend* ${DEPENDOBJS}: .NOMETA ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r349062 - in head: bin/csh bin/sh lib/libmagic lib/ncurses/ncurses share/syscons/scrnmaps usr.bin/awk usr.bin/vi/catalog
Author: bdrewery Date: Sat Jun 15 17:08:13 2019 New Revision: 349062 URL: https://svnweb.freebsd.org/changeset/base/349062 Log: Fix .depend files to work for build tools. This is somewhat of a follow-up to r335746. MFC after:2 weeks Sponsored by: DellEMC Modified: head/bin/csh/Makefile head/bin/sh/Makefile head/lib/libmagic/Makefile head/lib/ncurses/ncurses/Makefile head/share/syscons/scrnmaps/Makefile head/usr.bin/awk/Makefile head/usr.bin/vi/catalog/Makefile Modified: head/bin/csh/Makefile == --- head/bin/csh/Makefile Sat Jun 15 17:08:02 2019(r349061) +++ head/bin/csh/Makefile Sat Jun 15 17:08:13 2019(r349062) @@ -117,6 +117,7 @@ csh.1: tcsh.man build-tools: gethost +DEPENDOBJS+= gethost gethost: gethost.c sh.err.h tc.const.h sh.h ${BUILD_TOOLS_META} @rm -f ${.TARGET} ${CC:N${CCACHE_BIN}} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \ Modified: head/bin/sh/Makefile == --- head/bin/sh/MakefileSat Jun 15 17:08:02 2019(r349061) +++ head/bin/sh/MakefileSat Jun 15 17:08:13 2019(r349062) @@ -48,6 +48,7 @@ builtins.h: .NOMETA builtins.c builtins.h: mkbuiltins builtins.def sh ${.CURDIR}/mkbuiltins ${.CURDIR} +DEPENDOBJS+= mknodes mksyntax mknodes mksyntax: ${BUILD_TOOLS_META} .ORDER: nodes.c nodes.h Modified: head/lib/libmagic/Makefile == --- head/lib/libmagic/Makefile Sat Jun 15 17:08:02 2019(r349061) +++ head/lib/libmagic/Makefile Sat Jun 15 17:08:13 2019(r349062) @@ -41,10 +41,11 @@ magic.mgc: mkmagic magic ${BTOOLSPATH:U.}/mkmagic magic CLEANFILES+= mkmagic +DEPENDOBJS+= mkmagic build-tools: mkmagic mkmagic: apprentice.c cdf_time.c encoding.c funcs.c magic.c print.c ${INCS} ${BUILD_TOOLS_META} - ${CC:N${CCACHE_BIN}} ${CFLAGS} -DCOMPILE_ONLY ${LDFLAGS} -o ${.TARGET} ${.ALLSRC:N*.h} \ - ${LDADD} + ${CC:N${CCACHE_BIN}} ${CFLAGS} -DCOMPILE_ONLY ${LDFLAGS} -o ${.TARGET} \ + ${.ALLSRC:N*.h:O:u} ${LDADD} FILEVER!= awk '$$1 == "\#define" && $$2 == "VERSION" { print $$3; exit }' \ ${.CURDIR}/config.h Modified: head/lib/ncurses/ncurses/Makefile == --- head/lib/ncurses/ncurses/Makefile Sat Jun 15 17:08:02 2019 (r349061) +++ head/lib/ncurses/ncurses/Makefile Sat Jun 15 17:08:13 2019 (r349062) @@ -389,6 +389,7 @@ keys.list: MKkeys_list.sh Caps ${NCURSES_DIR}/include/Caps | LC_ALL=C sort > keys.list # Build tools +DEPENDOBJS+= make_hash make_keys build-tools: make_hash make_keys make_keys: make_keys.c names.c ncurses_def.h ${HEADERS} ${BUILD_TOOLS_META} Modified: head/share/syscons/scrnmaps/Makefile == --- head/share/syscons/scrnmaps/MakefileSat Jun 15 17:08:02 2019 (r349061) +++ head/share/syscons/scrnmaps/MakefileSat Jun 15 17:08:13 2019 (r349062) @@ -12,6 +12,7 @@ CLEANFILES+= ${SCRMAPS_MK} ${SCRMAPS} FILES= ${SCRMAPS} FILESDIR= ${SHAREDIR}/syscons/scrnmaps +DEPENDOBJS+= ${SCRMAPS_MK} build-tools: ${SCRMAPS_MK} ${SCRMAPS}: ${.TARGET:R}.mk Modified: head/usr.bin/awk/Makefile == --- head/usr.bin/awk/Makefile Sat Jun 15 17:08:02 2019(r349061) +++ head/usr.bin/awk/Makefile Sat Jun 15 17:08:13 2019(r349062) @@ -27,6 +27,7 @@ ytab.h: awkgram.c awkgram.h .NOMETA proctab.c: maketab ${BTOOLSPATH:U.}/maketab awkgram.h > proctab.c +DEPENDOBJS+= maketab build-tools: maketab maketab: ytab.h maketab.c ${BUILD_TOOLS_META} Modified: head/usr.bin/vi/catalog/Makefile == --- head/usr.bin/vi/catalog/MakefileSat Jun 15 17:08:02 2019 (r349061) +++ head/usr.bin/vi/catalog/MakefileSat Jun 15 17:08:13 2019 (r349062) @@ -105,8 +105,8 @@ english.base: dump ${SCAN} #Makefile sort -nu > $@ -dump: dump.c ${BUILD_TOOLS_META} - ${CC:N${CCACHE_BIN}} -o ${.TARGET} ${.ALLSRC} +DEPENDOBJS+= dump +dump: ${BUILD_TOOLS_META} CLEANFILES+= dump ${CAT} english.base *.check __ck1 __ck2 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r349066 - head/share/mk
Author: bdrewery Date: Sat Jun 15 17:08:28 2019 New Revision: 349066 URL: https://svnweb.freebsd.org/changeset/base/349066 Log: META_MODE: Delete build targets that fail. If a meta mode change is triggered but then the build fails then the next build will not retrigger meta mode. This only prevented by removing the target on rebuild or on the failure to rebuild. Sponsored by: DellEMC Modified: head/share/mk/local.sys.mk Modified: head/share/mk/local.sys.mk == --- head/share/mk/local.sys.mk Sat Jun 15 17:08:24 2019(r349065) +++ head/share/mk/local.sys.mk Sat Jun 15 17:08:28 2019(r349066) @@ -33,6 +33,11 @@ MAKE_PRINT_VAR_ON_ERROR+= \ OBJTOP \ ${MAKE_PRINT_VAR_ON_ERROR_XTRAS} +# Meta mode may rebuild targets that then fail. The next build won't detect +# the meta mode change. Not all targets have a 'rm ${.TARGET}' in them +# so force it. +.DELETE_ON_ERROR: + .if ${.MAKE.LEVEL} > 0 MAKE_PRINT_VAR_ON_ERROR += .MAKE.MAKEFILES .PATH .endif ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r349067 - in head: gnu/lib/csu gnu/lib/libgcc gnu/lib/libgcov lib/csu
Author: bdrewery Date: Sat Jun 15 17:08:32 2019 New Revision: 349067 URL: https://svnweb.freebsd.org/changeset/base/349067 Log: Support reading in .depend files. This is for an upcoming change that fixes .depend handling in here. It will cause some duplicate sources which need to be trimmed out. MFC after:2 weeks Sponsored by: DellEMC Modified: head/gnu/lib/csu/Makefile head/gnu/lib/libgcc/Makefile head/gnu/lib/libgcov/Makefile head/lib/csu/Makefile.inc Modified: head/gnu/lib/csu/Makefile == --- head/gnu/lib/csu/Makefile Sat Jun 15 17:08:28 2019(r349066) +++ head/gnu/lib/csu/Makefile Sat Jun 15 17:08:32 2019(r349067) @@ -49,23 +49,23 @@ CLEANFILES= ${OBJS} ${SOBJS} ${TGTOBJS} crtbegin.o:${BEGINSRC} ${CC} ${CFLAGS} -g0 -DCRT_BEGIN \ - -c -o ${.TARGET} ${.ALLSRC:N*.h} + -c -o ${.TARGET} ${.ALLSRC:N*.h:[1]} crtbeginT.o: ${BEGINSRC} ${CC} ${CFLAGS} -g0 -DCRT_BEGIN -DCRTSTUFFT_O \ - -c -o ${.TARGET} ${.ALLSRC:N*.h} + -c -o ${.TARGET} ${.ALLSRC:N*.h:[1]} crtbeginS.o: ${BEGINSRC} ${CC} ${CFLAGS} -g0 -DCRT_BEGIN ${CRTS_CFLAGS} \ - -c -o ${.TARGET} ${.ALLSRC:N*.h} + -c -o ${.TARGET} ${.ALLSRC:N*.h:[1]} crtend.o: ${ENDSRC} ${CC} ${CFLAGS} -g0 -DCRT_END \ - -c -o ${.TARGET} ${.ALLSRC:N*.h} + -c -o ${.TARGET} ${.ALLSRC:N*.h:[1]} crtendS.o: ${ENDSRC} ${CC} ${CFLAGS} -g0 -DCRT_END ${CRTS_CFLAGS} \ - -c -o ${.TARGET} ${.ALLSRC:N*.h} + -c -o ${.TARGET} ${.ALLSRC:N*.h:[1]} COMMONHDRS+= tm.h tconfig.h options.h CLEANFILES+= ${COMMONHDRS} optionlist cs-tconfig.h cs-tm.h Modified: head/gnu/lib/libgcc/Makefile == --- head/gnu/lib/libgcc/MakefileSat Jun 15 17:08:28 2019 (r349066) +++ head/gnu/lib/libgcc/MakefileSat Jun 15 17:08:32 2019 (r349067) @@ -224,11 +224,11 @@ ${T}_OBJS_S = ${${T}_FUNCS:S/$/.pico/} SOBJS += ${${T}_FUNCS:S/$/.pico/} ${${T}_OBJS_T}: ${${T}_CFILE} ${COMMONHDRS} - ${CC_T} ${${T}_CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c} + ${CC_T} ${${T}_CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c:[1]} ${${T}_OBJS_P}: ${${T}_CFILE} ${COMMONHDRS} - ${CC_P} ${${T}_CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c} + ${CC_P} ${${T}_CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c:[1]} ${${T}_OBJS_S}: ${${T}_CFILE} ${COMMONHDRS} - ${CC_S} ${${T}_CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c} + ${CC_S} ${${T}_CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c:[1]} .endfor #--- @@ -249,9 +249,9 @@ STAT_OBJS_P = ${SYMS_ST:S/$/.po/} STATICOBJS = ${SYMS_ST:S/$/.o/} ${STAT_OBJS_T}:${STD_CFILE} ${COMMONHDRS} - ${CC_T} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c} + ${CC_T} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c:[1]} ${STAT_OBJS_P}:${STD_CFILE} ${COMMONHDRS} - ${CC_P} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c} + ${CC_P} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c:[1]} #--- # Modified: head/gnu/lib/libgcov/Makefile == --- head/gnu/lib/libgcov/Makefile Sat Jun 15 17:08:28 2019 (r349066) +++ head/gnu/lib/libgcov/Makefile Sat Jun 15 17:08:32 2019 (r349067) @@ -51,16 +51,16 @@ CLEANFILES+=${COMMONHDRS} cs-tm.h cs-tconfig.h option ${OBJS} beforedepend: ${COMMONHDRS} ${OBJS_T}: libgcov.c - ${CC_T} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c} + ${CC_T} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c:[1]} .if !defined(NO_PIC) ${OBJS_S}: libgcov.c - ${CC_S} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c} + ${CC_S} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c:[1]} .endif .if ${MK_PROFILE} != "no" ${OBJS_P}: libgcov.c - ${CC_P} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c} + ${CC_P} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c:[1]} .endif .include Modified: head/lib/csu/Makefile.inc == --- head/lib/csu/Makefile.inc Sat Jun 15 17:08:28 2019(r349066) +++ head/lib/csu/Makefile.inc Sat Jun 15 17:08:32 2019(r349067) @@ -22,10 +22,11 @@ crtend.o: crtend.c crtendS.o: crtend.c crtbegin.o crtend.o crtbeginT.o: - ${CC} ${CFLAGS} -I${.CURDIR} -c -o ${.TARGET} ${.ALLSRC} + ${CC} ${CFLAGS} -I${.CURDIR} -c -o ${.TARGET} ${.ALLSRC:N*.h:[1]} crtbeginS.o crtendS.o: - ${CC} ${CFLAGS} -I${.CURDIR} ${CFLAGS_CRTS} -c -o ${.TARGET} ${.ALLSRC} + ${CC} ${CFLAGS} -I${.CURDIR} ${CFLAGS_CRTS} -c -o
svn commit: r349061 - head/share/mk
Author: bdrewery Date: Sat Jun 15 17:08:02 2019 New Revision: 349061 URL: https://svnweb.freebsd.org/changeset/base/349061 Log: Don't force OBJS_DEPEND_GUESS headers onto all objects. This is in the case of not having any .depend.foo.o yet. Don't force add *.h as a dependency for those. They are built in beforebuild already when in SRCS/DPSRCS. This change allows custom rules, like in bin/sh/Makefile for mksyntax, to not have cyclic dependency problems when connected to the .depend.* handling. This is purposely not copied to sys/conf/kern.post.mk as it handles generating headers slightly differently. MFC after:2 weeks Sponsored by: DellEMC Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk == --- head/share/mk/bsd.dep.mkSat Jun 15 16:59:03 2019(r349060) +++ head/share/mk/bsd.dep.mkSat Jun 15 17:08:02 2019(r349061) @@ -251,18 +251,17 @@ _depfile= ${.OBJDIR}/${_meta_obj} .else _depfile= ${.OBJDIR}/${_dep_obj} .endif -.if !exists(${_depfile}) -${__obj}: ${OBJS_DEPEND_GUESS} -${__obj}: ${OBJS_DEPEND_GUESS.${__obj}} -.elif defined(_meta_filemon) -# For meta mode we still need to know which file to depend on to avoid -# ambiguous suffix transformation rules from .PATH. Meta mode does not -# use .depend files. We really only need source files, not headers since -# they are typically in SRCS/beforebuild already. For target-specific -# guesses do include headers though since they may not be in SRCS. +.if !exists(${_depfile}) || defined(_meta_filemon) +# - Headers are normally built in beforebuild when included in DPSRCS or SRCS. +# So we don't need it as a guessed dependency (it may lead to cyclic problems +# if custom rules are defined). The only time this causes a problem is when +# 'make foo.o' is ran. +# - For meta mode we still need to know which file to depend on to avoid +# ambiguous suffix transformation rules from .PATH. Meta mode does not +# use .depend files when filemon is in use. ${__obj}: ${OBJS_DEPEND_GUESS:N*.h} ${__obj}: ${OBJS_DEPEND_GUESS.${__obj}} -.endif # !exists(${_depfile}) +.endif # !exists(${_depfile}) || defined(_meta_filemon) .endfor # Always run 'make depend' to generate dependencies early and to avoid the ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r349063 - head/share/mk
Author: bdrewery Date: Sat Jun 15 17:08:18 2019 New Revision: 349063 URL: https://svnweb.freebsd.org/changeset/base/349063 Log: Similar to r335710 avoid ccache when linking a .cc file directly. Sponsored by: DellEMC Modified: head/share/mk/bsd.suffixes.mk Modified: head/share/mk/bsd.suffixes.mk == --- head/share/mk/bsd.suffixes.mk Sat Jun 15 17:08:13 2019 (r349062) +++ head/share/mk/bsd.suffixes.mk Sat Jun 15 17:08:18 2019 (r349063) @@ -19,7 +19,7 @@ ${CC} -emit-llvm ${IR_CFLAGS} -S ${.IMPSRC} -o ${.TARGET} .cc .cpp .cxx .C: - ${CXX} ${CXXFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} + ${CXX:N${CCACHE_BIN}} ${CXXFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} .cc.o .cpp.o .cxx.o .C.o: ${CXX} ${STATIC_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r349005 - head/sys/modules/ocs_fc
Author: bdrewery Date: Wed Jun 12 23:09:10 2019 New Revision: 349005 URL: https://svnweb.freebsd.org/changeset/base/349005 Log: Don't delete .depend files outside of cleandepend. Sponsored by: DellEMC Modified: head/sys/modules/ocs_fc/Makefile Modified: head/sys/modules/ocs_fc/Makefile == --- head/sys/modules/ocs_fc/MakefileWed Jun 12 21:10:37 2019 (r349004) +++ head/sys/modules/ocs_fc/MakefileWed Jun 12 23:09:10 2019 (r349005) @@ -41,6 +41,6 @@ SRCS += ocs_cam.c CINCS = -I. -CLEANFILES += ${PROG}.debug ${PROG}.symbols cscope.* .depend.* +CLEANFILES += ${PROG}.debug ${PROG}.symbols cscope.* .include ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r348979 - in head/sys/modules: iwmfw iwnfw mwlfw ralfw rtwnfw usb/rsufw usb/runfw
Author: bdrewery Date: Wed Jun 12 00:03:00 2019 New Revision: 348979 URL: https://svnweb.freebsd.org/changeset/base/348979 Log: Stop using .OODATE for extracting firmware. This fixes META_MODE rebuilding since it assumes that it this is a non-consistent build command. These are always unencoded consistently though and do not need to use the .OODATE/$? mechanism. MFC after:2 weeks Reported by: npn Sponsored by: DellEMC Modified: head/sys/modules/iwmfw/Makefile.inc head/sys/modules/iwnfw/Makefile.inc head/sys/modules/mwlfw/Makefile head/sys/modules/ralfw/Makefile.inc head/sys/modules/rtwnfw/Makefile.inc head/sys/modules/usb/rsufw/Makefile.inc head/sys/modules/usb/runfw/Makefile Modified: head/sys/modules/iwmfw/Makefile.inc == --- head/sys/modules/iwmfw/Makefile.inc Tue Jun 11 23:46:31 2019 (r348978) +++ head/sys/modules/iwmfw/Makefile.inc Wed Jun 12 00:03:00 2019 (r348979) @@ -15,4 +15,4 @@ FIRMWS= ${_FIRM}:${KMOD} #FIRMWARE_LICENSE= ${_FIRM}: ${SRCTOP}/sys/contrib/dev/iwm/${_FIRM}.uu - uudecode -p $? > ${.TARGET} + uudecode -p ${.ALLSRC} > ${.TARGET} Modified: head/sys/modules/iwnfw/Makefile.inc == --- head/sys/modules/iwnfw/Makefile.inc Tue Jun 11 23:46:31 2019 (r348978) +++ head/sys/modules/iwnfw/Makefile.inc Wed Jun 12 00:03:00 2019 (r348979) @@ -15,4 +15,4 @@ FIRMWS= ${_FIRM}:${KMOD} #FIRMWARE_LICENSE= ${_FIRM}: ${SRCTOP}/sys/contrib/dev/iwn/${_FIRM}.uu - uudecode -p $? > ${.TARGET} + uudecode -p ${.ALLSRC} > ${.TARGET} Modified: head/sys/modules/mwlfw/Makefile == --- head/sys/modules/mwlfw/Makefile Tue Jun 11 23:46:31 2019 (r348978) +++ head/sys/modules/mwlfw/Makefile Wed Jun 12 00:03:00 2019 (r348979) @@ -6,9 +6,9 @@ FIRMWS= mw88W8363.fw:mw88W8363fw mwlboot.fw:mwlboot CLEANFILES+= mw88W8363.fw mwlboot.fw mw88W8363.fw: ${SRCTOP}/sys/contrib/dev/mwl/mw88W8363.fw.uu - uudecode -p $? > ${.TARGET} + uudecode -p ${.ALLSRC} > ${.TARGET} mwlboot.fw: ${SRCTOP}/sys/contrib/dev/mwl/mwlboot.fw.uu - uudecode -p $? > ${.TARGET} + uudecode -p ${.ALLSRC} > ${.TARGET} .include Modified: head/sys/modules/ralfw/Makefile.inc == --- head/sys/modules/ralfw/Makefile.inc Tue Jun 11 23:46:31 2019 (r348978) +++ head/sys/modules/ralfw/Makefile.inc Wed Jun 12 00:03:00 2019 (r348979) @@ -12,4 +12,4 @@ CLEANFILES+= ${_FIRM} FIRMWS=${_FIRM}:${KMOD} ${_FIRM}: ${SRCTOP}/sys/contrib/dev/ral/${_FIRM}.uu - uudecode -p $? > ${.TARGET} + uudecode -p ${.ALLSRC} > ${.TARGET} Modified: head/sys/modules/rtwnfw/Makefile.inc == --- head/sys/modules/rtwnfw/Makefile.incTue Jun 11 23:46:31 2019 (r348978) +++ head/sys/modules/rtwnfw/Makefile.incWed Jun 12 00:03:00 2019 (r348979) @@ -12,4 +12,4 @@ FIRMWS= ${_FIRM}:${KMOD}:111 # FIRMWARE_LICENSE=realtek ${_FIRM}: ${SRCTOP}/sys/contrib/dev/rtwn/${_FIRM}.uu - uudecode -p $? > ${.TARGET} + uudecode -p ${.ALLSRC} > ${.TARGET} Modified: head/sys/modules/usb/rsufw/Makefile.inc == --- head/sys/modules/usb/rsufw/Makefile.inc Tue Jun 11 23:46:31 2019 (r348978) +++ head/sys/modules/usb/rsufw/Makefile.inc Wed Jun 12 00:03:00 2019 (r348979) @@ -12,4 +12,4 @@ FIRMWS= ${_FIRM}:${KMOD}:120 # FIRMWARE_LICENSE=realtek ${_FIRM}: ${SRCTOP}/sys/contrib/dev/rsu/${_FIRM}.uu - uudecode -p $? > ${.TARGET} + uudecode -p ${.ALLSRC} > ${.TARGET} Modified: head/sys/modules/usb/runfw/Makefile == --- head/sys/modules/usb/runfw/Makefile Tue Jun 11 23:46:31 2019 (r348978) +++ head/sys/modules/usb/runfw/Makefile Wed Jun 12 00:03:00 2019 (r348979) @@ -6,6 +6,6 @@ FIRMWS= run.fw:runfw:1 CLEANFILES=run.fw run.fw: ${SRCTOP}/sys/contrib/dev/run/rt2870.fw.uu - uudecode -p $? > ${.TARGET} + uudecode -p ${.ALLSRC} > ${.TARGET} .include ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r348976 - head/sys/modules/efirt
Author: bdrewery Date: Tue Jun 11 23:35:49 2019 New Revision: 348976 URL: https://svnweb.freebsd.org/changeset/base/348976 Log: Add missing DPSRCS entry for assym.inc. This brings in various CLEANFILES/DEPENDOBJS handling. MFC after:2 weeks Sponsored by: DellEMC Modified: head/sys/modules/efirt/Makefile Modified: head/sys/modules/efirt/Makefile == --- head/sys/modules/efirt/Makefile Tue Jun 11 23:35:34 2019 (r348975) +++ head/sys/modules/efirt/Makefile Tue Jun 11 23:35:49 2019 (r348976) @@ -11,6 +11,7 @@ SRCS+= device_if.h bus_if.h clock_if.h .if ${MACHINE_CPUARCH} == "amd64" SRCS+= opt_hwpmc_hooks.h opt_kstack_pages.h SRCS+= efirt_support.S +DPSRCS+= assym.inc efirt_support.o: efirt_support.S assym.inc ${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \ ${.IMPSRC} -o ${.TARGET} ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r348975 - head/sys/conf
Author: bdrewery Date: Tue Jun 11 23:35:34 2019 New Revision: 348975 URL: https://svnweb.freebsd.org/changeset/base/348975 Log: Restore genassym.o to CLEANFILES. This was lost in r335910 for some reason. This also fixes a META_MODE rebuild issue in some modules [1]. MFC after:2 weeks Reported by: npn [1] Sponsored by: DellEMC Modified: head/sys/conf/kmod.mk Modified: head/sys/conf/kmod.mk == --- head/sys/conf/kmod.mk Tue Jun 11 23:28:07 2019(r348974) +++ head/sys/conf/kmod.mk Tue Jun 11 23:35:34 2019(r348975) @@ -500,7 +500,7 @@ acpi_quirks.h: ${SYSDIR}/tools/acpi_quirks2h.awk ${SYS .endif .if !empty(SRCS:Massym.inc) || !empty(DPSRCS:Massym.inc) -CLEANFILES+= assym.inc +CLEANFILES+= assym.inc genassym.o DEPENDOBJS+= genassym.o DPSRCS+= offset.inc .endif ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r348877 - head/share/mk
Author: bdrewery Date: Mon Jun 10 19:38:35 2019 New Revision: 348877 URL: https://svnweb.freebsd.org/changeset/base/348877 Log: DPSRCS need to be built before recursing. MFC after:2 weeks Sponsored by: DellEMC Modified: head/share/mk/bsd.progs.mk Modified: head/share/mk/bsd.progs.mk == --- head/share/mk/bsd.progs.mk Mon Jun 10 19:26:57 2019(r348876) +++ head/share/mk/bsd.progs.mk Mon Jun 10 19:38:35 2019(r348877) @@ -95,7 +95,7 @@ $v = # Find common sources among the PROGS to depend on them before building # anything. This allows parallelization without them each fighting over # the same objects. -_PROGS_COMMON_SRCS= +_PROGS_COMMON_SRCS= ${DPSRCS} _PROGS_ALL_SRCS= .for p in ${PROGS} .for s in ${SRCS.${p}} ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r347638 - in head: . etc lib/libc/gen
usr.sbin/etcupdate/tests/preworld_test.sh: $SRC/etc/master.passwd usr.sbin/mergemaster/mergemaster.sh: cp -p ${SOURCEDIR}/etc/master.passwd ${TEMPROOT}/etc && I suspect there are more places than these 2 that need to be fixed still. This was a very lazy grep. Sadly I think it should be reverted until further tool analysis is done. Both internal and external. Why a subdir of libc rather than just libc/? This is very oddly placed. Is there a libc-gen package? On 2019-05-16 11:05, Conrad Meyer wrote: Hi Brad, Can you revert this? It seems to break every config-management tool we have (mergemaster, etcupdate, beinstall ...). Additionally, I don't believe this move has been justified — the cons seem to outweigh the pros, if there are any. I skimmed the differential and it was not immediately obvious what the benefit was. The commit message describes what was changed, but not *why* you thought it was a good idea. Thanks, Conrad On Wed, May 15, 2019 at 6:09 PM Brad Davis wrote: Author: brd Date: Thu May 16 01:09:13 2019 New Revision: 347638 URL: https://svnweb.freebsd.org/changeset/base/347638 Log: Move master.passwd and group to lib/libc/gen/ libc was picked as the destination location for these because of the syscalls that use these files as the lowest level place they are referenced. Approved by: will (mentor), rgrimes, manu Differential Revision:https://reviews.freebsd.org/D16728 Added: head/lib/libc/gen/group - copied unchanged from r347637, head/etc/group head/lib/libc/gen/master.passwd - copied unchanged from r347637, head/etc/master.passwd Deleted: head/etc/group head/etc/master.passwd Modified: head/Makefile.inc1 head/etc/Makefile head/lib/libc/gen/Makefile.inc Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Thu May 16 00:53:54 2019(r347637) +++ head/Makefile.inc1 Thu May 16 01:09:13 2019(r347638) @@ -871,8 +871,8 @@ DB_FROM_SRC=yes .endif .if defined(DB_FROM_SRC) -INSTALLFLAGS+= -N ${.CURDIR}/etc -MTREEFLAGS+= -N ${.CURDIR}/etc +INSTALLFLAGS+= -N ${.CURDIR}/lib/libc/gen +MTREEFLAGS+= -N ${.CURDIR}/lib/libc/gen .endif _INSTALL_DDIR= ${DESTDIR}/${DISTDIR} INSTALL_DDIR= ${_INSTALL_DDIR:S://:/:g:C:/$::} Modified: head/etc/Makefile == --- head/etc/Makefile Thu May 16 00:53:54 2019(r347637) +++ head/etc/Makefile Thu May 16 01:09:13 2019(r347638) @@ -15,7 +15,6 @@ SUBDIR+=sendmail .endif BIN1= \ - group \ login.access \ rc.bsdextended \ rc.firewall \ @@ -65,21 +64,7 @@ distribution: .endif cd ${.CURDIR}; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ - ${BIN1} ${DESTDIR}/etc; \ - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ - master.passwd ${DESTDIR}/etc; - -.if ${MK_TCSH} == "no" - sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd -.endif - pwd_mkdb -i -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd -.if defined(NO_ROOT) - ( \ - echo "./etc/passwd type=file mode=0644 uname=root gname=wheel"; \ - echo "./etc/pwd.db type=file mode=0644 uname=root gname=wheel"; \ - echo "./etc/spwd.db type=file mode=0600 uname=root gname=wheel"; \ - ) | ${METALOG.add} -.endif + ${BIN1} ${DESTDIR}/etc ${_+_}cd ${.CURDIR}/gss; ${MAKE} install ${_+_}cd ${.CURDIR}/mtree; ${MAKE} install ${_+_}cd ${SRCTOP}/share/termcap; ${MAKE} etc-termcap Modified: head/lib/libc/gen/Makefile.inc == --- head/lib/libc/gen/Makefile.inc Thu May 16 00:53:54 2019 (r347637) +++ head/lib/libc/gen/Makefile.inc Thu May 16 01:09:13 2019 (r347638) @@ -4,7 +4,8 @@ # machine-independent gen sources .PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/gen ${LIBC_SRCTOP}/gen -CONFS= shells +CONFS+=group master.passwd shells +CONFSMODE_master.passwd= 600 SRCS+= __getosreldate.c \ __pthread_mutex_init_calloc_cb_stub.c \ @@ -543,3 +544,16 @@ MLINKS+=vis.3 nvis.3 \ vis.3 svis.3 MLINKS+=wordexp.3 wordfree.3 + +afterinstallconfig: +.if ${MK_TCSH} == "no" + sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd +.endif + pwd_mkdb -i -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd +.if defined(NO_ROOT) && defined(METALOG) + ( \ + echo "./etc/pwd.db type=file mode=0644 uname=root gname=wheel"; \ + echo "./etc/spwd.db type=file mode=0600 uname=root gname=wheel"; \ + echo "./etc/passwd type=file mode=0644 uname=root gname=wheel"; \ + ) | cat -l >> ${METALOG} +.endif Copied: head/lib/libc/gen/group (from r347637, head/etc/group)
svn commit: r347458 - head/sys/conf
Author: bdrewery Date: Fri May 10 18:09:27 2019 New Revision: 347458 URL: https://svnweb.freebsd.org/changeset/base/347458 Log: Fix build race with machine links and genoffset.o. Generate the ilinks for all dependency objects not just the ones in the CLEAN list. Possibly related to r345351 Reported by: kmoore MFC after:2 weeks X-MFC-with: r345351 Sponsored by: Dell EMC Isilon Modified: head/sys/conf/kern.post.mk Modified: head/sys/conf/kern.post.mk == --- head/sys/conf/kern.post.mk Fri May 10 17:31:50 2019(r347457) +++ head/sys/conf/kern.post.mk Fri May 10 18:09:27 2019(r347458) @@ -357,7 +357,7 @@ _ILINKS+= x86 # Ensure that debug info references the path in the source tree. .for _link in ${_ILINKS} .if !exists(${.OBJDIR}/${_link}) -${SRCS} ${CLEAN:M*.o}: ${_link} +${SRCS} ${DEPENDOBJS}: ${_link} .endif .if defined(_MAP_DEBUG_PREFIX) .if ${_link} == "machine" ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r346255 - head/usr.bin/jot
Author: bdrewery Date: Tue Apr 16 00:41:22 2019 New Revision: 346255 URL: https://svnweb.freebsd.org/changeset/base/346255 Log: Fix 'jot -r 0 start end' to work. This allows an endless stream of random data within the given bounds. It already worked if a seed was provided as the 4th argument but not if one was left out. In collaboration with:jhb MFC after:2 weeks Relnotes: yes Modified: head/usr.bin/jot/jot.c Modified: head/usr.bin/jot/jot.c == --- head/usr.bin/jot/jot.c Mon Apr 15 21:20:06 2019(r346254) +++ head/usr.bin/jot/jot.c Tue Apr 16 00:41:22 2019(r346255) @@ -263,12 +263,15 @@ main(int argc, char **argv) mask = 0; break; case HAVE_REPS | HAVE_BEGIN | HAVE_ENDER: - if (reps == 0) - errx(1, "infinite sequences cannot be bounded"); - else if (reps == 1) - s = 0.0; - else - s = (ender - begin) / (reps - 1); + if (!randomize) { + if (reps == 0) + errx(1, "infinite sequences cannot " + "be bounded"); + else if (reps == 1) + s = 0.0; + else + s = (ender - begin) / (reps - 1); + } mask = 0; break; case HAVE_REPS | HAVE_BEGIN | HAVE_ENDER | HAVE_STEP: ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r345351 - head/sys/conf
Author: bdrewery Date: Wed Mar 20 22:49:41 2019 New Revision: 345351 URL: https://svnweb.freebsd.org/changeset/base/345351 Log: Build common kernel dependencies before modules. This ensures files like genassym.o and awk/mfiles are generated before descending into the modules build. It may also allow some module builds to not recreate files that are already present in the KERNBUILDDIR. This fixes a rare build race where genassym.o is missing and assym.inc is empty. More work is planned around this to reduce some redundant dependency generation in modules. PR: 29 MFC after:2 weeks Reported by: markj Modified: head/sys/conf/kern.post.mk Modified: head/sys/conf/kern.post.mk == --- head/sys/conf/kern.post.mk Wed Mar 20 21:48:43 2019(r345350) +++ head/sys/conf/kern.post.mk Wed Mar 20 22:49:41 2019(r345351) @@ -140,6 +140,8 @@ kernel-obj: .if !defined(NO_MODULES) modules: modules-all +modules-depend: beforebuild +modules-all: beforebuild .if !defined(NO_MODULES_OBJ) modules-all modules-depend: modules-obj ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r344666 - head/tools/build/mk
Author: bdrewery Date: Thu Feb 28 20:48:18 2019 New Revision: 344666 URL: https://svnweb.freebsd.org/changeset/base/344666 Log: bsd.nls.mk isn't optional. It is protected by MK_NLS. If it should really be optional then it needs to be documented as such in share/mk/bsd.README and .sinclude used where needed. This fixes a regression from r335011. PR: 232527 Submitted by: jar...@downtools.com.au Reported by: ktulla...@gmail.com MFC after:3 days Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc == --- head/tools/build/mk/OptionalObsoleteFiles.inc Thu Feb 28 20:43:03 2019(r344665) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Thu Feb 28 20:48:18 2019(r344666) @@ -6603,7 +6603,6 @@ OLD_DIRS+=var/yp .if ${MK_NLS} == no OLD_DIRS+=usr/share/nls/ OLD_DIRS+=usr/share/nls/C -OLD_FILES+=usr/share/mk/bsd.nls.mk OLD_FILES+=usr/share/nls/C/ee.cat OLD_DIRS+=usr/share/nls/af_ZA.ISO8859-1 OLD_DIRS+=usr/share/nls/af_ZA.ISO8859-15 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r343881 - head/lib/libutil
On 2/7/19 1:51 PM, Sean Eric Fagan wrote: > Author: sef > Date: Thu Feb 7 21:51:39 2019 > New Revision: 343881 > URL: https://svnweb.freebsd.org/changeset/base/343881 > > Log: > r339008 broke repquota for UFS. This rectifies that. > > Refactor the function calls and tests so that, on UFS, the proper fields > are filled out. > > PR: 233849 > Reported by:Andre Albsmeier > Reviewed by:mav, delphij > MFC after: 1 month > Sponsored by: iXsystems Inc > Differential Revision: https://reviews.freebsd.org/D18785 > > Modified: > head/lib/libutil/quotafile.c > > Modified: head/lib/libutil/quotafile.c > == > --- head/lib/libutil/quotafile.c Thu Feb 7 21:41:27 2019 > (r343880) > +++ head/lib/libutil/quotafile.c Thu Feb 7 21:51:39 2019 > (r343881) > @@ -119,6 +119,7 @@ quota_open(struct fstab *fs, int quotatype, int openfl > struct group *grp; > struct stat st; > int qcmd, serrno; > + int ufs; > > if ((qf = calloc(1, sizeof(*qf))) == NULL) > return (NULL); > @@ -129,15 +130,21 @@ quota_open(struct fstab *fs, int quotatype, int openfl > goto error; > qf->dev = st.st_dev; > qcmd = QCMD(Q_GETQUOTASIZE, quotatype); > + ufs = strcmp(fs->fs_vfstype, "ufs") == 0; > + /* > + * On UFS, hasquota() fills in qf->qfname. But we only care about > + * this for UFS. So we need to call hasquota() for UFS, first. > + */ > + if (ufs) { > + serrno = hasquota(fs, quotatype, qf->qfname, > + sizeof(qf->qfname)); > + } > if (quotactl(qf->fsname, qcmd, 0, >wordsize) == 0) > return (qf); > - /* We only check the quota file for ufs */ > - if (strcmp(fs->fs_vfstype, "ufs")) { > + if (!ufs) { > errno = 0; > goto error; > - } > - serrno = hasquota(fs, quotatype, qf->qfname, sizeof(qf->qfname)); > - if (serrno == 0) { > + } else if (serrno == 0) { > errno = EOPNOTSUPP; > goto error; > } > /usr/src/lib/libutil/quotafile.c:121: warning: 'serrno' may be used uninitialized in this function -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r343880 - head/sbin/ipfw
Author: bdrewery Date: Thu Feb 7 21:41:27 2019 New Revision: 343880 URL: https://svnweb.freebsd.org/changeset/base/343880 Log: Fix build of r343877 MFC after:2 weeks X-MFC-with: r343877 Pointyhat to: bdrewery Modified: head/sbin/ipfw/tables.c Modified: head/sbin/ipfw/tables.c == --- head/sbin/ipfw/tables.c Thu Feb 7 21:37:06 2019(r343879) +++ head/sbin/ipfw/tables.c Thu Feb 7 21:41:27 2019(r343880) @@ -282,7 +282,7 @@ ipfw_table_handler(int ac, char *av[]) } break; case TOK_LIST: - arg = is_all ? (void*)1 : (void*)0; + arg = is_all ? (void*)1 : NULL; if (is_all == 0) { ipfw_xtable_info i; if ((error = table_get_info(, )) != 0) @@ -822,7 +822,9 @@ table_show_one(ipfw_xtable_info *i, void *arg) { ipfw_obj_header *oh; int error; - int is_all = (int)arg; + int is_all; + + is_all = arg == NULL ? 0 : 1; if ((error = table_do_get_list(i, )) != 0) { err(EX_OSERR, "Error requesting table %s list", i->tablename); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r343877 - head/sbin/ipfw
Author: bdrewery Date: Thu Feb 7 21:05:44 2019 New Revision: 343877 URL: https://svnweb.freebsd.org/changeset/base/343877 Log: ipfw table list: Fix showing header outside of 'all'. Properly pass down is_all to table_show_list(). This restores the behavior before r272840 so that only 'ipfw table all list' shows the headers. MFC after:2 weeks Relnotes: yes Modified: head/sbin/ipfw/tables.c Modified: head/sbin/ipfw/tables.c == --- head/sbin/ipfw/tables.c Thu Feb 7 20:58:45 2019(r343876) +++ head/sbin/ipfw/tables.c Thu Feb 7 21:05:44 2019(r343877) @@ -282,13 +282,14 @@ ipfw_table_handler(int ac, char *av[]) } break; case TOK_LIST: + arg = is_all ? (void*)1 : (void*)0; if (is_all == 0) { ipfw_xtable_info i; if ((error = table_get_info(, )) != 0) err(EX_OSERR, "failed to request table info"); - table_show_one(, NULL); + table_show_one(, arg); } else { - error = tables_foreach(table_show_one, NULL, 1); + error = tables_foreach(table_show_one, arg, 1); if (error != 0) err(EX_OSERR, "failed to request tables list"); } @@ -821,13 +822,14 @@ table_show_one(ipfw_xtable_info *i, void *arg) { ipfw_obj_header *oh; int error; + int is_all = (int)arg; if ((error = table_do_get_list(i, )) != 0) { err(EX_OSERR, "Error requesting table %s list", i->tablename); return (error); } - table_show_list(oh, 1); + table_show_list(oh, is_all); free(oh); return (0); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r343631 - in head: . sbin sbin/pfilctl share/man/man9 sys/contrib/ipfilter/netinet sys/net sys/netinet sys/netinet6 sys/netpfil/ipfw sys/netpfil/pf
On 1/31/19 3:01 PM, Gleb Smirnoff wrote: > Author: glebius > Date: Thu Jan 31 23:01:03 2019 > New Revision: 343631 > URL: https://svnweb.freebsd.org/changeset/base/343631 > > Log: > New pfil(9) KPI together with newborn pfil API and control utility. > > The KPI have been reviewed and cleansed of features that were planned > back 20 years ago and never implemented. The pfil(9) internals have > been made opaque to protocols with only returned types and function > declarations exposed. The KPI is made more strict, but at the same time > more extensible, as kernel uses same command structures that userland > ioctl uses. > > In nutshell [KA]PI is about declaring filtering points, declaring > filters and linking and unlinking them together. > > New [KA]PI makes it possible to reconfigure pfil(9) configuration: > change order of hooks, rehook filter from one filtering point to a > different one, disconnect a hook on output leaving it on input only, > prepend/append a filter to existing list of filters. > > Now it possible for a single packet filter to provide multiple rulesets > that may be linked to different points. Think of per-interface ACLs in > Cisco or Juniper. None of existing packet filters yet support that, > however limited usage is already possible, e.g. default ruleset can > be moved to single interface, as soon as interface would pride their > filtering points. > > Another future feature is possiblity to create pfil heads, that provide > not an mbuf pointer but just a memory pointer with length. That would > allow filtering at very early stages of a packet lifecycle, e.g. when > packet has just been received by a NIC and no mbuf was yet allocated. > > Differential Revision: https://reviews.freebsd.org/D18951 > > Added: > head/sbin/pfilctl/ > head/sbin/pfilctl/Makefile (contents, props changed) > head/sbin/pfilctl/pfilctl.8 (contents, props changed) > head/sbin/pfilctl/pfilctl.c (contents, props changed) > Modified: > head/ObsoleteFiles.inc > head/sbin/Makefile > head/share/man/man9/Makefile > head/share/man/man9/pfil.9 > head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c > head/sys/net/if_bridge.c > head/sys/net/if_enc.c > head/sys/net/if_ethersubr.c > head/sys/net/if_var.h > head/sys/net/pfil.c > head/sys/net/pfil.h > head/sys/netinet/ip_fastfwd.c > head/sys/netinet/ip_input.c > head/sys/netinet/ip_output.c > head/sys/netinet/ip_var.h > head/sys/netinet/siftr.c > head/sys/netinet6/ip6_fastfwd.c > head/sys/netinet6/ip6_forward.c > head/sys/netinet6/ip6_input.c > head/sys/netinet6/ip6_output.c > head/sys/netinet6/ip6_var.h > head/sys/netpfil/ipfw/ip_fw_eaction.c > head/sys/netpfil/ipfw/ip_fw_pfil.c > head/sys/netpfil/pf/pf_ioctl.c This breaks the build. https://ci.freebsd.org/job/FreeBSD-head-powerpc64-build/9220/console > 23:28:54 cc1: warnings being treated as errors > 23:28:54 /usr/src/sbin/pfilctl/pfilctl.c: In function 'help': > 23:28:54 /usr/src/sbin/pfilctl/pfilctl.c:97: warning: nested extern > declaration of '__progname' > 23:28:54 --- all_subdir_lib --- > 23:28:54 --- clog.3.gz --- > 23:28:54 gzip -cn /usr/src/lib/msun/man/clog.3 > clog.3.gz > 23:28:54 --- all_subdir_sbin --- > 23:28:54 *** [pfilctl.o] Error code 1 > 23:28:54 > 23:28:54 make[4]: stopped in /usr/src/sbin/pfilctl -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
Re: svn commit: r343633 - head/usr.bin/shar
On 1/31/19 3:21 PM, Bryan Drewery wrote: > Author: bdrewery > Date: Thu Jan 31 23:21:18 2019 > New Revision: 343633 > URL: https://svnweb.freebsd.org/changeset/base/343633 > > Log: > Shar files may be seen as binary by grep. > > Suggest using -a to egrep to properly see executed commands. > > This is a minor improvement to the manpage. A better improvement > would be removal or gigantic warnings. I dare someone to remove this utility. There may still be documentation suggesting its use somewhere due to pre-bugzilla days but now we can do proper binary attachments I believe. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
Re: svn commit: r343630 - in head/sys: kern sys
On 1/31/19 3:04 PM, Brooks Davis wrote: > On Thu, Jan 31, 2019 at 10:58:17PM +, Brooks Davis wrote: >> Author: brooks >> Date: Thu Jan 31 22:58:17 2019 >> New Revision: 343630 >> URL: https://svnweb.freebsd.org/changeset/base/343630 >> >> Log: >> Regen after r342190. > > Yes, that was a while ago... I can only assume I was interrupted and > forgot to get back to it. Fortunately, no functional change and testing > was against a tree with the files regenerated. > > -- Brooks > I've been needing to get involved again. I'll start thinking about and tackling generating these during the build soon. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r343633 - head/usr.bin/shar
Author: bdrewery Date: Thu Jan 31 23:21:18 2019 New Revision: 343633 URL: https://svnweb.freebsd.org/changeset/base/343633 Log: Shar files may be seen as binary by grep. Suggest using -a to egrep to properly see executed commands. This is a minor improvement to the manpage. A better improvement would be removal or gigantic warnings. Sponsored by: Dell EMC MFC after:1 week Modified: head/usr.bin/shar/shar.1 Modified: head/usr.bin/shar/shar.1 == --- head/usr.bin/shar/shar.1Thu Jan 31 23:01:12 2019(r343632) +++ head/usr.bin/shar/shar.1Thu Jan 31 23:21:18 2019(r343633) @@ -28,7 +28,7 @@ .\" @(#)shar.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd June 6, 1993 +.Dd January 31, 2019 .Dt SHAR 1 .Os .Sh NAME @@ -103,5 +103,5 @@ Archives produced using this implementation of .Nm may be easily examined with the command: .Bd -literal -offset indent -egrep -v '^[X#]' shar.file +egrep -av '^[X#]' shar.file .Ed ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r340157 - in head: . tools/build tools/tools/nanobsd/embedded
On 11/5/2018 11:51 AM, Alex Richardson wrote: > Author: arichardson > Date: Mon Nov 5 19:51:10 2018 > New Revision: 340157 > URL: https://svnweb.freebsd.org/changeset/base/340157 > > Log: > Allow building world without inheriting $PATH > This change has a summary that doesn't seem to match its change (to build host tools for cross-os builds). Does $PATH go into the build still or not? SYSTEM_COMPILER relies on $PATH inheriting into the build. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
Re: svn commit: r338268 - head
On 8/23/2018 11:19 AM, Alex Richardson wrote: > Author: arichardson > Date: Thu Aug 23 18:19:10 2018 > New Revision: 338268 > URL: https://svnweb.freebsd.org/changeset/base/338268 > > Log: > Fix non-FreeBSD host lib32 build for TARGET=amd64 > > When building on non-FreeBSD systems we need to pass an explicit target > triple to clang otherwise it will attempt to build with the host triple. > This also has advantages when building on a FreeBSD host: we now tell > clang that we are targeting at least FreeBSD 12.0 instead of an older > version so it can enable newer features. > > Reviewed By:brooks (mentor) > Approved By:jhb (mentor) > Differential Revision: https://reviews.freebsd.org/D16842 > > Modified: > head/Makefile.libcompat > > Modified: head/Makefile.libcompat > == > --- head/Makefile.libcompat Thu Aug 23 18:19:01 2018(r338267) > +++ head/Makefile.libcompat Thu Aug 23 18:19:10 2018(r338268) > @@ -14,6 +14,11 @@ LIB32CPUFLAGS= -march=i686 -mmmx -msse -msse2 > .else > LIB32CPUFLAGS= -march=${TARGET_CPUTYPE} > .endif > +.if ${WANT_COMPILER_TYPE} == gcc || \ > +(defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc) > +.else > +LIB32CPUFLAGS+= -target x86_64-unknown-freebsd12.0 This can be ${TARGET_TRIPLE}, no? It also seems like it should be in the LIBSOFT flags too; via LIBCOMPATCFLAGS. > +.endif > LIB32CPUFLAGS+= -m32 > LIB32WMAKEENV= MACHINE=i386 MACHINE_ARCH=i386 \ > MACHINE_CPU="i686 mmx sse sse2" > -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
Re: svn commit: r339636 - in head: . share/mk
On 10/22/2018 11:31 PM, Alex Richardson wrote: > Author: arichardson > Date: Tue Oct 23 06:31:25 2018 > New Revision: 339636 > URL: https://svnweb.freebsd.org/changeset/base/339636 > > Log: > Only compute the X_COMPILER_*/X_LINKER_* variables when needed > > When building CheriBSD we have to set XLD/XCC/XCFLAGS on the command line. > This triggers the $XCC != $CC case in bsd.compiler.mk (and the same for LD > in bsd.linker.mk) which causes it to call ${XCC} --version and > ${XLD} --version (plus various awk+sed+echo calls) in every subdirectory. > For incremental builds and stages that only walk the source tree this is > often the majority of the time spent in that directory. > ... > By only computing the value of the X_COMPILER_*/X_LINKER_* variables if > _WANT_TOOLCHAIN_CROSS_VARS is set we can reduce the number of cc/ld calls > to once per build stage instead of once per recursive make. This sounds wrong. bsd.compiler.mk *already* handles that kind of thing by exporting its computations. Adding a second hack for a similar problem isn't the right solution. > > With this change (and no changes to the sources) the `make includes` stage > now takes 28 seconds at -j1 instead of 86 seconds. > > Approved By:brooks (mentor) > Differential Revision: https://reviews.freebsd.org/D17046 -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
Re: svn commit: r339946 - in head: . share/mk
On 10/31/2018 3:45 AM, Alex Richardson wrote: > Author: arichardson > Date: Wed Oct 31 10:45:28 2018 > New Revision: 339946 > URL: https://svnweb.freebsd.org/changeset/base/339946 > > Log: > Don't run cc --version during cleandir/obj stages > I haven't had a chance to look at this fully or r339636 but I don't think this change, r339946, is complete. There's far more tree-walks than these named ones that should not be running cc. > This will no work when there is no cc in $PATH (which is the case before the > cross-tools stage once we no longer inherit $PATH in $WMAKE). > The variables set by bsd.compiler.mk/bsd.linker.mk are not needed in these > stages so this avoids a little bit of makefile parsing. > > Reviewed By:emaste > Approved By:jhb (mentor) > Differential Revision: https://reviews.freebsd.org/D16814 > > Modified: > head/Makefile.inc1 > head/share/mk/bsd.compiler.mk > > Modified: head/Makefile.inc1 > == > --- head/Makefile.inc1Wed Oct 31 10:30:19 2018(r339945) > +++ head/Makefile.inc1Wed Oct 31 10:45:28 2018(r339946) > @@ -950,7 +950,7 @@ _worldtmp: .PHONY > .else > ${_+_}@if [ -e "${WORLDTMP}" ]; then \ > echo ">>> Deleting stale files in build tree..."; \ > - cd ${.CURDIR}; ${WMAKE} -DBATCH_DELETE_OLD_FILES \ > + cd ${.CURDIR}; ${WMAKE} -DBATCH_DELETE_OLD_FILES > _NO_INCLUDE_COMPILERMK=t \ > delete-old delete-old-libs >/dev/null; \ > fi > rm -rf ${WORLDTMP}/legacy/usr/include > @@ -1003,19 +1003,21 @@ _cleanobj: > @echo "--" > @echo ">>> stage 2.1: cleaning up the object tree" > @echo "--" > - ${_+_}cd ${.CURDIR}; ${WMAKE} ${CLEANDIR} > + # Avoid including bsd.compiler.mk in clean and obj with > _NO_INCLUDE_COMPILERMK > + # since the restricted $PATH might not contain a valid cc binary > + ${_+_}cd ${.CURDIR}; ${WMAKE} _NO_INCLUDE_COMPILERMK=t ${CLEANDIR} > .if defined(LIBCOMPAT) > - ${_+_}cd ${.CURDIR}; ${LIBCOMPATWMAKE} -f Makefile.inc1 ${CLEANDIR} > + ${_+_}cd ${.CURDIR}; ${LIBCOMPATWMAKE} _NO_INCLUDE_COMPILERMK=t -f > Makefile.inc1 ${CLEANDIR} > .endif > .else > - ${_+_}cd ${.CURDIR}; ${WMAKE} _cleanobj_fast_depend_hack > + ${_+_}cd ${.CURDIR}; ${WMAKE} _NO_INCLUDE_COMPILERMK=t > _cleanobj_fast_depend_hack > .endif # !defined(NO_CLEAN) > _obj: > @echo > @echo "--" > @echo ">>> stage 2.2: rebuilding the object tree" > @echo "--" > - ${_+_}cd ${.CURDIR}; ${WMAKE} obj > + ${_+_}cd ${.CURDIR}; ${WMAKE} _NO_INCLUDE_COMPILERMK=t obj > _build-tools: > @echo > @echo "--" > > Modified: head/share/mk/bsd.compiler.mk > == > --- head/share/mk/bsd.compiler.mk Wed Oct 31 10:30:19 2018 > (r339945) > +++ head/share/mk/bsd.compiler.mk Wed Oct 31 10:45:28 2018 > (r339946) > @@ -33,6 +33,16 @@ : > > .include > > +.if defined(_NO_INCLUDE_COMPILERMK) > +# If _NO_INCLUDE_COMPILERMK is set we are doing a make obj/cleandir/cleanobj > +# and might not have a valid compiler in $PATH yet. In this case just set the > +# variables that are expected by the other .mk files and return > +COMPILER_TYPE=none > +X_COMPILER_TYPE=none > +COMPILER_VERSION=0 > +X_COMPILER_VERSION=0 > +COMPILER_FEATURES=none > +.else > # command = /usr/local/bin/ccache cc ... > # wrapper = /usr/local/libexec/ccache/cc ... > CCACHE_BUILD_TYPE?= command > @@ -220,4 +230,5 @@ ${var}.${${X_}_cc_hash}:= ${${var}} > .if !defined(_NO_INCLUDE_LINKERMK) > .include > .endif > +.endif # defined(_NO_INCLUDE_COMPILERMK) > .endif # !target() > -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
Re: svn commit: r339326 - head
On 10/12/2018 4:33 AM, Kyle Evans wrote: > On Fri, Oct 12, 2018 at 12:43 AM Dag-Erling Smørgrav wrote: >> >> Author: des >> Date: Fri Oct 12 05:42:38 2018 >> New Revision: 339326 >> URL: https://svnweb.freebsd.org/changeset/base/339326 >> >> Log: >> Move libssl up in the bootstrap order. >> >> Submitted by: jkim >> Approved by: re (gjb) >> >> Modified: >> head/Makefile.inc1 >> >> Modified: head/Makefile.inc1 >> == >> --- head/Makefile.inc1 Fri Oct 12 05:27:58 2018(r339325) >> +++ head/Makefile.inc1 Fri Oct 12 05:42:38 2018(r339326) >> @@ -2534,8 +2534,8 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} \ >> ${_cddl_lib_libctf} \ >> lib/libufs \ >> lib/libutil lib/libpjdlog ${_lib_libypclnt} lib/libz >> lib/msun \ >> - ${_secure_lib_libcrypto} ${_lib_libldns} \ >> - ${_secure_lib_libssh} ${_secure_lib_libssl} >> + ${_secure_lib_libcrypto} ${_secure_lib_libssl} \ >> + ${_lib_libldns} ${_secure_lib_libssh} >> >> .if ${MK_GNUCXX} != "no" >> _prebuild_libs+= gnu/lib/libstdc++ gnu/lib/libsupc++ >> ___ > > Hmm... doesn't this kind of situation also require an __L rule down > below to prevent the race, since they're both in prebuild_libs? > > Thanks, > Yes, this list is not an ordering. It's just a list. The ordering comes from __L targets which define the dependency graph. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r338950 - head/usr.sbin/chown
Author: bdrewery Date: Wed Sep 26 18:40:57 2018 New Revision: 338950 URL: https://svnweb.freebsd.org/changeset/base/338950 Log: Handle overflow of uid or gid in arguments for chown chown incorrectly allows a uid or gid greater than UID_MAX/GID_MAX respectively. Using such an argument rolls over to accounts such as root, operator, etc. Approved by: re (gjb) Relnotes: yes Reviewed by: cem, kib Submitted by: Don Morris Sponsored by: Dell EMC Differential Revision:https://reviews.freebsd.org/D15119 Modified: head/usr.sbin/chown/chown.c Modified: head/usr.sbin/chown/chown.c == --- head/usr.sbin/chown/chown.c Wed Sep 26 17:12:30 2018(r338949) +++ head/usr.sbin/chown/chown.c Wed Sep 26 18:40:57 2018(r338950) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -246,16 +247,13 @@ a_uid(const char *s) static uid_t id(const char *name, const char *type) { - uid_t val; + unsigned long val; char *ep; - /* -* XXX -* We know that uid_t's and gid_t's are unsigned longs. -*/ errno = 0; val = strtoul(name, , 10); - if (errno || *ep != '\0') + _Static_assert(UID_MAX >= GID_MAX, "UID MAX less than GID MAX"); + if (errno || *ep != '\0' || val > UID_MAX) errx(1, "%s: illegal %s name", name, type); return (val); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r338738 - head/share/mk
Author: bdrewery Date: Mon Sep 17 22:15:12 2018 New Revision: 338738 URL: https://svnweb.freebsd.org/changeset/base/338738 Log: DIRS: Rework how duplicated dirs are installed. - Warn if multiple DIRS have conflicting metadata - This fixes META_MODE writing to a very long .meta file that contained the full DESTDIR path. Reported by: sjg, jonathan Sponsored by: Dell EMC Approved by: re (gjb) Modified: head/share/mk/bsd.dirs.mk Modified: head/share/mk/bsd.dirs.mk == --- head/share/mk/bsd.dirs.mk Mon Sep 17 22:15:09 2018(r338737) +++ head/share/mk/bsd.dirs.mk Mon Sep 17 22:15:12 2018(r338738) @@ -27,18 +27,29 @@ ${dir}TAG_ARGS= -T ${${dir}TAGS:[*]:S/ /,/g} . endif installdirs: installdirs-${dir} - -installdirs-${dir}: installdirs-${DESTDIR}${${dir}} - -. if !target(installdirs-${DESTDIR}${${dir}}) -installdirs-${DESTDIR}${${dir}}: - @${ECHO} installing DIRS ${dir} +# Coalesce duplicate destdirs +. if !defined(_uniquedirs_${${dir}}) +_uniquedirs_${${dir}}= ${dir} +_alldirs_${dir}= ${dir} +installdirs-${dir}: .PHONY + @${ECHO} installing DIRS ${_alldirs_${dir}} ${INSTALL} ${${dir}TAG_ARGS} -d -m ${${dir}_MODE} -o ${${dir}_OWN} \ -g ${${dir}_GRP} ${${dir}_FLAG} ${DESTDIR}${${dir}} -. endif -.endif - -realinstall: installdirs-${dir} +. else +_uniquedir:= ${_uniquedirs_${${dir}}} +_alldirs_${_uniquedir}+=${dir} +# Connect to the single target +installdirs-${dir}: installdirs-${_uniquedir} +# Validate that duplicate dirs have the same metadata. +.for v in TAG_ARGS _MODE _OWN _GRP _FLAG +. if ${${dir}${v}:Uunset} != ${${_uniquedir}${v}:Uunset} +.warning ${RELDIR}: ${dir}${v} (${${dir}${v}:U}) does not match ${_uniquedir}${v} (${${_uniquedir}${v}:U}) but both install to ${${dir}} +. endif +.endfor +. endif # !defined(_uniquedirs_${${dir}}) +.endif # defined(${dir}) && !empty(${dir}) . endfor + +realinstall: installdirs .endif ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r338737 - head/share/mk
Author: bdrewery Date: Mon Sep 17 22:15:09 2018 New Revision: 338737 URL: https://svnweb.freebsd.org/changeset/base/338737 Log: installdirs can be a recursive/standalone target. Sponsored by: Dell EMC Approved by: re (gjb) Modified: head/share/mk/bsd.subdir.mk Modified: head/share/mk/bsd.subdir.mk == --- head/share/mk/bsd.subdir.mk Mon Sep 17 22:15:06 2018(r338736) +++ head/share/mk/bsd.subdir.mk Mon Sep 17 22:15:09 2018(r338737) @@ -46,6 +46,7 @@ SUBDIR_TARGETS+= \ all all-man analyze buildconfig buildfiles buildincludes \ checkdpadd clean cleandepend cleandir cleanilinks \ cleanobj depend distribute files includes installconfig \ + installdirs \ installfiles installincludes print-dir realinstall \ maninstall manlint ${_obj} objlink tags \ @@ -53,7 +54,7 @@ SUBDIR_TARGETS+= \ STANDALONE_SUBDIR_TARGETS+= \ all-man buildconfig buildfiles buildincludes check checkdpadd \ clean cleandepend cleandir cleanilinks cleanobj files includes \ - installconfig installincludes installfiles print-dir \ + installconfig installdirs installincludes installfiles print-dir \ maninstall manlint obj objlink # It is safe to install in parallel when staging. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r338736 - head/share/mk
Author: bdrewery Date: Mon Sep 17 22:15:06 2018 New Revision: 338736 URL: https://svnweb.freebsd.org/changeset/base/338736 Log: PROGS: Don't redundantly process DIRS. Sponsored by: Dell EMC Approved by: re (gjb) Modified: head/share/mk/bsd.progs.mk Modified: head/share/mk/bsd.progs.mk == --- head/share/mk/bsd.progs.mk Mon Sep 17 22:14:53 2018(r338735) +++ head/share/mk/bsd.progs.mk Mon Sep 17 22:15:06 2018(r338736) @@ -77,7 +77,7 @@ stage_as.prog.${_prog}: ${_prog} .ifdef _RECURSING_PROGS MK_STAGING= no -_PROGS_GLOBAL_VARS= CLEANFILES CLEANDIRS CONFGROUPS FILESGROUPS INCSGROUPS \ +_PROGS_GLOBAL_VARS= CLEANFILES CLEANDIRS CONFGROUPS DIRS FILESGROUPS INCSGROUPS \ SCRIPTS .for v in ${_PROGS_GLOBAL_VARS} $v = ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r338735 - head/share/mk
Author: bdrewery Date: Mon Sep 17 22:14:53 2018 New Revision: 338735 URL: https://svnweb.freebsd.org/changeset/base/338735 Log: DIRS: installdirs should also be .PHONY Sponsored by: Dell EMC Approved by: re (gjb, kib) Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk == --- head/share/mk/bsd.sys.mkMon Sep 17 20:15:18 2018(r338734) +++ head/share/mk/bsd.sys.mkMon Sep 17 22:14:53 2018(r338735) @@ -250,8 +250,8 @@ PHONY_NOTMAIN = analyze afterdepend afterinstall all b beforelinking build build-tools buildconfig buildfiles \ buildincludes check checkdpadd clean cleandepend cleandir \ cleanobj configure depend distclean distribute exe \ - files html includes install installconfig installfiles \ - installincludes lint obj objlink objs objwarn \ + files html includes install installconfig installdirs \ + installfiles installincludes lint obj objlink objs objwarn \ realinstall tags whereobj # we don't want ${PROG} to be PHONY ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"