svn commit: r295964 - head/sys/dev/hyperv/vmbus
Author: sephe Date: Wed Feb 24 08:54:50 2016 New Revision: 295964 URL: https://svnweb.freebsd.org/changeset/base/295964 Log: hyperv/vmbus: Use free(9) for interrupt page; it is allocated by malloc(9) MFC after:1 week Sponsored by: Microsoft OSTC Differential Revision:https://reviews.freebsd.org/D5417 Modified: head/sys/dev/hyperv/vmbus/hv_connection.c Modified: head/sys/dev/hyperv/vmbus/hv_connection.c == --- head/sys/dev/hyperv/vmbus/hv_connection.c Wed Feb 24 07:53:57 2016 (r295963) +++ head/sys/dev/hyperv/vmbus/hv_connection.c Wed Feb 24 08:54:50 2016 (r295964) @@ -248,10 +248,7 @@ hv_vmbus_connect(void) { mtx_destroy(&hv_vmbus_g_connection.channel_msg_lock); if (hv_vmbus_g_connection.interrupt_page != NULL) { - contigfree( - hv_vmbus_g_connection.interrupt_page, - PAGE_SIZE, - M_DEVBUF); + free(hv_vmbus_g_connection.interrupt_page, M_DEVBUF); hv_vmbus_g_connection.interrupt_page = NULL; } @@ -279,7 +276,7 @@ hv_vmbus_disconnect(void) { ret = hv_vmbus_post_message(&msg, sizeof(hv_vmbus_channel_unload)); - contigfree(hv_vmbus_g_connection.interrupt_page, PAGE_SIZE, M_DEVBUF); + free(hv_vmbus_g_connection.interrupt_page, M_DEVBUF); mtx_destroy(&hv_vmbus_g_connection.channel_msg_lock); ___ 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: r295965 - head/sys/compat/cloudabi
Author: ed Date: Wed Feb 24 10:54:26 2016 New Revision: 295965 URL: https://svnweb.freebsd.org/changeset/base/295965 Log: Call cap_rights_init() properly. Even though or'ing the individual rights works in this specific case, it may not work in general. Pass them in as varargs. Modified: head/sys/compat/cloudabi/cloudabi_sock.c Modified: head/sys/compat/cloudabi/cloudabi_sock.c == --- head/sys/compat/cloudabi/cloudabi_sock.cWed Feb 24 08:54:50 2016 (r295964) +++ head/sys/compat/cloudabi/cloudabi_sock.cWed Feb 24 10:54:26 2016 (r295965) @@ -208,7 +208,7 @@ cloudabi_sys_sock_stat_get(struct thread int error; error = getsock_cap(td, uap->fd, cap_rights_init(&rights, - CAP_GETSOCKOPT | CAP_GETPEERNAME | CAP_GETSOCKNAME), &fp, NULL); + CAP_GETSOCKOPT, CAP_GETPEERNAME, CAP_GETSOCKNAME), &fp, NULL); if (error != 0) return (error); so = fp->f_data; ___ 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: r295966 - head/sys/amd64/amd64
Author: kib Date: Wed Feb 24 11:58:15 2016 New Revision: 295966 URL: https://svnweb.freebsd.org/changeset/base/295966 Log: Return dst as the result from memcpy(9) on amd64. PR: 207422 MFC after:1 week Modified: head/sys/amd64/amd64/support.S Modified: head/sys/amd64/amd64/support.S == --- head/sys/amd64/amd64/support.S Wed Feb 24 10:54:26 2016 (r295965) +++ head/sys/amd64/amd64/support.S Wed Feb 24 11:58:15 2016 (r295966) @@ -151,6 +151,7 @@ END(bcopy) */ ENTRY(memcpy) PUSH_FRAME_POINTER + movq%rdi,%rax movq%rdx,%rcx shrq$3,%rcx /* copy by 64-bit words */ cld /* copy forwards */ ___ 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: r295967 - head/sys/netipsec
Author: ae Date: Wed Feb 24 12:28:49 2016 New Revision: 295967 URL: https://svnweb.freebsd.org/changeset/base/295967 Log: Fix useless check. m_pkthdr.len should be equal to orglen. MFC after:2 weeks Modified: head/sys/netipsec/key.c Modified: head/sys/netipsec/key.c == --- head/sys/netipsec/key.c Wed Feb 24 11:58:15 2016(r295966) +++ head/sys/netipsec/key.c Wed Feb 24 12:28:49 2016(r295967) @@ -7204,8 +7204,7 @@ key_parse(struct mbuf *m, struct socket orglen = PFKEY_UNUNIT64(msg->sadb_msg_len); target = KEY_SENDUP_ONE; - if ((m->m_flags & M_PKTHDR) == 0 || - m->m_pkthdr.len != m->m_pkthdr.len) { + if ((m->m_flags & M_PKTHDR) == 0 || m->m_pkthdr.len != orglen) { ipseclog((LOG_DEBUG, "%s: invalid message length.\n",__func__)); PFKEYSTAT_INC(out_invlen); error = EINVAL; ___ 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: r295934 - head/sys/kern
Thank you! On 24 February 2016 at 00:38, Bryan Drewery wrote: > On 2/23/2016 2:02 PM, Mariusz Zaborski wrote: > > Author: oshogbo > > Date: Tue Feb 23 22:02:25 2016 > > New Revision: 295934 > > URL: https://svnweb.freebsd.org/changeset/base/295934 > > > > Log: > > According to the sys/kern/capabilities.conf, gethostid(3) should be > allowed. > > > > Pointed out by: Milosz Kaniewski > > Approved by:pjd (mentor) > > MFC after: 3 days > > Sponsored by: Wheel Systems, http://wheelsystems.com > > > > Modified: > > head/sys/kern/kern_mib.c > > > > Modified: head/sys/kern/kern_mib.c > > > == > > --- head/sys/kern/kern_mib.c Tue Feb 23 21:21:47 2016(r295933) > > +++ head/sys/kern/kern_mib.c Tue Feb 23 22:02:25 2016(r295934) > > @@ -422,7 +422,7 @@ sysctl_hostid(SYSCTL_HANDLER_ARGS) > > } > > > > SYSCTL_PROC(_kern, KERN_HOSTID, hostid, > > -CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_MPSAFE, > > +CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_MPSAFE | > CTFLAG_CAPRD, > > It is spelled wrong. Fixed in r295941, be sure to MFC that too. > > > NULL, 0, sysctl_hostid, "LU", "Host ID"); > > > > /* > > > > > > -- > 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: r295969 - in head: sbin/ipfw sys/netpfil/ipfw
Author: ae Date: Wed Feb 24 13:16:03 2016 New Revision: 295969 URL: https://svnweb.freebsd.org/changeset/base/295969 Log: Fix bug in filling and handling ipfw's O_DSCP opcode. Due to integer overflow CS4 token was handled as BE. PR: 207459 MFC after:1 week Modified: head/sbin/ipfw/ipfw2.c head/sys/netpfil/ipfw/ip_fw2.c Modified: head/sbin/ipfw/ipfw2.c == --- head/sbin/ipfw/ipfw2.c Wed Feb 24 12:37:35 2016(r295968) +++ head/sbin/ipfw/ipfw2.c Wed Feb 24 13:16:03 2016(r295969) @@ -1029,7 +1029,7 @@ fill_dscp(ipfw_insn *cmd, char *av, int errx(EX_DATAERR, "Invalid DSCP value"); } - if (code > 32) + if (code >= 32) *high |= 1 << (code - 32); else *low |= 1 << code; Modified: head/sys/netpfil/ipfw/ip_fw2.c == --- head/sys/netpfil/ipfw/ip_fw2.c Wed Feb 24 12:37:35 2016 (r295968) +++ head/sys/netpfil/ipfw/ip_fw2.c Wed Feb 24 13:16:03 2016 (r295969) @@ -1711,7 +1711,7 @@ do { \ break; /* DSCP bitmask is stored as low_u32 high_u32 */ - if (x > 32) + if (x >= 32) match = *(p + 1) & (1 << (x - 32)); else match = *p & (1 << x); ___ 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: r295971 - in head/sys: kern sys
Author: kib Date: Wed Feb 24 15:15:46 2016 New Revision: 295971 URL: https://svnweb.freebsd.org/changeset/base/295971 Log: Provide more correct sizing of the KVA consumed by a vnode, used by the virtvnodes calculation. Include the size of fs-specific v_data as the nfs nclnode inline, the NFS nclnode is bigger than either ZFS znode or UFS inode. Include the size of namecache_ts and short cache path element, multiplied by the name cache population factor, again inline. Inline defines are used to avoid pollution of the vnode.h with the subsystem-private objects. Non-significant unsynchronized changes of the definitions are fine, we do not care about that precision, and e.g. ZFS consumes much malloced memory per vnode for reasons unaccounted in the formula. Lower the partition of kmem dedicated to vnodes, from 1/7 to 1/10. The measures reduce vnode cache pressure on kmem and bring the vnode cache memory use below some apparent thresholds that were exceeded by r291244 due to more robust vnode reuse. Reported and tested by: marius (i386, previous version) Reviewed by: bde Sponsored by: The FreeBSD Foundation MFC after:2 weeks Modified: head/sys/kern/vfs_cache.c head/sys/kern/vfs_subr.c head/sys/sys/vnode.h Modified: head/sys/kern/vfs_cache.c == --- head/sys/kern/vfs_cache.c Wed Feb 24 13:48:40 2016(r295970) +++ head/sys/kern/vfs_cache.c Wed Feb 24 15:15:46 2016(r295971) @@ -171,7 +171,7 @@ SYSCTL_ULONG(_debug, OID_AUTO, numcache, static u_long numcachehv; /* number of cache entries with vnodes held */ SYSCTL_ULONG(_debug, OID_AUTO, numcachehv, CTLFLAG_RD, &numcachehv, 0, "Number of namecache entries with vnodes held"); -static u_int ncsizefactor = 2; +u_int ncsizefactor = 2; SYSCTL_UINT(_vfs, OID_AUTO, ncsizefactor, CTLFLAG_RW, &ncsizefactor, 0, "Size factor for namecache"); Modified: head/sys/kern/vfs_subr.c == --- head/sys/kern/vfs_subr.cWed Feb 24 13:48:40 2016(r295970) +++ head/sys/kern/vfs_subr.cWed Feb 24 15:15:46 2016(r295971) @@ -407,6 +407,27 @@ vnode_fini(void *mem, int size) rw_destroy(BO_LOCKPTR(bo)); } +/* + * Provide the size of NFS nclnode and NFS fh for calculation of the + * vnode memory consumption. The size is specified directly to + * eliminate dependency on NFS-private header. + * + * Other filesystems may use bigger or smaller (like UFS and ZFS) + * private inode data, but the NFS-based estimation is ample enough. + * Still, we care about differences in the size between 64- and 32-bit + * platforms. + * + * Namecache structure size is heuristically + * sizeof(struct namecache_ts) + CACHE_PATH_CUTOFF + 1. + */ +#ifdef _LP64 +#defineNFS_NCLNODE_SZ (528 + 64) +#defineNC_SZ 148 +#else +#defineNFS_NCLNODE_SZ (360 + 32) +#defineNC_SZ 92 +#endif + static void vntblinit(void *dummy __unused) { @@ -422,12 +443,12 @@ vntblinit(void *dummy __unused) * marginal ratio of desiredvnodes to the physical memory size is * 1:64. However, desiredvnodes is limited by the kernel's heap * size. The memory required by desiredvnodes vnodes and vm objects -* must not exceed 1/7th of the kernel's heap size. +* must not exceed 1/10th of the kernel's heap size. */ physvnodes = maxproc + pgtok(vm_cnt.v_page_count) / 64 + 3 * min(98304 * 16, pgtok(vm_cnt.v_page_count)) / 64; - virtvnodes = vm_kmem_size / (7 * (sizeof(struct vm_object) + - sizeof(struct vnode))); + virtvnodes = vm_kmem_size / (10 * (sizeof(struct vm_object) + + sizeof(struct vnode) + NC_SZ * ncsizefactor + NFS_NCLNODE_SZ)); desiredvnodes = min(physvnodes, virtvnodes); if (desiredvnodes > MAXVNODES_MAX) { if (bootverbose) Modified: head/sys/sys/vnode.h == --- head/sys/sys/vnode.hWed Feb 24 13:48:40 2016(r295970) +++ head/sys/sys/vnode.hWed Feb 24 15:15:46 2016(r295971) @@ -372,6 +372,8 @@ struct vattr { MALLOC_DECLARE(M_VNODE); #endif +extern u_int ncsizefactor; + /* * Convert between vnode types and inode formats (since POSIX.1 * defines mode word of stat structure in terms of inode formats). ___ 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: r295972 - in head/sys: boot/fdt/dts/riscv conf riscv/conf riscv/htif riscv/include riscv/riscv
Author: br Date: Wed Feb 24 16:50:34 2016 New Revision: 295972 URL: https://svnweb.freebsd.org/changeset/base/295972 Log: Add support for symmetric multiprocessing (SMP). Tested on Spike simulator with 2 and 16 cores (tlb enabled), so set MAXCPU to 16 at this time. This uses FDT data to get information about CPUs (code based on arm64 mp_machdep). Invalidate entire TLB cache as it is the only way yet. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Added: head/sys/riscv/riscv/mp_machdep.c (contents, props changed) Modified: head/sys/boot/fdt/dts/riscv/spike.dts head/sys/conf/files.riscv head/sys/riscv/conf/GENERIC head/sys/riscv/htif/htif.c head/sys/riscv/htif/htif_block.c head/sys/riscv/htif/htif_console.c head/sys/riscv/include/intr.h head/sys/riscv/include/param.h head/sys/riscv/include/pcpu.h head/sys/riscv/include/riscvreg.h head/sys/riscv/include/smp.h head/sys/riscv/riscv/cpufunc_asm.S head/sys/riscv/riscv/exception.S head/sys/riscv/riscv/genassym.c head/sys/riscv/riscv/intr_machdep.c head/sys/riscv/riscv/locore.S head/sys/riscv/riscv/machdep.c head/sys/riscv/riscv/pmap.c head/sys/riscv/riscv/swtch.S Modified: head/sys/boot/fdt/dts/riscv/spike.dts == --- head/sys/boot/fdt/dts/riscv/spike.dts Wed Feb 24 15:15:46 2016 (r295971) +++ head/sys/boot/fdt/dts/riscv/spike.dts Wed Feb 24 16:50:34 2016 (r295972) @@ -43,6 +43,23 @@ #size-cells = <1>; #interrupt-cells = <1>; + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + device_type = "cpu"; + compatible = "riscv,rv64i"; + reg = <0x40002000>; + }; + + cpu@1 { + device_type = "cpu"; + compatible = "riscv,rv64i"; + reg = <0x4000a000>; + }; + }; + aliases { console0 = &console0; }; Modified: head/sys/conf/files.riscv == --- head/sys/conf/files.riscv Wed Feb 24 15:15:46 2016(r295971) +++ head/sys/conf/files.riscv Wed Feb 24 16:50:34 2016(r295972) @@ -1,6 +1,7 @@ # $FreeBSD$ crypto/blowfish/bf_enc.c optionalcrypto | ipsec crypto/des/des_enc.c optionalcrypto | ipsec | netsmb +dev/ofw/ofw_cpu.c optionalfdt kern/kern_clocksource.cstandard kern/subr_dummy_vdso_tc.c standard libkern/bcmp.c standard @@ -29,8 +30,9 @@ riscv/riscv/intr_machdep.cstandard riscv/riscv/in_cksum.c optionalinet | inet6 riscv/riscv/identcpu.c standard riscv/riscv/locore.S standardno-obj -riscv/riscv/minidump_machdep.c standard riscv/riscv/machdep.c standard +riscv/riscv/minidump_machdep.c standard +riscv/riscv/mp_machdep.c optionalsmp riscv/riscv/mem.c standard riscv/riscv/nexus.cstandard riscv/riscv/pmap.c standard Modified: head/sys/riscv/conf/GENERIC == --- head/sys/riscv/conf/GENERIC Wed Feb 24 15:15:46 2016(r295971) +++ head/sys/riscv/conf/GENERIC Wed Feb 24 16:50:34 2016(r295972) @@ -70,7 +70,13 @@ options MAC # TrustedBSD MAC Framewor optionsRACCT # Resource accounting framework optionsRACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default optionsRCTL# Resource limits -# options SMP +optionsSMP + +# Uncomment for memory disk +# options MD_ROOT +# options MD_ROOT_SIZE=8192 # 8MB ram disk +# makeoptions MFS_IMAGE=/path/to/img +# options ROOTDEVNAME=\"ufs:/dev/md0\" # Debugging support. Always need this: # options KDB # Enable kernel debugger support. Modified: head/sys/riscv/htif/htif.c == --- head/sys/riscv/htif/htif.c Wed Feb 24 15:15:46 2016(r295971) +++ head/sys/riscv/htif/htif.c Wed Feb 24 16:50:34 2016(r295972) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2015 Ruslan Bukin + * Copyright (c) 2015-2016 Ruslan Bukin * All rights reserved. * * Portions of this software were developed by SRI International and the @@ -62,7 +62,7 @@ __FBSDID("$FreeBSD$"); #include "htif.h" static struct resource_spec htif_spec[] = { - { SYS_RES_IRQ, 0, RF_ACTIVE }, + { SYS_RES_IRQ, 0, RF_ACTIVE | RF_SHAREABLE}, { -1, 0 } }; @@ -126,9 +126,9 @@ htif_intr(void *arg) sc = arg; - htif_handle_entry(sc); + csr_clear(sip, SIP_SSI
svn commit: r295973 - head/lib/libc/db/btree
Author: pfg Date: Wed Feb 24 16:52:03 2016 New Revision: 295973 URL: https://svnweb.freebsd.org/changeset/base/295973 Log: db(3): Fix aliasing warnings from modern GCC. Obtained from:NetBSD (CVS Rev. 1.20) Modified: head/lib/libc/db/btree/bt_split.c Modified: head/lib/libc/db/btree/bt_split.c == --- head/lib/libc/db/btree/bt_split.c Wed Feb 24 16:50:34 2016 (r295972) +++ head/lib/libc/db/btree/bt_split.c Wed Feb 24 16:52:03 2016 (r295973) @@ -236,9 +236,12 @@ __bt_split(BTREE *t, PAGE *sp, const DBT WR_BINTERNAL(dest, nksize ? nksize : bl->ksize, rchild->pgno, bl->flags & P_BIGKEY); memmove(dest, bl->bytes, nksize ? nksize : bl->ksize); - if (bl->flags & P_BIGKEY && - bt_preserve(t, *(pgno_t *)bl->bytes) == RET_ERROR) - goto err1; + if (bl->flags & P_BIGKEY) { + pgno_t pgno; + memcpy(&pgno, bl->bytes, sizeof(pgno)); + if (bt_preserve(t, pgno) == RET_ERROR) + goto err1; + } break; case P_RINTERNAL: /* @@ -544,9 +547,12 @@ bt_broot(BTREE *t, PAGE *h, PAGE *l, PAG * If the key is on an overflow page, mark the overflow chain * so it isn't deleted when the leaf copy of the key is deleted. */ - if (bl->flags & P_BIGKEY && - bt_preserve(t, *(pgno_t *)bl->bytes) == RET_ERROR) - return (RET_ERROR); + if (bl->flags & P_BIGKEY) { + pgno_t pgno; + memcpy(&pgno, bl->bytes, sizeof(pgno)); + if (bt_preserve(t, pgno) == RET_ERROR) + return (RET_ERROR); + } break; case P_BINTERNAL: bi = GETBINTERNAL(r, 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: r295974 - head/sys/kern
Author: ed Date: Wed Feb 24 17:10:32 2016 New Revision: 295974 URL: https://svnweb.freebsd.org/changeset/base/295974 Log: Make asynchronous connection failures on UNIX sockets fail with ECONNRESET. While making CloudABI work well on Linux, I discovered that I had a FreeBSD-ism in one of my unit tests. The test did the following: - Create UNIX socket 1, bind it, make it listen. - Create UNIX socket 2, connect it to UNIX socket 1. - Close UNIX socket 1. - Obtain SO_ERROR from socket 2. On FreeBSD this returns ECONNABORTED, while on Linux it returns ECONNRESET. I dug through some of the relevant specifications[1] and it looks like Linux is all right here. ECONNABORTED should only be returned when the local connection (socket 2) is aborted; not the peer (socket 1). It is of course slightly misleading: the function in which we set this error is called uipc_abort(), but keep in mind that we're aborting the peer, thus resetting the local socket. [1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/connect.html Reviewed by: cem Sponsored by: Nuxi, the Netherlands Differential Revision:https://reviews.freebsd.org/D5419 Modified: head/sys/kern/uipc_usrreq.c Modified: head/sys/kern/uipc_usrreq.c == --- head/sys/kern/uipc_usrreq.c Wed Feb 24 16:52:03 2016(r295973) +++ head/sys/kern/uipc_usrreq.c Wed Feb 24 17:10:32 2016(r295974) @@ -354,7 +354,7 @@ uipc_abort(struct socket *so) unp2 = unp->unp_conn; if (unp2 != NULL) { UNP_PCB_LOCK(unp2); - unp_drop(unp2, ECONNABORTED); + unp_drop(unp2, ECONNRESET); UNP_PCB_UNLOCK(unp2); } UNP_PCB_UNLOCK(unp); ___ 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: r295975 - head/lib/libc/db/recno
Author: pfg Date: Wed Feb 24 17:14:11 2016 New Revision: 295975 URL: https://svnweb.freebsd.org/changeset/base/295975 Log: db(3): Fix aliasing warnings from modern GCC. While here also drop a malloc cast. Obtained from:NetBSD (CVS Rev. 1.18 - 1.20) Modified: head/lib/libc/db/recno/rec_put.c Modified: head/lib/libc/db/recno/rec_put.c == --- head/lib/libc/db/recno/rec_put.cWed Feb 24 17:10:32 2016 (r295974) +++ head/lib/libc/db/recno/rec_put.cWed Feb 24 17:14:11 2016 (r295975) @@ -140,8 +140,7 @@ einval: errno = EINVAL; return (RET_ERROR); if (nrec > t->bt_nrecs + 1) { if (F_ISSET(t, R_FIXLEN)) { - if ((tdata.data = - (void *)malloc(t->bt_reclen)) == NULL) + if ((tdata.data = malloc(t->bt_reclen)) == NULL) return (RET_ERROR); tdata.size = t->bt_reclen; memset(tdata.data, t->bt_bval, tdata.size); @@ -208,7 +207,7 @@ __rec_iput(BTREE *t, recno_t nrec, const return (RET_ERROR); tdata.data = db; tdata.size = NOVFLSIZE; - *(pgno_t *)db = pg; + memcpy(db, &pg, sizeof(pg)); *(u_int32_t *)(db + sizeof(pgno_t)) = data->size; dflags = P_BIGDATA; data = &tdata; ___ 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: r295974 - head/sys/kern
This should really be commented to this effect in the code otherwise someone reading the source will think its a mistake. On 24/02/2016 17:10, Ed Schouten wrote: Author: ed Date: Wed Feb 24 17:10:32 2016 New Revision: 295974 URL: https://svnweb.freebsd.org/changeset/base/295974 Log: Make asynchronous connection failures on UNIX sockets fail with ECONNRESET. While making CloudABI work well on Linux, I discovered that I had a FreeBSD-ism in one of my unit tests. The test did the following: - Create UNIX socket 1, bind it, make it listen. - Create UNIX socket 2, connect it to UNIX socket 1. - Close UNIX socket 1. - Obtain SO_ERROR from socket 2. On FreeBSD this returns ECONNABORTED, while on Linux it returns ECONNRESET. I dug through some of the relevant specifications[1] and it looks like Linux is all right here. ECONNABORTED should only be returned when the local connection (socket 2) is aborted; not the peer (socket 1). It is of course slightly misleading: the function in which we set this error is called uipc_abort(), but keep in mind that we're aborting the peer, thus resetting the local socket. [1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/connect.html Reviewed by: cem Sponsored by:Nuxi, the Netherlands Differential Revision: https://reviews.freebsd.org/D5419 Modified: head/sys/kern/uipc_usrreq.c Modified: head/sys/kern/uipc_usrreq.c == --- head/sys/kern/uipc_usrreq.c Wed Feb 24 16:52:03 2016(r295973) +++ head/sys/kern/uipc_usrreq.c Wed Feb 24 17:10:32 2016(r295974) @@ -354,7 +354,7 @@ uipc_abort(struct socket *so) unp2 = unp->unp_conn; if (unp2 != NULL) { UNP_PCB_LOCK(unp2); - unp_drop(unp2, ECONNABORTED); + unp_drop(unp2, ECONNRESET); UNP_PCB_UNLOCK(unp2); } UNP_PCB_UNLOCK(unp); ___ 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: r295977 - in head/usr.bin: mkcsmapper_static mkesdb_static
Author: bdrewery Date: Wed Feb 24 17:18:31 2016 New Revision: 295977 URL: https://svnweb.freebsd.org/changeset/base/295977 Log: Properly fix these builds by adding NO_WMISSING_VARIABLE_DECLARATIONS from r249657. This reverts r284374. MFC after:2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/usr.bin/mkcsmapper_static/Makefile head/usr.bin/mkesdb_static/Makefile Modified: head/usr.bin/mkcsmapper_static/Makefile == --- head/usr.bin/mkcsmapper_static/Makefile Wed Feb 24 17:18:28 2016 (r295976) +++ head/usr.bin/mkcsmapper_static/Makefile Wed Feb 24 17:18:31 2016 (r295977) @@ -7,9 +7,7 @@ SRCS= citrus_bcs.c citrus_db_factory.c c citrus_lookup_factory.c citrus_pivot_factory.c MAN= NO_SHARED= yes -.if ${MACHINE} == "host" -NO_WARNS= yes -.endif +NO_WMISSING_VARIABLE_DECLARATIONS= build-tools: mkcsmapper_static Modified: head/usr.bin/mkesdb_static/Makefile == --- head/usr.bin/mkesdb_static/Makefile Wed Feb 24 17:18:28 2016 (r295976) +++ head/usr.bin/mkesdb_static/Makefile Wed Feb 24 17:18:31 2016 (r295977) @@ -7,9 +7,7 @@ SRCS= citrus_bcs.c citrus_db_factory.c c citrus_lookup_factory.c MAN= NO_SHARED= yes -.if ${MACHINE} == "host" -NO_WARNS= yes -.endif +NO_WMISSING_VARIABLE_DECLARATIONS= build-tools: mkesdb_static ___ 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: r295976 - head/share/mk
Author: bdrewery Date: Wed Feb 24 17:18:28 2016 New Revision: 295976 URL: https://svnweb.freebsd.org/changeset/base/295976 Log: PROGS: Only recurse on called targets like done for SUBDIR in r291635. MFC after:2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.progs.mk Modified: head/share/mk/bsd.progs.mk == --- head/share/mk/bsd.progs.mk Wed Feb 24 17:14:11 2016(r295975) +++ head/share/mk/bsd.progs.mk Wed Feb 24 17:18:28 2016(r295976) @@ -134,6 +134,8 @@ $p.$t: .PHONY .MAKE # Depend main pseudo targets on all PROG.pseudo targets too. .for t in ${PROGS_TARGETS:O:u} +.if make(${t}) $t: ${PROGS:%=%.$t} +.endif .endfor .endif # !empty(PROGS) && !defined(_RECURSING_PROGS) && !defined(PROG) ___ 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: r295978 - in head: lib/libcxxrt usr.bin/mkcsmapper_static usr.bin/mkesdb_static usr.bin/mkuzip
Author: bdrewery Date: Wed Feb 24 17:18:35 2016 New Revision: 295978 URL: https://svnweb.freebsd.org/changeset/base/295978 Log: DIRDEPS_BUILD: Update dependencies. Sponsored by: EMC / Isilon Storage Division Added: head/usr.bin/mkesdb_static/Makefile.depend - copied, changed from r295977, head/usr.bin/mkcsmapper_static/Makefile.depend Modified: head/lib/libcxxrt/Makefile.depend.host head/usr.bin/mkcsmapper_static/Makefile.depend head/usr.bin/mkuzip/Makefile.depend Modified: head/lib/libcxxrt/Makefile.depend.host == --- head/lib/libcxxrt/Makefile.depend.host Wed Feb 24 17:18:31 2016 (r295977) +++ head/lib/libcxxrt/Makefile.depend.host Wed Feb 24 17:18:35 2016 (r295978) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - usr.bin/clang/clang \ .include Modified: head/usr.bin/mkcsmapper_static/Makefile.depend == --- head/usr.bin/mkcsmapper_static/Makefile.depend Wed Feb 24 17:18:31 2016(r295977) +++ head/usr.bin/mkcsmapper_static/Makefile.depend Wed Feb 24 17:18:35 2016(r295978) @@ -2,12 +2,15 @@ # Autogenerated - do NOT edit! DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ include \ include/arpa \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + usr.bin/yacc.host \ .include Copied and modified: head/usr.bin/mkesdb_static/Makefile.depend (from r295977, head/usr.bin/mkcsmapper_static/Makefile.depend) == --- head/usr.bin/mkcsmapper_static/Makefile.depend Wed Feb 24 17:18:31 2016(r295977, copy source) +++ head/usr.bin/mkesdb_static/Makefile.depend Wed Feb 24 17:18:35 2016 (r295978) @@ -2,12 +2,15 @@ # Autogenerated - do NOT edit! DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ include \ include/arpa \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + usr.bin/yacc.host \ .include Modified: head/usr.bin/mkuzip/Makefile.depend == --- head/usr.bin/mkuzip/Makefile.depend Wed Feb 24 17:18:31 2016 (r295977) +++ head/usr.bin/mkuzip/Makefile.depend Wed Feb 24 17:18:35 2016 (r295978) @@ -9,6 +9,9 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/liblzma \ + lib/libmd \ + lib/libthr \ lib/libz \ ___ 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: r295980 - head
Author: bdrewery Date: Wed Feb 24 17:18:49 2016 New Revision: 295980 URL: https://svnweb.freebsd.org/changeset/base/295980 Log: Support a WANT_MAKE_VERSION. This will be used soon for .dinclude support in FAST_DEPEND. MFC after:2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile Modified: head/Makefile == --- head/Makefile Wed Feb 24 17:18:43 2016(r295979) +++ head/Makefile Wed Feb 24 17:18:49 2016(r295980) @@ -297,11 +297,9 @@ kernel: buildkernel installkernel # Perform a few tests to determine if the installed tools are adequate # for building the world. # -# Note: if we ever need to care about the version of bmake, simply testing -# MAKE_VERSION against a required version should suffice. -# upgrade_checks: -.if ${HAVE_MAKE} != ${WANT_MAKE} +.if ${HAVE_MAKE} != ${WANT_MAKE} || \ +(defined(WANT_MAKE_VERSION) && ${MAKE_VERSION} < ${WANT_MAKE_VERSION}) @(cd ${.CURDIR} && ${MAKE} ${WANT_MAKE:S,^f,,}) .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: r295979 - in head: kerberos5/lib/libasn1 kerberos5/lib/libgssapi_krb5 kerberos5/lib/libgssapi_spnego kerberos5/lib/libhdb kerberos5/lib/libheimntlm kerberos5/lib/libhx509 kerberos5/lib/...
Author: bdrewery Date: Wed Feb 24 17:18:43 2016 New Revision: 295979 URL: https://svnweb.freebsd.org/changeset/base/295979 Log: DIRDEPS_BUILD: Add some missing build dependencies for kerberos5. Sponsored by: EMC / Isilon Storage Division Modified: head/kerberos5/lib/libasn1/Makefile.depend head/kerberos5/lib/libgssapi_krb5/Makefile.depend head/kerberos5/lib/libgssapi_spnego/Makefile.depend head/kerberos5/lib/libhdb/Makefile.depend head/kerberos5/lib/libheimntlm/Makefile.depend head/kerberos5/lib/libhx509/Makefile.depend head/kerberos5/lib/libkadm5clnt/Makefile.depend head/kerberos5/lib/libkadm5srv/Makefile.depend head/kerberos5/lib/libkafs5/Makefile.depend head/kerberos5/lib/libkrb5/Makefile.depend head/kerberos5/lib/libroken/Makefile.depend head/kerberos5/lib/libvers/Makefile.depend head/kerberos5/lib/libwind/Makefile.depend head/kerberos5/libexec/ipropd-master/Makefile.depend head/kerberos5/libexec/ipropd-slave/Makefile.depend head/kerberos5/libexec/kdigest/Makefile.depend head/kerberos5/tools/asn1_compile/Makefile.depend head/kerberos5/tools/slc/Makefile.depend head/kerberos5/usr.bin/hxtool/Makefile.depend head/kerberos5/usr.bin/kadmin/Makefile.depend head/kerberos5/usr.bin/kcc/Makefile.depend head/kerberos5/usr.sbin/iprop-log/Makefile.depend head/kerberos5/usr.sbin/ktutil/Makefile.depend head/targets/pseudo/hosttools/Makefile.depend Modified: head/kerberos5/lib/libasn1/Makefile.depend == --- head/kerberos5/lib/libasn1/Makefile.depend Wed Feb 24 17:18:35 2016 (r295978) +++ head/kerberos5/lib/libasn1/Makefile.depend Wed Feb 24 17:18:43 2016 (r295979) @@ -8,10 +8,12 @@ DIRDEPS = \ include/arpa \ include/xlocale \ kerberos5/lib/libroken \ + kerberos5/tools/asn1_compile.host \ lib/${CSU_DIR} \ lib/libc \ lib/libcom_err \ lib/libcompiler_rt \ + usr.bin/compile_et.host \ .include Modified: head/kerberos5/lib/libgssapi_krb5/Makefile.depend == --- head/kerberos5/lib/libgssapi_krb5/Makefile.depend Wed Feb 24 17:18:35 2016(r295978) +++ head/kerberos5/lib/libgssapi_krb5/Makefile.depend Wed Feb 24 17:18:43 2016(r295979) @@ -19,6 +19,7 @@ DIRDEPS = \ lib/libcompiler_rt \ lib/libgssapi \ secure/lib/libcrypto \ + usr.bin/compile_et.host \ .include Modified: head/kerberos5/lib/libgssapi_spnego/Makefile.depend == --- head/kerberos5/lib/libgssapi_spnego/Makefile.depend Wed Feb 24 17:18:35 2016(r295978) +++ head/kerberos5/lib/libgssapi_spnego/Makefile.depend Wed Feb 24 17:18:43 2016(r295979) @@ -11,6 +11,7 @@ DIRDEPS = \ kerberos5/lib/libheimbase \ kerberos5/lib/libkrb5 \ kerberos5/lib/libroken \ + kerberos5/tools/asn1_compile.host \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ Modified: head/kerberos5/lib/libhdb/Makefile.depend == --- head/kerberos5/lib/libhdb/Makefile.depend Wed Feb 24 17:18:35 2016 (r295978) +++ head/kerberos5/lib/libhdb/Makefile.depend Wed Feb 24 17:18:43 2016 (r295979) @@ -13,12 +13,14 @@ DIRDEPS = \ kerberos5/lib/libkrb5 \ kerberos5/lib/libroken \ kerberos5/lib/libwind \ + kerberos5/tools/asn1_compile.host \ lib/${CSU_DIR} \ lib/libc \ lib/libcom_err \ lib/libcompiler_rt \ lib/libsqlite3 \ secure/lib/libcrypto \ + usr.bin/compile_et.host \ .include Modified: head/kerberos5/lib/libheimntlm/Makefile.depend == --- head/kerberos5/lib/libheimntlm/Makefile.depend Wed Feb 24 17:18:35 2016(r295978) +++ head/kerberos5/lib/libheimntlm/Makefile.depend Wed Feb 24 17:18:43 2016(r295979) @@ -15,6 +15,7 @@ DIRDEPS = \ lib/libcom_err \ lib/libcompiler_rt \ secure/lib/libcrypto \ + usr.bin/compile_et.host \ .include Modified: head/kerberos5/lib/libhx509/Makefile.depend == --- head/kerberos5/lib/libhx509/Makefile.depend Wed Feb 24 17:18:35 2016 (r295978) +++ head/kerberos5/lib/libhx509/Makefile.depend Wed Feb 24 17:18:43 2016 (r295979) @@ -10,11 +10,13 @@ DIRDEPS = \ kerberos5/lib/libasn1 \ kerberos5/lib/libroken \ kerberos5/lib/libwind \ + kerberos5/tools/asn1_compile.host \ lib/${CSU_DIR} \ lib/libc \ lib/libcom_err \ lib/libcompiler_rt \ secure/lib/libcrypto \ + usr.bin/compile_et.host \ usr.bin/yacc.host \ Mo
svn commit: r295984 - head/sys/conf
Author: bdrewery Date: Wed Feb 24 17:19:02 2016 New Revision: 295984 URL: https://svnweb.freebsd.org/changeset/base/295984 Log: Support beforebuild in the kernel. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/conf/kern.post.mk Modified: head/sys/conf/kern.post.mk == --- head/sys/conf/kern.post.mk Wed Feb 24 17:18:58 2016(r295983) +++ head/sys/conf/kern.post.mk Wed Feb 24 17:19:02 2016(r295984) @@ -86,7 +86,8 @@ ports-${__target}: .ORDER: kernel-install modules-install -kernel-all: ${KERNEL_KO} ${KERNEL_EXTRA} +beforebuild: .PHONY +kernel-all: beforebuild .WAIT ${KERNEL_KO} ${KERNEL_EXTRA} kernel-cleandir: kernel-clean kernel-cleandepend ___ 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: r295981 - head/tools/tools/net80211/w00t
Author: bdrewery Date: Wed Feb 24 17:18:52 2016 New Revision: 295981 URL: https://svnweb.freebsd.org/changeset/base/295981 Log: Convert to LIBADD. Sponsored by: EMC / Isilon Storage Division Modified: head/tools/tools/net80211/w00t/Makefile.inc Modified: head/tools/tools/net80211/w00t/Makefile.inc == --- head/tools/tools/net80211/w00t/Makefile.inc Wed Feb 24 17:18:49 2016 (r295980) +++ head/tools/tools/net80211/w00t/Makefile.inc Wed Feb 24 17:18:52 2016 (r295981) @@ -2,9 +2,10 @@ W00T= ../libw00t # NB: we get crc32 from -lz -DPADD= ${W00T}/libw00t.a ${LIBCRYPTO} ${LIBZ} +DPADD= ${W00T}/libw00t.a LDFLAGS= -L${W00T} -LDADD= -lw00t -lcrypto -lz +LDADD= -lw00t +LIBADD+= crypto z BINDIR=/usr/local/bin CFLAGS=-g -I${W00T} ___ 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: r295982 - head/share/mk
Author: bdrewery Date: Wed Feb 24 17:18:55 2016 New Revision: 295982 URL: https://svnweb.freebsd.org/changeset/base/295982 Log: Follow-up r295667 with fixes for SRCS defined. cleandepend should always remove CLEANDEPEND* if they are not empty, but bsd.dep.mk should not add the tags entries unless SRCS is defined as it did before. The .depend file itself it still always removed to avoid accidentally keeping a stale one around as done in r295666. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk == --- head/share/mk/bsd.dep.mkWed Feb 24 17:18:52 2016(r295981) +++ head/share/mk/bsd.dep.mkWed Feb 24 17:18:55 2016(r295982) @@ -268,6 +268,7 @@ afterdepend: .endif .endif +.if defined(SRCS) .if ${CTAGS:T} == "gtags" CLEANDEPENDFILES+= GPATH GRTAGS GSYMS GTAGS .if defined(HTML) @@ -276,15 +277,16 @@ CLEANDEPENDDIRS+= HTML .else CLEANDEPENDFILES+= tags .endif +.endif .if !target(cleandepend) cleandepend: -.if defined(SRCS) +.if !empty(CLEANDEPENDFILES) rm -f ${CLEANDEPENDFILES} +.endif .if !empty(CLEANDEPENDDIRS) rm -rf ${CLEANDEPENDDIRS} .endif .endif -.endif .if !target(checkdpadd) && (defined(DPADD) || defined(LDADD)) _LDADD_FROM_DPADD= ${DPADD:R:T:C;^lib(.*)$;-l\1;g} ___ 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: r295987 - in head: share/mk sys/conf
Author: bdrewery Date: Wed Feb 24 17:19:13 2016 New Revision: 295987 URL: https://svnweb.freebsd.org/changeset/base/295987 Log: Hook the meta/nofilemon build into using FAST_DEPEND. FAST_DEPEND is intended to be the "skip 'make depend' and mkdep" feature. Since DIRDEPS_BUILD does this already with some of its own hacks, and filemon doesn't need this, and nofilemon does, teach it how to handle each of these cases. In meta+filemon mode filemon will handle dependencies itself via the meta mode logic in bmake. We still want to set MK_FAST_DEPEND=yes to enable some logic that indicates that 'make depend' is skipped in the traditional sense. The actual .depend.* files will be skipped. When nofilemon is set though we still need to track and generate dependencies. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.dep.mk head/share/mk/bsd.opts.mk head/share/mk/local.meta.sys.mk head/sys/conf/kern.opts.mk head/sys/conf/kern.post.mk Modified: head/share/mk/bsd.dep.mk == --- head/share/mk/bsd.dep.mkWed Feb 24 17:19:09 2016(r295986) +++ head/share/mk/bsd.dep.mkWed Feb 24 17:19:13 2016(r295987) @@ -173,14 +173,24 @@ ${_D}.po: ${_DSRC} ${POBJS:S/^${_D}.po$/ .endfor -.if ${MK_FAST_DEPEND} == "yes" && \ -(${.MAKE.MODE:Mmeta} == "" || ${.MAKE.MODE:Mnofilemon} != "") +.if !empty(.MAKE.MODE:Mmeta) && empty(.MAKE.MODE:Mnofilemon) +_meta_filemon= 1 +.endif +.if ${MK_FAST_DEPEND} == "yes" DEPEND_MP?=-MP # Handle OBJS=../somefile.o hacks. Just replace '/' rather than use :T to # avoid collisions. DEPEND_FILTER= C,/,_,g +DEPENDSRCS=${SRCS:M*.[cSC]} ${SRCS:M*.cxx} ${SRCS:M*.cpp} ${SRCS:M*.cc} +.if !empty(DEPENDSRCS) +DEPENDOBJS+= ${DEPENDSRCS:R:S,$,.o,} +.endif +DEPENDFILES_OBJS= ${DEPENDOBJS:O:u:${DEPEND_FILTER}:C/^/${DEPENDFILE}./} DEPEND_CFLAGS+=-MD ${DEPEND_MP} -MF${DEPENDFILE}.${.TARGET:${DEPEND_FILTER}} DEPEND_CFLAGS+=-MT${.TARGET} +# Skip generating or including .depend.* files if in meta+filemon mode since +# it will track dependencies itself. OBJS_DEPEND_GUESS is still used though. +.if !defined(_meta_filemon) .if defined(.PARSEDIR) # Only add in DEPEND_CFLAGS for CFLAGS on files we expect from DEPENDOBJS # as those are the only ones we will include. @@ -189,34 +199,34 @@ CFLAGS+= ${${DEPEND_CFLAGS_CONDITION}:?$ .else CFLAGS+= ${DEPEND_CFLAGS} .endif -DEPENDSRCS=${SRCS:M*.[cSC]} ${SRCS:M*.cxx} ${SRCS:M*.cpp} ${SRCS:M*.cc} -.if !empty(DEPENDSRCS) -DEPENDOBJS+= ${DEPENDSRCS:R:S,$,.o,} -.endif -DEPENDFILES_OBJS= ${DEPENDOBJS:O:u:${DEPEND_FILTER}:C/^/${DEPENDFILE}./} .if !defined(_SKIP_READ_DEPEND) .for __depend_obj in ${DEPENDFILES_OBJS} .sinclude "${__depend_obj}" .endfor .endif # !defined(_SKIP_READ_DEPEND) +.endif # !defined(_meta_filemon) .endif # ${MK_FAST_DEPEND} == "yes" .endif # defined(SRCS) .if ${MK_DIRDEPS_BUILD} == "yes" .include +# If using filemon then _EXTRADEPEND is skipped since it is not needed. +.if empty(.MAKE.MODE:Mnofilemon) # this depend: bypasses that below # the dependency helps when bootstrapping depend: beforedepend ${DPSRCS} ${SRCS} afterdepend beforedepend: afterdepend: beforedepend .endif +.endif # Guess some dependencies for when no ${DEPENDFILE}.OBJ is generated yet. -# Done here to support meta mode as well which does not always need -# the CFLAGS modifications or .depend.* included. +# For meta+filemon the .meta file is checked for since it is the dependency +# file used. .if ${MK_FAST_DEPEND} == "yes" .for __obj in ${DEPENDOBJS:O:u} -.if !exists(${.OBJDIR}/${DEPENDFILE}.${__obj}) +.if (defined(_meta_filemon) && !exists(${.OBJDIR}/${__obj}.meta)) || \ +(!defined(_meta_filemon) && !exists(${.OBJDIR}/${DEPENDFILE}.${__obj})) ${__obj}: ${OBJS_DEPEND_GUESS} ${__obj}: ${OBJS_DEPEND_GUESS.${__obj}} .endif Modified: head/share/mk/bsd.opts.mk == --- head/share/mk/bsd.opts.mk Wed Feb 24 17:19:09 2016(r295986) +++ head/share/mk/bsd.opts.mk Wed Feb 24 17:19:13 2016(r295987) @@ -77,7 +77,14 @@ __DEFAULT_NO_OPTIONS = \ __DEFAULT_DEPENDENT_OPTIONS = \ STAGING_MAN/STAGING \ STAGING_PROG/STAGING \ - + + +# Enable FAST_DEPEND by default for the meta build. +.if !empty(.MAKE.MODE:Mmeta) +__DEFAULT_YES_OPTIONS+=FAST_DEPEND +__DEFAULT_NO_OPTIONS:= ${__DEFAULT_NO_OPTIONS:NFAST_DEPEND} +.endif + .include # Modified: head/share/mk/local.meta.sys.mk == --- head/share/mk/local.meta.sys.mk Wed Feb 24 17:19:09 2016 (r295986) +++ head/share/mk/local.meta.sys.mk Wed Feb 24 17:19:13 2016 (r295987) @@ -6,6 +6,7 @@ # we need this until there is an alternative MK_INSTALL_AS_USER= yes +MK_FAST_DEPEND= yes _default_makeobjdir=$$
svn commit: r295983 - head/sys/conf
Author: bdrewery Date: Wed Feb 24 17:18:58 2016 New Revision: 295983 URL: https://svnweb.freebsd.org/changeset/base/295983 Log: Remove ilinks in cleandepend directly via CLEANDEPENDFILES. The 'cleanilinks' target is kept since it may still be useful as added in r200178, though never documented. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/conf/kmod.mk Modified: head/sys/conf/kmod.mk == --- head/sys/conf/kmod.mk Wed Feb 24 17:18:55 2016(r295982) +++ head/sys/conf/kmod.mk Wed Feb 24 17:18:58 2016(r295983) @@ -452,7 +452,7 @@ ${OBJS}: opt_global.h .include -cleandepend: cleanilinks +CLEANDEPENDFILES+= ${_ILINKS} # .depend needs include links so we remove them only together. cleanilinks: rm -f ${_ILINKS} ___ 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: r295985 - in head: share/mk sys/conf
Author: bdrewery Date: Wed Feb 24 17:19:05 2016 New Revision: 295985 URL: https://svnweb.freebsd.org/changeset/base/295985 Log: FAST_DEPEND: Rework how guessed dependencies are handled. Rather than depend on .depend not existing, check the actual .depend.OBJ file that will be used for that object. If it doesn't exist then use the guessed dependencies. FAST_DEPEND may never have a .depend file. Not having one means all of the previous logic would over-depend all object files on all headers which is not what we wanted. It also means that if a .depend is generated before a build is done for _EXTRADEPEND (such as for PROG or LIB) then all of these dependencies would not be used since the .depend wasn't generated from mkdep and the real .depend.* files are not generated until the build. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.dep.mk head/share/mk/bsd.lib.mk head/share/mk/bsd.prog.mk head/sys/conf/kern.post.mk head/sys/conf/kmod.mk Modified: head/share/mk/bsd.dep.mk == --- head/share/mk/bsd.dep.mkWed Feb 24 17:19:02 2016(r295984) +++ head/share/mk/bsd.dep.mkWed Feb 24 17:19:05 2016(r295985) @@ -94,19 +94,21 @@ _SKIP_READ_DEPEND= 1 .if defined(SRCS) CLEANFILES?= -.if ${MK_FAST_DEPEND} == "yes" || !exists(${.OBJDIR}/${DEPENDFILE}) .for _S in ${SRCS:N*.[dhly]} -${_S:R}.o: ${_S} -.endfor +OBJS_DEPEND_GUESS.${_S:R}.o= ${_S} +.if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE}) +${_S:R}.o: ${OBJS_DEPEND_GUESS.${_S:R}.o} .endif +.endfor # Lexical analyzers .for _LSRC in ${SRCS:M*.l:N*/*} .for _LC in ${_LSRC:R}.c ${_LC}: ${_LSRC} ${LEX} ${LFLAGS} -o${.TARGET} ${.ALLSRC} -.if ${MK_FAST_DEPEND} == "yes" || !exists(${.OBJDIR}/${DEPENDFILE}) -${_LC:R}.o: ${_LC} +OBJS_DEPEND_GUESS.${_LC:R}.o= ${_LC} +.if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE}) +${_LC:R}.o: ${OBJS_DEPEND_GUESS.${_LC:R}.o} .endif SRCS:= ${SRCS:S/${_LSRC}/${_LC}/} CLEANFILES+= ${_LC} @@ -136,8 +138,9 @@ CLEANFILES+= ${_YH} ${_YC}: ${_YSRC} ${YACC} ${YFLAGS} -o ${_YC} ${.ALLSRC} .endif -.if ${MK_FAST_DEPEND} == "yes" || !exists(${.OBJDIR}/${DEPENDFILE}) -${_YC:R}.o: ${_YC} +OBJS_DEPEND_GUESS.${_YC:R}.o= ${_YC} +.if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE}) +${_YC:R}.o: ${OBJS_DEPEND_GUESS.${_YC:R}.o} .endif .endfor .endfor @@ -195,7 +198,7 @@ DEPENDFILES_OBJS= ${DEPENDOBJS:O:u:${DEP .for __depend_obj in ${DEPENDFILES_OBJS} .sinclude "${__depend_obj}" .endfor -.endif +.endif # !defined(_SKIP_READ_DEPEND) .endif # ${MK_FAST_DEPEND} == "yes" .endif # defined(SRCS) @@ -208,6 +211,18 @@ beforedepend: afterdepend: beforedepend .endif +# Guess some dependencies for when no ${DEPENDFILE}.OBJ is generated yet. +# Done here to support meta mode as well which does not always need +# the CFLAGS modifications or .depend.* included. +.if ${MK_FAST_DEPEND} == "yes" +.for __obj in ${DEPENDOBJS:O:u} +.if !exists(${.OBJDIR}/${DEPENDFILE}.${__obj}) +${__obj}: ${OBJS_DEPEND_GUESS} +${__obj}: ${OBJS_DEPEND_GUESS.${__obj}} +.endif +.endfor +.endif + .if !target(depend) .if defined(SRCS) depend: beforedepend ${DEPENDFILE} afterdepend Modified: head/share/mk/bsd.lib.mk == --- head/share/mk/bsd.lib.mkWed Feb 24 17:19:02 2016(r295984) +++ head/share/mk/bsd.lib.mkWed Feb 24 17:19:05 2016(r295985) @@ -415,28 +415,31 @@ lint: ${SRCS:M*.c} .include .endif -.include - -.if ${MK_FAST_DEPEND} == "yes" || !exists(${.OBJDIR}/${DEPENDFILE}) .if defined(LIB) && !empty(LIB) -.if !exists(${.OBJDIR}/${DEPENDFILE}) -${OBJS} ${STATICOBJS} ${POBJS}: ${SRCS:M*.h} +OBJS_DEPEND_GUESS+= ${SRCS:M*.h} +.if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE}) +${OBJS} ${STATICOBJS} ${POBJS}: ${OBJS_DEPEND_GUESS} .endif .for _S in ${SRCS:N*.[hly]} -${_S:R}.po: ${_S} +OBJS_DEPEND_GUESS.${_S:R}.po= ${_S} +.if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE}) +${_S:R}.po: ${OBJS_DEPEND_GUESS.${_S:R}.po} +.endif .endfor .endif .if defined(SHLIB_NAME) || \ defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) -.if !exists(${.OBJDIR}/${DEPENDFILE}) -${SOBJS}: ${SRCS:M*.h} +.if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE}) +${SOBJS}: ${OBJS_DEPEND_GUESS} .endif .for _S in ${SRCS:N*.[hly]} -${_S:R}.So: ${_S} -.endfor +OBJS_DEPEND_GUESS.${_S:R}.So= ${_S} +.if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE}) +${_S:R}.So: ${OBJS_DEPEND_GUESS.${_S:R}.So} .endif +.endfor .endif +.include .include - .include Modified: head/share/mk/bsd.prog.mk == --- head/share/mk/bsd.prog.mk Wed Feb 24 17:19:02 2016(r295984) +++ head/share/mk/bsd.prog.mk Wed Feb 24 17:19:05 2016
svn commit: r295986 - in head: share/mk sys/conf
Author: bdrewery Date: Wed Feb 24 17:19:09 2016 New Revision: 295986 URL: https://svnweb.freebsd.org/changeset/base/295986 Log: FAST_DEPEND: Don't waste time generating an empty .depend file. The .depend file will still be generated if _EXTRADEPEND is used. The target is kept with a dependency on DPSRCS though so that 'make depend' will generate all files. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.dep.mk head/sys/conf/kern.post.mk Modified: head/share/mk/bsd.dep.mk == --- head/share/mk/bsd.dep.mkWed Feb 24 17:19:05 2016(r295985) +++ head/share/mk/bsd.dep.mkWed Feb 24 17:19:09 2016(r295986) @@ -246,6 +246,8 @@ MKDEP_CXXFLAGS= ${CXXFLAGS:M-nostdinc*} .endif # ${MK_FAST_DEPEND} == "no" DPSRCS+= ${SRCS} +# FAST_DEPEND will only generate a .depend if _EXTRADEPEND is used but +# the target is created to allow 'make depend' to generate files. ${DEPENDFILE}: ${DPSRCS} .if ${MK_FAST_DEPEND} == "no" rm -f ${DEPENDFILE} @@ -260,8 +262,6 @@ ${DEPENDFILE}: ${DPSRCS} ${.ALLSRC:M*.cc} ${.ALLSRC:M*.C} ${.ALLSRC:M*.cpp} ${.ALLSRC:M*.cxx} .else .endif -.else - : > ${.TARGET} .endif # ${MK_FAST_DEPEND} == "no" .if target(_EXTRADEPEND) _EXTRADEPEND: .USE Modified: head/sys/conf/kern.post.mk == --- head/sys/conf/kern.post.mk Wed Feb 24 17:19:05 2016(r295985) +++ head/sys/conf/kern.post.mk Wed Feb 24 17:19:09 2016(r295986) @@ -278,8 +278,6 @@ ${__obj}: ${OBJS_DEPEND_GUESS.${__obj}} ${MAKE} -V SFILES_CDDL | \ CC="${_MKDEPCC}" xargs mkdep -a -f ${.TARGET}.tmp ${ZFS_ASM_CFLAGS} mv ${.TARGET}.tmp ${.TARGET} -.else - : > ${.TARGET} .endif _ILINKS= 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: r295988 - in head: kerberos5/lib/libasn1 kerberos5/lib/libhdb kerberos5/lib/libheimntlm kerberos5/lib/libhx509 lib/clang share/mk sys/conf
Author: bdrewery Date: Wed Feb 24 17:19:18 2016 New Revision: 295988 URL: https://svnweb.freebsd.org/changeset/base/295988 Log: FAST_DEPEND: Always run depend via beforebuild which removes many hacks. This will generate dependencies rather than depending on the previous behavior of depending on the guessed OBJS: *.h dependecies or a user running 'make depend'. Experimentation showed that depending only on headers was not enough and prone to .ORDER errors. Downstream users may also have added dependencies into beforedepend or afterdepend targets. The safest way to ensure dependencies are generated before build is to run 'make depend' beforehand rather than just depending on DPSRCS+SRCS. Note that the OBJS_DEPEND_GUESS mechanism (a.k.a .if !exists(.depend) then foo.o: *.h) is still useful as it improves incremental builds with missing .depend.* files and allows 'make foo.o' to usually work, while this 'beforebuild: depend' ensures that the build will always find all dependencies. The 'make foo.o' case has no means of a 'beforebuild' hook. This also removes several hacks in the DIRDEPS_BUILD: - NO_INSTALL_INCLUDES is no longer needed as it mostly was to work around .ORDER problems with building the needed headers early. - DIRDEPS_BUILD: It is no longer necesarry to track "local dependencies" in Makefile.depend. These were only in Makefile.depend for 'clean builds' since nothing would generate the files due to skipping 'make depend' and early dependency bugs that have been fixed, such as adding headers into SRCS for the OBJS_DEPEND_GUESS mechanism. Normally if a .depend file does not exist then a dependency is added by bsd.lib.mk/bsd.prog.mk from OBJS: *.h. However, meta.autodep.mk creates a .depend file from created meta files and inserts that into Makefile.depend. It also only tracks *.[ch] files though which can miss some dependencies that are hooked into 'make depend'. This .depend that is created then breaks incremental builds due to the !exists(.depend) checks for OBJS_DEPEND_GUESS. The goal was to skip 'make depend' yet it only really works the first time. After that files are not generated as expected, which r288966 tried to address but was using buildfiles: rather than beforebuild: and was reverted in r291725. As noted previously, depending only on headers in beforebuild: would create .ORDER errors in some cases. meta.autodep.mk is still used to generate Makefile.depend though via: gendirdeps: Makefile.depend .END: gendirdeps This commit allows removing all of the "local dependencies" in Makefile.depend which cuts down on churn and removes some of the arch-dependent Makefile.depend files. The "local dependencies" were also problematic for bootstrapping. Sponsored by: EMC / Isilon Storage Division Modified: head/kerberos5/lib/libasn1/Makefile head/kerberos5/lib/libhdb/Makefile head/kerberos5/lib/libheimntlm/Makefile head/kerberos5/lib/libhx509/Makefile head/lib/clang/clang.build.mk head/share/mk/bsd.dep.mk head/sys/conf/kern.post.mk Modified: head/kerberos5/lib/libasn1/Makefile == --- head/kerberos5/lib/libasn1/Makefile Wed Feb 24 17:19:13 2016 (r295987) +++ head/kerberos5/lib/libasn1/Makefile Wed Feb 24 17:19:18 2016 (r295988) @@ -116,11 +116,6 @@ ${GEN_KX509}: kx509.asn1 .hx.h: ${CP} ${.IMPSRC} ${.TARGET} -# This makefile generates a lot of its headers -# so tell bsd.sys.mk not to try and stage them before they are built. -# Note: this is rare -NO_BEFOREBUILD_INCLUDES= - .include .SUFFIXES: .h .c .x .hx Modified: head/kerberos5/lib/libhdb/Makefile == --- head/kerberos5/lib/libhdb/Makefile Wed Feb 24 17:19:13 2016 (r295987) +++ head/kerberos5/lib/libhdb/Makefile Wed Feb 24 17:19:18 2016 (r295988) @@ -97,11 +97,6 @@ ${GEN}: hdb.asn1 .hx.h: ${CP} ${.IMPSRC} ${.TARGET} -# This makefile generates a lot of its headers -# so tell bsd.sys.mk not to try and stage them before they are built. -# Note: this is rare -NO_BEFOREBUILD_INCLUDES= - .include .SUFFIXES: .h .c .x .hx Modified: head/kerberos5/lib/libheimntlm/Makefile == --- head/kerberos5/lib/libheimntlm/Makefile Wed Feb 24 17:19:13 2016 (r295987) +++ head/kerberos5/lib/libheimntlm/Makefile Wed Feb 24 17:19:18 2016 (r295988) @@ -3,7 +3,7 @@ LIB= heimntlm LDFLAGS= -Wl,--no-undefined LIBADD=crypto com_err krb5 roken -SRCS= ntlm.c ntlm_err.c +SRCS= ntlm.c ntlm_err.c ntlm_err.h INCS= heimntlm.h heimntlm-protos.h ntlm_err.h CFLAGS+=-I${KRB5DIR}/lib/ntlm -I${KRB5DIR}/lib/roken VERSION_MAP= ${KRB5DIR}/lib/ntlm/version-script.map Modi
svn commit: r295989 - in head: bin/csh bin/expr bin/rmail bin/sh cddl/lib/libdtrace gnu/lib/csu gnu/lib/libgcc gnu/lib/libgcov gnu/lib/libgomp gnu/lib/libregex gnu/lib/libstdc++ gnu/lib/libsupc++ g...
Author: bdrewery Date: Wed Feb 24 17:20:11 2016 New Revision: 295989 URL: https://svnweb.freebsd.org/changeset/base/295989 Log: DIRDEPS_BUILD: Regenerate without local dependencies. These are no longer needed after the recent 'beforebuild: depend' changes and hooking DIRDEPS_BUILD into a subset of FAST_DEPEND which supports skipping 'make depend'. Sponsored by: EMC / Isilon Storage Division Added: head/gnu/usr.bin/binutils/ld/Makefile.depend - copied, changed from r295988, head/bin/expr/Makefile.depend head/gnu/usr.bin/binutils/libbfd/Makefile.depend - copied, changed from r295988, head/gnu/usr.bin/cc/libcpp/Makefile.depend head/gnu/usr.bin/gdb/kgdb/Makefile.depend - copied, changed from r295988, head/gnu/usr.bin/gdb/gdb/Makefile.depend head/gnu/usr.bin/gdb/libgdb/Makefile.depend - copied, changed from r295988, head/usr.sbin/ntp/libntp/Makefile.depend Deleted: head/gnu/usr.bin/binutils/ld/Makefile.depend.amd64 head/gnu/usr.bin/binutils/libbfd/Makefile.depend.amd64 head/gnu/usr.bin/gdb/kgdb/Makefile.depend.amd64 head/gnu/usr.bin/gdb/libgdb/Makefile.depend.amd64 Modified: head/bin/csh/Makefile.depend head/bin/expr/Makefile.depend head/bin/rmail/Makefile.depend head/bin/sh/Makefile.depend head/cddl/lib/libdtrace/Makefile.depend head/gnu/lib/csu/Makefile.depend head/gnu/lib/libgcc/Makefile.depend head/gnu/lib/libgcov/Makefile.depend head/gnu/lib/libgomp/Makefile.depend head/gnu/lib/libregex/Makefile.depend head/gnu/lib/libstdc++/Makefile.depend head/gnu/lib/libsupc++/Makefile.depend head/gnu/usr.bin/binutils/ld/Makefile.depend.host head/gnu/usr.bin/binutils/libbfd/Makefile.depend.host head/gnu/usr.bin/binutils/libbinutils/Makefile.depend head/gnu/usr.bin/cc/cc1/Makefile.depend head/gnu/usr.bin/cc/cc1plus/Makefile.depend head/gnu/usr.bin/cc/cc_tools/Makefile.depend head/gnu/usr.bin/cc/libcpp/Makefile.depend head/gnu/usr.bin/diff3/Makefile.depend head/gnu/usr.bin/dtc/Makefile.depend head/gnu/usr.bin/gdb/gdb/Makefile.depend head/gnu/usr.bin/gdb/gdbtui/Makefile.depend head/gnu/usr.bin/groff/src/libs/libgroff/Makefile.depend head/gnu/usr.bin/groff/src/preproc/eqn/Makefile.depend head/gnu/usr.bin/groff/src/preproc/pic/Makefile.depend head/gnu/usr.bin/groff/src/preproc/refer/Makefile.depend head/gnu/usr.bin/groff/src/roff/troff/Makefile.depend head/gnu/usr.bin/sdiff/Makefile.depend head/kerberos5/lib/libasn1/Makefile.depend head/kerberos5/lib/libgssapi_krb5/Makefile.depend head/kerberos5/lib/libgssapi_spnego/Makefile.depend head/kerberos5/lib/libhdb/Makefile.depend head/kerberos5/lib/libheimntlm/Makefile.depend head/kerberos5/lib/libhx509/Makefile.depend head/kerberos5/lib/libkadm5clnt/Makefile.depend head/kerberos5/lib/libkadm5srv/Makefile.depend head/kerberos5/lib/libkrb5/Makefile.depend head/kerberos5/lib/libroken/Makefile.depend head/kerberos5/lib/libvers/Makefile.depend head/kerberos5/lib/libwind/Makefile.depend head/kerberos5/libexec/ipropd-master/Makefile.depend head/kerberos5/libexec/ipropd-slave/Makefile.depend head/kerberos5/libexec/kdigest/Makefile.depend head/kerberos5/tools/asn1_compile/Makefile.depend head/kerberos5/tools/make-roken/Makefile.depend head/kerberos5/tools/slc/Makefile.depend head/kerberos5/usr.bin/hxtool/Makefile.depend head/kerberos5/usr.bin/kadmin/Makefile.depend head/kerberos5/usr.bin/kcc/Makefile.depend head/kerberos5/usr.sbin/iprop-log/Makefile.depend head/kerberos5/usr.sbin/ktutil/Makefile.depend head/lib/clang/libclanganalysis/Makefile.depend head/lib/clang/libclangarcmigrate/Makefile.depend head/lib/clang/libclangast/Makefile.depend head/lib/clang/libclangbasic/Makefile.depend head/lib/clang/libclangcodegen/Makefile.depend head/lib/clang/libclangdriver/Makefile.depend head/lib/clang/libclangedit/Makefile.depend head/lib/clang/libclangfrontend/Makefile.depend head/lib/clang/libclangfrontendtool/Makefile.depend head/lib/clang/libclanglex/Makefile.depend head/lib/clang/libclangparse/Makefile.depend head/lib/clang/libclangrewrite/Makefile.depend head/lib/clang/libclangrewritefrontend/Makefile.depend head/lib/clang/libclangsema/Makefile.depend head/lib/clang/libclangserialization/Makefile.depend head/lib/clang/libclangstaticanalyzercheckers/Makefile.depend head/lib/clang/libclangstaticanalyzercore/Makefile.depend head/lib/clang/libclangstaticanalyzerfrontend/Makefile.depend head/lib/clang/liblldbAPI/Makefile.depend head/lib/clang/liblldbBreakpoint/Makefile.depend head/lib/clang/liblldbCommands/Makefile.depend head/lib/clang/liblldbCore/Makefile.depend head/lib/clang/liblldbDataFormatters/Makefile.depend head/lib/clang/liblldbExpression/Makefile.depend head/lib/clang/liblldbInterpreter/Makefile.depend head/lib/clang/liblldbPluginABISysV_arm/Makefile.depend head/lib/clang/liblldbPluginABISysV_arm64/Makefile.depend head/lib/clang/liblldbPluginABISysV_i386/Makefile.depend head/l
svn commit: r295990 - in head: . targets/pseudo/kernel
Author: bdrewery Date: Wed Feb 24 17:20:22 2016 New Revision: 295990 URL: https://svnweb.freebsd.org/changeset/base/295990 Log: FAST_DEPEND: Skip 'make depend' for buildworld and kernel since it is auto-ran now. Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 head/targets/pseudo/kernel/Makefile Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Wed Feb 24 17:20:11 2016(r295989) +++ head/Makefile.inc1 Wed Feb 24 17:20:22 2016(r295990) @@ -145,6 +145,16 @@ CLEANDIR= clean cleandepend CLEANDIR= cleandir .endif +# FAST_DEPEND can skip depend tree-walks. +.if ${MK_FAST_DEPEND} == "yes" +NO_DEPEND= t +NO_KERNELDEPEND=t +.endif +# Ensure shell checks later have a value. +.if defined(NO_DEPEND) +NO_DEPEND= t +.endif + LOCAL_TOOL_DIRS?= PACKAGEDIR?= ${DESTDIR}/${DISTDIR} @@ -772,7 +782,11 @@ WMAKE_TGTS+= _worldtmp _legacy WMAKE_TGTS+= _bootstrap-tools .endif WMAKE_TGTS+= _cleanobj _obj _build-tools _cross-tools -WMAKE_TGTS+= _includes _libraries _depend everything +WMAKE_TGTS+= _includes _libraries +.if !defined(NO_DEPEND) +WMAKE_TGTS+= _depend +.endif +WMAKE_TGTS+= everything .if defined(LIB32TMP) && ${MK_LIB32} != "no" && empty(SUBDIR_OVERRIDE) WMAKE_TGTS+= build32 .endif @@ -1403,7 +1417,7 @@ legacy: cd ${.CURDIR}/${_tool}; \ ${MAKE} DIRPRFX=${_tool}/ obj; \ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy includes; \ - ${MAKE} DIRPRFX=${_tool}/ depend; \ + if [ -z "${NO_DEPEND}" ]; then ${MAKE} DIRPRFX=${_tool}/ depend; fi; \ ${MAKE} DIRPRFX=${_tool}/ all; \ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install .endfor @@ -1551,7 +1565,7 @@ ${_bt}-${_tool}: .PHONY .MAKE ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_tool}; \ ${MAKE} DIRPRFX=${_tool}/ obj; \ - ${MAKE} DIRPRFX=${_tool}/ depend; \ + if [ -z "${NO_DEPEND}" ]; then ${MAKE} DIRPRFX=${_tool}/ depend; fi; \ ${MAKE} DIRPRFX=${_tool}/ all; \ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install @@ -1600,7 +1614,7 @@ build-tools_${_tool}: .PHONY ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all)"; \ cd ${.CURDIR}/${_tool}; \ ${MAKE} DIRPRFX=${_tool}/ obj; \ - ${MAKE} DIRPRFX=${_tool}/ depend; \ + if [ -z "${NO_DEPEND}" ]; then ${MAKE} DIRPRFX=${_tool}/ depend; fi; \ ${MAKE} DIRPRFX=${_tool}/ all build-tools: build-tools_${_tool} .endfor @@ -1684,7 +1698,7 @@ cross-tools: .MAKE .PHONY ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_tool}; \ ${MAKE} DIRPRFX=${_tool}/ obj; \ - ${MAKE} DIRPRFX=${_tool}/ depend; \ + if [ -z "${NO_DEPEND}" ]; then ${MAKE} DIRPRFX=${_tool}/ depend; fi; \ ${MAKE} DIRPRFX=${_tool}/ all; \ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX} install .endfor @@ -1716,7 +1730,7 @@ native-xtools: .PHONY ${_+_}@${ECHODIR} "===> ${_gperf} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_gperf}; \ ${NXBMAKE} DIRPRFX=${_gperf}/ obj; \ - ${NXBMAKE} DIRPRFX=${_gperf}/ depend; \ + if [ -z "${NO_DEPEND}" ]; then ${NXBMAKE} DIRPRFX=${_gperf}/ depend; fi; \ ${NXBMAKE} DIRPRFX=${_gperf}/ all; \ ${NXBMAKE} DIRPRFX=${_gperf}/ DESTDIR=${OBJTREE}/gperf_for_gcc install .endif @@ -1791,7 +1805,7 @@ native-xtools: .PHONY ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_tool}; \ ${NXBMAKE} DIRPRFX=${_tool}/ obj; \ - ${NXBMAKE} DIRPRFX=${_tool}/ depend; \ + if [ -z "${NO_DEPEND}" ]; then ${NXBMAKE} DIRPRFX=${_tool}/ depend; fi; \ ${NXBMAKE} DIRPRFX=${_tool}/ all; \ ${NXBMAKE} DIRPRFX=${_tool}/ DESTDIR=${NXBDESTDIR} install .endfor @@ -2021,7 +2035,7 @@ ${_lib}__PL: .PHONY .MAKE ${_+_}@${ECHODIR} "===> ${_lib} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_lib}; \ ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ obj; \ - ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ depend; \ + if [ -z "${NO_DEPEND}" ]; then ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ depend; fi; \ ${MAKE} MK_TESTS=no MK_PROFILE=no -DNO_PIC \ DIRPRFX=${_lib}/ all; \ ${MAKE} MK_TESTS=no MK_PROFILE=no -DNO_PIC \ @@ -2035,7 +2049,7 @@ ${_lib}__L: .PHONY .MAKE ${_+_}@${ECHODIR} "===> ${_lib} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_lib}; \ ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ obj; \ - ${MAKE} MK_TESTS=no DIRP
svn commit: r295991 - head/targets
Author: bdrewery Date: Wed Feb 24 17:20:25 2016 New Revision: 295991 URL: https://svnweb.freebsd.org/changeset/base/295991 Log: DIRDEPS_BUILD: Allow 'make destroy*' to work from top-level. Sponsored by: EMC / Isilon Storage Division Modified: head/targets/Makefile.xtras Modified: head/targets/Makefile.xtras == --- head/targets/Makefile.xtras Wed Feb 24 17:20:22 2016(r295990) +++ head/targets/Makefile.xtras Wed Feb 24 17:20:25 2016(r295991) @@ -51,6 +51,7 @@ show-help: not-valid-target: @echo "ERROR: '${_TARGETS}' is not a valid target for ${MACHINE}." +.include .for t in ${_TARGETS:Nlove} .if !target($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: r295994 - head/share/mk
Author: bdrewery Date: Wed Feb 24 17:20:34 2016 New Revision: 295994 URL: https://svnweb.freebsd.org/changeset/base/295994 Log: PROGS: Remove the 'build one' optimization since it breaks 'build multiple' Given PROG1 PROG2, 'make PROG1' would work but 'make PROG1 PROG2' would not. Just build them as normal in a sub-make to avoid any issues. MFC after:2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.progs.mk Modified: head/share/mk/bsd.progs.mk == --- head/share/mk/bsd.progs.mk Wed Feb 24 17:20:31 2016(r295993) +++ head/share/mk/bsd.progs.mk Wed Feb 24 17:20:34 2016(r295994) @@ -27,18 +27,6 @@ UPDATE_DEPENDFILE_PROG = ${PROGS:[1]} .export UPDATE_DEPENDFILE_PROG .endif -.ifndef PROG -# They may have asked us to build just one -.for t in ${PROGS} -.if make($t) -.if ${PROGS_CXX:U:M${t}} -PROG_CXX ?= $t -.endif -PROG ?= $t -.endif -.endfor -.endif - .if defined(PROG) # just one of many PROG_OVERRIDE_VARS += BINDIR BINGRP BINOWN BINMODE DPSRCS MAN NO_WERROR \ ___ 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: r295992 - head/targets
Author: bdrewery Date: Wed Feb 24 17:20:28 2016 New Revision: 295992 URL: https://svnweb.freebsd.org/changeset/base/295992 Log: DIRDEPS_BUILD: Allow destroy-(arch|host|stage) from top-level. Sponsored by: EMC / Isilon Storage Division Modified: head/targets/Makefile.xtras Modified: head/targets/Makefile.xtras == --- head/targets/Makefile.xtras Wed Feb 24 17:20:25 2016(r295991) +++ head/targets/Makefile.xtras Wed Feb 24 17:20:28 2016(r295992) @@ -29,6 +29,9 @@ no-default: .if make(show-valid-targets) OTHER_TARGETS = \ destroy \ + destroy-arch \ + destroy-host \ + destroy-stage \ BUILD_TARGETS != cd ${_here} && \ find . \( -name Makefile.depend -o -name ${.MAKE.DEPENDFILE: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: r295993 - head/share/mk
Author: bdrewery Date: Wed Feb 24 17:20:31 2016 New Revision: 295993 URL: https://svnweb.freebsd.org/changeset/base/295993 Log: Show full DIRPRFX in subdir parallel target name. For example when building, from buildworld, lib/atf/libatf-c++/tests/detail: --- all_subdir_atf --- is now: --- all_subdir_lib/atf/libatf-c++/tests/detail --- Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.subdir.mk Modified: head/share/mk/bsd.subdir.mk == --- head/share/mk/bsd.subdir.mk Wed Feb 24 17:20:28 2016(r295992) +++ head/share/mk/bsd.subdir.mk Wed Feb 24 17:20:31 2016(r295993) @@ -138,14 +138,14 @@ __subdir_targets= .if ${__dir} == .WAIT __subdir_targets+= .WAIT .else -__subdir_targets+= ${__target}_subdir_${__dir} +__subdir_targets+= ${__target}_subdir_${DIRPRFX}${__dir} __deps= .if ${_is_standalone_target} == 0 .for __dep in ${SUBDIR_DEPEND_${__dir}} -__deps+= ${__target}_subdir_${__dep} +__deps+= ${__target}_subdir_${DIRPRFX}${__dep} .endfor .endif -${__target}_subdir_${__dir}: .PHONY .MAKE ${__deps} +${__target}_subdir_${DIRPRFX}${__dir}: .PHONY .MAKE ${__deps} .if !defined(NO_SUBDIR) @${_+_}target=${__target:realinstall=install}; \ dir=${__dir}; \ ___ 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: r295974 - head/sys/kern
Hi Steven, 2016-02-24 18:14 GMT+01:00 Steven Hartland : > This should really be commented to this effect in the code otherwise someone > reading the source will think its a mistake. Good point. I also looked at the code a bit more and it looks like we now call unp_drop() with errno == ECONNRESET unconditionally, meaning we can simplify the code a bit. What do you think of the following patch? http://80386.nl/pub/20160224-socket-econnreset.txt Thanks, -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 ___ 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: r295995 - head/share/man/man5
Author: bdrewery Date: Wed Feb 24 19:07:35 2016 New Revision: 295995 URL: https://svnweb.freebsd.org/changeset/base/295995 Log: BDECFLAGS has not been available since r82604 removed /etc/defaults/make.conf. WARNS=6 has provided BDECFLAGS since r94332 as well. MFC after:1 week Sponsored by: EMC / Isilon Storage Division Modified: head/share/man/man5/make.conf.5 Modified: head/share/man/man5/make.conf.5 == --- head/share/man/man5/make.conf.5 Wed Feb 24 17:20:34 2016 (r295994) +++ head/share/man/man5/make.conf.5 Wed Feb 24 19:07:35 2016 (r295995) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 12, 2015 +.Dd February 24, 2016 .Dt MAKE.CONF 5 .Os .Sh NAME @@ -141,16 +141,6 @@ Optimization levels other than and .Fl O2 are not supported. -.Va BDECFLAGS -is provided as a set of -.Xr cc 1 -settings suggested by -.An Bruce Evans Aq Mt b...@freebsd.org -for developing and testing changes. -They can be used, if set, by: -.Bd -literal -offset indent -CFLAGS+=${BDECFLAGS} -.Ed .It Va CPUTYPE .Pq Vt str Controls which processor should be targeted for generated ___ 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: r293068 - in head/etc: . mtree
> On 03 Jan 2016, at 05:32, Warner Losh wrote: >> Author: imp >> Date: Sun Jan 3 04:32:05 2016 >> New Revision: 293068 >> URL: https://svnweb.freebsd.org/changeset/base/293068 >> >> Log: >> Add libsoft to the tree, just like lib32. Is this commit complete? I only see mtree extractions, but no build or install changes to get the libraries. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r295996 - head/share/man/man5
Author: bdrewery Date: Wed Feb 24 19:19:25 2016 New Revision: 295996 URL: https://svnweb.freebsd.org/changeset/base/295996 Log: Regenerate Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 == --- head/share/man/man5/src.conf.5 Wed Feb 24 19:07:35 2016 (r295995) +++ head/share/man/man5/src.conf.5 Wed Feb 24 19:19:25 2016 (r295996) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 292283 2015-12-15 18:42:30Z bdrewery .\" $FreeBSD$ -.Dd January 9, 2016 +.Dd February 24, 2016 .Dt SRC.CONF 5 .Os .Sh NAME @@ -165,10 +165,16 @@ The resulting system cannot build progra .Pp It is a default setting on arm64/aarch64. +.It Va WITH_BINUTILS +.\" from FreeBSD: head/tools/build/options/WITH_BINUTILS 295491 2016-02-11 00:14:00Z emaste +Set to build and install binutils (as, ld, objcopy, and objdump) as part +of the normal system build. +.Pp +It is a default setting on +amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv6hf, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_BINUTILS_BOOTSTRAP -.\" from FreeBSD: head/tools/build/options/WITHOUT_BINUTILS_BOOTSTRAP 264660 2014-04-18 17:03:58Z imp -Set to not build binutils (as, c++-filt, gconv, -ld, nm, objcopy, objdump, readelf, size and strip) +.\" from FreeBSD: head/tools/build/options/WITHOUT_BINUTILS_BOOTSTRAP 295490 2016-02-10 23:57:09Z emaste +Set to not build binutils (as, ld, objcopy and objdump) as part of the bootstrap process. .Bf -symbolic The option does not work for build targets unless some alternative @@ -177,6 +183,13 @@ toolchain is provided. .Pp It is a default setting on arm64/aarch64. +.It Va WITH_BINUTILS_BOOTSTRAP +.\" from FreeBSD: head/tools/build/options/WITH_BINUTILS_BOOTSTRAP 295491 2016-02-11 00:14:00Z emaste +Set build binutils (as, ld, objcopy and objdump) +as part of the bootstrap process. +.Pp +It is a default setting on +amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv6hf, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_BLUETOOTH .\" from FreeBSD: head/tools/build/options/WITHOUT_BLUETOOTH 156932 2006-03-21 07:50:50Z ru Set to not build Bluetooth related kernel modules, programs and libraries. @@ -504,6 +517,8 @@ When set, it also enforces the following .Pp .Bl -item -compact .It +.Va WITH_FAST_DEPEND +.It .Va WITH_INSTALL_AS_USER .El .Pp @@ -601,6 +616,14 @@ instead of the one from GNU Binutils. .Pp It is a default setting on arm64/aarch64. +.It Va WITHOUT_ELFTOOLCHAIN_BOOTSTRAP +.\" from FreeBSD: head/tools/build/options/WITHOUT_ELFTOOLCHAIN_BOOTSTRAP 295491 2016-02-11 00:14:00Z emaste +Set to not build ELF Tool Chain tools +(addr2line, nm, size, strings and strip) +as part of the bootstrap process. +.Bf -symbolic +An alternate bootstrap tool chain must be provided. +.Ef .It Va WITHOUT_EXAMPLES .\" from FreeBSD: head/tools/build/options/WITHOUT_EXAMPLES 156938 2006-03-21 09:06:24Z ru Set to avoid installing examples to @@ -702,6 +725,13 @@ Set to not build .Pp It is a default setting on arm64/aarch64. +.It Va WITH_GDB +.\" from FreeBSD: head/tools/build/options/WITH_GDB 295493 2016-02-11 00:30:51Z emaste +Set to build +.Xr gdb 1 . +.Pp +It is a default setting on +amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv6hf, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_GNU .\" from FreeBSD: head/tools/build/options/WITHOUT_GNU 174550 2007-12-12 16:43:17Z ru Set to not build contributed GNU software as a part of the base system. ___ 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: r295997 - head/sys/conf
Author: bdrewery Date: Wed Feb 24 20:02:58 2016 New Revision: 295997 URL: https://svnweb.freebsd.org/changeset/base/295997 Log: Remove hack from r2408 that is no longer needed. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/conf/kern.post.mk Modified: head/sys/conf/kern.post.mk == --- head/sys/conf/kern.post.mk Wed Feb 24 19:19:25 2016(r295996) +++ head/sys/conf/kern.post.mk Wed Feb 24 20:02:58 2016(r295997) @@ -181,9 +181,6 @@ hack.So: Makefile ${CC} ${HACK_EXTRA_FLAGS} -nostdlib hack.c -o hack.So rm -f hack.c -# This rule stops ./assym.s in .depend from causing problems. -./assym.s: assym.s - assym.s: $S/kern/genassym.sh genassym.o NM='${NM}' NMFLAGS='${NMFLAGS}' sh $S/kern/genassym.sh genassym.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: r295998 - head/share/man/man9
Author: kib Date: Wed Feb 24 20:04:41 2016 New Revision: 295998 URL: https://svnweb.freebsd.org/changeset/base/295998 Log: Remove references to Giant in the description of vrele(9). Add notes about vnode lock and sleeping. Reported by: julian Sponsored by: The FreeBSD Foundation MFC after:2 weeks Modified: head/share/man/man9/vrele.9 Modified: head/share/man/man9/vrele.9 == --- head/share/man/man9/vrele.9 Wed Feb 24 20:02:58 2016(r295997) +++ head/share/man/man9/vrele.9 Wed Feb 24 20:04:41 2016(r295998) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2010 +.Dd February 24, 2015 .Dt VRELE 9 .Os .Sh NAME @@ -81,9 +81,11 @@ If the .Va v_usecount field of the non-doomed vnode reaches zero, then it will be inactivated and placed on the free list. -Since the functions might need to call VOPs for the vnode, the -.Va Giant -mutex should be conditionally locked around the call. +.Pp +The +.Fn vrele +function may lock the vnode. +All three functions may sleep. .Pp The hold count for the vnode is always greater or equal to the usecount. Non-forced unmount fails when mount point owns a vnode that has non-zero ___ 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: r295999 - head/share/mk
Author: bdrewery Date: Wed Feb 24 20:28:45 2016 New Revision: 295999 URL: https://svnweb.freebsd.org/changeset/base/295999 Log: FAST_DEPEND: Still need to remove DEPENDFILE when rebuilding. This avoids _EXTRADEPEND adding duplicate entries. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk == --- head/share/mk/bsd.dep.mkWed Feb 24 20:04:41 2016(r295998) +++ head/share/mk/bsd.dep.mkWed Feb 24 20:28:45 2016(r295999) @@ -268,8 +268,10 @@ DPSRCS+= ${SRCS} # FAST_DEPEND will only generate a .depend if _EXTRADEPEND is used but # the target is created to allow 'make depend' to generate files. ${DEPENDFILE}: ${DPSRCS} -.if ${MK_FAST_DEPEND} == "no" +.if exists(${.OBJDIR}/${DEPENDFILE}) rm -f ${DEPENDFILE} +.endif +.if ${MK_FAST_DEPEND} == "no" .if !empty(DPSRCS:M*.[cS]) ${MKDEPCMD} -f ${DEPENDFILE} -a ${MKDEP} \ ${MKDEP_CFLAGS} ${.ALLSRC:M*.[cS]} ___ 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: r296000 - head/share/mk
Author: bdrewery Date: Wed Feb 24 20:28:48 2016 New Revision: 296000 URL: https://svnweb.freebsd.org/changeset/base/296000 Log: PROGS: Only the main process will install INCS. MFC after:2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.progs.mk Modified: head/share/mk/bsd.progs.mk == --- head/share/mk/bsd.progs.mk Wed Feb 24 20:28:45 2016(r295999) +++ head/share/mk/bsd.progs.mk Wed Feb 24 20:28:48 2016(r296000) @@ -62,7 +62,8 @@ UPDATE_DEPENDFILE = NO # These are handled by the main make process. .ifdef _RECURSING_PROGS -_PROGS_GLOBAL_VARS= CLEANFILES CLEANDIRS FILESGROUPS SCRIPTS CONFGROUPS +_PROGS_GLOBAL_VARS= CLEANFILES CLEANDIRS CONFGROUPS FILESGROUPS INCSGROUPS \ + SCRIPTS .for v in ${_PROGS_GLOBAL_VARS} $v = .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: r296001 - head/share/man/man9
Author: kib Date: Wed Feb 24 20:32:24 2016 New Revision: 296001 URL: https://svnweb.freebsd.org/changeset/base/296001 Log: Fix year. Noted by: bdrewery MFC after:2 weeks Modified: head/share/man/man9/vrele.9 Modified: head/share/man/man9/vrele.9 == --- head/share/man/man9/vrele.9 Wed Feb 24 20:28:48 2016(r296000) +++ head/share/man/man9/vrele.9 Wed Feb 24 20:32:24 2016(r296001) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 24, 2015 +.Dd February 24, 2016 .Dt VRELE 9 .Os .Sh 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: r296002 - head/gnu/lib/libgcc
Author: bdrewery Date: Wed Feb 24 21:19:44 2016 New Revision: 296002 URL: https://svnweb.freebsd.org/changeset/base/296002 Log: Don't hide AR command as bsd.lib.mk's r283925 changed as well. MFC after:2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/gnu/lib/libgcc/Makefile Modified: head/gnu/lib/libgcc/Makefile == --- head/gnu/lib/libgcc/MakefileWed Feb 24 20:32:24 2016 (r296001) +++ head/gnu/lib/libgcc/MakefileWed Feb 24 21:19:44 2016 (r296002) @@ -380,7 +380,7 @@ CLEANFILES += libgcc.map libgcc_eh.a: ${EH_OBJS_T} @${ECHO} building static gcc_eh library @rm -f ${.TARGET} - @${AR} ${ARFLAGS} ${.TARGET} `lorder ${EH_OBJS_T} | tsort -q` + ${AR} ${ARFLAGS} ${.TARGET} `lorder ${EH_OBJS_T} | tsort -q` ${RANLIB} ${RANLIBFLAGS} ${.TARGET} _LIBS+= libgcc_eh.a @@ -389,7 +389,7 @@ _LIBS+= libgcc_eh.a libgcc_eh_p.a: ${EH_OBJS_P} @${ECHO} building profiled gcc_eh library @rm -f ${.TARGET} - @${AR} ${ARFLAGS} ${.TARGET} `lorder ${EH_OBJS_P} | tsort -q` + ${AR} ${ARFLAGS} ${.TARGET} `lorder ${EH_OBJS_P} | tsort -q` ${RANLIB} ${RANLIBFLAGS} ${.TARGET} _LIBS+= libgcc_eh_p.a ___ 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: r296009 - head/sys/net
Author: kib Date: Wed Feb 24 22:00:35 2016 New Revision: 296009 URL: https://svnweb.freebsd.org/changeset/base/296009 Log: In bpf_getdltlist(), do not call copyout(9) while holding bpf lock. Copy the data into temprorary malloced buffer and drop the lock for copyout. Reported, reviewed and tested by: cem Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/net/bpf.c Modified: head/sys/net/bpf.c == --- head/sys/net/bpf.c Wed Feb 24 21:41:28 2016(r296008) +++ head/sys/net/bpf.c Wed Feb 24 22:00:35 2016(r296009) @@ -2681,26 +2681,44 @@ bpf_ifdetach(void *arg __unused, struct static int bpf_getdltlist(struct bpf_d *d, struct bpf_dltlist *bfl) { - int n, error; struct ifnet *ifp; struct bpf_if *bp; + u_int *lst; + int error, n, n1; BPF_LOCK_ASSERT(); ifp = d->bd_bif->bif_ifp; +again: + n1 = 0; + LIST_FOREACH(bp, &bpf_iflist, bif_next) { + if (bp->bif_ifp == ifp) + n1++; + } + if (bfl->bfl_list == NULL) { + bfl->bfl_len = n1; + return (0); + } + if (n1 > bfl->bfl_len) + return (ENOMEM); + BPF_UNLOCK(); + lst = malloc(n1 * sizeof(u_int), M_TEMP, M_WAITOK); n = 0; - error = 0; + BPF_LOCK(); LIST_FOREACH(bp, &bpf_iflist, bif_next) { if (bp->bif_ifp != ifp) continue; - if (bfl->bfl_list != NULL) { - if (n >= bfl->bfl_len) - return (ENOMEM); - error = copyout(&bp->bif_dlt, - bfl->bfl_list + n, sizeof(u_int)); + if (n > n1) { + free(lst, M_TEMP); + goto again; } + lst[n] = bp->bif_dlt; n++; } + BPF_UNLOCK(); + error = copyout(lst, bfl->bfl_list, sizeof(u_int) * n); + free(lst, M_TEMP); + BPF_LOCK(); bfl->bfl_len = n; return (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: r296013 - head/share/mk
Author: bdrewery Date: Wed Feb 24 22:27:22 2016 New Revision: 296013 URL: https://svnweb.freebsd.org/changeset/base/296013 Log: Add more STANDALONE_SUBDIR_TARGETS. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.subdir.mk Modified: head/share/mk/bsd.subdir.mk == --- head/share/mk/bsd.subdir.mk Wed Feb 24 22:27:18 2016(r296012) +++ head/share/mk/bsd.subdir.mk Wed Feb 24 22:27:22 2016(r296013) @@ -47,8 +47,15 @@ SUBDIR_TARGETS+= \ # Described above. STANDALONE_SUBDIR_TARGETS+= \ - obj check checkdpadd clean cleandepend cleandir \ - cleanilinks cleanobj installconfig \ + all-man buildconfig buildfiles buildincludes check checkdpadd \ + clean cleandepend cleandir cleanilinks cleanobj files includes \ + installconfig installincludes installfiles maninstall manlint \ + obj objlink \ + +# It is safe to install in parallel when staging. +.if defined(NO_ROOT) +STANDALONE_SUBDIR_TARGETS+= realinstall +.endif .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: r296014 - head
Author: bdrewery Date: Wed Feb 24 22:27:25 2016 New Revision: 296014 URL: https://svnweb.freebsd.org/changeset/base/296014 Log: Add order for installworld/installkernel. MFC after:2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile Modified: head/Makefile == --- head/Makefile Wed Feb 24 22:27:22 2016(r296013) +++ head/Makefile Wed Feb 24 22:27:25 2016(r296014) @@ -138,6 +138,7 @@ TGTS+= ${BITGTS} .ORDER: buildworld distributeworld .ORDER: buildworld buildkernel .ORDER: installworld distribution +.ORDER: installworld installkernel .ORDER: buildkernel installkernel .ORDER: buildkernel installkernel.debug .ORDER: buildkernel reinstallkernel ___ 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: r296012 - head/gnu/lib/libgcc
Author: bdrewery Date: Wed Feb 24 22:27:18 2016 New Revision: 296012 URL: https://svnweb.freebsd.org/changeset/base/296012 Log: OBJS and POBJS have not been used since r215127. r215127 disabled building of libgcc.a. MFC after:2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/gnu/lib/libgcc/Makefile Modified: head/gnu/lib/libgcc/Makefile == --- head/gnu/lib/libgcc/MakefileWed Feb 24 22:07:56 2016 (r296011) +++ head/gnu/lib/libgcc/MakefileWed Feb 24 22:27:18 2016 (r296012) @@ -33,7 +33,7 @@ CFLAGS+= -DIN_GCC -DIN_LIBGCC2 -D__GCC_F LDFLAGS+= -nodefaultlibs LIBADD+= c -OBJS= # added to below in various ways depending on TARGET_CPUARCH +SOBJS= # added to below in various ways depending on TARGET_CPUARCH #--- # @@ -252,7 +252,7 @@ OBJ_GRPS += FPBIT DPBIT ${T}_OBJS_T = ${${T}_FUNCS:S/$/.o/} ${T}_OBJS_P = ${${T}_FUNCS:S/$/.po/} ${T}_OBJS_S = ${${T}_FUNCS:S/$/.So/} -OBJS +=${${T}_FUNCS:S/$/.o/} +SOBJS += ${${T}_FUNCS:S/$/.So/} ${${T}_OBJS_T}: ${${T}_CFILE} ${COMMONHDRS} ${CC_T} ${${T}_CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c} @@ -267,9 +267,7 @@ ${${T}_OBJS_S}: ${${T}_CFILE} ${COMMONHD # Extra objects coming from separate files # .if !empty(LIB2ADD) -OBJS += ${LIB2ADD:R:S/$/.o/} SOBJS += ${LIB2ADD:R:S/$/.So/} -POBJS += ${LIB2ADD:R:S/$/.po/} .endif #--- @@ -295,7 +293,7 @@ ASM_T = ${LIB1ASMFUNCS:S/$/.o/} ASM_P =${LIB1ASMFUNCS:S/$/.po/} ASM_S =${LIB1ASMFUNCS:S/$/.So/} ASM_V =${LIB1ASMFUNCS:S/$/.vis/} -OBJS +=${LIB1ASMFUNCS:S/$/.o/} +SOBJS += ${LIB1ASMFUNCS:S/$/.So/} ${ASM_T}: ${LIB1ASMSRC} ${.PREFIX}.vis ${CC} -x assembler-with-cpp -c ${CFLAGS} -DL${.PREFIX} \ @@ -363,7 +361,7 @@ SHLIB_MAPFILES += ${GCCDIR}/config/arm/ .endif VERSION_MAP = libgcc.map -libgcc.map: ${SHLIB_MKMAP} ${SHLIB_MAPFILES} ${SOBJS} ${OBJS:R:S/$/.So/} +libgcc.map: ${SHLIB_MKMAP} ${SHLIB_MAPFILES} ${SOBJS} ( ${NM} -pg ${SOBJS};echo %% ; \ cat ${SHLIB_MAPFILES} \ | sed -e '/^[ ]*#/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: r296017 - head/share/misc
Author: jmcneill Date: Thu Feb 25 01:03:34 2016 New Revision: 296017 URL: https://svnweb.freebsd.org/changeset/base/296017 Log: Add myself as src committer. Approved by: gonzo (mentor) Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot == --- head/share/misc/committers-src.dot Thu Feb 25 00:37:51 2016 (r296016) +++ head/share/misc/committers-src.dot Thu Feb 25 01:03:34 2016 (r296017) @@ -200,6 +200,7 @@ jkim [label="Jung-uk Kim\njkim@FreeBSD.o jkoshy [label="A. Joseph Koshy\njko...@freebsd.org\n1998/05/13"] jlh [label="Jeremie Le Hen\n...@freebsd.org\n2012/04/22"] jls [label="Jordan Sissel\n...@freebsd.org\n2006/12/06"] +jmcneill [label="Jared McNeill\njmcne...@freebsd.org\n2016/02/24"] jmg [label="John-Mark Gurney\n...@freebsd.org\n1997/02/13"] jmmv [label="Julio Merino\nj...@freebsd.org\n2013/11/02"] joerg [label="Joerg Wunsch\njo...@freebsd.org\n1993/11/14"] @@ -340,6 +341,7 @@ day1 -> alm day1 -> dg adrian -> avos +adrian -> jmcneill adrian -> lidl adrian -> loos adrian -> monthadar @@ -470,6 +472,8 @@ gnn -> erj gnn -> kp gnn -> jtl +gonzo -> jmcneill + grehan -> bryanv grog -> edwin ___ 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: r296018 - head/sys/dev/cxgbe
Author: np Date: Thu Feb 25 01:10:56 2016 New Revision: 296018 URL: https://svnweb.freebsd.org/changeset/base/296018 Log: cxgbe(4): Add a sysctl to retrieve the maximum speed/bandwidth supported by a port. dev.cxgbe..max_speed dev.cxl..max_speed Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/adapter.h == --- head/sys/dev/cxgbe/adapter.hThu Feb 25 01:03:34 2016 (r296017) +++ head/sys/dev/cxgbe/adapter.hThu Feb 25 01:10:56 2016 (r296018) @@ -1011,6 +1011,22 @@ is_40G_port(const struct port_info *pi) } static inline int +port_top_speed(const struct port_info *pi) +{ + + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_100G) + return (100); + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_40G) + return (40); + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_10G) + return (10); + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_1G) + return (1); + + return (0); +} + +static inline int tx_resume_threshold(struct sge_eq *eq) { Modified: head/sys/dev/cxgbe/t4_main.c == --- head/sys/dev/cxgbe/t4_main.cThu Feb 25 01:03:34 2016 (r296017) +++ head/sys/dev/cxgbe/t4_main.cThu Feb 25 01:10:56 2016 (r296018) @@ -5499,6 +5499,9 @@ cxgbe_sysctls(struct port_info *pi) CTLTYPE_STRING | CTLFLAG_RW, pi, PAUSE_TX, sysctl_pause_settings, "A", "PAUSE settings (bit 0 = rx_pause, bit 1 = tx_pause)"); + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "max_speed", CTLFLAG_RD, NULL, + port_top_speed(pi), "max speed (in Gbps)"); + /* * dev.cxgbe.X.stats. */ ___ 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: r296019 - head/sys/arm/allwinner
Author: jmcneill Date: Thu Feb 25 01:24:02 2016 New Revision: 296019 URL: https://svnweb.freebsd.org/changeset/base/296019 Log: Fix dedicated DMA transfers. For sources and destinations marked "noincr", the previous code was incorrectly programming the dedicated DMA channel control register using bit definitions for normal DMA channels. This code path is not currently used, but will be used by the HDMI audio driver in review. Reviewed by: andrew Approved by: gonzo (mentor) Differential Revision:https://reviews.freebsd.org/D5382 Modified: head/sys/arm/allwinner/a10_dmac.c Modified: head/sys/arm/allwinner/a10_dmac.c == --- head/sys/arm/allwinner/a10_dmac.c Thu Feb 25 01:10:56 2016 (r296018) +++ head/sys/arm/allwinner/a10_dmac.c Thu Feb 25 01:24:02 2016 (r296019) @@ -222,8 +222,8 @@ a10dmac_set_config(device_t dev, void *p { struct a10dmac_channel *ch = priv; uint32_t val; - unsigned int dst_dw, dst_bl, dst_bs, dst_wc; - unsigned int src_dw, src_bl, src_bs, src_wc; + unsigned int dst_dw, dst_bl, dst_bs, dst_wc, dst_am; + unsigned int src_dw, src_bl, src_bs, src_wc, src_am; switch (cfg->dst_width) { case 8: @@ -284,16 +284,23 @@ a10dmac_set_config(device_t dev, void *p (src_dw << AWIN_DMA_CTL_SRC_DATA_WIDTH_SHIFT) | (src_bl << AWIN_DMA_CTL_SRC_BURST_LEN_SHIFT) | (cfg->src_drqtype << AWIN_DMA_CTL_SRC_DRQ_TYPE_SHIFT); - if (cfg->dst_noincr) { - val |= AWIN_NDMA_CTL_DST_ADDR_NOINCR; - } - if (cfg->src_noincr) { - val |= AWIN_NDMA_CTL_SRC_ADDR_NOINCR; - } if (ch->ch_type == CH_NDMA) { + if (cfg->dst_noincr) + val |= AWIN_NDMA_CTL_DST_ADDR_NOINCR; + if (cfg->src_noincr) + val |= AWIN_NDMA_CTL_SRC_ADDR_NOINCR; + DMACH_WRITE(ch, AWIN_NDMA_CTL_REG, val); } else { + dst_am = cfg->dst_noincr ? AWIN_DDMA_CTL_DMA_ADDR_IO : + AWIN_DDMA_CTL_DMA_ADDR_LINEAR; + src_am = cfg->src_noincr ? AWIN_DDMA_CTL_DMA_ADDR_IO : + AWIN_DDMA_CTL_DMA_ADDR_LINEAR; + + val |= (dst_am << AWIN_DDMA_CTL_DST_ADDR_MODE_SHIFT); + val |= (src_am << AWIN_DDMA_CTL_SRC_ADDR_MODE_SHIFT); + DMACH_WRITE(ch, AWIN_DDMA_CTL_REG, val); dst_bs = cfg->dst_blksize - 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: r296020 - head/sys/dev/mrsas
Author: smh Date: Thu Feb 25 02:46:47 2016 New Revision: 296020 URL: https://svnweb.freebsd.org/changeset/base/296020 Log: Fix NULL pointer dereferences Fix NULL pointer dereferences identified as V522 by PVS-Studio. MFC after:1 week Sponsored by: Multiplay Modified: head/sys/dev/mrsas/mrsas.c Modified: head/sys/dev/mrsas/mrsas.c == --- head/sys/dev/mrsas/mrsas.c Thu Feb 25 01:24:02 2016(r296019) +++ head/sys/dev/mrsas/mrsas.c Thu Feb 25 02:46:47 2016(r296020) @@ -1274,14 +1274,12 @@ mrsas_get_softc_instance(struct cdev *de * Application */ sc = mrsas_mgmt_info.sc_ptr[user_ioc->host_no]; - if ((user_ioc->host_no >= mrsas_mgmt_info.max_index) || (sc == NULL)) { - if (sc == NULL) - mrsas_dprint(sc, MRSAS_FAULT, - "There is no Controller number %d .\n", user_ioc->host_no); - else - mrsas_dprint(sc, MRSAS_FAULT, - "Invalid Controller number %d .\n", user_ioc->host_no); - } + if (sc == NULL) + printf("There is no Controller number %d\n", + user_ioc->host_no); + else if (user_ioc->host_no >= mrsas_mgmt_info.max_index) + mrsas_dprint(sc, MRSAS_FAULT, + "Invalid Controller number %d\n", user_ioc->host_no); } return sc; @@ -4023,8 +4021,8 @@ mrsas_aen_handler(struct mrsas_softc *sc u_int32_t seq_num; int error; - if (!sc) { - device_printf(sc->mrsas_dev, "invalid instance!\n"); + if (sc == NULL) { + printf("invalid instance!\n"); return; } if (sc->evt_detail_mem) { ___ 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: r296021 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: smh Date: Thu Feb 25 03:01:24 2016 New Revision: 296021 URL: https://svnweb.freebsd.org/changeset/base/296021 Log: Removed unused label and fix mutex_exit order Remove unused done label from zfs_setacl fixing PVS-Studio V729. Fix mutex_exit order to mirror the mutex_enter order. MFC after:1 week Sponsored by: Multiplay Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c Thu Feb 25 02:46:47 2016(r296020) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c Thu Feb 25 03:01:24 2016(r296021) @@ -1994,8 +1994,8 @@ top: zfs_sa_upgrade_txholds(tx, zp); error = dmu_tx_assign(tx, TXG_NOWAIT); if (error) { - mutex_exit(&zp->z_acl_lock); mutex_exit(&zp->z_lock); + mutex_exit(&zp->z_acl_lock); if (error == ERESTART) { dmu_tx_wait(tx); @@ -2020,7 +2020,6 @@ top: if (fuidp) zfs_fuid_info_free(fuidp); dmu_tx_commit(tx); -done: mutex_exit(&zp->z_lock); mutex_exit(&zp->z_acl_lock); ___ 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: r296022 - head/sys/dev/hyperv/netvsc
Author: sephe Date: Thu Feb 25 03:21:25 2016 New Revision: 296022 URL: https://svnweb.freebsd.org/changeset/base/296022 Log: hyperv/hn: Implement ifnet.if_transmit method It will be turned on by default later. MFC after:1 week Sponsored by: Microsoft OSTC Differential Revision:https://reviews.freebsd.org/D5415 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h == --- head/sys/dev/hyperv/netvsc/hv_net_vsc.h Thu Feb 25 03:01:24 2016 (r296021) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.h Thu Feb 25 03:21:25 2016 (r296022) @@ -1034,6 +1034,9 @@ struct hn_tx_ring { struct task hn_tx_task; struct task hn_txeof_task; + struct buf_ring *hn_mbuf_br; + int hn_oactive; + struct mtx hn_tx_lock; struct hn_softc *hn_sc; Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c == --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Thu Feb 25 03:01:24 2016(r296021) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Thu Feb 25 03:21:25 2016(r296022) @@ -272,6 +272,10 @@ static int hn_bind_tx_taskq = -1; SYSCTL_INT(_hw_hn, OID_AUTO, bind_tx_taskq, CTLFLAG_RDTUN, &hn_bind_tx_taskq, 0, "Bind TX taskqueue to the specified cpu"); +static int hn_use_if_start = 1; +SYSCTL_INT(_hw_hn, OID_AUTO, use_if_start, CTLFLAG_RDTUN, +&hn_use_if_start, 0, "Use if_start TX method"); + /* * Forward declarations */ @@ -305,6 +309,13 @@ static void hn_create_rx_data(struct hn_ static void hn_destroy_rx_data(struct hn_softc *sc); static void hn_set_tx_chimney_size(struct hn_softc *, int); +static int hn_transmit(struct ifnet *, struct mbuf *); +static void hn_xmit_qflush(struct ifnet *); +static int hn_xmit(struct hn_tx_ring *, int); +static void hn_xmit_txeof(struct hn_tx_ring *); +static void hn_xmit_taskfunc(void *, int); +static void hn_xmit_txeof_taskfunc(void *, int); + static int hn_ifmedia_upd(struct ifnet *ifp __unused) { @@ -422,13 +433,18 @@ netvsc_attach(device_t dev) ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = hn_ioctl; - ifp->if_start = hn_start; ifp->if_init = hn_ifinit; /* needed by hv_rf_on_device_add() code */ ifp->if_mtu = ETHERMTU; - IFQ_SET_MAXLEN(&ifp->if_snd, 512); - ifp->if_snd.ifq_drv_maxlen = 511; - IFQ_SET_READY(&ifp->if_snd); + if (hn_use_if_start) { + ifp->if_start = hn_start; + IFQ_SET_MAXLEN(&ifp->if_snd, 512); + ifp->if_snd.ifq_drv_maxlen = 511; + IFQ_SET_READY(&ifp->if_snd); + } else { + ifp->if_transmit = hn_transmit; + ifp->if_qflush = hn_xmit_qflush; + } ifmedia_init(&sc->hn_media, 0, hn_ifmedia_upd, hn_ifmedia_sts); ifmedia_add(&sc->hn_media, IFM_ETHER | IFM_AUTO, 0, NULL); @@ -924,6 +940,12 @@ again: if (!error) { ETHER_BPF_MTAP(ifp, txd->m); if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); + if (!hn_use_if_start) { + if_inc_counter(ifp, IFCOUNTER_OBYTES, + txd->m->m_pkthdr.len); + if (txd->m->m_flags & M_MCAST) + if_inc_counter(ifp, IFCOUNTER_OMCASTS, 1); + } } hn_txdesc_put(txr, txd); @@ -976,6 +998,8 @@ hn_start_locked(struct hn_tx_ring *txr, struct ifnet *ifp = sc->hn_ifp; struct hv_device *device_ctx = vmbus_get_devctx(sc->hn_dev); + KASSERT(hn_use_if_start, + ("hn_start_locked is called, when if_start is disabled")); KASSERT(txr == &sc->hn_tx_ring[0], ("not the first TX ring")); mtx_assert(&txr->hn_tx_lock, MA_OWNED); @@ -1530,7 +1554,7 @@ static void hn_stop(hn_softc_t *sc) { struct ifnet *ifp; - int ret; + int ret, i; struct hv_device *device_ctx = vmbus_get_devctx(sc->hn_dev); ifp = sc->hn_ifp; @@ -1540,6 +1564,9 @@ hn_stop(hn_softc_t *sc) atomic_clear_int(&ifp->if_drv_flags, (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)); + for (i = 0; i < sc->hn_tx_ring_cnt; ++i) + sc->hn_tx_ring[i].hn_oactive = 0; + if_link_state_change(ifp, LINK_STATE_DOWN); sc->hn_initdone = 0; @@ -1612,7 +1639,7 @@ hn_ifinit_locked(hn_softc_t *sc) { struct ifnet *ifp; struct hv_device *device_ctx = vmbus_get_devctx(sc->hn_dev); - int ret; + int ret, i; ifp = sc->hn_ifp; @@ -1628,7 +1655,11 @@ hn_ifinit_locked(hn_softc_t *sc) } else { sc->hn_initdone = 1; } + atomic_clear_int(&ifp->if_d
svn commit: r296023 - head/sys/dev/cy
Author: jhibbits Date: Thu Feb 25 04:32:17 2016 New Revision: 296023 URL: https://svnweb.freebsd.org/changeset/base/296023 Log: Fix the build. Pointy-hat to:jhibbits Spotted by: bde Modified: head/sys/dev/cy/cy_pci.c Modified: head/sys/dev/cy/cy_pci.c == --- head/sys/dev/cy/cy_pci.cThu Feb 25 03:21:25 2016(r296022) +++ head/sys/dev/cy/cy_pci.cThu Feb 25 04:32:17 2016(r296023) @@ -114,7 +114,7 @@ cy_pci_attach(dev) mem_res = NULL; ioport_rid = CY_PCI_BASE_ADDR1; - ioport_res = bus_alloc_resource_(dev, SYS_RES_IOPORT, &ioport_rid, + ioport_res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &ioport_rid, RF_ACTIVE); if (ioport_res == NULL) { device_printf(dev, "ioport resource allocation failed\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: r296024 - head/sys/dev/hyperv/netvsc
Author: sephe Date: Thu Feb 25 07:03:10 2016 New Revision: 296024 URL: https://svnweb.freebsd.org/changeset/base/296024 Log: hyperv/hn: Hold the TX ring lock then drain TX desc buf_ring Reported by: Hongxiong Xian MFC after:1 week Sponsored by: Microsoft OSTC Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c == --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Thu Feb 25 04:32:17 2016(r296023) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Thu Feb 25 07:03:10 2016(r296024) @@ -2326,8 +2326,10 @@ hn_destroy_tx_ring(struct hn_tx_ring *tx hn_txdesc_dmamap_destroy(txd); } #else + mtx_lock(&txr->hn_tx_lock); while ((txd = buf_ring_dequeue_sc(txr->hn_txdesc_br)) != NULL) hn_txdesc_dmamap_destroy(txd); + mtx_unlock(&txr->hn_tx_lock); #endif if (txr->hn_tx_data_dtag != 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: r296025 - head/sys/netpfil/pf
Author: kp Date: Thu Feb 25 07:33:59 2016 New Revision: 296025 URL: https://svnweb.freebsd.org/changeset/base/296025 Log: pf: Fix possible out-of-bounds write In the DIOCRSETADDRS ioctl() handler we allocate a table for struct pfr_addrs, which is processed in pfr_set_addrs(). At the users request we also provide feedback on the deleted addresses, by storing them after the new list ('bcopy(&ad, addr + size + i, sizeof(ad));' in pfr_set_addrs()). This means we write outside the bounds of the buffer we've just allocated. We need to look at pfrio_size2 instead (i.e. the size the user reserved for our feedback). That'd allow a malicious user to specify a smaller pfrio_size2 than pfrio_size though, in which case we'd still read outside of the allocated buffer. Instead we allocate the largest of the two values. Reported By: Paul J Murphy PR: 207463 MFC after:5 days Differential Revision:https://reviews.freebsd.org/D5426 Modified: head/sys/netpfil/pf/pf_ioctl.c Modified: head/sys/netpfil/pf/pf_ioctl.c == --- head/sys/netpfil/pf/pf_ioctl.c Thu Feb 25 07:03:10 2016 (r296024) +++ head/sys/netpfil/pf/pf_ioctl.c Thu Feb 25 07:33:59 2016 (r296025) @@ -2718,13 +2718,14 @@ DIOCCHANGEADDR_error: case DIOCRSETADDRS: { struct pfioc_table *io = (struct pfioc_table *)addr; struct pfr_addr *pfras; - size_t totlen; + size_t totlen, count; if (io->pfrio_esize != sizeof(struct pfr_addr)) { error = ENODEV; break; } - totlen = io->pfrio_size * sizeof(struct pfr_addr); + count = max(io->pfrio_size, io->pfrio_size2); + totlen = count * sizeof(struct pfr_addr); pfras = malloc(totlen, M_TEMP, M_WAITOK); error = copyin(io->pfrio_buffer, pfras, totlen); if (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"
Re: svn commit: r296025 - head/sys/netpfil/pf
.. what's capping totlen so one doesn't run out of memory? -a On 24 February 2016 at 23:33, Kristof Provost wrote: > Author: kp > Date: Thu Feb 25 07:33:59 2016 > New Revision: 296025 > URL: https://svnweb.freebsd.org/changeset/base/296025 > > Log: > pf: Fix possible out-of-bounds write > > In the DIOCRSETADDRS ioctl() handler we allocate a table for struct > pfr_addrs, > which is processed in pfr_set_addrs(). At the users request we also provide > feedback on the deleted addresses, by storing them after the new list > ('bcopy(&ad, addr + size + i, sizeof(ad));' in pfr_set_addrs()). > > This means we write outside the bounds of the buffer we've just allocated. > We need to look at pfrio_size2 instead (i.e. the size the user reserved for > our > feedback). That'd allow a malicious user to specify a smaller pfrio_size2 > than > pfrio_size though, in which case we'd still read outside of the allocated > buffer. Instead we allocate the largest of the two values. > > Reported By: Paul J Murphy > PR: 207463 > MFC after:5 days > Differential Revision:https://reviews.freebsd.org/D5426 > > Modified: > head/sys/netpfil/pf/pf_ioctl.c > > Modified: head/sys/netpfil/pf/pf_ioctl.c > == > --- head/sys/netpfil/pf/pf_ioctl.c Thu Feb 25 07:03:10 2016 > (r296024) > +++ head/sys/netpfil/pf/pf_ioctl.c Thu Feb 25 07:33:59 2016 > (r296025) > @@ -2718,13 +2718,14 @@ DIOCCHANGEADDR_error: > case DIOCRSETADDRS: { > struct pfioc_table *io = (struct pfioc_table *)addr; > struct pfr_addr *pfras; > - size_t totlen; > + size_t totlen, count; > > if (io->pfrio_esize != sizeof(struct pfr_addr)) { > error = ENODEV; > break; > } > - totlen = io->pfrio_size * sizeof(struct pfr_addr); > + count = max(io->pfrio_size, io->pfrio_size2); > + totlen = count * sizeof(struct pfr_addr); > pfras = malloc(totlen, M_TEMP, M_WAITOK); > error = copyin(io->pfrio_buffer, pfras, totlen); > if (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"
Re: svn commit: r296025 - head/sys/netpfil/pf
On Wed, Feb 24, 2016 at 11:41 PM, Adrian Chadd wrote: > .. what's capping totlen so one doesn't run out of memory? There was a DoS vector before (user controlled io->pfrio_size) and basically the same DoS vector now (either of io->pfrio_size or io->pfrio_size2). This change isn't a regression. Still, it should be fixed. Best, Conrad > On 24 February 2016 at 23:33, Kristof Provost wrote: >> ... >> Modified: head/sys/netpfil/pf/pf_ioctl.c >> == >> --- head/sys/netpfil/pf/pf_ioctl.c Thu Feb 25 07:03:10 2016 >> (r296024) >> +++ head/sys/netpfil/pf/pf_ioctl.c Thu Feb 25 07:33:59 2016 >> (r296025) >> @@ -2718,13 +2718,14 @@ DIOCCHANGEADDR_error: >> case DIOCRSETADDRS: { >> struct pfioc_table *io = (struct pfioc_table *)addr; >> struct pfr_addr *pfras; >> - size_t totlen; >> + size_t totlen, count; >> >> if (io->pfrio_esize != sizeof(struct pfr_addr)) { >> error = ENODEV; >> break; >> } >> - totlen = io->pfrio_size * sizeof(struct pfr_addr); >> + count = max(io->pfrio_size, io->pfrio_size2); >> + totlen = count * sizeof(struct pfr_addr); >> pfras = malloc(totlen, M_TEMP, M_WAITOK); >> error = copyin(io->pfrio_buffer, pfras, totlen); >> if (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"