From owner-svn-src-head@FreeBSD.ORG Sun Aug 10 00:23:58 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20AC281E for ; Sun, 10 Aug 2014 00:23:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC6132B38 for ; Sun, 10 Aug 2014 00:23:57 +0000 (UTC) Received: from ian (uid 1311) (envelope-from ian@FreeBSD.org) id 27fa by svn.freebsd.org (DragonFly Mail Agent v0.9+); Sun, 10 Aug 2014 00:23:57 +0000 From: Ian Lepore Date: Sun, 10 Aug 2014 00:23:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269769 - head/sys/dev/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e6bb9d.27fa.94d13d8@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Aug 2014 00:23:58 -0000 Author: ian Date: Sun Aug 10 00:23:57 2014 New Revision: 269769 URL: http://svnweb.freebsd.org/changeset/base/269769 Log: Use a separate variable for resource id, because 'i' may increment at a rate greater than 1 on each iteration. Modified: head/sys/dev/ofw/ofwbus.c Modified: head/sys/dev/ofw/ofwbus.c ============================================================================== --- head/sys/dev/ofw/ofwbus.c Sun Aug 10 00:03:40 2014 (r269768) +++ head/sys/dev/ofw/ofwbus.c Sun Aug 10 00:23:57 2014 (r269769) @@ -438,7 +438,7 @@ ofwbus_setup_dinfo(device_t dev, phandle uint32_t *reg, *intr, icells; uint64_t phys, size; phandle_t iparent; - int i, j; + int i, j, rid; int nintr; int nreg; @@ -467,7 +467,7 @@ ofwbus_setup_dinfo(device_t dev, phandle nreg = 0; } - for (i = 0; i < nreg; i += sc->acells + sc->scells) { + for (i = 0, rid = 0; i < nreg; i += sc->acells + sc->scells, rid++) { phys = size = 0; for (j = 0; j < sc->acells; j++) { phys <<= 32; @@ -479,7 +479,7 @@ ofwbus_setup_dinfo(device_t dev, phandle } /* Skip the dummy reg property of glue devices like ssm(4). */ if (size != 0) - resource_list_add(&ndi->ndi_rl, SYS_RES_MEMORY, i, + resource_list_add(&ndi->ndi_rl, SYS_RES_MEMORY, rid, phys, phys + size - 1, size); } free(reg, M_OFWPROP); @@ -492,10 +492,10 @@ ofwbus_setup_dinfo(device_t dev, phandle sizeof(iparent)); OF_searchencprop(OF_xref_phandle(iparent), "#interrupt-cells", &icells, sizeof(icells)); - for (i = 0; i < nintr; i+= icells) { + for (i = 0, rid = 0; i < nintr; i += icells, rid++) { intr[i] = ofw_bus_map_intr(dev, iparent, icells, &intr[i]); - resource_list_add(&ndi->ndi_rl, SYS_RES_IRQ, i, intr[i], + resource_list_add(&ndi->ndi_rl, SYS_RES_IRQ, rid, intr[i], intr[i], 1); } free(intr, M_OFWPROP); From owner-svn-src-head@FreeBSD.ORG Sun Aug 10 00:30:12 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E6BB79BE for ; Sun, 10 Aug 2014 00:30:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE75D2B50 for ; Sun, 10 Aug 2014 00:30:12 +0000 (UTC) Received: from ian (uid 1311) (envelope-from ian@FreeBSD.org) id 2813 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Sun, 10 Aug 2014 00:30:12 +0000 From: Ian Lepore Date: Sun, 10 Aug 2014 00:30:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269770 - head/sys/dev/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e6bd14.2813.47a4416f@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Aug 2014 00:30:13 -0000 Author: ian Date: Sun Aug 10 00:30:12 2014 New Revision: 269770 URL: http://svnweb.freebsd.org/changeset/base/269770 Log: Handle various ways that interrupt config data can be malformed by warning and assuming more or less reasonable values. Modified: head/sys/dev/ofw/ofwbus.c Modified: head/sys/dev/ofw/ofwbus.c ============================================================================== --- head/sys/dev/ofw/ofwbus.c Sun Aug 10 00:23:57 2014 (r269769) +++ head/sys/dev/ofw/ofwbus.c Sun Aug 10 00:30:12 2014 (r269770) @@ -435,6 +435,7 @@ ofwbus_setup_dinfo(device_t dev, phandle { struct ofwbus_softc *sc; struct ofwbus_devinfo *ndi; + const char *nodename; uint32_t *reg, *intr, icells; uint64_t phys, size; phandle_t iparent; @@ -449,8 +450,8 @@ ofwbus_setup_dinfo(device_t dev, phandle free(ndi, M_DEVBUF); return (NULL); } - if (OFWBUS_EXCLUDED(ndi->ndi_obdinfo.obd_name, - ndi->ndi_obdinfo.obd_type)) { + nodename = ndi->ndi_obdinfo.obd_name; + if (OFWBUS_EXCLUDED(nodename, ndi->ndi_obdinfo.obd_type)) { ofw_bus_gen_destroy_devinfo(&ndi->ndi_obdinfo); free(ndi, M_DEVBUF); return (NULL); @@ -463,7 +464,7 @@ ofwbus_setup_dinfo(device_t dev, phandle if (nreg % (sc->acells + sc->scells) != 0) { if (bootverbose) device_printf(dev, "Malformed reg property on <%s>\n", - ndi->ndi_obdinfo.obd_name); + nodename); nreg = 0; } @@ -487,11 +488,24 @@ ofwbus_setup_dinfo(device_t dev, phandle nintr = OF_getencprop_alloc(node, "interrupts", sizeof(*intr), (void **)&intr); if (nintr > 0) { - iparent = 0; - OF_searchencprop(node, "interrupt-parent", &iparent, - sizeof(iparent)); - OF_searchencprop(OF_xref_phandle(iparent), "#interrupt-cells", - &icells, sizeof(icells)); + if (OF_searchencprop(node, "interrupt-parent", &iparent, + sizeof(iparent)) == -1) { + device_printf(dev, "No interrupt-parent found, " + "assuming nexus on <%s>\n", nodename); + iparent = 0xffffffff; + } + if (OF_searchencprop(OF_xref_phandle(iparent), + "#interrupt-cells", &icells, sizeof(icells)) == -1) { + device_printf(dev, "Missing #interrupt-cells property, " + "assuming <1> on <%s>\n", nodename); + icells = 1; + } + if (icells < 1 || icells > nintr) { + device_printf(dev, "Invalid #interrupt-cells property " + "value <%d>, assuming <1> on <%s>\n", icells, + nodename); + icells = 1; + } for (i = 0, rid = 0; i < nintr; i += icells, rid++) { intr[i] = ofw_bus_map_intr(dev, iparent, icells, &intr[i]); From owner-svn-src-head@FreeBSD.ORG Sun Aug 10 01:13:33 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 267A5E44 for ; Sun, 10 Aug 2014 01:13:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB44A207B for ; Sun, 10 Aug 2014 01:13:32 +0000 (UTC) Received: from rmacklem (uid 1196) (envelope-from rmacklem@FreeBSD.org) id 2b9a by svn.freebsd.org (DragonFly Mail Agent v0.9+); Sun, 10 Aug 2014 01:13:32 +0000 From: Rick Macklem Date: Sun, 10 Aug 2014 01:13:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269771 - head/sys/fs/nfsserver X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e6c73c.2b9a.73209a54@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Aug 2014 01:13:33 -0000 Author: rmacklem Date: Sun Aug 10 01:13:32 2014 New Revision: 269771 URL: http://svnweb.freebsd.org/changeset/base/269771 Log: Change the NFS server's printf related to hitting the DRC cache's flood level so that it suggests increasing vfs.nfsd.tcphighwater. Suggested by: h.schmalzbauer@omnilan.de Modified: head/sys/fs/nfsserver/nfs_nfsdsocket.c Modified: head/sys/fs/nfsserver/nfs_nfsdsocket.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdsocket.c Sun Aug 10 00:30:12 2014 (r269770) +++ head/sys/fs/nfsserver/nfs_nfsdsocket.c Sun Aug 10 01:13:32 2014 (r269771) @@ -749,10 +749,9 @@ nfsrvd_compound(struct nfsrv_descript *n nd->nd_rp->rc_refcnt == 0) && (nfsrv_mallocmget_limit() || nfsrc_tcpsavedreplies > nfsrc_floodlevel)) { - if (nfsrc_tcpsavedreplies > nfsrc_floodlevel) { - printf("nfsd server cache flooded, try to"); - printf(" increase nfsrc_floodlevel\n"); - } + if (nfsrc_tcpsavedreplies > nfsrc_floodlevel) + printf("nfsd server cache flooded, try " + "increasing vfs.nfsd.tcphighwater\n"); nd->nd_repstat = NFSERR_RESOURCE; *repp = nfsd_errmap(nd); if (op == NFSV4OP_SETATTR) { From owner-svn-src-head@FreeBSD.ORG Sun Aug 10 03:09:36 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E4BA19D for ; Sun, 10 Aug 2014 03:09:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44AEA2A77 for ; Sun, 10 Aug 2014 03:09:36 +0000 (UTC) Received: from adrian (uid 753) (envelope-from adrian@FreeBSD.org) id 29c1 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Sun, 10 Aug 2014 03:09:36 +0000 From: Adrian Chadd Date: Sun, 10 Aug 2014 03:09:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269772 - head/tools/tools/ath/athalq X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e6e270.29c1.60d01f1b@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Aug 2014 03:09:36 -0000 Author: adrian Date: Sun Aug 10 03:09:35 2014 New Revision: 269772 URL: http://svnweb.freebsd.org/changeset/base/269772 Log: Fix paths. Modified: head/tools/tools/ath/athalq/ar9300_ds.c Modified: head/tools/tools/ath/athalq/ar9300_ds.c ============================================================================== --- head/tools/tools/ath/athalq/ar9300_ds.c Sun Aug 10 01:13:32 2014 (r269771) +++ head/tools/tools/ath/athalq/ar9300_ds.c Sun Aug 10 03:09:35 2014 (r269772) @@ -29,7 +29,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include "ar9300_ds.h" From owner-svn-src-head@FreeBSD.ORG Sun Aug 10 06:43:40 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 93942139 for ; Sun, 10 Aug 2014 06:43:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 677E22D5F for ; Sun, 10 Aug 2014 06:43:40 +0000 (UTC) Received: from rpaulo (uid 1145) (envelope-from rpaulo@FreeBSD.org) id 23c9 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Sun, 10 Aug 2014 06:43:40 +0000 From: Rui Paulo Date: Sun, 10 Aug 2014 06:43:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269775 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e7149c.23c9.59b20a2b@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Aug 2014 06:43:40 -0000 Author: rpaulo Date: Sun Aug 10 06:43:40 2014 New Revision: 269775 URL: http://svnweb.freebsd.org/changeset/base/269775 Log: Fix a few problems with the USDT probes: * Include OBJDIR to make sure the generated file is found; * Simplify the definition of OBJS; * Add targets for shared objects and for profiled objects. MFC after: 3 days Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Sun Aug 10 06:10:21 2014 (r269774) +++ head/share/mk/bsd.dep.mk Sun Aug 10 06:43:40 2014 (r269775) @@ -125,21 +125,26 @@ ${_YC:R}.o: ${_YC} .if ${SRCS:M*.d} LDFLAGS+= -lelf LDADD+= ${LIBELF} -CFLAGS+= -D_DTRACE_VERSION=1 +CFLAGS+= -D_DTRACE_VERSION=1 -I${.OBJDIR} .endif .for _DSRC in ${SRCS:M*.d:N*/*} .for _D in ${_DSRC:R} ${_D}.h: ${_DSRC} ${DTRACE} -xnolibs -h -s ${.ALLSRC} SRCS:= ${SRCS:S/${_DSRC}/${_D}.h/} -${_D}.o: ${_D}.h ${_DSRC} ${OBJS} ${SOBJS} - ${DTRACE} -xnolibs -G -o ${.TARGET} -s ${_DSRC} \ - ${OBJS:S/${_D}.o//} ${SOBJS:S/${_D}.o//} -CLEANFILES+= ${_D}.h ${_D}.o -.if defined(PROG) OBJS+= ${_D}.o -.else -SOBJS+= ${_D}.o +CLEANFILES+= ${_D}.h ${_D}.o +${_D}.o: ${_D.h} ${OBJS:S/${_D}.o//} + ${DTRACE} -xnolibs -G -o ${.TARGET} -s ${.CURDIR}/${_DSRC} \ + ${OBJS:S/${_D}.o//} +.if defined(LIB) +CLEANFILES+= ${_D}.So ${_D}.po +${_D}.So: ${_D.h} ${SOBJS:S/${_D}.So//} + ${DTRACE} -xnolibs -G -o ${.TARGET} -s ${.CURDIR}/${_DSRC} \ + ${SOBJS:S/${_D}.So//} +${_D}.po: ${_D}.h ${POBJS:S/${_D}.po//} + ${DTRACE} -xnolibs -G -o ${.TARGET} -s ${.CURDIR}/${_DSRC} \ + ${POBJS:S/${_D}.po//} .endif .endfor .endfor From owner-svn-src-head@FreeBSD.ORG Sun Aug 10 06:56:43 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B93272E9 for ; Sun, 10 Aug 2014 06:56:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F1102E42 for ; Sun, 10 Aug 2014 06:56:43 +0000 (UTC) Received: from rpaulo (uid 1145) (envelope-from rpaulo@FreeBSD.org) id 2978 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Sun, 10 Aug 2014 06:56:43 +0000 From: Rui Paulo Date: Sun, 10 Aug 2014 06:56:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269776 - head/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e717ab.2978.611515cf@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Aug 2014 06:56:43 -0000 Author: rpaulo Date: Sun Aug 10 06:56:43 2014 New Revision: 269776 URL: http://svnweb.freebsd.org/changeset/base/269776 Log: Remove the BROKEN_LIBELF section. This problem was fixed by Kai Wang in 2011. MFC after: 3 days Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Sun Aug 10 06:43:40 2014 (r269775) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Sun Aug 10 06:56:43 2014 (r269776) @@ -1895,7 +1895,6 @@ dtrace_program_link(dtrace_hdl_t *dtp, d goto done; } #if !defined(sun) -#define BROKEN_LIBELF /* * FreeBSD's ld(1) is not instructed to interpret and add * correctly the SUNW_dof section present in tfile. @@ -1919,9 +1918,6 @@ dtrace_program_link(dtrace_hdl_t *dtp, d /* * Add the string '.SUWN_dof' to the shstrtab section. */ -#ifdef BROKEN_LIBELF - elf_flagelf(e, ELF_C_SET, ELF_F_LAYOUT); -#endif elf_getshdrstrndx(e, &stridx); scn = elf_getscn(e, stridx); gelf_getshdr(scn, &shdr); @@ -1933,54 +1929,6 @@ dtrace_program_link(dtrace_hdl_t *dtp, d loc = shdr.sh_size; shdr.sh_size += data->d_size; gelf_update_shdr(scn, &shdr); -#ifdef BROKEN_LIBELF - off = shdr.sh_offset; - rc = shdr.sh_offset + shdr.sh_size; - gelf_getehdr(e, &ehdr); - if (ehdr.e_shoff > off) { - off = ehdr.e_shoff + ehdr.e_shnum * ehdr.e_shentsize; - rc = roundup(rc, 8); - ehdr.e_shoff = rc; - gelf_update_ehdr(e, &ehdr); - rc += ehdr.e_shnum * ehdr.e_shentsize; - } - for (;;) { - scn0 = NULL; - scn = NULL; - while ((scn = elf_nextscn(e, scn)) != NULL) { - gelf_getshdr(scn, &shdr); - if (shdr.sh_type == SHT_NOBITS || - shdr.sh_offset < off) - continue; - /* Find the immediately adjcent section. */ - if (scn0 == NULL || - shdr.sh_offset < shdr0.sh_offset) { - scn0 = scn; - gelf_getshdr(scn0, &shdr0); - } - } - if (scn0 == NULL) - break; - /* Load section data to work around another bug */ - elf_getdata(scn0, NULL); - /* Update section header, assure section alignment */ - off = shdr0.sh_offset + shdr0.sh_size; - rc = roundup(rc, shdr0.sh_addralign); - shdr0.sh_offset = rc; - gelf_update_shdr(scn0, &shdr0); - rc += shdr0.sh_size; - } - if (elf_update(e, ELF_C_WRITE) < 0) { - ret = dt_link_error(dtp, NULL, -1, NULL, - "failed to add append the shstrtab section: %s", - elf_errmsg(elf_errno())); - elf_end(e); - close(efd); - goto done; - } - elf_end(e); - e = elf_begin(efd, ELF_C_RDWR, NULL); -#endif /* * Construct the .SUNW_dof section. */ From owner-svn-src-head@FreeBSD.ORG Sun Aug 10 07:51:56 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1B9E4E15 for ; Sun, 10 Aug 2014 07:51:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E5025247F for ; Sun, 10 Aug 2014 07:51:55 +0000 (UTC) Received: from hselasky (uid 1241) (envelope-from hselasky@FreeBSD.org) id 20e4 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Sun, 10 Aug 2014 07:51:55 +0000 From: Hans Petter Selasky Date: Sun, 10 Aug 2014 07:51:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269777 - head/sys/netinet/cc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e7249b.20e4.485017ca@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Aug 2014 07:51:56 -0000 Author: hselasky Date: Sun Aug 10 07:51:55 2014 New Revision: 269777 URL: http://svnweb.freebsd.org/changeset/base/269777 Log: Fix string length argument passed to "sysctl_handle_string()" so that the complete string is returned by the function and not just only one byte. PR: 192544 MFC after: 2 weeks Modified: head/sys/netinet/cc/cc.c Modified: head/sys/netinet/cc/cc.c ============================================================================== --- head/sys/netinet/cc/cc.c Sun Aug 10 06:56:43 2014 (r269776) +++ head/sys/netinet/cc/cc.c Sun Aug 10 07:51:55 2014 (r269777) @@ -101,7 +101,7 @@ cc_default_algo(SYSCTL_HANDLER_ARGS) CC_LIST_RLOCK(); strlcpy(default_cc, CC_DEFAULT()->name, TCP_CA_NAME_MAX); CC_LIST_RUNLOCK(); - err = sysctl_handle_string(oidp, default_cc, 1, req); + err = sysctl_handle_string(oidp, default_cc, 0, req); } else { /* Find algo with specified name and set it to default. */ CC_LIST_RLOCK(); @@ -166,7 +166,7 @@ cc_list_available(SYSCTL_HANDLER_ARGS) if (!err) { sbuf_finish(s); - err = sysctl_handle_string(oidp, sbuf_data(s), 1, req); + err = sysctl_handle_string(oidp, sbuf_data(s), 0, req); } sbuf_delete(s); From owner-svn-src-head@FreeBSD.ORG Sun Aug 10 08:35:43 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04F6DDBE for ; Sun, 10 Aug 2014 08:35:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CEC3527DF for ; Sun, 10 Aug 2014 08:35:42 +0000 (UTC) Received: from adrian (uid 753) (envelope-from adrian@FreeBSD.org) id 2247 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Sun, 10 Aug 2014 08:35:42 +0000 From: Adrian Chadd Date: Sun, 10 Aug 2014 08:35:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269778 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e72ede.2247.6354488c@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Aug 2014 08:35:43 -0000 Author: adrian Date: Sun Aug 10 08:35:42 2014 New Revision: 269778 URL: http://svnweb.freebsd.org/changeset/base/269778 Log: Undo r195846 for now - allow raw frame transmit in monitor mode. The original commit was supposed to stop the ability to do raw frame injection in monitor mode to arbitrary channels (whether supported by regulatory or not) however it doesn't seem to have been followed by any useful way of doing it. Apparently AHDEMO is supposed to be that way, but it seems to require too much fiddly things (disable scanning, set a garbage SSID, etc) for it to actually be useful for spoofing things. So for now let's just disable it and instead look to filter transmit in the output path if the channel isn't allowed by regulatory. That way monitor RX works fine but TX will be blocked. I don't plan on MFC'ing this to -10 until the regulatory enforcement bits are written. Modified: head/sys/net80211/ieee80211.c Modified: head/sys/net80211/ieee80211.c ============================================================================== --- head/sys/net80211/ieee80211.c Sun Aug 10 07:51:55 2014 (r269777) +++ head/sys/net80211/ieee80211.c Sun Aug 10 08:35:42 2014 (r269778) @@ -570,15 +570,9 @@ ieee80211_vap_attach(struct ieee80211vap ifp->if_baudrate = IF_Mbps(maxrate); ether_ifattach(ifp, vap->iv_myaddr); - if (vap->iv_opmode == IEEE80211_M_MONITOR) { - /* NB: disallow transmit */ - ifp->if_transmit = null_transmit; - ifp->if_output = null_output; - } else { - /* hook output method setup by ether_ifattach */ - vap->iv_output = ifp->if_output; - ifp->if_output = ieee80211_output; - } + /* hook output method setup by ether_ifattach */ + vap->iv_output = ifp->if_output; + ifp->if_output = ieee80211_output; /* NB: if_mtu set by ether_ifattach to ETHERMTU */ IEEE80211_LOCK(ic); From owner-svn-src-head@FreeBSD.ORG Sun Aug 10 12:00:17 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5702647A; Sun, 10 Aug 2014 12:00:17 +0000 (UTC) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id DFB342A65; Sun, 10 Aug 2014 12:00:16 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvgGAHdd51ODaFve/2dsb2JhbABag19OCQEDgnTKMIdIAYEbd4QDAQEEASMEUgUWDgYEAgINGQJZBhOIOggNrCuUYReBLI1sATMHgnmBUwWOZYZZiEiTJIN4IS+BRw X-IronPort-AV: E=Sophos;i="5.01,836,1400040000"; d="scan'208";a="146199922" Received: from muskoka.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.222]) by esa-jnhn.mail.uoguelph.ca with ESMTP; 10 Aug 2014 07:59:07 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id D657BB3F19; Sun, 10 Aug 2014 07:59:06 -0400 (EDT) Date: Sun, 10 Aug 2014 07:59:06 -0400 (EDT) From: Rick Macklem To: Rick Macklem Message-ID: <796544262.9468281.1407671946855.JavaMail.root@uoguelph.ca> In-Reply-To: <53e6c73c.2b9a.73209a54@svn.freebsd.org> Subject: Re: svn commit: r269771 - head/sys/fs/nfsserver MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.209] X-Mailer: Zimbra 7.2.6_GA_2926 (ZimbraWebClient - FF3.0 (Win)/7.2.6_GA_2926) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Aug 2014 12:00:17 -0000 I wrote: > Author: rmacklem > Date: Sun Aug 10 01:13:32 2014 > New Revision: 269771 > URL: http://svnweb.freebsd.org/changeset/base/269771 > > Log: > Change the NFS server's printf related to hitting > the DRC cache's flood level so that it suggests > increasing vfs.nfsd.tcphighwater. > > Suggested by: h.schmalzbauer@omnilan.de > Oops, I intended to put an MFC of 1 week here. Sorry about that, rick > Modified: > head/sys/fs/nfsserver/nfs_nfsdsocket.c > > Modified: head/sys/fs/nfsserver/nfs_nfsdsocket.c > ============================================================================== > --- head/sys/fs/nfsserver/nfs_nfsdsocket.c Sun Aug 10 00:30:12 2014 > (r269770) > +++ head/sys/fs/nfsserver/nfs_nfsdsocket.c Sun Aug 10 01:13:32 2014 > (r269771) > @@ -749,10 +749,9 @@ nfsrvd_compound(struct nfsrv_descript *n > nd->nd_rp->rc_refcnt == 0) && > (nfsrv_mallocmget_limit() || > nfsrc_tcpsavedreplies > nfsrc_floodlevel)) { > - if (nfsrc_tcpsavedreplies > nfsrc_floodlevel) { > - printf("nfsd server cache flooded, try to"); > - printf(" increase nfsrc_floodlevel\n"); > - } > + if (nfsrc_tcpsavedreplies > nfsrc_floodlevel) > + printf("nfsd server cache flooded, try " > + "increasing vfs.nfsd.tcphighwater\n"); > nd->nd_repstat = NFSERR_RESOURCE; > *repp = nfsd_errmap(nd); > if (op == NFSV4OP_SETATTR) { > > From owner-svn-src-head@FreeBSD.ORG Sun Aug 10 14:55:40 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3804EBC6 for ; Sun, 10 Aug 2014 14:55:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F8482B21 for ; Sun, 10 Aug 2014 14:55:40 +0000 (UTC) Received: from dumbbell (uid 1042) (envelope-from dumbbell@FreeBSD.org) id 247f by svn.freebsd.org (DragonFly Mail Agent v0.9+); Sun, 10 Aug 2014 14:55:39 +0000 From: Jean-Sebastien Pedron Date: Sun, 10 Aug 2014 14:55:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269779 - head/sys/dev/fb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e787eb.247f.4de6e89f@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Aug 2014 14:55:40 -0000 Author: dumbbell Date: Sun Aug 10 14:55:39 2014 New Revision: 269779 URL: http://svnweb.freebsd.org/changeset/base/269779 Log: fbd: Fix a bug where vt_fb_attach() success would be considered a failure vt_fb_attach() currently always returns 0, but it could return a code defined in errno.h. However, it doesn't return a CN_* code. So checking its return value against CN_DEAD (which is 0) is incorrect, and in this case, a success becomes a failure. The consequence was unimportant, because the caller (drm_fb_helper.c) would only log an error message in this case. The console would still work. Approved by: nwhitehorn Modified: head/sys/dev/fb/fbd.c Modified: head/sys/dev/fb/fbd.c ============================================================================== --- head/sys/dev/fb/fbd.c Sun Aug 10 08:35:42 2014 (r269778) +++ head/sys/dev/fb/fbd.c Sun Aug 10 14:55:39 2014 (r269779) @@ -246,8 +246,9 @@ fbd_register(struct fb_info* info) return (err); if (first) { - if (vt_fb_attach(info) == CN_DEAD) - return (ENXIO); + err = vt_fb_attach(info); + if (err) + return (err); } return (0); From owner-svn-src-head@FreeBSD.ORG Sun Aug 10 15:02:52 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 151C3E9E for ; Sun, 10 Aug 2014 15:02:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA19A2C6F for ; Sun, 10 Aug 2014 15:02:51 +0000 (UTC) Received: from dumbbell (uid 1042) (envelope-from dumbbell@FreeBSD.org) id 2a80 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Sun, 10 Aug 2014 15:02:51 +0000 From: Jean-Sebastien Pedron Date: Sun, 10 Aug 2014 15:02:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269780 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e7899b.2a80.ac5f854@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Aug 2014 15:02:52 -0000 Author: dumbbell Date: Sun Aug 10 15:02:51 2014 New Revision: 269780 URL: http://svnweb.freebsd.org/changeset/base/269780 Log: vt(4): Add vtbuf_dirty*_locked() to lock vtbuf once, not twice In several functions, vtbuf_putchar() in particular, the lock on vtbuf is acquired twice: 1. once by the said functions; 2. once in vtbuf_dirty(). Now, vtbuf_dirty_locked() and vtbuf_dirty_cell_locked() allow to acquire that lock only once. This improves the input speed of vt(4). To measure the gain, a 50,000-lines file was displayed on the console using cat(1). The time taken by cat(1) is reported below: o On amd64, with vt_vga: - before: 1.0" - after: 0.5" o On sparc64, with creator_vt: - before: 13.6" - after: 10.5" MFC after: 1 week Modified: head/sys/dev/vt/vt_buf.c Modified: head/sys/dev/vt/vt_buf.c ============================================================================== --- head/sys/dev/vt/vt_buf.c Sun Aug 10 14:55:39 2014 (r269779) +++ head/sys/dev/vt/vt_buf.c Sun Aug 10 15:02:51 2014 (r269780) @@ -229,10 +229,9 @@ vtbuf_dirty_axis(unsigned int begin, uns } static inline void -vtbuf_dirty(struct vt_buf *vb, const term_rect_t *area) +vtbuf_dirty_locked(struct vt_buf *vb, const term_rect_t *area) { - VTBUF_LOCK(vb); if (vb->vb_dirtyrect.tr_begin.tp_row > area->tr_begin.tp_row) vb->vb_dirtyrect.tr_begin.tp_row = area->tr_begin.tp_row; if (vb->vb_dirtyrect.tr_begin.tp_col > area->tr_begin.tp_col) @@ -245,18 +244,26 @@ vtbuf_dirty(struct vt_buf *vb, const ter vtbuf_dirty_axis(area->tr_begin.tp_row, area->tr_end.tp_row); vb->vb_dirtymask.vbm_col |= vtbuf_dirty_axis(area->tr_begin.tp_col, area->tr_end.tp_col); +} + +static inline void +vtbuf_dirty(struct vt_buf *vb, const term_rect_t *area) +{ + + VTBUF_LOCK(vb); + vtbuf_dirty_locked(vb, area); VTBUF_UNLOCK(vb); } static inline void -vtbuf_dirty_cell(struct vt_buf *vb, const term_pos_t *p) +vtbuf_dirty_cell_locked(struct vt_buf *vb, const term_pos_t *p) { term_rect_t area; area.tr_begin = *p; area.tr_end.tp_row = p->tp_row + 1; area.tr_end.tp_col = p->tp_col + 1; - vtbuf_dirty(vb, &area); + vtbuf_dirty_locked(vb, &area); } static void @@ -373,9 +380,8 @@ vtbuf_fill_locked(struct vt_buf *vb, con VTBUF_LOCK(vb); vtbuf_fill(vb, r, c); + vtbuf_dirty_locked(vb, r); VTBUF_UNLOCK(vb); - - vtbuf_dirty(vb, r); } static void @@ -531,8 +537,8 @@ vtbuf_putchar(struct vt_buf *vb, const t if (row[p->tp_col] != c) { VTBUF_LOCK(vb); row[p->tp_col] = c; + vtbuf_dirty_cell_locked(vb, p); VTBUF_UNLOCK(vb); - vtbuf_dirty_cell(vb, p); } } @@ -541,9 +547,11 @@ vtbuf_cursor_position(struct vt_buf *vb, { if (vb->vb_flags & VBF_CURSOR) { - vtbuf_dirty_cell(vb, &vb->vb_cursor); + VTBUF_LOCK(vb); + vtbuf_dirty_cell_locked(vb, &vb->vb_cursor); vb->vb_cursor = *p; - vtbuf_dirty_cell(vb, &vb->vb_cursor); + vtbuf_dirty_cell_locked(vb, &vb->vb_cursor); + VTBUF_UNLOCK(vb); } else { vb->vb_cursor = *p; } @@ -724,10 +732,10 @@ vtbuf_cursor_visibility(struct vt_buf *v else vb->vb_flags &= ~VBF_CURSOR; nflags = vb->vb_flags; - VTBUF_UNLOCK(vb); if (oflags != nflags) - vtbuf_dirty_cell(vb, &vb->vb_cursor); + vtbuf_dirty_cell_locked(vb, &vb->vb_cursor); + VTBUF_UNLOCK(vb); } void @@ -742,9 +750,9 @@ vtbuf_scroll_mode(struct vt_buf *vb, int else vb->vb_flags &= ~VBF_SCROLL; nflags = vb->vb_flags; - VTBUF_UNLOCK(vb); if (oflags != nflags) - vtbuf_dirty_cell(vb, &vb->vb_cursor); + vtbuf_dirty_cell_locked(vb, &vb->vb_cursor); + VTBUF_UNLOCK(vb); } From owner-svn-src-head@FreeBSD.ORG Sun Aug 10 15:26:32 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CBBA43EB for ; Sun, 10 Aug 2014 15:26:32 +0000 (UTC) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98FBC2E6B for ; Sun, 10 Aug 2014 15:26:32 +0000 (UTC) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by gateway1.nyi.internal (Postfix) with ESMTP id D00F721498; Sun, 10 Aug 2014 11:26:25 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Sun, 10 Aug 2014 11:26:25 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.fm; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=mesmtp; bh=NEconUOMIHfBIFqV1KHmFdQc uOo=; b=coEwrXG3is+QVCBZI0kqkatdT8MlESgPJHmYJC1qK4wq24a37ZI2hN1p r6c0zznEnZ7feoyPK6o9b22b0JVAED/2W8R7wRuYw7G6XL9EhTtfOIPOEmSgGDHe BF8gxuNW+veMPMGQkT1qMHBvxpgRMa8Mm9UPTQL1KmqcrmSk/DI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:to:cc:subject:message-id :references:mime-version:content-type:in-reply-to; s=smtpout; bh=NEconUOMIHfBIFqV1KHmFdQcuOo=; b=I56C9kAVIykatFYLIIERgoQdsH0a /xGN7hMRhhJ3FP9v+KITLLa6ry7zbG0ha43jz1TJsFnY+h4gO/FVg+RQoTj++nr6 Red1Dhs3fAPJsU1+wOgSA+W7l3ikXWhCCC7PxaIJ3pIGqOf9W93bv0avnzmY6SNE xT0obzqzwrmo8K0= X-Sasl-enc: TkS/sYYmnnZRPwv1l86NRteI92MSrhhmjGA9oZ4fiF3C 1407684385 Received: from kropotkin.aux.io (unknown [223.252.30.161]) by mail.messagingengine.com (Postfix) with ESMTPA id 28E11C007B0; Sun, 10 Aug 2014 11:26:23 -0400 (EDT) Date: Mon, 11 Aug 2014 01:26:16 +1000 From: Alastair Hogge To: Baptiste Daroussin Subject: Re: svn commit: r269649 - in head: lib lib/libohash share/mk usr.bin/m4 usr.bin/m4/lib Message-ID: <20140810152615.GA3824@kropotkin.aux.io> References: <53e2b038.5e44.59dbd637@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53e2b038.5e44.59dbd637@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Aug 2014 15:26:33 -0000 On 2014-08-06 Wed 22:46:15 +0000, Baptiste Daroussin wrote: > Author: bapt > Date: Wed Aug 6 22:46:15 2014 > New Revision: 269649 > URL: http://svnweb.freebsd.org/changeset/base/269649 > > Log: > Make libohash a proper internallib instead of hidding it in m4 > > mandoc development seems to be also using ohash so prepare to share the > code when needed Hi, I have not been able to build head with PIE since this commit. Build host is 11.0-CURRENT r269770. $ cat /etc/src.conf WITH_PIE= $ cat /etc/make.conf ALWAYS_CHECK_MAKE= $ cd /tmp/r269649 && env MAKEOBJDIRPREFIX=/tmp/obj make -j9 buildworld ===> usr.bin/m4 (all) ===> usr.bin/m4/tests (all) cc -O2 -pipe -DEXTENDED -I/tmp/r269649/usr.bin/m4 -I/tmp/r269649/usr.bin/m4/../../lib/libohash -fPIE -pie -std=gnu99 -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wp ointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments -pie -o m4 eval.o expr.o look.o main.o misc.o gnum4.o trace.o parser.o tokenizer.o -ly -ll -lm /tmp/obj/tmp/r269649/lib/libohash/libohash.a /tmp/obj/tmp/r269649/tmp/usr/bin/ld: /tmp/obj/tmp/r269649/lib/libohash/libohash.a(ohash.o): relocation R_X86_64_PC32 against `strlen@@FBSD_1.0' can not be used when making a shared object; recompile with -fPIC /tmp/obj/tmp/r269649/tmp/usr/bin/ld: final link failed: Bad value cc: error: linker command failed with exit code 1 (use -v to see invocation) *** [m4] Error code 1 make[4]: stopped in /tmp/r269649/usr.bin/m4 1 error make[4]: stopped in /tmp/r269649/usr.bin/m4 *** [all_subdir_m4] Error code 2 make[3]: stopped in /tmp/r269649/usr.bin 1 error make[3]: stopped in /tmp/r269649/usr.bin *** [usr.bin.all__D] Error code 2 make[2]: stopped in /tmp/r269649 1 error make[2]: stopped in /tmp/r269649 *** [everything] Error code 2 make[1]: stopped in /tmp/r269649 1 error make[1]: stopped in /tmp/r269649 *** [buildworld] Error code 2 make: stopped in /tmp/r269649 1 error make: stopped in /tmp/r269649 From owner-svn-src-head@FreeBSD.ORG Sun Aug 10 16:59:40 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A09D446 for ; Sun, 10 Aug 2014 16:59:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F65E2702 for ; Sun, 10 Aug 2014 16:59:40 +0000 (UTC) Received: from kib (uid 1100) (envelope-from kib@FreeBSD.org) id 2898 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Sun, 10 Aug 2014 16:59:39 +0000 From: Konstantin Belousov Date: Sun, 10 Aug 2014 16:59:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269782 - in head/sys/sparc64: include sparc64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e7a4fc.2898.352aa941@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Aug 2014 16:59:40 -0000 Author: kib Date: Sun Aug 10 16:59:39 2014 New Revision: 269782 URL: http://svnweb.freebsd.org/changeset/base/269782 Log: On sparc64, do not keep mappings for the destroyed sf_bufs. Sparc64 pmap, unlike i386, and similar to i386/xen pv, does not tolerate abandoned mappings for the freed pages. Reported and tested by: dumbbell Diagnosed and reviewed by: alc Sponsored by: The FreeBSD Foundation Added: head/sys/sparc64/include/sf_buf.h - copied, changed from r269781, head/sys/i386/include/sf_buf.h Modified: head/sys/sparc64/include/vmparam.h head/sys/sparc64/sparc64/vm_machdep.c Copied and modified: head/sys/sparc64/include/sf_buf.h (from r269781, head/sys/i386/include/sf_buf.h) ============================================================================== --- head/sys/i386/include/sf_buf.h Sun Aug 10 15:21:26 2014 (r269781, copy source) +++ head/sys/sparc64/include/sf_buf.h Sun Aug 10 16:59:39 2014 (r269782) @@ -31,6 +31,5 @@ void sf_buf_map(struct sf_buf *, int); int sf_buf_unmap(struct sf_buf *); -boolean_t sf_buf_invalidate_cache(vm_page_t); #endif /* !_MACHINE_SF_BUF_H_ */ Modified: head/sys/sparc64/include/vmparam.h ============================================================================== --- head/sys/sparc64/include/vmparam.h Sun Aug 10 15:21:26 2014 (r269781) +++ head/sys/sparc64/include/vmparam.h Sun Aug 10 16:59:39 2014 (r269782) @@ -240,6 +240,6 @@ extern vm_offset_t vm_max_kernel_address #define ZERO_REGION_SIZE PAGE_SIZE #define SFBUF -#define SFBUF_NOMD +#define SFBUF_MAP #endif /* !_MACHINE_VMPARAM_H_ */ Modified: head/sys/sparc64/sparc64/vm_machdep.c ============================================================================== --- head/sys/sparc64/sparc64/vm_machdep.c Sun Aug 10 15:21:26 2014 (r269781) +++ head/sys/sparc64/sparc64/vm_machdep.c Sun Aug 10 16:59:39 2014 (r269782) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -443,3 +444,18 @@ uma_small_free(void *mem, int size, u_in vm_page_free(m); atomic_subtract_int(&vm_cnt.v_wire_count, 1); } + +void +sf_buf_map(struct sf_buf *sf, int flags) +{ + + pmap_qenter(sf->kva, &sf->m, 1); +} + +int +sf_buf_unmap(struct sf_buf *sf) +{ + + pmap_qremove(sf->kva, 1); + return (1); +} From owner-svn-src-head@FreeBSD.ORG Sun Aug 10 17:04:12 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26DAA70D for ; Sun, 10 Aug 2014 17:04:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0862327C4 for ; Sun, 10 Aug 2014 17:04:12 +0000 (UTC) Received: from dumbbell (uid 1042) (envelope-from dumbbell@FreeBSD.org) id 2c0b by svn.freebsd.org (DragonFly Mail Agent v0.9+); Sun, 10 Aug 2014 17:04:10 +0000 From: Jean-Sebastien Pedron Date: Sun, 10 Aug 2014 17:04:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269783 - in head/sys/dev: fb vt/colors vt/hw/efifb vt/hw/fb vt/hw/ofwfb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e7a60a.2c0b.7349c23c@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Aug 2014 17:04:12 -0000 Author: dumbbell Date: Sun Aug 10 17:04:10 2014 New Revision: 269783 URL: http://svnweb.freebsd.org/changeset/base/269783 Log: vt(4): Colors are indexed against a console palette, not a VGA palette Rename vt_generate_vga_palette() to vt_generate_cons_palette() and change it to build a palette where the color index is the same than in terminal escape codes, not the VGA index. That's what TCHAR_CREATE() uses and passes to vt(4). The main differences between both orders are: o Blue and red are swapped (1 <-> 4) o Yellow and cyan are swapped (3 <-> 6) The problem remained unnoticed, because the RGB bit indexes passed to vt_generate_vga_palette() were reversed. This inversion was cancelled by the colors inversions in the generated palette. For instance, red (0xff0000) and blue (0x0000ff) have bytes in opposite order, but were swapped in the palette. But after changing the value of blue (see last paragraph), the modified color was in fact the red one. This commit includes a fix to creator_vt.c, submitted by Nathan Whitehorn: fb_cmsize is set to 16. Before this, the generated palette would be overwritte. This fixes colors on sparc64 with a Creator3D adapter. While here, tune the palette to better match console colors and improve the readability (especially the dark blue). Submitted by: nwhitehorn (fix to creator_vt.c) MFC after: 1 week Modified: head/sys/dev/fb/creator_vt.c head/sys/dev/vt/colors/vt_termcolors.c head/sys/dev/vt/colors/vt_termcolors.h head/sys/dev/vt/hw/efifb/efifb.c head/sys/dev/vt/hw/fb/vt_early_fb.c head/sys/dev/vt/hw/fb/vt_fb.c head/sys/dev/vt/hw/ofwfb/ofwfb.c Modified: head/sys/dev/fb/creator_vt.c ============================================================================== --- head/sys/dev/fb/creator_vt.c Sun Aug 10 16:59:39 2014 (r269782) +++ head/sys/dev/fb/creator_vt.c Sun Aug 10 17:04:10 2014 (r269783) @@ -151,8 +151,9 @@ creatorfb_init(struct vt_device *vd) sc->memh = sparc64_fake_bustag(space, phys, &sc->memt[0]); /* 32-bit VGA palette */ - vt_generate_vga_palette(sc->fb.fb_cmap, COLOR_FORMAT_RGB, - 255, 16, 255, 8, 255, 0); + vt_generate_cons_palette(sc->fb.fb_cmap, COLOR_FORMAT_RGB, + 255, 0, 255, 8, 255, 16); + sc->fb.fb_cmsize = 16; vt_fb_init(vd); Modified: head/sys/dev/vt/colors/vt_termcolors.c ============================================================================== --- head/sys/dev/vt/colors/vt_termcolors.c Sun Aug 10 16:59:39 2014 (r269782) +++ head/sys/dev/vt/colors/vt_termcolors.c Sun Aug 10 17:04:10 2014 (r269783) @@ -39,25 +39,36 @@ static struct { unsigned char b; /* Blue percentage value. */ } color_def[16] = { {0, 0, 0}, /* black */ - {0, 0, 50}, /* dark blue */ - {0, 50, 0}, /* dark green */ - {0, 50, 50}, /* dark cyan */ {50, 0, 0}, /* dark red */ + {0, 50, 0}, /* dark green */ + {77, 63, 0}, /* dark yellow */ + {20, 40, 64}, /* dark blue */ {50, 0, 50}, /* dark magenta */ - {50, 50, 0}, /* brown */ + {0, 50, 50}, /* dark cyan */ {75, 75, 75}, /* light gray */ - {50, 50, 50}, /* dark gray */ - {0, 0, 100}, /* light blue */ - {0, 100, 0}, /* light green */ - {0, 100, 100}, /* light cyan */ + + {18, 20, 21}, /* dark gray */ {100, 0, 0}, /* light red */ + {0, 100, 0}, /* light green */ + {100, 100, 0}, /* light yellow */ + {45, 62, 81}, /* light blue */ {100, 0, 100}, /* light magenta */ - {100, 100, 0}, /* yellow */ + {0, 100, 100}, /* light cyan */ {100, 100, 100}, /* white */ }; +/* + * Between console's palette and VGA's one: + * - blue and red are swapped (1 <-> 4) + * - yellow ad cyan are swapped (3 <-> 6) + */ +static const int cons_to_vga_colors[16] = { + 0, 4, 2, 6, 1, 5, 3, 7, + 0, 4, 2, 6, 1, 5, 3, 7 +}; + int -vt_generate_vga_palette(uint32_t *palette, int format, uint32_t rmax, int roffset, +vt_generate_cons_palette(uint32_t *palette, int format, uint32_t rmax, int roffset, uint32_t gmax, int goffset, uint32_t bmax, int boffset) { int i; @@ -66,7 +77,7 @@ vt_generate_vga_palette(uint32_t *palett for (i = 0; i < 16; i++) { switch (format) { case COLOR_FORMAT_VGA: - palette[i] = i; + palette[i] = cons_to_vga_colors[i]; break; case COLOR_FORMAT_RGB: palette[i] = CF(r, i) | CF(g, i) | CF(b, i); Modified: head/sys/dev/vt/colors/vt_termcolors.h ============================================================================== --- head/sys/dev/vt/colors/vt_termcolors.h Sun Aug 10 16:59:39 2014 (r269782) +++ head/sys/dev/vt/colors/vt_termcolors.h Sun Aug 10 17:04:10 2014 (r269783) @@ -45,6 +45,6 @@ enum vt_color_format { }; /* Helper to fill color map used by driver */ -int vt_generate_vga_palette(uint32_t *palette, int format, uint32_t rmax, +int vt_generate_cons_palette(uint32_t *palette, int format, uint32_t rmax, int roffset, uint32_t gmax, int goffset, uint32_t bmax, int boffset); Modified: head/sys/dev/vt/hw/efifb/efifb.c ============================================================================== --- head/sys/dev/vt/hw/efifb/efifb.c Sun Aug 10 16:59:39 2014 (r269782) +++ head/sys/dev/vt/hw/efifb/efifb.c Sun Aug 10 17:04:10 2014 (r269783) @@ -129,7 +129,7 @@ vt_efifb_init(struct vt_device *vd) info->fb_stride = efifb->fb_stride * (depth / 8); - vt_generate_vga_palette(info->fb_cmap, COLOR_FORMAT_RGB, + vt_generate_cons_palette(info->fb_cmap, COLOR_FORMAT_RGB, efifb->fb_mask_red, ffs(efifb->fb_mask_red) - 1, efifb->fb_mask_green, ffs(efifb->fb_mask_green) - 1, efifb->fb_mask_blue, ffs(efifb->fb_mask_blue) - 1); Modified: head/sys/dev/vt/hw/fb/vt_early_fb.c ============================================================================== --- head/sys/dev/vt/hw/fb/vt_early_fb.c Sun Aug 10 16:59:39 2014 (r269782) +++ head/sys/dev/vt/hw/fb/vt_early_fb.c Sun Aug 10 17:04:10 2014 (r269783) @@ -90,25 +90,25 @@ vt_efb_initialize(struct fb_info *info) */ switch (info->fb_depth) { case 8: - vt_generate_vga_palette(info->fb_cmap, COLOR_FORMAT_RGB, + vt_generate_cons_palette(info->fb_cmap, COLOR_FORMAT_RGB, 0x7, 5, 0x7, 2, 0x3, 0); break; case 15: - vt_generate_vga_palette(info->fb_cmap, COLOR_FORMAT_RGB, + vt_generate_cons_palette(info->fb_cmap, COLOR_FORMAT_RGB, 0x1f, 10, 0x1f, 5, 0x1f, 0); break; case 16: - vt_generate_vga_palette(info->fb_cmap, COLOR_FORMAT_RGB, + vt_generate_cons_palette(info->fb_cmap, COLOR_FORMAT_RGB, 0x1f, 11, 0x3f, 5, 0x1f, 0); break; case 24: case 32: #if BYTE_ORDER == BIG_ENDIAN - vt_generate_vga_palette(info->fb_cmap, - COLOR_FORMAT_RGB, 255, 16, 255, 8, 255, 0); -#else - vt_generate_vga_palette(info->fb_cmap, + vt_generate_cons_palette(info->fb_cmap, COLOR_FORMAT_RGB, 255, 0, 255, 8, 255, 16); +#else + vt_generate_cons_palette(info->fb_cmap, + COLOR_FORMAT_RGB, 255, 16, 255, 8, 255, 0); #endif #ifdef FDT for (i = 0; i < 16; i++) { Modified: head/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- head/sys/dev/vt/hw/fb/vt_fb.c Sun Aug 10 16:59:39 2014 (r269782) +++ head/sys/dev/vt/hw/fb/vt_fb.c Sun Aug 10 17:04:10 2014 (r269783) @@ -333,18 +333,18 @@ vt_fb_init_cmap(uint32_t *cmap, int dept switch (depth) { case 8: - return (vt_generate_vga_palette(cmap, COLOR_FORMAT_RGB, + return (vt_generate_cons_palette(cmap, COLOR_FORMAT_RGB, 0x7, 5, 0x7, 2, 0x3, 0)); case 15: - return (vt_generate_vga_palette(cmap, COLOR_FORMAT_RGB, + return (vt_generate_cons_palette(cmap, COLOR_FORMAT_RGB, 0x1f, 10, 0x1f, 5, 0x1f, 0)); case 16: - return (vt_generate_vga_palette(cmap, COLOR_FORMAT_RGB, + return (vt_generate_cons_palette(cmap, COLOR_FORMAT_RGB, 0x1f, 11, 0x3f, 5, 0x1f, 0)); case 24: case 32: /* Ignore alpha. */ - return (vt_generate_vga_palette(cmap, COLOR_FORMAT_RGB, - 0xff, 0, 0xff, 8, 0xff, 16)); + return (vt_generate_cons_palette(cmap, COLOR_FORMAT_RGB, + 0xff, 16, 0xff, 8, 0xff, 0)); default: return (1); } Modified: head/sys/dev/vt/hw/ofwfb/ofwfb.c ============================================================================== --- head/sys/dev/vt/hw/ofwfb/ofwfb.c Sun Aug 10 16:59:39 2014 (r269782) +++ head/sys/dev/vt/hw/ofwfb/ofwfb.c Sun Aug 10 17:04:10 2014 (r269783) @@ -205,8 +205,8 @@ ofwfb_initialize(struct vt_device *vd) switch (sc->fb.fb_bpp) { case 8: - vt_generate_vga_palette(sc->fb.fb_cmap, COLOR_FORMAT_RGB, 255, - 0, 255, 8, 255, 16); + vt_generate_cons_palette(sc->fb.fb_cmap, COLOR_FORMAT_RGB, 255, + 16, 255, 8, 255, 0); for (i = 0; i < 16; i++) { OF_call_method("color!", sc->sc_handle, 4, 1, @@ -228,11 +228,11 @@ ofwfb_initialize(struct vt_device *vd) oldpix = bus_space_read_4(sc->sc_memt, sc->fb.fb_vbase, 0); bus_space_write_4(sc->sc_memt, sc->fb.fb_vbase, 0, 0xff000000); if (*(uint8_t *)(sc->fb.fb_vbase) == 0xff) - vt_generate_vga_palette(sc->fb.fb_cmap, - COLOR_FORMAT_RGB, 255, 16, 255, 8, 255, 0); - else - vt_generate_vga_palette(sc->fb.fb_cmap, + vt_generate_cons_palette(sc->fb.fb_cmap, COLOR_FORMAT_RGB, 255, 0, 255, 8, 255, 16); + else + vt_generate_cons_palette(sc->fb.fb_cmap, + COLOR_FORMAT_RGB, 255, 16, 255, 8, 255, 0); bus_space_write_4(sc->sc_memt, sc->fb.fb_vbase, 0, oldpix); break; From owner-svn-src-head@FreeBSD.ORG Sun Aug 10 19:14:15 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F2D7907; Sun, 10 Aug 2014 19:14:15 +0000 (UTC) Received: from felyko.com (felyko.com [IPv6:2001:470:1:2d5:26:3:1337:ca7]) by mx1.freebsd.org (Postfix) with ESMTP id 345042560; Sun, 10 Aug 2014 19:14:15 +0000 (UTC) Received: from [IPv6:2601:9:8280:5fd:29b0:4ef8:aab2:5b94] (unknown [IPv6:2601:9:8280:5fd:29b0:4ef8:aab2:5b94]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by felyko.com (Postfix) with ESMTPSA id 92E5E34AAC9; Sun, 10 Aug 2014 12:14:13 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r269777 - head/sys/netinet/cc From: Rui Paulo In-Reply-To: <53e7249b.20e4.485017ca@svn.freebsd.org> Date: Sun, 10 Aug 2014 12:14:35 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <53e7249b.20e4.485017ca@svn.freebsd.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Aug 2014 19:14:15 -0000 On Aug 10, 2014, at 0:51, Hans Petter Selasky = wrote: > Author: hselasky > Date: Sun Aug 10 07:51:55 2014 > New Revision: 269777 > URL: http://svnweb.freebsd.org/changeset/base/269777 >=20 > Log: > Fix string length argument passed to "sysctl_handle_string()" so that > the complete string is returned by the function and not just only one > byte. >=20 > PR: 192544 > MFC after: 2 weeks >=20 > Modified: > head/sys/netinet/cc/cc.c >=20 > Modified: head/sys/netinet/cc/cc.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/netinet/cc/cc.c Sun Aug 10 06:56:43 2014 = (r269776) > +++ head/sys/netinet/cc/cc.c Sun Aug 10 07:51:55 2014 = (r269777) > @@ -101,7 +101,7 @@ cc_default_algo(SYSCTL_HANDLER_ARGS) > CC_LIST_RLOCK(); > strlcpy(default_cc, CC_DEFAULT()->name, = TCP_CA_NAME_MAX); > CC_LIST_RUNLOCK(); > - err =3D sysctl_handle_string(oidp, default_cc, 1, req); > + err =3D sysctl_handle_string(oidp, default_cc, 0, req); > } else { > /* Find algo with specified name and set it to default. = */ > CC_LIST_RLOCK(); > @@ -166,7 +166,7 @@ cc_list_available(SYSCTL_HANDLER_ARGS) >=20 > if (!err) { > sbuf_finish(s); > - err =3D sysctl_handle_string(oidp, sbuf_data(s), 1, = req); > + err =3D sysctl_handle_string(oidp, sbuf_data(s), 0, = req); > } >=20 > sbuf_delete(s); >=20 Are you sure this is still correct? The len parameter should probably = be sbuf_len(s). -- Rui Paulo From owner-svn-src-head@FreeBSD.ORG Sun Aug 10 20:05:13 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C641756A for ; Sun, 10 Aug 2014 20:05:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C0652913 for ; Sun, 10 Aug 2014 20:05:13 +0000 (UTC) Received: from rmacklem (uid 1196) (envelope-from rmacklem@FreeBSD.org) id 29ab by svn.freebsd.org (DragonFly Mail Agent v0.9+); Sun, 10 Aug 2014 20:05:13 +0000 From: Rick Macklem Date: Sun, 10 Aug 2014 20:05:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269788 - head/usr.sbin/nfsd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e7d079.29ab.511a0bf3@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Aug 2014 20:05:13 -0000 Author: rmacklem Date: Sun Aug 10 20:05:13 2014 New Revision: 269788 URL: http://svnweb.freebsd.org/changeset/base/269788 Log: Document the use of the vfs.nfsd sysctls that control the size of the NFS server's DRC for TCP. This is a content change. MFC after: 1 week Modified: head/usr.sbin/nfsd/nfsd.8 Modified: head/usr.sbin/nfsd/nfsd.8 ============================================================================== --- head/usr.sbin/nfsd/nfsd.8 Sun Aug 10 18:13:50 2014 (r269787) +++ head/usr.sbin/nfsd/nfsd.8 Sun Aug 10 20:05:13 2014 (r269788) @@ -28,7 +28,7 @@ .\" @(#)nfsd.8 8.4 (Berkeley) 3/29/95 .\" $FreeBSD$ .\" -.Dd July 18, 2014 +.Dd August 10, 2014 .Dt NFSD 8 .Os .Sh NAME @@ -175,6 +175,24 @@ utility would then be used to block nfs-related packets that come in on the outside interface. .Pp +If the server has stopped servicing clients and has generated a console message +like +.Dq Li "nfsd server cache flooded..." , +the value for vfs.nfsd.tcphighwater needs to be increased. +This should allow the server to again handle requests without a reboot. +Also, you may want to consider decreasing the value for +vfs.nfsd.tcpcachetimeo to several minutes (in seconds) instead of 12 hours +when this occurs. +.Pp +Unfortunately making vfs.nfsd.tcphighwater too large can result in the mbuf +limit being reached, as indicated by a console message +like +.Dq Li "kern.ipc.nmbufs limit reached" . +If you cannot find values of the above +.Nm sysctl +values that work, you can disable the DRC cache for TCP by setting +vfs.nfsd.cachetcp to 0. +.Pp The .Nm utility has to be terminated with From owner-svn-src-head@FreeBSD.ORG Sun Aug 10 22:24:15 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1C7368F5 for ; Sun, 10 Aug 2014 22:24:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E08F52702 for ; Sun, 10 Aug 2014 22:24:14 +0000 (UTC) Received: from dumbbell (uid 1042) (envelope-from dumbbell@FreeBSD.org) id 23d4 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Sun, 10 Aug 2014 22:24:14 +0000 From: Jean-Sebastien Pedron Date: Sun, 10 Aug 2014 22:24:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269791 - in head/sys: arm/freescale/imx powerpc/ps3 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e7f10e.23d4.5ab585c1@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Aug 2014 22:24:15 -0000 Author: dumbbell Date: Sun Aug 10 22:24:14 2014 New Revision: 269791 URL: http://svnweb.freebsd.org/changeset/base/269791 Log: Fix two files forgotten in r269783 (vt_generate_cons_palette) Reported by: bz MFC after: 1 week MFC with: 269783 Modified: head/sys/arm/freescale/imx/imx51_ipuv3_fbd.c head/sys/powerpc/ps3/ps3_syscons.c Modified: head/sys/arm/freescale/imx/imx51_ipuv3_fbd.c ============================================================================== --- head/sys/arm/freescale/imx/imx51_ipuv3_fbd.c Sun Aug 10 21:45:58 2014 (r269790) +++ head/sys/arm/freescale/imx/imx51_ipuv3_fbd.c Sun Aug 10 22:24:14 2014 (r269791) @@ -163,18 +163,18 @@ ipu3_fb_init_cmap(uint32_t *cmap, int by switch (bytespp) { case 8: - return (vt_generate_vga_palette(cmap, COLOR_FORMAT_RGB, + return (vt_generate_cons_palette(cmap, COLOR_FORMAT_RGB, 0x7, 5, 0x7, 2, 0x3, 0)); case 15: - return (vt_generate_vga_palette(cmap, COLOR_FORMAT_RGB, + return (vt_generate_cons_palette(cmap, COLOR_FORMAT_RGB, 0x1f, 10, 0x1f, 5, 0x1f, 0)); case 16: - return (vt_generate_vga_palette(cmap, COLOR_FORMAT_RGB, + return (vt_generate_cons_palette(cmap, COLOR_FORMAT_RGB, 0x1f, 11, 0x3f, 5, 0x1f, 0)); case 24: case 32: /* Ignore alpha. */ - return (vt_generate_vga_palette(cmap, COLOR_FORMAT_RGB, - 0xff, 16, 0xff, 8, 0xff, 0)); + return (vt_generate_cons_palette(cmap, COLOR_FORMAT_RGB, + 0xff, 0, 0xff, 8, 0xff, 16)); default: return (1); } Modified: head/sys/powerpc/ps3/ps3_syscons.c ============================================================================== --- head/sys/powerpc/ps3/ps3_syscons.c Sun Aug 10 21:45:58 2014 (r269790) +++ head/sys/powerpc/ps3/ps3_syscons.c Sun Aug 10 22:24:14 2014 (r269791) @@ -178,8 +178,8 @@ ps3fb_init(struct vt_device *vd) sc->fb_info.fb_vbase = 0x10000000; /* 32-bit VGA palette */ - vt_generate_vga_palette(sc->fb_info.fb_cmap, COLOR_FORMAT_RGB, - 255, 16, 255, 8, 255, 0); + vt_generate_cons_palette(sc->fb_info.fb_cmap, COLOR_FORMAT_RGB, + 255, 0, 255, 8, 255, 16); /* Set correct graphics context */ lv1_gpu_context_attribute(sc->sc_fbcontext, From owner-svn-src-head@FreeBSD.ORG Mon Aug 11 00:03:51 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8F093E36 for ; Mon, 11 Aug 2014 00:03:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 654D42076 for ; Mon, 11 Aug 2014 00:03:51 +0000 (UTC) Received: from adrian (uid 753) (envelope-from adrian@FreeBSD.org) id 2e6f by svn.freebsd.org (DragonFly Mail Agent v0.9+); Mon, 11 Aug 2014 00:03:50 +0000 From: Adrian Chadd Date: Mon, 11 Aug 2014 00:03:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269793 - head/sys/contrib/dev/ath/ath_hal/ar9300 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e80867.2e6f.7b3e4cec@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2014 00:03:51 -0000 Author: adrian Date: Mon Aug 11 00:03:50 2014 New Revision: 269793 URL: http://svnweb.freebsd.org/changeset/base/269793 Log: Add some more OS_MARK() probes to the AR9300 HAL. Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_power.c head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_recv.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_power.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_power.c Sun Aug 10 22:26:29 2014 (r269792) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_power.c Mon Aug 11 00:03:50 2014 (r269793) @@ -666,6 +666,7 @@ ar9300_set_power_mode(struct ath_hal *ah HALDEBUG(ah, HAL_DEBUG_POWER_MGMT, "%s: %s -> %s (%s)\n", __func__, modes[ar9300_get_power_mode(ah)], modes[mode], set_chip ? "set chip " : ""); + OS_MARK(ah, AH_MARK_CHIP_POWER, mode); switch (mode) { case HAL_PM_AWAKE: @@ -719,8 +720,10 @@ ar9300_set_power_mode(struct ath_hal *ah default: HALDEBUG(ah, HAL_DEBUG_POWER_MGMT, "%s: unknown power mode %u\n", __func__, mode); + OS_MARK(ah, AH_MARK_CHIP_POWER_DONE, -1); return AH_FALSE; } + OS_MARK(ah, AH_MARK_CHIP_POWER_DONE, status); return status; } Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_recv.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_recv.c Sun Aug 10 22:26:29 2014 (r269792) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_recv.c Mon Aug 11 00:03:50 2014 (r269793) @@ -113,6 +113,8 @@ ar9300_stop_dma_receive(struct ath_hal * #define AH_RX_STOP_DMA_TIMEOUT 10000 /* usec */ #define AH_TIME_QUANTUM 100 /* usec */ + OS_MARK(ah, AH_MARK_RX_CTL, AH_MARK_RX_CTL_DMA_STOP); + if (timeout == 0) { timeout = AH_RX_STOP_DMA_TIMEOUT; } @@ -157,6 +159,9 @@ ar9300_stop_dma_receive(struct ath_hal * OS_REG_WRITE(ah, AR_MACMISC, org_value); + OS_MARK(ah, AH_MARK_RX_CTL, + status ? AH_MARK_RX_CTL_DMA_STOP_OK : AH_MARK_RX_CTL_DMA_STOP_ERR); + return status; #undef AH_RX_STOP_DMA_TIMEOUT #undef AH_TIME_QUANTUM From owner-svn-src-head@FreeBSD.ORG Mon Aug 11 03:04:16 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B6665F80 for ; Mon, 11 Aug 2014 03:04:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CABA21A0 for ; Mon, 11 Aug 2014 03:04:16 +0000 (UTC) Received: from araujo (uid 1134) (envelope-from araujo@FreeBSD.org) id 2a0c by svn.freebsd.org (DragonFly Mail Agent v0.9+); Mon, 11 Aug 2014 03:04:16 +0000 From: Marcelo Araujo Date: Mon, 11 Aug 2014 03:04:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269799 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e832b0.2a0c.2e4c9ba5@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2014 03:04:16 -0000 Author: araujo (ports committer) Date: Mon Aug 11 03:04:16 2014 New Revision: 269799 URL: http://svnweb.freebsd.org/changeset/base/269799 Log: - Remove unneeded include. Phabric: D563 Reviewed by: kevlo Approved by: kevlo Modified: head/sys/net/if_lagg.c Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Mon Aug 11 02:20:24 2014 (r269798) +++ head/sys/net/if_lagg.c Mon Aug 11 03:04:16 2014 (r269799) @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include From owner-svn-src-head@FreeBSD.ORG Mon Aug 11 11:00:50 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6761C8FE; Mon, 11 Aug 2014 11:00:50 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id DEBF224DA; Mon, 11 Aug 2014 11:00:49 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id s7BB0kc2055662 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 11 Aug 2014 15:00:46 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id s7BB0kmd055661; Mon, 11 Aug 2014 15:00:46 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 11 Aug 2014 15:00:46 +0400 From: Gleb Smirnoff To: Konstantin Belousov Subject: Re: svn commit: r269782 - in head/sys/sparc64: include sparc64 Message-ID: <20140811110046.GQ72338@FreeBSD.org> References: <53e7a4fc.2898.352aa941@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53e7a4fc.2898.352aa941@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: alc@FreeBSD.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, dumbbell@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2014 11:00:50 -0000 On Sun, Aug 10, 2014 at 04:59:39PM +0000, Konstantin Belousov wrote: K> Author: kib K> Date: Sun Aug 10 16:59:39 2014 K> New Revision: 269782 K> URL: http://svnweb.freebsd.org/changeset/base/269782 K> K> Log: K> On sparc64, do not keep mappings for the destroyed sf_bufs. Sparc64 K> pmap, unlike i386, and similar to i386/xen pv, does not tolerate K> abandoned mappings for the freed pages. K> K> Reported and tested by: dumbbell K> Diagnosed and reviewed by: alc K> Sponsored by: The FreeBSD Foundation That's my oversight. Sorry. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Mon Aug 11 12:26:49 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9AD83218 for ; Mon, 11 Aug 2014 12:26:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72BA42EA6 for ; Mon, 11 Aug 2014 12:26:49 +0000 (UTC) Received: from ache (uid 542) (envelope-from ache@FreeBSD.org) id 2f28 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Mon, 11 Aug 2014 12:26:49 +0000 From: Andrey A. Chernov Date: Mon, 11 Aug 2014 12:26:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269806 - in head/contrib/opie: . libopie X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e8b689.2f28.3febd085@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2014 12:26:49 -0000 Author: ache Date: Mon Aug 11 12:26:48 2014 New Revision: 269806 URL: http://svnweb.freebsd.org/changeset/base/269806 Log: Fix too long (seed length >12 chars) challenge handling. 1) " ext" length should be included into OPIE_CHALLENGE_MAX (as all places of opie code expects that). 2) Overflow check in challenge.c is off by 1 even with corrected OPIE_CHALLENGE_MAX 3) When fallback to randomchallenge() happens and rval is 0 (i.e. challenge is too long), its value should be set to error state too. To demonstrate the bug, run opiepasswd with valid seed: opiepasswd -s 1234567890123456 and notice that it falls back to randomchallenge() (i.e. no 1234567890123456 in the prompt). PR: 191511 Submitted by: mitsururike@gmail.com (partially) MFC after: 1 week Modified: head/contrib/opie/libopie/challenge.c head/contrib/opie/opie.h Modified: head/contrib/opie/libopie/challenge.c ============================================================================== --- head/contrib/opie/libopie/challenge.c Mon Aug 11 08:58:35 2014 (r269805) +++ head/contrib/opie/libopie/challenge.c Mon Aug 11 12:26:48 2014 (r269806) @@ -68,7 +68,9 @@ int opiechallenge FUNCTION((mp, name, ss } if (rval || - (snprintf(ss, OPIE_CHALLENGE_MAX, "otp-%s %d %s ext", algids[MDX], mp->opie_n - 1, mp->opie_seed) >= OPIE_CHALLENGE_MAX)) { + (snprintf(ss, OPIE_CHALLENGE_MAX+1, "otp-%s %d %s ext", algids[MDX], mp->opie_n - 1, mp->opie_seed) >= OPIE_CHALLENGE_MAX+1)) { + if (!rval) + rval = 1; opierandomchallenge(ss); memset(mp, 0, sizeof(*mp)); } Modified: head/contrib/opie/opie.h ============================================================================== --- head/contrib/opie/opie.h Mon Aug 11 08:58:35 2014 (r269805) +++ head/contrib/opie/opie.h Mon Aug 11 12:26:48 2014 (r269806) @@ -72,8 +72,8 @@ struct opie { /* Max length of hash algorithm name (md4/md5) */ #define OPIE_HASHNAME_MAX 3 -/* Maximum length of a challenge (otp-md? 9999 seed) */ -#define OPIE_CHALLENGE_MAX (4+OPIE_HASHNAME_MAX+1+4+1+OPIE_SEED_MAX) +/* Maximum length of a challenge (otp-md? 9999 seed ext) */ +#define OPIE_CHALLENGE_MAX (4+OPIE_HASHNAME_MAX+1+4+1+OPIE_SEED_MAX+1+3) /* Maximum length of a response that we allow */ #define OPIE_RESPONSE_MAX (9+1+19+1+9+OPIE_SEED_MAX+1+19+1+19+1+19) From owner-svn-src-head@FreeBSD.ORG Mon Aug 11 12:59:56 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2563CB59 for ; Mon, 11 Aug 2014 12:59:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F10C022D2 for ; Mon, 11 Aug 2014 12:59:55 +0000 (UTC) Received: from glebius (uid 1025) (envelope-from glebius@FreeBSD.org) id 2c83 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Mon, 11 Aug 2014 12:59:55 +0000 From: Gleb Smirnoff Date: Mon, 11 Aug 2014 12:59:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269807 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e8be4b.2c83.3b3d1940@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2014 12:59:56 -0000 Author: glebius Date: Mon Aug 11 12:59:55 2014 New Revision: 269807 URL: http://svnweb.freebsd.org/changeset/base/269807 Log: Provide sf_buf_ref() to optimize refcounting of already allocated sendfile(2) buffers. Sponsored by: Netflix Sponsored by: Nginx, Inc. Modified: head/sys/kern/subr_sfbuf.c head/sys/kern/uipc_syscalls.c head/sys/sys/sf_buf.h Modified: head/sys/kern/subr_sfbuf.c ============================================================================== --- head/sys/kern/subr_sfbuf.c Mon Aug 11 12:26:48 2014 (r269806) +++ head/sys/kern/subr_sfbuf.c Mon Aug 11 12:59:55 2014 (r269807) @@ -201,6 +201,22 @@ sf_buf_free(struct sf_buf *sf) mtx_unlock(&sf_buf_lock); } +void +sf_buf_ref(struct sf_buf *sf) +{ + +#ifdef SFBUF_OPTIONAL_DIRECT_MAP + if (SFBUF_OPTIONAL_DIRECT_MAP) + return; +#endif + + KASSERT(sf->ref_count > 0, ("%s: sf %p not allocated", __func__, sf)); + + mtx_lock(&sf_buf_lock); + sf->ref_count++; + mtx_unlock(&sf_buf_lock); +} + #ifdef SFBUF_PROCESS_PAGE /* * Run callback function on sf_buf that holds a certain page. Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Mon Aug 11 12:26:48 2014 (r269806) +++ head/sys/kern/uipc_syscalls.c Mon Aug 11 12:59:55 2014 (r269807) @@ -1993,8 +1993,7 @@ sf_ext_ref(void *arg1, void *arg2) struct sendfile_sync *sfs = arg2; vm_page_t pg = sf_buf_page(sf); - /* XXXGL: there should be sf_buf_ref() */ - sf_buf_alloc(sf_buf_page(sf), SFB_NOWAIT); + sf_buf_ref(sf); vm_page_lock(pg); vm_page_wire(pg); Modified: head/sys/sys/sf_buf.h ============================================================================== --- head/sys/sys/sf_buf.h Mon Aug 11 12:26:48 2014 (r269806) +++ head/sys/sys/sf_buf.h Mon Aug 11 12:59:55 2014 (r269807) @@ -106,6 +106,7 @@ struct sf_buf; #ifdef SFBUF struct sf_buf *sf_buf_alloc(struct vm_page *, int); void sf_buf_free(struct sf_buf *); +void sf_buf_ref(struct sf_buf *); static inline vm_offset_t sf_buf_kva(struct sf_buf *sf) @@ -168,6 +169,11 @@ static inline void sf_buf_free(struct sf_buf *sf) { } + +static inline void +sf_buf_ref(struct sf_buf *sf) +{ +} #endif /* SFBUF */ /* From owner-svn-src-head@FreeBSD.ORG Mon Aug 11 13:12:18 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A12C5193 for ; Mon, 11 Aug 2014 13:12:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FADC25CE for ; Mon, 11 Aug 2014 13:12:18 +0000 (UTC) Received: from glebius (uid 1025) (envelope-from glebius@FreeBSD.org) id 23e6 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Mon, 11 Aug 2014 13:12:18 +0000 From: Gleb Smirnoff Date: Mon, 11 Aug 2014 13:12:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269808 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e8c132.23e6.34cb6102@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2014 13:12:18 -0000 Author: glebius Date: Mon Aug 11 13:12:18 2014 New Revision: 269808 URL: http://svnweb.freebsd.org/changeset/base/269808 Log: Use M_WAITOK in sf_buf_init(). Sponsored by: Netflix Sponsored by: Nginx, Inc. Modified: head/sys/kern/subr_sfbuf.c Modified: head/sys/kern/subr_sfbuf.c ============================================================================== --- head/sys/kern/subr_sfbuf.c Mon Aug 11 12:59:55 2014 (r269807) +++ head/sys/kern/subr_sfbuf.c Mon Aug 11 13:12:18 2014 (r269808) @@ -99,8 +99,7 @@ sf_buf_init(void *arg) TAILQ_INIT(&sf_buf_freelist); sf_base = kva_alloc(nsfbufs * PAGE_SIZE); sf_bufs = malloc(nsfbufs * sizeof(struct sf_buf), M_TEMP, - M_NOWAIT | M_ZERO); - KASSERT(sf_bufs, ("%s: malloc failure", __func__)); + M_WAITOK | M_ZERO); for (i = 0; i < nsfbufs; i++) { sf_bufs[i].kva = sf_base + i * PAGE_SIZE; TAILQ_INSERT_TAIL(&sf_buf_freelist, &sf_bufs[i], free_entry); From owner-svn-src-head@FreeBSD.ORG Mon Aug 11 13:36:02 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C41C0E24 for ; Mon, 11 Aug 2014 13:36:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97352287F for ; Mon, 11 Aug 2014 13:36:02 +0000 (UTC) Received: from ache (uid 542) (envelope-from ache@FreeBSD.org) id 2dd0 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Mon, 11 Aug 2014 13:36:02 +0000 From: Andrey A. Chernov Date: Mon, 11 Aug 2014 13:36:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269809 - head/contrib/opie X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e8c6c2.2dd0.45941591@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2014 13:36:02 -0000 Author: ache Date: Mon Aug 11 13:36:02 2014 New Revision: 269809 URL: http://svnweb.freebsd.org/changeset/base/269809 Log: When sha1 support was added, they forget to increase OPIE_HASHNAME_MAX MFC after: 1 week Modified: head/contrib/opie/opie.h Modified: head/contrib/opie/opie.h ============================================================================== --- head/contrib/opie/opie.h Mon Aug 11 13:12:18 2014 (r269808) +++ head/contrib/opie/opie.h Mon Aug 11 13:36:02 2014 (r269809) @@ -69,8 +69,8 @@ struct opie { /* Maximum length of a seed */ #define OPIE_SEED_MAX 16 -/* Max length of hash algorithm name (md4/md5) */ -#define OPIE_HASHNAME_MAX 3 +/* Max length of hash algorithm name (md4/md5/sha1) */ +#define OPIE_HASHNAME_MAX 4 /* Maximum length of a challenge (otp-md? 9999 seed ext) */ #define OPIE_CHALLENGE_MAX (4+OPIE_HASHNAME_MAX+1+4+1+OPIE_SEED_MAX+1+3) From owner-svn-src-head@FreeBSD.ORG Mon Aug 11 13:47:38 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8AEC44BC; Mon, 11 Aug 2014 13:47:38 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E35429C9; Mon, 11 Aug 2014 13:47:38 +0000 (UTC) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s7BDlWoD085221 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 11 Aug 2014 16:47:32 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua s7BDlWoD085221 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id s7BDlWWL085220; Mon, 11 Aug 2014 16:47:32 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 11 Aug 2014 16:47:32 +0300 From: Konstantin Belousov To: Gleb Smirnoff Subject: Re: svn commit: r269807 - in head/sys: kern sys Message-ID: <20140811134732.GA2737@kib.kiev.ua> References: <53e8be4b.2c83.3b3d1940@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wRRV7LY7NUeQGEoC" Content-Disposition: inline In-Reply-To: <53e8be4b.2c83.3b3d1940@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2014 13:47:38 -0000 --wRRV7LY7NUeQGEoC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 11, 2014 at 12:59:55PM +0000, Gleb Smirnoff wrote: > Author: glebius > Date: Mon Aug 11 12:59:55 2014 > New Revision: 269807 > URL: http://svnweb.freebsd.org/changeset/base/269807 >=20 > Log: > Provide sf_buf_ref() to optimize refcounting of already allocated > sendfile(2) buffers. > =20 > Sponsored by: Netflix > Sponsored by: Nginx, Inc. >=20 > Modified: > head/sys/kern/subr_sfbuf.c > head/sys/kern/uipc_syscalls.c > head/sys/sys/sf_buf.h >=20 > Modified: head/sys/kern/subr_sfbuf.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/kern/subr_sfbuf.c Mon Aug 11 12:26:48 2014 (r269806) > +++ head/sys/kern/subr_sfbuf.c Mon Aug 11 12:59:55 2014 (r269807) > @@ -201,6 +201,22 @@ sf_buf_free(struct sf_buf *sf) > mtx_unlock(&sf_buf_lock); > } > =20 > +void > +sf_buf_ref(struct sf_buf *sf) > +{ > + > +#ifdef SFBUF_OPTIONAL_DIRECT_MAP > + if (SFBUF_OPTIONAL_DIRECT_MAP) > + return; > +#endif > + > + KASSERT(sf->ref_count > 0, ("%s: sf %p not allocated", __func__, sf)); > + > + mtx_lock(&sf_buf_lock); > + sf->ref_count++; > + mtx_unlock(&sf_buf_lock); > +} I think assert could be usefully moved under the mutex protected region. --wRRV7LY7NUeQGEoC Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJT6Ml0AAoJEJDCuSvBvK1BO5cP/jVriWv8yNNdf9xWmTbiPHPu 1n4Dceed8aC8xiS2Wjb/NUYT2rDjvm06Pf3kD0Zl+NJwPS4x/eidyW0jqv6Wot4I SkB3BQMhd7I8Yg8y/Y9ZmvcDkWKt1V6VetkHZV6LLIrsqla6yWAhMEDVByqhysn5 dxvdJ9me5pLbjKlWlFvWQfbFysw5rMXA3xLlIvotddytPlYspMzAfbKN/6/ksHMW emiU5r5BO0nn+VFY9FPYZYz4VJbDu4XsHKt4E+ZGvAyJu7PPy9jexaKviklk2ybv E+leUDkHxXh5anOyvOqqAwIr2ec9Z3F1E2Eh2xINtIFPEOpsE6u3wBQtb81tJCtr 5byIqTBYCayqOTYnRPmnst4XJVfEU4JlRdv9WMun/I5pbBlj4GvSv03lsiOAwhSi 7Vw8XEgMHujip0dFLUOZJN4AWR35Svr3PF2E4lMoDou48yW3nYtMmj98xdYES+3c hWlgpj9X1dGb1OontIUmt2Ty4vH+czrETI9r7hb0X7hFY6tNzNgCJwUy1zx+svSH xcgHbLe5VHz5LNHqG7nVjb+EHLYmxo7ynfGCWWcx62oTRiueeKflziapV69xKy7G gx2LWq7v+1nD1XGXpLxQY4NR0iSIPe45zVRinXw0knq+9ZIFV9JPBoOWUv98d0/u nHUjNCzI1TiT8MMHAzha =ogeK -----END PGP SIGNATURE----- --wRRV7LY7NUeQGEoC-- From owner-svn-src-head@FreeBSD.ORG Mon Aug 11 14:37:57 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A937BAC6 for ; Mon, 11 Aug 2014 14:37:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D1D32138 for ; Mon, 11 Aug 2014 14:37:57 +0000 (UTC) Received: from ache (uid 542) (envelope-from ache@FreeBSD.org) id 2930 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Mon, 11 Aug 2014 14:37:57 +0000 From: Andrey A. Chernov Date: Mon, 11 Aug 2014 14:37:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269810 - head/usr.bin/opiekey X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e8d545.2930.710d42f1@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2014 14:37:57 -0000 Author: ache Date: Mon Aug 11 14:37:57 2014 New Revision: 269810 URL: http://svnweb.freebsd.org/changeset/base/269810 Log: Link otp-sha1 to match real challenge prompt, not otp-sha MFC after: 1 week Modified: head/usr.bin/opiekey/Makefile Modified: head/usr.bin/opiekey/Makefile ============================================================================== --- head/usr.bin/opiekey/Makefile Mon Aug 11 13:36:02 2014 (r269809) +++ head/usr.bin/opiekey/Makefile Mon Aug 11 14:37:57 2014 (r269810) @@ -15,9 +15,9 @@ LDADD= -lopie -lmd LINKS= ${BINDIR}/opiekey ${BINDIR}/otp-md4 LINKS+= ${BINDIR}/opiekey ${BINDIR}/otp-md5 -LINKS+= ${BINDIR}/opiekey ${BINDIR}/otp-sha +LINKS+= ${BINDIR}/opiekey ${BINDIR}/otp-sha1 -MLINKS= opiekey.1 otp-md4.1 opiekey.1 otp-md5.1 opiekey.1 otp-sha.1 +MLINKS= opiekey.1 otp-md4.1 opiekey.1 otp-md5.1 opiekey.1 otp-sha1.1 .PATH: ${OPIE_DIST} From owner-svn-src-head@FreeBSD.ORG Mon Aug 11 14:46:10 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3810F23A for ; Mon, 11 Aug 2014 14:46:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E8252243 for ; Mon, 11 Aug 2014 14:46:10 +0000 (UTC) Received: from ache (uid 542) (envelope-from ache@FreeBSD.org) id 2caa by svn.freebsd.org (DragonFly Mail Agent v0.9+); Mon, 11 Aug 2014 14:46:10 +0000 From: Andrey A. Chernov Date: Mon, 11 Aug 2014 14:46:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269811 - head/contrib/opie X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e8d732.2caa.3b2dbe2@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2014 14:46:10 -0000 Author: ache Date: Mon Aug 11 14:46:09 2014 New Revision: 269811 URL: http://svnweb.freebsd.org/changeset/base/269811 Log: Last '/' for program name, not first one MFC after: 1 week Modified: head/contrib/opie/opiekey.c Modified: head/contrib/opie/opiekey.c ============================================================================== --- head/contrib/opie/opiekey.c Mon Aug 11 14:37:57 2014 (r269810) +++ head/contrib/opie/opiekey.c Mon Aug 11 14:46:09 2014 (r269811) @@ -145,7 +145,7 @@ int main FUNCTION((argc, argv), int argc int type = RESPONSE_STANDARD; int force = 0; - if (slash = strchr(argv[0], '/')) + if (slash = strrchr(argv[0], '/')) slash++; else slash = argv[0]; From owner-svn-src-head@FreeBSD.ORG Mon Aug 11 14:50:53 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4105E55E for ; Mon, 11 Aug 2014 14:50:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2BAF42416 for ; Mon, 11 Aug 2014 14:50:53 +0000 (UTC) Received: from imp (uid 547) (envelope-from imp@FreeBSD.org) id 2d10 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Mon, 11 Aug 2014 14:50:50 +0000 From: Warner Losh Date: Mon, 11 Aug 2014 14:50:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269812 - in head/sys: conf modules modules/aic7xxx/ahc modules/cxgb modules/cxgbe modules/dpt modules/drm modules/drm2 modules/ep modules/if_gif modules/netgraph modules/sound/driver m... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e8d84a.2d10.3a29d8f5@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2014 14:50:53 -0000 Author: imp Date: Mon Aug 11 14:50:49 2014 New Revision: 269812 URL: http://svnweb.freebsd.org/changeset/base/269812 Log: Remove dependence on source tree options. Move all kernel module options into kern.opts.mk and change all the places where we use src.opts.mk to pull in the options. Conditionally define SYSDIR and use SYSDIR/conf/kern.opts.mk instead of a CURDIR path. Replace all instances of CURDIR/../../etc with STSDIR, but only in the affected files. As a special compatibility hack, include bsd.owm.mk at the top of kern.opts.mk to allow the bare build of sys/modules to work on older systems. If the defaults ever change between 9.x, 10.x and current for these options, however, you'll wind up with the host OS' defaults rather than the -current defaults. This hack will be removed when we no longer need to support this build scenario. Reviewed by: jhb Differential Revision: https://phabric.freebsd.org/D529 Modified: head/sys/conf/kern.opts.mk head/sys/modules/Makefile head/sys/modules/aic7xxx/ahc/Makefile head/sys/modules/cxgb/Makefile head/sys/modules/cxgbe/Makefile head/sys/modules/dpt/Makefile head/sys/modules/drm/Makefile head/sys/modules/drm2/Makefile head/sys/modules/ep/Makefile head/sys/modules/if_gif/Makefile head/sys/modules/netgraph/Makefile head/sys/modules/sound/driver/Makefile head/sys/modules/usb/Makefile head/sys/modules/vx/Makefile Modified: head/sys/conf/kern.opts.mk ============================================================================== --- head/sys/conf/kern.opts.mk Mon Aug 11 14:46:09 2014 (r269811) +++ head/sys/conf/kern.opts.mk Mon Aug 11 14:50:49 2014 (r269812) @@ -11,19 +11,42 @@ # that haven't been converted over. # +# Note: bsd.own.mk must be included before the rest of kern.opts.mk to make +# building on 10.x and earlier work. This should be removed when that's no +# longer supported since it confounds the defaults (since it uses the host's +# notion of defaults rather than what's default in current when building +# within sys/modules). +.include + # These options are used by the kernel build process (kern.mk and kmod.mk) # They have to be listed here so we can build modules outside of the # src tree. __DEFAULT_YES_OPTIONS = \ ARM_EABI \ + BLUETOOTH \ + CDDL \ + CRYPT \ FORMAT_EXTENSIONS \ INET \ INET6 \ - KERNEL_SYMBOLS + IPFILTER \ + KERNEL_SYMBOLS \ + NETGRAPH \ + PF \ + SOURCELESS_HOST \ + SOURCELESS_UCODE \ + USB_GADGET_EXAMPLES \ + ZFS + +__DEFAULT_NO_OPTIONS = \ + EISA \ + NAND \ + OFED -# expanded inline from bsd.mkopt.mk: +# expanded inline from bsd.mkopt.mk to avoid share/mk dependency +# Those that default to yes .for var in ${__DEFAULT_YES_OPTIONS} .if !defined(MK_${var}) .if defined(WITHOUT_${var}) # WITHOUT always wins @@ -35,6 +58,18 @@ MK_${var}:= yes .endfor .undef __DEFAULT_YES_OPTIONS +# Those that default to no +.for var in ${__DEFAULT_NO_OPTIONS} +.if !defined(MK_${var}) +.if defined(WITH_${var}) && !defined(WITHOUT_${var}) # WITHOUT always wins +MK_${var}:= yes +.else +MK_${var}:= no +.endif +.endif +.endfor +.undef __DEFAULT_NO_OPTIONS + # # MK_*_SUPPORT options which default to "yes" unless their corresponding # MK_* variable is set to "no". Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Mon Aug 11 14:46:09 2014 (r269811) +++ head/sys/modules/Makefile Mon Aug 11 14:50:49 2014 (r269812) @@ -1,6 +1,7 @@ # $FreeBSD$ -.include +SYSDIR?=${.CURDIR}/.. +.include "${SYSDIR}/conf/kern.opts.mk" SUBDIR_PARALLEL= Modified: head/sys/modules/aic7xxx/ahc/Makefile ============================================================================== --- head/sys/modules/aic7xxx/ahc/Makefile Mon Aug 11 14:46:09 2014 (r269811) +++ head/sys/modules/aic7xxx/ahc/Makefile Mon Aug 11 14:50:49 2014 (r269812) @@ -1,9 +1,10 @@ # $FreeBSD$ -.include +SYSDIR?=${.CURDIR}/../../.. +.include "${SYSDIR}/conf/kern.opts.mk" -.PATH: ${.CURDIR}/../../../dev/aic7xxx +.PATH: ${SYSDIR}/dev/aic7xxx KMOD= ahc .if ${MK_EISA} != "no" SUBDIR+= ahc_eisa @@ -20,20 +21,20 @@ REG_PRINT_OPT= -p aic7xxx_reg_print.c .endif BEFORE_DEPEND = ${GENSRCS} -../aicasm/aicasm: ${.CURDIR}/../../../dev/aic7xxx/aicasm/*.[chyl] +../aicasm/aicasm: ${SYSDIR}/dev/aic7xxx/aicasm/*.[chyl] ( cd ${.CURDIR}/../aicasm; ${MAKE} aicasm; ) .if make(ahcfirmware) ahcfirmware: ${GENSRCS} ${GENSRCS}: \ - ${.CURDIR}/../../../dev/aic7xxx/aic7xxx.{reg,seq} \ - ${.CURDIR}/../../../cam/scsi/scsi_message.h - ../aicasm/aicasm ${INCLUDES} -I${.CURDIR}/../../../cam/scsi \ - -I${.CURDIR}/../../../dev/aic7xxx \ + ${SYSDIR}/dev/aic7xxx/aic7xxx.{reg,seq} \ + ${SYSDIR}/cam/scsi/scsi_message.h + ../aicasm/aicasm ${INCLUDES} -I${SYSDIR}/cam/scsi \ + -I${SYSDIR}/dev/aic7xxx \ -o aic7xxx_seq.h -r aic7xxx_reg.h \ ${REG_PRINT_OPT} \ - -i ${.CURDIR}/../../../dev/aic7xxx/aic7xxx_osm.h \ - ${.CURDIR}/../../../dev/aic7xxx/aic7xxx.seq + -i ${SYSDIR}/dev/aic7xxx/aic7xxx_osm.h \ + ${SYSDIR}/dev/aic7xxx/aic7xxx.seq .else ${GENSRCS}: @echo "Error: ${.TARGET} is missing. Run 'make ahcfirmware'" Modified: head/sys/modules/cxgb/Makefile ============================================================================== --- head/sys/modules/cxgb/Makefile Mon Aug 11 14:46:09 2014 (r269811) +++ head/sys/modules/cxgb/Makefile Mon Aug 11 14:50:49 2014 (r269812) @@ -1,6 +1,7 @@ # $FreeBSD$ -.include +SYSDIR?=${.CURDIR}/../.. +.include "${SYSDIR}/conf/kern.opts.mk" SUBDIR= cxgb SUBDIR+= cxgb_t3fw Modified: head/sys/modules/cxgbe/Makefile ============================================================================== --- head/sys/modules/cxgbe/Makefile Mon Aug 11 14:46:09 2014 (r269811) +++ head/sys/modules/cxgbe/Makefile Mon Aug 11 14:50:49 2014 (r269812) @@ -2,7 +2,8 @@ # $FreeBSD$ # -.include +SYSDIR?=${.CURDIR}/../.. +.include "${SYSDIR}/conf/kern.opts.mk" SUBDIR= if_cxgbe SUBDIR+= t4_firmware Modified: head/sys/modules/dpt/Makefile ============================================================================== --- head/sys/modules/dpt/Makefile Mon Aug 11 14:46:09 2014 (r269811) +++ head/sys/modules/dpt/Makefile Mon Aug 11 14:50:49 2014 (r269812) @@ -1,8 +1,9 @@ # $FreeBSD$ -.include +SYSDIR?=${.CURDIR}/../.. +.include "${SYSDIR}/conf/kern.opts.mk" -.PATH: ${.CURDIR}/../../dev/dpt +.PATH: ${SYSDIR}/dev/dpt KMOD= dpt SRCS= dpt_scsi.c dpt.h \ dpt_pci.c pci_if.h \ Modified: head/sys/modules/drm/Makefile ============================================================================== --- head/sys/modules/drm/Makefile Mon Aug 11 14:46:09 2014 (r269811) +++ head/sys/modules/drm/Makefile Mon Aug 11 14:50:49 2014 (r269812) @@ -1,6 +1,7 @@ # $FreeBSD$ -.include +SYSDIR?=${.CURDIR}/../.. +.include "${SYSDIR}/conf/kern.opts.mk" # Modules that include binary-only blobs of microcode should be selectable by # MK_SOURCELESS_UCODE option (see below). Modified: head/sys/modules/drm2/Makefile ============================================================================== --- head/sys/modules/drm2/Makefile Mon Aug 11 14:46:09 2014 (r269811) +++ head/sys/modules/drm2/Makefile Mon Aug 11 14:50:49 2014 (r269812) @@ -1,7 +1,7 @@ # $FreeBSD$ -.include -.include +SYSDIR?=${.CURDIR}/../.. +.include "${SYSDIR}/conf/kern.opts.mk" .if ${MACHINE_CPUARCH} == "amd64" _radeonkms= radeonkms Modified: head/sys/modules/ep/Makefile ============================================================================== --- head/sys/modules/ep/Makefile Mon Aug 11 14:46:09 2014 (r269811) +++ head/sys/modules/ep/Makefile Mon Aug 11 14:50:49 2014 (r269812) @@ -1,8 +1,9 @@ # $FreeBSD$ -.include +SYSDIR?=${.CURDIR}/../.. +.include "${SYSDIR}/conf/kern.opts.mk" -.PATH: ${.CURDIR}/../../dev/ep +.PATH: ${SYSDIR}/dev/ep KMOD= if_ep SRCS= if_ep.c Modified: head/sys/modules/if_gif/Makefile ============================================================================== --- head/sys/modules/if_gif/Makefile Mon Aug 11 14:46:09 2014 (r269811) +++ head/sys/modules/if_gif/Makefile Mon Aug 11 14:50:49 2014 (r269812) @@ -1,8 +1,9 @@ # $FreeBSD$ -.include +SYSDIR?=${.CURDIR}/../.. +.include "${SYSDIR}/conf/kern.opts.mk" -.PATH: ${.CURDIR}/../../net ${.CURDIR}/../../netinet ${.CURDIR}/../../netinet6 +.PATH: ${SYSDIR}/net ${SYSDIR}/netinet ${SYSDIR}/netinet6 KMOD= if_gif SRCS= if_gif.c in_gif.c opt_inet.h opt_inet6.h opt_mrouting.h Modified: head/sys/modules/netgraph/Makefile ============================================================================== --- head/sys/modules/netgraph/Makefile Mon Aug 11 14:46:09 2014 (r269811) +++ head/sys/modules/netgraph/Makefile Mon Aug 11 14:50:49 2014 (r269812) @@ -1,7 +1,8 @@ # $Whistle: Makefile,v 1.5 1999/01/24 06:48:37 archie Exp $ # $FreeBSD$ -.include +SYSDIR?=${.CURDIR}/../.. +.include "${SYSDIR}/conf/kern.opts.mk" SUBDIR= async \ atm \ @@ -57,7 +58,7 @@ SUBDIR= async \ _bluetooth= bluetooth .endif -.if ${MK_CRYPT} != "no" && exists(${.CURDIR}/../../crypto/rc4/rc4.c) +.if ${MK_CRYPT} != "no" && exists(${SYSDIR}/crypto/rc4/rc4.c) _mppc= mppc .endif Modified: head/sys/modules/sound/driver/Makefile ============================================================================== --- head/sys/modules/sound/driver/Makefile Mon Aug 11 14:46:09 2014 (r269811) +++ head/sys/modules/sound/driver/Makefile Mon Aug 11 14:50:49 2014 (r269812) @@ -1,6 +1,7 @@ # $FreeBSD$ -.include +SYSDIR?=${.CURDIR}/../../.. +.include "${SYSDIR}/conf/kern.opts.mk" # Modules that include binary-only blobs of microcode should be selectable by # MK_SOURCELESS_UCODE option (see below). Modified: head/sys/modules/usb/Makefile ============================================================================== --- head/sys/modules/usb/Makefile Mon Aug 11 14:46:09 2014 (r269811) +++ head/sys/modules/usb/Makefile Mon Aug 11 14:50:49 2014 (r269812) @@ -25,7 +25,8 @@ # SUCH DAMAGE. # -.include +SYSDIR?=${.CURDIR}/../.. +.include "${SYSDIR}/conf/kern.opts.mk" # # Check for common USB debug flags to pass when building the USB Modified: head/sys/modules/vx/Makefile ============================================================================== --- head/sys/modules/vx/Makefile Mon Aug 11 14:46:09 2014 (r269811) +++ head/sys/modules/vx/Makefile Mon Aug 11 14:50:49 2014 (r269812) @@ -1,8 +1,9 @@ # $FreeBSD$ -.include +SYSDIR?=${.CURDIR}/../.. +.include "${SYSDIR}/conf/kern.opts.mk" -.PATH: ${.CURDIR}/../../dev/vx +.PATH: ${SYSDIR}/dev/vx KMOD= if_vx SRCS= if_vx.c if_vx_pci.c From owner-svn-src-head@FreeBSD.ORG Mon Aug 11 15:06:07 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9DD36B94 for ; Mon, 11 Aug 2014 15:06:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 73DC225AD for ; Mon, 11 Aug 2014 15:06:07 +0000 (UTC) Received: from glebius (uid 1025) (envelope-from glebius@FreeBSD.org) id 256d by svn.freebsd.org (DragonFly Mail Agent v0.9+); Mon, 11 Aug 2014 15:06:07 +0000 From: Gleb Smirnoff Date: Mon, 11 Aug 2014 15:06:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269813 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e8dbdf.256d.4d189ea0@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2014 15:06:07 -0000 Author: glebius Date: Mon Aug 11 15:06:07 2014 New Revision: 269813 URL: http://svnweb.freebsd.org/changeset/base/269813 Log: Move KASSERT into locked region. Submitted by: kib Modified: head/sys/kern/subr_sfbuf.c Modified: head/sys/kern/subr_sfbuf.c ============================================================================== --- head/sys/kern/subr_sfbuf.c Mon Aug 11 14:50:49 2014 (r269812) +++ head/sys/kern/subr_sfbuf.c Mon Aug 11 15:06:07 2014 (r269813) @@ -209,9 +209,8 @@ sf_buf_ref(struct sf_buf *sf) return; #endif - KASSERT(sf->ref_count > 0, ("%s: sf %p not allocated", __func__, sf)); - mtx_lock(&sf_buf_lock); + KASSERT(sf->ref_count > 0, ("%s: sf %p not allocated", __func__, sf)); sf->ref_count++; mtx_unlock(&sf_buf_lock); } From owner-svn-src-head@FreeBSD.ORG Mon Aug 11 15:37:02 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0CA3703 for ; Mon, 11 Aug 2014 15:37:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76D3C2913 for ; Mon, 11 Aug 2014 15:37:02 +0000 (UTC) Received: from royger (uid 1332) (envelope-from royger@FreeBSD.org) id 2179 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Mon, 11 Aug 2014 15:37:02 +0000 From: Roger Pau Monné Date: Mon, 11 Aug 2014 15:37:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269814 - head/sys/dev/xen/blkfront X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e8e31e.2179.30c1c657@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2014 15:37:02 -0000 Author: royger Date: Mon Aug 11 15:37:02 2014 New Revision: 269814 URL: http://svnweb.freebsd.org/changeset/base/269814 Log: blkfront: add support for unmapped IO Using unmapped IO is really beneficial when running inside of a VM, since it avoids IPIs to other vCPUs in order to invalidate the mappings. This patch adds unmapped IO support to blkfront. The following tests results have been obtained when running on a Xen host without HAP: PVHVM 3165.84 real 6354.17 user 4483.32 sys PVHVM with unmapped IO 2099.46 real 4624.52 user 2967.38 sys This is because when running using shadow page tables TLB flushes and range invalidations are much more expensive, so using unmapped IO provides a very important performance boost. Sponsored by: Citrix Systems R&D Tested by: robak MFC after: 1 week PR: 191173 dev/xen/blkfront/blkfront.c: - Add and announce support for unmapped IO. Modified: head/sys/dev/xen/blkfront/blkfront.c Modified: head/sys/dev/xen/blkfront/blkfront.c ============================================================================== --- head/sys/dev/xen/blkfront/blkfront.c Mon Aug 11 15:06:07 2014 (r269813) +++ head/sys/dev/xen/blkfront/blkfront.c Mon Aug 11 15:37:02 2014 (r269814) @@ -272,8 +272,12 @@ xbd_queue_request(struct xbd_softc *sc, { int error; - error = bus_dmamap_load(sc->xbd_io_dmat, cm->cm_map, cm->cm_data, - cm->cm_datalen, xbd_queue_cb, cm, 0); + if (cm->cm_bp != NULL) + error = bus_dmamap_load_bio(sc->xbd_io_dmat, cm->cm_map, + cm->cm_bp, xbd_queue_cb, cm, 0); + else + error = bus_dmamap_load(sc->xbd_io_dmat, cm->cm_map, + cm->cm_data, cm->cm_datalen, xbd_queue_cb, cm, 0); if (error == EINPROGRESS) { /* * Maintain queuing order by freezing the queue. The next @@ -333,8 +337,6 @@ xbd_bio_command(struct xbd_softc *sc) } cm->cm_bp = bp; - cm->cm_data = bp->bio_data; - cm->cm_datalen = bp->bio_bcount; cm->cm_sector_number = (blkif_sector_t)bp->bio_pblkno; switch (bp->bio_cmd) { @@ -993,7 +995,7 @@ xbd_instance_create(struct xbd_softc *sc sc->xbd_disk->d_mediasize = sectors * sector_size; sc->xbd_disk->d_maxsize = sc->xbd_max_request_size; - sc->xbd_disk->d_flags = 0; + sc->xbd_disk->d_flags = DISKFLAG_UNMAPPED_BIO; if ((sc->xbd_flags & (XBDF_FLUSH|XBDF_BARRIER)) != 0) { sc->xbd_disk->d_flags |= DISKFLAG_CANFLUSHCACHE; device_printf(sc->xbd_dev, From owner-svn-src-head@FreeBSD.ORG Mon Aug 11 15:41:55 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BBD6197B for ; Mon, 11 Aug 2014 15:41:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 922292A29 for ; Mon, 11 Aug 2014 15:41:55 +0000 (UTC) Received: from ache (uid 542) (envelope-from ache@FreeBSD.org) id 27ba by svn.freebsd.org (DragonFly Mail Agent v0.9+); Mon, 11 Aug 2014 15:41:55 +0000 From: Andrey A. Chernov Date: Mon, 11 Aug 2014 15:41:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269815 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e8e443.27ba.4596dd89@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2014 15:41:55 -0000 Author: ache Date: Mon Aug 11 15:41:55 2014 New Revision: 269815 URL: http://svnweb.freebsd.org/changeset/base/269815 Log: Add otp-sha MFC after: 1 week Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Mon Aug 11 15:37:02 2014 (r269814) +++ head/ObsoleteFiles.inc Mon Aug 11 15:41:55 2014 (r269815) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20140811: otp-sha renamed to otp-sha1 +OLD_FILES+=usr/bin/otp-sha +OLD_FILES+=usr/share/man/man1/otp-sha.1.gz # 20140807: Remove private lib files that should not be installed. OLD_FILES+=usr/lib/private/libatf-c.a OLD_FILES+=usr/lib/private/libatf-c.so From owner-svn-src-head@FreeBSD.ORG Mon Aug 11 16:31:29 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 412FFBCA for ; Mon, 11 Aug 2014 16:31:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 187BF214B for ; Mon, 11 Aug 2014 16:31:29 +0000 (UTC) Received: from gjb (uid 1237) (envelope-from gjb@FreeBSD.org) id 2894 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Mon, 11 Aug 2014 16:31:29 +0000 From: Glen Barber Date: Mon, 11 Aug 2014 16:31:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269816 - head/release/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e8efe1.2894.7404ff5c@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2014 16:31:29 -0000 Author: gjb Date: Mon Aug 11 16:31:28 2014 New Revision: 269816 URL: http://svnweb.freebsd.org/changeset/base/269816 Log: In arm/release.sh, continue if 'xdev-links' target fails where the target is not valid (stable/10), instead of doing per-branch evaluation on if xdev-links needs to be invoked. Sponsored by: The FreeBSD Foundation Modified: head/release/arm/release.sh Modified: head/release/arm/release.sh ============================================================================== --- head/release/arm/release.sh Mon Aug 11 15:41:55 2014 (r269815) +++ head/release/arm/release.sh Mon Aug 11 16:31:28 2014 (r269816) @@ -103,7 +103,7 @@ main() { eval chroot ${CHROOTDIR} make -C /usr/src \ ${XDEV_FLAGS} XDEV=${XDEV} XDEV_ARCH=${XDEV_ARCH} \ TARGET=${XDEV} TARGET_ARCH=${XDEV_ARCH} \ - ${WORLD_FLAGS} xdev-links + ${WORLD_FLAGS} xdev-links || true # Run the ldconfig(8) startup script so /var/run/ld-elf*.so.hints # is created. From owner-svn-src-head@FreeBSD.ORG Mon Aug 11 16:35:46 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F368ADD4; Mon, 11 Aug 2014 16:35:45 +0000 (UTC) Received: from pp2.rice.edu (proofpoint2.mail.rice.edu [128.42.201.101]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9B5B2173; Mon, 11 Aug 2014 16:35:44 +0000 (UTC) Received: from pps.filterd (pp2.rice.edu [127.0.0.1]) by pp2.rice.edu (8.14.5/8.14.5) with SMTP id s7BGWYaP018169; Mon, 11 Aug 2014 11:35:38 -0500 Received: from mh1.mail.rice.edu (mh1.mail.rice.edu [128.42.201.20]) by pp2.rice.edu with ESMTP id 1nppmn06k1-1; Mon, 11 Aug 2014 11:35:38 -0500 X-Virus-Scanned: by amavis-2.7.0 at mh1.mail.rice.edu, auth channel Received: from 108-254-203-201.lightspeed.hstntx.sbcglobal.net (108-254-203-201.lightspeed.hstntx.sbcglobal.net [108.254.203.201]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh1.mail.rice.edu (Postfix) with ESMTPSA id EAF9E460148; Mon, 11 Aug 2014 11:35:37 -0500 (CDT) Message-ID: <53E8F0D9.9080900@rice.edu> Date: Mon, 11 Aug 2014 11:35:37 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r269782 - in head/sys/sparc64: include sparc64 References: <53e7a4fc.2898.352aa941@svn.freebsd.org> In-Reply-To: <53e7a4fc.2898.352aa941@svn.freebsd.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 kscore.is_bulkscore=1.67643676718399e-14 kscore.compositescore=0 circleOfTrustscore=0 compositescore=0.714301145562988 urlsuspect_oldscore=0.714301145562988 suspectscore=13 recipient_domain_to_sender_totalscore=0 phishscore=0 bulkscore=0 kscore.is_spamscore=0 recipient_to_sender_totalscore=0 recipient_domain_to_sender_domain_totalscore=0 rbsscore=0.714301145562988 spamscore=0 recipient_to_sender_domain_totalscore=0 urlsuspectscore=0.9 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1408110191 Cc: src-committers@freebsd.org, Konstantin Belousov X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2014 16:35:46 -0000 On 08/10/2014 11:59, Konstantin Belousov wrote: > Author: kib > Date: Sun Aug 10 16:59:39 2014 > New Revision: 269782 > URL: http://svnweb.freebsd.org/changeset/base/269782 > > Log: > On sparc64, do not keep mappings for the destroyed sf_bufs. Sparc64 > pmap, unlike i386, and similar to i386/xen pv, does not tolerate > abandoned mappings for the freed pages. > > Reported and tested by: dumbbell > Diagnosed and reviewed by: alc > Sponsored by: The FreeBSD Foundation This change fixes things on sparc64, but there is also an opportunity here to make sf_buf operations much faster on newer sparc64 hardware. If someone is interested in doing this, then please e-mail me. Basically, if dcache_color_ignore is non-zero, then sparc64's direct map can be used. It shouldn't be a difficult change. > Added: > head/sys/sparc64/include/sf_buf.h > - copied, changed from r269781, head/sys/i386/include/sf_buf.h > Modified: > head/sys/sparc64/include/vmparam.h > head/sys/sparc64/sparc64/vm_machdep.c > > Copied and modified: head/sys/sparc64/include/sf_buf.h (from r269781, head/sys/i386/include/sf_buf.h) > ============================================================================== > --- head/sys/i386/include/sf_buf.h Sun Aug 10 15:21:26 2014 (r269781, copy source) > +++ head/sys/sparc64/include/sf_buf.h Sun Aug 10 16:59:39 2014 (r269782) > @@ -31,6 +31,5 @@ > > void sf_buf_map(struct sf_buf *, int); > int sf_buf_unmap(struct sf_buf *); > -boolean_t sf_buf_invalidate_cache(vm_page_t); > > #endif /* !_MACHINE_SF_BUF_H_ */ > > Modified: head/sys/sparc64/include/vmparam.h > ============================================================================== > --- head/sys/sparc64/include/vmparam.h Sun Aug 10 15:21:26 2014 (r269781) > +++ head/sys/sparc64/include/vmparam.h Sun Aug 10 16:59:39 2014 (r269782) > @@ -240,6 +240,6 @@ extern vm_offset_t vm_max_kernel_address > #define ZERO_REGION_SIZE PAGE_SIZE > > #define SFBUF > -#define SFBUF_NOMD > +#define SFBUF_MAP > > #endif /* !_MACHINE_VMPARAM_H_ */ > > Modified: head/sys/sparc64/sparc64/vm_machdep.c > ============================================================================== > --- head/sys/sparc64/sparc64/vm_machdep.c Sun Aug 10 15:21:26 2014 (r269781) > +++ head/sys/sparc64/sparc64/vm_machdep.c Sun Aug 10 16:59:39 2014 (r269782) > @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include > @@ -443,3 +444,18 @@ uma_small_free(void *mem, int size, u_in > vm_page_free(m); > atomic_subtract_int(&vm_cnt.v_wire_count, 1); > } > + > +void > +sf_buf_map(struct sf_buf *sf, int flags) > +{ > + > + pmap_qenter(sf->kva, &sf->m, 1); > +} > + > +int > +sf_buf_unmap(struct sf_buf *sf) > +{ > + > + pmap_qremove(sf->kva, 1); > + return (1); > +} > > From owner-svn-src-head@FreeBSD.ORG Mon Aug 11 17:04:05 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6719D816 for ; Mon, 11 Aug 2014 17:04:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E701255C for ; Mon, 11 Aug 2014 17:04:05 +0000 (UTC) Received: from ngie (uid 1347) (envelope-from ngie@FreeBSD.org) id 29bb by svn.freebsd.org (DragonFly Mail Agent v0.9+); Mon, 11 Aug 2014 17:04:05 +0000 From: Garrett Cooper Date: Mon, 11 Aug 2014 17:04:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269820 - head/sys/modules X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e8f785.29bb.3ea60116@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2014 17:04:05 -0000 Author: ngie Date: Mon Aug 11 17:04:04 2014 New Revision: 269820 URL: http://svnweb.freebsd.org/changeset/base/269820 Log: Similar to r250143, optimize MODULES_OVERRIDE such that SUBDIR isn't automatically defined if MODULES_OVERRIDE is defined Approved by: jmmv (mentor) Reviewed by: imp Phabric: D578 Sponsored by: EMC / Isilon Storage Division Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Mon Aug 11 16:57:47 2014 (r269819) +++ head/sys/modules/Makefile Mon Aug 11 17:04:04 2014 (r269820) @@ -8,6 +8,9 @@ SUBDIR_PARALLEL= # Modules that include binary-only blobs of microcode should be selectable by # MK_SOURCELESS_UCODE option (see below). +.if defined(MODULES_OVERRIDE) && !defined(ALL_MODULES) +SUBDIR=${MODULES_OVERRIDE} +.else SUBDIR= \ ${_3dfx} \ ${_3dfx_linux} \ @@ -830,9 +833,6 @@ _sound= sound _zfs= zfs .endif .endif - -.if defined(MODULES_OVERRIDE) && !defined(ALL_MODULES) -SUBDIR=${MODULES_OVERRIDE} .endif .for reject in ${WITHOUT_MODULES} From owner-svn-src-head@FreeBSD.ORG Mon Aug 11 17:45:42 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EA81AAC1 for ; Mon, 11 Aug 2014 17:45:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB21429BA for ; Mon, 11 Aug 2014 17:45:41 +0000 (UTC) Received: from alc (uid 759) (envelope-from alc@FreeBSD.org) id 2d1e by svn.freebsd.org (DragonFly Mail Agent v0.9+); Mon, 11 Aug 2014 17:45:41 +0000 From: Alan Cox Date: Mon, 11 Aug 2014 17:45:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269822 - head/sys/i386/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e90145.2d1e.35def4e2@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2014 17:45:42 -0000 Author: alc Date: Mon Aug 11 17:45:41 2014 New Revision: 269822 URL: http://svnweb.freebsd.org/changeset/base/269822 Log: Change {_,}pmap_allocpte() so that they look for the flag PMAP_ENTER_NOSLEEP instead of M_NOWAIT/M_WAITOK when deciding whether to sleep on page table page allocation. (The same functions in the i386/xen and mips pmap implementations already use PMAP_ENTER_NOSLEEP.) X-MFC with: r269728 Sponsored by: EMC / Isilon Storage Division Modified: head/sys/i386/i386/pmap.c Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Mon Aug 11 17:34:25 2014 (r269821) +++ head/sys/i386/i386/pmap.c Mon Aug 11 17:45:41 2014 (r269822) @@ -331,9 +331,9 @@ static void pmap_update_pde(pmap_t pmap, pd_entry_t newpde); static void pmap_update_pde_invalidate(vm_offset_t va, pd_entry_t newpde); -static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va, int flags); +static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va, u_int flags); -static vm_page_t _pmap_allocpte(pmap_t pmap, u_int ptepindex, int flags); +static vm_page_t _pmap_allocpte(pmap_t pmap, u_int ptepindex, u_int flags); static void _pmap_unwire_ptp(pmap_t pmap, vm_page_t m, struct spglist *free); static pt_entry_t *pmap_pte_quick(pmap_t pmap, vm_offset_t va); static void pmap_pte_release(pt_entry_t *pte); @@ -1818,21 +1818,17 @@ pmap_pinit(pmap_t pmap) * mapped correctly. */ static vm_page_t -_pmap_allocpte(pmap_t pmap, u_int ptepindex, int flags) +_pmap_allocpte(pmap_t pmap, u_int ptepindex, u_int flags) { vm_paddr_t ptepa; vm_page_t m; - KASSERT((flags & (M_NOWAIT | M_WAITOK)) == M_NOWAIT || - (flags & (M_NOWAIT | M_WAITOK)) == M_WAITOK, - ("_pmap_allocpte: flags is neither M_NOWAIT nor M_WAITOK")); - /* * Allocate a page table page. */ if ((m = vm_page_alloc(NULL, ptepindex, VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | VM_ALLOC_ZERO)) == NULL) { - if (flags & M_WAITOK) { + if ((flags & PMAP_ENTER_NOSLEEP) == 0) { PMAP_UNLOCK(pmap); rw_wunlock(&pvh_global_lock); VM_WAIT; @@ -1864,16 +1860,12 @@ _pmap_allocpte(pmap_t pmap, u_int ptepin } static vm_page_t -pmap_allocpte(pmap_t pmap, vm_offset_t va, int flags) +pmap_allocpte(pmap_t pmap, vm_offset_t va, u_int flags) { u_int ptepindex; pd_entry_t ptepa; vm_page_t m; - KASSERT((flags & (M_NOWAIT | M_WAITOK)) == M_NOWAIT || - (flags & (M_NOWAIT | M_WAITOK)) == M_WAITOK, - ("pmap_allocpte: flags is neither M_NOWAIT nor M_WAITOK")); - /* * Calculate pagetable page index */ @@ -1906,7 +1898,7 @@ retry: * been deallocated. */ m = _pmap_allocpte(pmap, ptepindex, flags); - if (m == NULL && (flags & M_WAITOK)) + if (m == NULL && (flags & PMAP_ENTER_NOSLEEP) == 0) goto retry; } return (m); @@ -3468,12 +3460,11 @@ pmap_enter(pmap_t pmap, vm_offset_t va, pv_entry_t pv; vm_paddr_t opa, pa; vm_page_t mpte, om; - boolean_t invlva, nosleep, wired; + boolean_t invlva, wired; va = trunc_page(va); mpte = NULL; wired = (flags & PMAP_ENTER_WIRED) != 0; - nosleep = (flags & PMAP_ENTER_NOSLEEP) != 0; KASSERT(va <= VM_MAX_KERNEL_ADDRESS, ("pmap_enter: toobig")); KASSERT(va < UPT_MIN_ADDRESS || va >= UPT_MAX_ADDRESS, @@ -3491,9 +3482,9 @@ pmap_enter(pmap_t pmap, vm_offset_t va, * resident, we are creating it here. */ if (va < VM_MAXUSER_ADDRESS) { - mpte = pmap_allocpte(pmap, va, nosleep ? M_NOWAIT : M_WAITOK); + mpte = pmap_allocpte(pmap, va, flags); if (mpte == NULL) { - KASSERT(nosleep, + KASSERT((flags & PMAP_ENTER_NOSLEEP) != 0, ("pmap_allocpte failed with sleep allowed")); sched_unpin(); rw_wunlock(&pvh_global_lock); @@ -3828,7 +3819,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ mpte->wire_count++; } else { mpte = _pmap_allocpte(pmap, ptepindex, - M_NOWAIT); + PMAP_ENTER_NOSLEEP); if (mpte == NULL) return (mpte); } @@ -4154,7 +4145,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm */ if ((ptetemp & PG_MANAGED) != 0) { dstmpte = pmap_allocpte(dst_pmap, addr, - M_NOWAIT); + PMAP_ENTER_NOSLEEP); if (dstmpte == NULL) goto out; dst_pte = pmap_pte_quick(dst_pmap, addr); From owner-svn-src-head@FreeBSD.ORG Mon Aug 11 18:26:58 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E49892B for ; Mon, 11 Aug 2014 18:26:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E781A2FE8 for ; Mon, 11 Aug 2014 18:26:57 +0000 (UTC) Received: from jhb (uid 793) (envelope-from jhb@FreeBSD.org) id 2e27 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Mon, 11 Aug 2014 18:26:57 +0000 From: John Baldwin Date: Mon, 11 Aug 2014 18:26:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269824 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e90af1.2e27.3eae78d1@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2014 18:26:58 -0000 Author: jhb Date: Mon Aug 11 18:26:57 2014 New Revision: 269824 URL: http://svnweb.freebsd.org/changeset/base/269824 Log: Fix a typo. PR: 192294 Submitted by: Conrad Meyer Modified: head/share/man/man9/vm_page_busy.9 Modified: head/share/man/man9/vm_page_busy.9 ============================================================================== --- head/share/man/man9/vm_page_busy.9 Mon Aug 11 18:09:37 2014 (r269823) +++ head/share/man/man9/vm_page_busy.9 Mon Aug 11 18:26:57 2014 (r269824) @@ -95,7 +95,7 @@ themselves. For example, when a thread wants to access or update page contents without a lock held the page is shared busied. .Pp -Before busing a page the vm_object lock must be held. +Before busying a page the vm_object lock must be held. The same rule applies when a page is unbusied. This makes the vm_object lock a real busy interlock. .Pp From owner-svn-src-head@FreeBSD.ORG Mon Aug 11 19:03:20 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB63F661 for ; Mon, 11 Aug 2014 19:03:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8098C2560 for ; Mon, 11 Aug 2014 19:03:20 +0000 (UTC) Received: from jmg (uid 686) (envelope-from jmg@FreeBSD.org) id 2fb9 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Mon, 11 Aug 2014 19:03:20 +0000 From: John-Mark Gurney Date: Mon, 11 Aug 2014 19:03:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269828 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e91378.2fb9.18277257@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2014 19:03:20 -0000 Author: jmg Date: Mon Aug 11 19:03:20 2014 New Revision: 269828 URL: http://svnweb.freebsd.org/changeset/base/269828 Log: add myself as opencrypto maintainer as I'm doing some work in the area... Note that documentation is requires for commits to what I maintain... Modified: head/MAINTAINERS Modified: head/MAINTAINERS ============================================================================== --- head/MAINTAINERS Mon Aug 11 18:57:22 2014 (r269827) +++ head/MAINTAINERS Mon Aug 11 19:03:20 2014 (r269828) @@ -20,7 +20,7 @@ It is not a registry of 'turf' or privat subsystem login notes ----------------------------- -kqueue jmg Pre-commit review requested. +kqueue jmg Pre-commit review requested. Documentation Required. libc/posix1e rwatson Pre-commit review requested. POSIX.1e ACLs rwatson Pre-commit review requested. UFS EAs rwatson Pre-commit review requested. @@ -132,3 +132,4 @@ release/release.sh gjb Pre-commit review requested. nanobsd imp Pre-commit review requested for coordination. vmm(4) neel,grehan Pre-commit review requested. +opencrypto jmg Pre-commit review requested. Documentation Required. From owner-svn-src-head@FreeBSD.ORG Mon Aug 11 20:30:04 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26445495; Mon, 11 Aug 2014 20:30:04 +0000 (UTC) Received: from caravan.chchile.org (caravan.chchile.org [178.32.125.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Caravan", Issuer "Mail Client CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E087A2007; Mon, 11 Aug 2014 20:30:03 +0000 (UTC) Received: by caravan.chchile.org (Postfix, from userid 1000) id D8C6CB22C6; Mon, 11 Aug 2014 20:29:54 +0000 (UTC) Date: Mon, 11 Aug 2014 22:29:54 +0200 From: Jeremie Le Hen To: Jean-Sebastien Pedron Subject: Re: svn commit: r269729 - in head/usr.bin/sed: . tests Message-ID: <20140811202954.GA66720@caravan.chchile.org> Mail-Followup-To: Jean-Sebastien Pedron , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <53e508dd.23d7.7477a7f9@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53e508dd.23d7.7477a7f9@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2014 20:30:04 -0000 Hi Jean Sebastien, On Fri, Aug 08, 2014 at 05:29:01PM +0000, Jean-Sebastien Pedron wrote: > Author: dumbbell > Date: Fri Aug 8 17:29:01 2014 > New Revision: 269729 > URL: http://svnweb.freebsd.org/changeset/base/269729 > > Log: > sed(1): Don't force a newline on last line, if input stream doesn't have one > > While here, change how we check if the current line is the last one. > Before, we just checked if there were more files after the current one. > Now, we check the actual content of those files: they files may not have > a line at all. This matches the definition of the "last line" by the > Open Group. > > The new behavior is closer to GNU sed. Any plan to MFC this? -- Jeremie Le Hen Scientists say the world is made up of Protons, Neutrons and Electrons. They forgot to mention Morons. From owner-svn-src-head@FreeBSD.ORG Mon Aug 11 20:41:14 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E5E73D9 for ; Mon, 11 Aug 2014 20:41:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA8E521C4 for ; Mon, 11 Aug 2014 20:41:14 +0000 (UTC) Received: from rpaulo (uid 1145) (envelope-from rpaulo@FreeBSD.org) id 2e52 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Mon, 11 Aug 2014 20:41:14 +0000 From: Rui Paulo Date: Mon, 11 Aug 2014 20:41:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269838 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e92a6a.2e52.856905@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2014 20:41:15 -0000 Author: rpaulo Date: Mon Aug 11 20:41:14 2014 New Revision: 269838 URL: http://svnweb.freebsd.org/changeset/base/269838 Log: Fix an error in the dependency of the DTrace object file. MFC after: 3 days Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Mon Aug 11 20:38:52 2014 (r269837) +++ head/share/mk/bsd.dep.mk Mon Aug 11 20:41:14 2014 (r269838) @@ -134,7 +134,7 @@ ${_D}.h: ${_DSRC} SRCS:= ${SRCS:S/${_DSRC}/${_D}.h/} OBJS+= ${_D}.o CLEANFILES+= ${_D}.h ${_D}.o -${_D}.o: ${_D.h} ${OBJS:S/${_D}.o//} +${_D}.o: ${_D}.h ${OBJS:S/${_D}.o//} ${DTRACE} -xnolibs -G -o ${.TARGET} -s ${.CURDIR}/${_DSRC} \ ${OBJS:S/${_D}.o//} .if defined(LIB) From owner-svn-src-head@FreeBSD.ORG Mon Aug 11 20:44:57 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF5A9290 for ; Mon, 11 Aug 2014 20:44:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 842EC21E7 for ; Mon, 11 Aug 2014 20:44:57 +0000 (UTC) Received: from rpaulo (uid 1145) (envelope-from rpaulo@FreeBSD.org) id 2e69 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Mon, 11 Aug 2014 20:44:57 +0000 From: Rui Paulo Date: Mon, 11 Aug 2014 20:44:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269839 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e92b49.2e69.39ede5a7@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2014 20:44:57 -0000 Author: rpaulo Date: Mon Aug 11 20:44:57 2014 New Revision: 269839 URL: http://svnweb.freebsd.org/changeset/base/269839 Log: bsd.dep.mk: use the empty() function with the check for .d files. Seems to work better with the old make. MFC after: 3 days Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Mon Aug 11 20:41:14 2014 (r269838) +++ head/share/mk/bsd.dep.mk Mon Aug 11 20:44:57 2014 (r269839) @@ -122,7 +122,7 @@ ${_YC:R}.o: ${_YC} # DTrace probe definitions # libelf is currently needed for drti.o -.if ${SRCS:M*.d} +.if !empty(${SRCS:M*.d}) LDFLAGS+= -lelf LDADD+= ${LIBELF} CFLAGS+= -D_DTRACE_VERSION=1 -I${.OBJDIR} From owner-svn-src-head@FreeBSD.ORG Mon Aug 11 21:14:08 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EA82DB50 for ; Mon, 11 Aug 2014 21:14:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0FB225D5 for ; Mon, 11 Aug 2014 21:14:08 +0000 (UTC) Received: from rpaulo (uid 1145) (envelope-from rpaulo@FreeBSD.org) id 2b98 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Mon, 11 Aug 2014 21:14:08 +0000 From: Rui Paulo Date: Mon, 11 Aug 2014 21:14:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269840 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e93220.2b98.372dda7a@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2014 21:14:09 -0000 Author: rpaulo Date: Mon Aug 11 21:14:08 2014 New Revision: 269840 URL: http://svnweb.freebsd.org/changeset/base/269840 Log: Fix another typoe in the definition of DTrace SOBJS. MFC after: 3 days Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Mon Aug 11 20:44:57 2014 (r269839) +++ head/share/mk/bsd.dep.mk Mon Aug 11 21:14:08 2014 (r269840) @@ -139,7 +139,7 @@ ${_D}.o: ${_D}.h ${OBJS:S/${_D}.o//} ${OBJS:S/${_D}.o//} .if defined(LIB) CLEANFILES+= ${_D}.So ${_D}.po -${_D}.So: ${_D.h} ${SOBJS:S/${_D}.So//} +${_D}.So: ${_D}.h ${SOBJS:S/${_D}.So//} ${DTRACE} -xnolibs -G -o ${.TARGET} -s ${.CURDIR}/${_DSRC} \ ${SOBJS:S/${_D}.So//} ${_D}.po: ${_D}.h ${POBJS:S/${_D}.po//} From owner-svn-src-head@FreeBSD.ORG Mon Aug 11 21:28:57 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0233D373; Mon, 11 Aug 2014 21:28:57 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF9DC2708; Mon, 11 Aug 2014 21:28:56 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id C0EAEB968; Mon, 11 Aug 2014 17:28:55 -0400 (EDT) From: John Baldwin To: "Andrey V. Elsukov" Subject: Re: svn commit: r269661 - head/sys/kern Date: Mon, 11 Aug 2014 12:25:35 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20140415; KDE/4.5.5; amd64; ; ) References: <53e353b6.5aa8.4ee2421b@svn.freebsd.org> In-Reply-To: <53e353b6.5aa8.4ee2421b@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201408111225.35190.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 11 Aug 2014 17:28:55 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2014 21:28:57 -0000 On Thursday, August 07, 2014 6:23:50 am Andrey V. Elsukov wrote: > Author: ae > Date: Thu Aug 7 10:23:50 2014 > New Revision: 269661 > URL: http://svnweb.freebsd.org/changeset/base/269661 > > Log: > Use cpuset_setithread() to apply cpu mask to taskq threads. > > Sponsored by: Yandex LLC I think this is fine (sorry I didn't reply to your earlier mail). My one comment is we probably should rename cpuset_setithread() as it is now used for non-ithreads. I would suggest cpuset_setkthread(), but it isn't something all kthreads should use, so that isn't really correct either. Something along the lines of what it actually does (cpuset_privateset()) might be best? -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Aug 11 21:28:59 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D25C3520; Mon, 11 Aug 2014 21:28:59 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA7E62709; Mon, 11 Aug 2014 21:28:59 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 924E1B948; Mon, 11 Aug 2014 17:28:58 -0400 (EDT) From: John Baldwin To: Roger Pau MonnXX Subject: Re: svn commit: r269675 - head/sys/x86/isa Date: Mon, 11 Aug 2014 12:27:48 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20140415; KDE/4.5.5; amd64; ; ) References: <53e3b0c2.25ff.29ca9019@svn.freebsd.org> In-Reply-To: <53e3b0c2.25ff.29ca9019@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <201408111227.48940.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 11 Aug 2014 17:28:58 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2014 21:28:59 -0000 On Thursday, August 07, 2014 1:00:50 pm Roger Pau MonnXX wrote: > Author: royger > Date: Thu Aug 7 17:00:50 2014 > New Revision: 269675 > URL: http://svnweb.freebsd.org/changeset/base/269675 >=20 > Log: > atpic: make sure atpic_init is called after IO APIC initialization > =20 > After r269510 the IO APIC and ATPIC initialization is done at the same > order, which means atpic_init can be called before the IO APIC has > been initalized. In that case the ATPIC will take over the interrupt > sources, preventing the IO APIC from registering them. > =20 > Reported by: David Wolfskill > Tested by: David Wolfskill , > Trond Endrest=C3=B8l > Sponsored by: Citrix Systems R&D I should have caught this earlier, I almost suggested looking at all the=20 SI_SUB_INTR inits to ensure everything was correct. Thanks for tracking it= =20 down! =2D-=20 John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Aug 11 21:29:03 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2759B6A7; Mon, 11 Aug 2014 21:29:03 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F2376270D; Mon, 11 Aug 2014 21:29:02 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id DD578B94A; Mon, 11 Aug 2014 17:29:01 -0400 (EDT) From: John Baldwin To: Warner Losh Subject: Re: svn commit: r269812 - in head/sys: conf modules modules/aic7xxx/ahc modules/cxgb modules/cxgbe modules/dpt modules/drm modules/drm2 modules/ep modules/if_gif modules/netgraph modules/sound/driver m... Date: Mon, 11 Aug 2014 12:32:48 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20140415; KDE/4.5.5; amd64; ; ) References: <53e8d84a.2d10.3a29d8f5@svn.freebsd.org> In-Reply-To: <53e8d84a.2d10.3a29d8f5@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201408111232.48445.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 11 Aug 2014 17:29:02 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2014 21:29:03 -0000 On Monday, August 11, 2014 10:50:50 am Warner Losh wrote: > Author: imp > Date: Mon Aug 11 14:50:49 2014 > New Revision: 269812 > URL: http://svnweb.freebsd.org/changeset/base/269812 > > Log: > Remove dependence on source tree options. Move all kernel module > options into kern.opts.mk and change all the places where we use > src.opts.mk to pull in the options. Conditionally define SYSDIR and > use SYSDIR/conf/kern.opts.mk instead of a CURDIR path. Replace all > instances of CURDIR/../../etc with STSDIR, but only in the affected > files. > > As a special compatibility hack, include bsd.owm.mk at the top of > kern.opts.mk to allow the bare build of sys/modules to work on older > systems. If the defaults ever change between 9.x, 10.x and current for > these options, however, you'll wind up with the host OS' defaults > rather than the -current defaults. This hack will be removed when > we no longer need to support this build scenario. > > Reviewed by: jhb > Differential Revision: https://phabric.freebsd.org/D529 Thanks! -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Aug 11 21:29:06 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F269787; Mon, 11 Aug 2014 21:29:06 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC2132710; Mon, 11 Aug 2014 21:29:05 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id CC0F3B968; Mon, 11 Aug 2014 17:29:04 -0400 (EDT) From: John Baldwin To: Bruce Evans Subject: Re: svn commit: r269474 - in head: share/man/man4 sys/dev/vt Date: Mon, 11 Aug 2014 13:15:16 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20140415; KDE/4.5.5; amd64; ; ) References: <53de340e.52ce.7073778e@svn.freebsd.org> <20140805091730.N2827@besplex.bde.org> In-Reply-To: <20140805091730.N2827@besplex.bde.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201408111315.16939.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 11 Aug 2014 17:29:04 -0400 (EDT) Cc: svn-src-head@freebsd.org, Aleksandr Rybalko , src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2014 21:29:06 -0000 On Monday, August 04, 2014 8:03:58 pm Bruce Evans wrote: > On Mon, 4 Aug 2014, John Baldwin wrote: > > > On Aug 3, 2014, at 6:07 AM, Aleksandr Rybalko wrote: > > > >> Log: > >> Allow to disable some special key combinations handled by vt(4), like debug > >> request, reboot request. > >> > >> Requested by: Claude Buisson > >> > >> Sponsored by: The FreeBSD Foundation > > > > I realize the API uses 'SPCL' as an abbreviation, but for user-facing things like a sysctl and tunable, I think it might be better to spell it out as "specialkeys" instead? > > It is a bad name, and also gratuitously different from syscons where the > names are: > > hw.syscons.kbd_reboot > hw.syscons.kbd_debug > hw.syscons.sc_no_suspend_vtswitch I would prefer individual nodes for vt along these lines as I think it is clearer to the user ("what exactly constitutes a special key?") -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Aug 11 21:42:06 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A09BB1F5 for ; Mon, 11 Aug 2014 21:42:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FEB028E3 for ; Mon, 11 Aug 2014 21:42:06 +0000 (UTC) Received: from rpaulo (uid 1145) (envelope-from rpaulo@FreeBSD.org) id 294f by svn.freebsd.org (DragonFly Mail Agent v0.9+); Mon, 11 Aug 2014 21:42:06 +0000 From: Rui Paulo Date: Mon, 11 Aug 2014 21:42:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269842 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e938ae.294f.5e6e0f22@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2014 21:42:06 -0000 Author: rpaulo Date: Mon Aug 11 21:42:06 2014 New Revision: 269842 URL: http://svnweb.freebsd.org/changeset/base/269842 Log: Add .d files to the reverse matching pattern in bsd.dep.mk to account for source file dependencies. This follows the .y and .l behaviour. MFC after: 3 days Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Mon Aug 11 21:38:41 2014 (r269841) +++ head/share/mk/bsd.dep.mk Mon Aug 11 21:42:06 2014 (r269842) @@ -73,7 +73,7 @@ tags: ${SRCS} CLEANFILES?= .if !exists(${.OBJDIR}/${DEPENDFILE}) -.for _S in ${SRCS:N*.[hly]} +.for _S in ${SRCS:N*.[dhly]} ${_S:R}.o: ${_S} .endfor .endif From owner-svn-src-head@FreeBSD.ORG Mon Aug 11 22:43:44 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B37EFCA4 for ; Mon, 11 Aug 2014 22:43:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F5392FF5 for ; Mon, 11 Aug 2014 22:43:44 +0000 (UTC) Received: from rpaulo (uid 1145) (envelope-from rpaulo@FreeBSD.org) id 2270 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Mon, 11 Aug 2014 22:43:44 +0000 From: Rui Paulo Date: Mon, 11 Aug 2014 22:43:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269844 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e94720.2270.50307fa7@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2014 22:43:44 -0000 Author: rpaulo Date: Mon Aug 11 22:43:44 2014 New Revision: 269844 URL: http://svnweb.freebsd.org/changeset/base/269844 Log: Revert r269839. This doesn't work like I expected and the if clause is never matched. It turns out that the problem with the older make is unrelated. MFC after: 3 days Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Mon Aug 11 22:38:13 2014 (r269843) +++ head/share/mk/bsd.dep.mk Mon Aug 11 22:43:44 2014 (r269844) @@ -122,7 +122,7 @@ ${_YC:R}.o: ${_YC} # DTrace probe definitions # libelf is currently needed for drti.o -.if !empty(${SRCS:M*.d}) +.if ${SRCS:M*.d} LDFLAGS+= -lelf LDADD+= ${LIBELF} CFLAGS+= -D_DTRACE_VERSION=1 -I${.OBJDIR} From owner-svn-src-head@FreeBSD.ORG Tue Aug 12 02:09:01 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84900A36 for ; Tue, 12 Aug 2014 02:09:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 706482419 for ; Tue, 12 Aug 2014 02:09:01 +0000 (UTC) Received: from peter (uid 633) (envelope-from peter@FreeBSD.org) id 2b28 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Tue, 12 Aug 2014 02:09:01 +0000 From: Peter Wemm Date: Tue, 12 Aug 2014 02:09:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269851 - head/contrib/sqlite3 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e9773d.2b28.2c0d30db@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2014 02:09:01 -0000 Author: peter Date: Tue Aug 12 02:09:00 2014 New Revision: 269851 URL: http://svnweb.freebsd.org/changeset/base/269851 Log: Update sqlite-3.7.17 -> 3.8.5 Modified: head/contrib/sqlite3/INSTALL head/contrib/sqlite3/Makefile.in head/contrib/sqlite3/aclocal.m4 head/contrib/sqlite3/config.guess head/contrib/sqlite3/config.sub head/contrib/sqlite3/configure head/contrib/sqlite3/configure.ac head/contrib/sqlite3/depcomp head/contrib/sqlite3/install-sh head/contrib/sqlite3/ltmain.sh head/contrib/sqlite3/missing head/contrib/sqlite3/shell.c head/contrib/sqlite3/sqlite3.1 head/contrib/sqlite3/sqlite3.c head/contrib/sqlite3/sqlite3.h head/contrib/sqlite3/sqlite3ext.h Directory Properties: head/contrib/sqlite3/ (props changed) Modified: head/contrib/sqlite3/INSTALL ============================================================================== --- head/contrib/sqlite3/INSTALL Tue Aug 12 02:04:48 2014 (r269850) +++ head/contrib/sqlite3/INSTALL Tue Aug 12 02:09:00 2014 (r269851) @@ -1,16 +1,25 @@ Installation Instructions ************************* -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free -Software Foundation, Inc. +Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, +Inc. -This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. + Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without warranty of any kind. Basic Installation ================== -These are generic installation instructions. + Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. Some packages provide this +`INSTALL' file but do not implement all of the features documented +below. The lack of an optional feature in a given package is not +necessarily a bug. More recommendations for GNU packages can be found +in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses @@ -23,9 +32,9 @@ debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. (Caching is +the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale -cache files.) +cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail @@ -35,30 +44,37 @@ some point `config.cache' contains resul may remove or edit it. The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You only need -`configure.ac' if you want to change it or regenerate `configure' using -a newer version of `autoconf'. +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. -The simplest way to compile this package is: + The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. + `./configure' to configure the package for your system. - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with - the package. + the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and - documentation. + documentation. When installing into a prefix owned by root, it is + recommended that the package be configured and built as a regular + user, and only the `make install' phase executed with root + privileges. + + 5. Optionally, type `make installcheck' to repeat any self-tests, but + this time using the binaries in their final installed location. + This target does not install anything. Running this target as a + regular user, particularly if the prior `make install' required + root privileges, verifies that the installation completed + correctly. - 5. You can remove the program binaries and object files from the + 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is @@ -67,45 +83,69 @@ The simplest way to compile this package all sorts of other programs in order to regenerate files that came with the distribution. + 7. Often, you can also type `make uninstall' to remove the installed + files again. In practice, not all packages have tested that + uninstallation works correctly, even though it is required by the + GNU Coding Standards. + + 8. Some packages, particularly those that use Automake, provide `make + distcheck', which can by used by developers to test that all other + targets like `make install' and `make uninstall' work correctly. + This target is generally not run by end users. + Compilers and Options ===================== -Some systems require unusual options for compilation or linking that the -`configure' script does not know about. Run `./configure --help' for -details on some of the pertinent environment variables. + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: - ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== -You can compile the package for more than one kind of computer at the + You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the +own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. +source code in the directory that `configure' is in and in `..'. This +is known as a "VPATH" build. - If you have to use a `make' that does not support the `VPATH' -variable, you have to compile the package for one architecture at a -time in the source code directory. After you have installed the -package for one architecture, use `make distclean' before reconfiguring -for another architecture. + With a non-GNU `make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use `make distclean' before +reconfiguring for another architecture. + + On MacOS X 10.5 and later systems, you can create libraries and +executables that work on multiple system types--known as "fat" or +"universal" binaries--by specifying multiple `-arch' options to the +compiler but only a single `-arch' option to the preprocessor. Like +this: + + ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CPP="gcc -E" CXXCPP="g++ -E" + + This is not guaranteed to produce working output in all cases, you +may have to build one architecture at a time and combine the results +using the `lipo' tool if you have problems. Installation Names ================== -By default, `make install' installs the package's commands under + By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving -`configure' the option `--prefix=PREFIX'. +`configure' the option `--prefix=PREFIX', where PREFIX must be an +absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you @@ -116,16 +156,47 @@ Documentation and other data files still In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. +you can set and what kinds of files go in them. In general, the +default for these options is expressed in terms of `${prefix}', so that +specifying just `--prefix' will affect all of the other directory +specifications that were not explicitly provided. + + The most portable way to affect installation locations is to pass the +correct locations to `configure'; however, many packages provide one or +both of the following shortcuts of passing variable assignments to the +`make install' command line to change installation locations without +having to reconfigure or recompile. + + The first method involves providing an override variable for each +affected directory. For example, `make install +prefix=/alternate/directory' will choose an alternate location for all +directory configuration variables that were expressed in terms of +`${prefix}'. Any directories that were specified during `configure', +but not in terms of `${prefix}', must each be overridden at install +time for the entire installation to be relocated. The approach of +makefile variable overrides for each directory variable is required by +the GNU Coding Standards, and ideally causes no recompilation. +However, some platforms have known limitations with the semantics of +shared libraries that end up requiring recompilation when using this +method, particularly noticeable in packages that use GNU Libtool. + + The second method involves providing the `DESTDIR' variable. For +example, `make install DESTDIR=/alternate/directory' will prepend +`/alternate/directory' before all installation names. The approach of +`DESTDIR' overrides is not required by the GNU Coding Standards, and +does not work on platforms that have drive letters. On the other hand, +it does better at avoiding recompilation issues, and works well even +when some directory options were not specified in terms of `${prefix}' +at `configure' time. + +Optional Features +================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. -Optional Features -================= - -Some packages pay attention to `--enable-FEATURE' options to + Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The @@ -137,14 +208,58 @@ find the X include and library files aut you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. + Some packages offer the ability to configure how verbose the +execution of `make' will be. For these packages, running `./configure +--enable-silent-rules' sets the default to minimal output, which can be +overridden with `make V=1'; while running `./configure +--disable-silent-rules' sets the default to verbose, which can be +overridden with `make V=0'. + +Particular systems +================== + + On HP-UX, the default C compiler is not ANSI C compatible. If GNU +CC is not installed, it is recommended to use the following options in +order to use an ANSI C compiler: + + ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" + +and if that doesn't work, install pre-built binaries of GCC for HP-UX. + + HP-UX `make' updates targets which have the same time stamps as +their prerequisites, which makes it generally unusable when shipped +generated files such as `configure' are involved. Use GNU `make' +instead. + + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot +parse its `' header file. The option `-nodtk' can be used as +a workaround. If GNU CC is not installed, it is therefore recommended +to try + + ./configure CC="cc" + +and if that doesn't work, try + + ./configure CC="cc -nodtk" + + On Solaris, don't put `/usr/ucb' early in your `PATH'. This +directory contains several dysfunctional programs; working variants of +these programs are available in `/usr/bin'. So, if you need `/usr/ucb' +in your `PATH', put it _after_ `/usr/bin'. + + On Haiku, software installed for all users goes in `/boot/common', +not `/usr/local'. It is recommended to use the following options: + + ./configure --prefix=/boot/common + Specifying the System Type ========================== -There may be some features `configure' cannot figure out automatically, -but needs to determine by the type of machine the package will run on. -Usually, assuming the package is built to be run on the _same_ -architectures, `configure' can figure that out, but if it prints a -message saying it cannot guess the machine type, give it the + There may be some features `configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, `configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: @@ -152,7 +267,8 @@ type, such as `sun4', or a canonical nam where SYSTEM can have one of these forms: - OS KERNEL-OS + OS + KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't @@ -170,9 +286,9 @@ eventually be run) with `--host=TYPE'. Sharing Defaults ================ -If you want to set default values for `configure' scripts to share, you -can create a site shell script called `config.site' that gives default -values for variables like `CC', `cache_file', and `prefix'. + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. @@ -181,7 +297,7 @@ A warning: not all `configure' scripts l Defining Variables ================== -Variables not defined in a site shell script can be set in the + Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set @@ -190,21 +306,29 @@ them in the `configure' command line, us ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is -overridden in the site shell script). Here is a another example: +overridden in the site shell script). - /bin/bash ./configure CONFIG_SHELL=/bin/bash +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf bug. Until the bug is fixed you can use this workaround: -Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent -configuration-related scripts to be executed by `/bin/bash'. + CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== -`configure' recognizes the following options to control how it operates. + `configure' recognizes the following options to control how it +operates. `--help' `-h' - Print a summary of the options to `configure', and exit. + Print a summary of all of the options to `configure', and exit. + +`--help=short' +`--help=recursive' + Print a summary of the options unique to this package's + `configure', and exit. The `short' variant lists options used + only in the top level, while the `recursive' variant lists options + also present in any nested packages. `--version' `-V' @@ -231,6 +355,16 @@ configuration-related scripts to be exec Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. +`--prefix=DIR' + Use DIR as the installation prefix. *note Installation Names:: + for more details, including other options available for fine-tuning + the installation locations. + +`--no-create' +`-n' + Run the configure checks, but stop before creating any output + files. + `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. Modified: head/contrib/sqlite3/Makefile.in ============================================================================== --- head/contrib/sqlite3/Makefile.in Tue Aug 12 02:04:48 2014 (r269850) +++ head/contrib/sqlite3/Makefile.in Tue Aug 12 02:09:00 2014 (r269851) @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. +# Makefile.in generated by automake 1.11.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,15 +18,29 @@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = . +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -40,56 +55,84 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = sqlite3$(EXEEXT) +subdir = . DIST_COMMON = README $(am__configure_deps) $(include_HEADERS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/sqlite3.pc.in $(top_srcdir)/configure INSTALL \ config.guess config.sub depcomp install-sh ltmain.sh missing -subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno configure.status.lineno + configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = sqlite3.pc +CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(pkgconfigdir)" \ "$(DESTDIR)$(includedir)" -libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libsqlite3_la_LIBADD = am_libsqlite3_la_OBJECTS = sqlite3.lo libsqlite3_la_OBJECTS = $(am_libsqlite3_la_OBJECTS) -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +libsqlite3_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libsqlite3_la_LDFLAGS) $(LDFLAGS) -o $@ PROGRAMS = $(bin_PROGRAMS) am_sqlite3_OBJECTS = shell.$(OBJEXT) sqlite3_OBJECTS = $(am_sqlite3_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(srcdir) +DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ SOURCES = $(libsqlite3_la_SOURCES) $(sqlite3_SOURCES) DIST_SOURCES = $(libsqlite3_la_SOURCES) $(sqlite3_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man_MANS) -pkgconfigDATA_INSTALL = $(INSTALL_DATA) DATA = $(pkgconfig_DATA) -includeHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(include_HEADERS) ETAGS = etags CTAGS = ctags @@ -97,16 +140,18 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCE distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ @@ -119,57 +164,65 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ DYNAMIC_EXTENSION_FLAGS = @DYNAMIC_EXTENSION_FLAGS@ -ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ THREADSAFE_FLAGS = @THREADSAFE_FLAGS@ VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -181,6 +234,7 @@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -208,8 +262,12 @@ program_transform_name = @program_transf psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ AM_CFLAGS = @THREADSAFE_FLAGS@ @DYNAMIC_EXTENSION_FLAGS@ -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE lib_LTLIBRARIES = libsqlite3.la libsqlite3_la_SOURCES = sqlite3.c @@ -226,21 +284,21 @@ all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj -am--refresh: +am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ - cd $(srcdir) && $(AUTOMAKE) --foreign \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -256,28 +314,34 @@ $(top_builddir)/config.status: $(top_src $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) - cd $(srcdir) && $(AUTOCONF) + $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): sqlite3.pc: $(top_builddir)/config.status $(srcdir)/sqlite3.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + list2="$$list2 $$p"; \ else :; fi; \ - done + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) - @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: @@ -288,39 +352,57 @@ clean-libLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libsqlite3.la: $(libsqlite3_la_OBJECTS) $(libsqlite3_la_DEPENDENCIES) - $(LINK) -rpath $(libdir) $(libsqlite3_la_LDFLAGS) $(libsqlite3_la_OBJECTS) $(libsqlite3_la_LIBADD) $(LIBS) +libsqlite3.la: $(libsqlite3_la_OBJECTS) $(libsqlite3_la_DEPENDENCIES) $(EXTRA_libsqlite3_la_DEPENDENCIES) + $(libsqlite3_la_LINK) -rpath $(libdir) $(libsqlite3_la_OBJECTS) $(libsqlite3_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -sqlite3$(EXEEXT): $(sqlite3_OBJECTS) $(sqlite3_DEPENDENCIES) + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +sqlite3$(EXEEXT): $(sqlite3_OBJECTS) $(sqlite3_DEPENDENCIES) $(EXTRA_sqlite3_DEPENDENCIES) @rm -f sqlite3$(EXEEXT) - $(LINK) $(sqlite3_LDFLAGS) $(sqlite3_OBJECTS) $(sqlite3_LDADD) $(LIBS) + $(LINK) $(sqlite3_OBJECTS) $(sqlite3_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -332,22 +414,22 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sqlite3.Plo@am__quote@ .c.o: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< @@ -359,177 +441,215 @@ clean-libtool: -rm -rf .libs _libs distclean-libtool: - -rm -f libtool -uninstall-info-am: -install-man1: $(man1_MANS) $(man_MANS) + -rm -f libtool config.lt +install-man1: $(man_MANS) @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)" - @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.1*) list="$$list $$i" ;; \ - esac; \ + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man1dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.1[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ + fi; \ done; \ - for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 1*) ;; \ - *) ext='1' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ - done + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ + done; } + uninstall-man1: @$(NORMAL_UNINSTALL) - @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.1*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 1*) ;; \ - *) ext='1' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ - rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ - done + @list=''; test -n "$(man1dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.1[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) - test -z "$(pkgconfigdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfigdir)" - @list='$(pkgconfig_DATA)'; for p in $$list; do \ + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ + fi; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ - $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) - @list='$(pkgconfig_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ - rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ - done + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" - @list='$(include_HEADERS)'; for p in $$list; do \ + @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ + fi; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ - $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) - @list='$(include_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(includedir)/$$f"; \ - done + @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Aug 12 03:18:06 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C13AC3A9; Tue, 12 Aug 2014 03:18:06 +0000 (UTC) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id 82A562A97; Tue, 12 Aug 2014 03:18:06 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id D13B5D409A4; Tue, 12 Aug 2014 13:17:56 +1000 (EST) Date: Tue, 12 Aug 2014 13:17:55 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John Baldwin Subject: Re: svn commit: r269474 - in head: share/man/man4 sys/dev/vt In-Reply-To: <201408111315.16939.jhb@freebsd.org> Message-ID: <20140812121718.U1185@besplex.bde.org> References: <53de340e.52ce.7073778e@svn.freebsd.org> <20140805091730.N2827@besplex.bde.org> <201408111315.16939.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=fvDlOjIf c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=9sZAoq1AbeMA:10 a=252g7Ztp5P0A:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=BvYZXN6Kv6LMIY-lhhQA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, Aleksandr Rybalko , src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2014 03:18:06 -0000 On Mon, 11 Aug 2014, John Baldwin wrote: > On Monday, August 04, 2014 8:03:58 pm Bruce Evans wrote: >> On Mon, 4 Aug 2014, John Baldwin wrote: >>> I realize the API uses 'SPCL' as an abbreviation, but for user-facing things like a sysctl and tunable, I think it might be better to spell it out as > "specialkeys" instead? >> >> It is a bad name, and also gratuitously different from syscons where the >> names are: >> >> hw.syscons.kbd_reboot >> hw.syscons.kbd_debug >> hw.syscons.sc_no_suspend_vtswitch > > I would prefer individual nodes for vt along these lines as I think it is > clearer to the user ("what exactly constitutes a special key?") But rename them a bit so it is clearer that they give limited access control. The sysctl -d descriptions are no better about this: % hw.syscons.kbd_reboot: enable keyboard reboot % hw.syscons.kbd_debug: enable keyboard debug % hw.syscons.sc_no_suspend_vtswitch: Disable VT switch before suspend. These also have some style bugs ("enable" is not capitalized; the last description is terminated). The option name SC_DISABLE_KDBKEY is better. It more clearly controls a key, not debugging. The option name SC_DISABLE_REBOOT is no better. Bruce From owner-svn-src-head@FreeBSD.ORG Tue Aug 12 09:07:40 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C7CC61CA; Tue, 12 Aug 2014 09:07:40 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6092E52; Tue, 12 Aug 2014 09:07:40 +0000 (UTC) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s7C97XPw062587 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 12 Aug 2014 12:07:33 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua s7C97XPw062587 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id s7C97W2b062586; Tue, 12 Aug 2014 12:07:32 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 12 Aug 2014 12:07:32 +0300 From: Konstantin Belousov To: Alan Cox Subject: Re: svn commit: r269782 - in head/sys/sparc64: include sparc64 Message-ID: <20140812090732.GC2737@kib.kiev.ua> References: <53e7a4fc.2898.352aa941@svn.freebsd.org> <53E8F0D9.9080900@rice.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+xNpyl7Qekk2NvDX" Content-Disposition: inline In-Reply-To: <53E8F0D9.9080900@rice.edu> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2014 09:07:41 -0000 --+xNpyl7Qekk2NvDX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 11, 2014 at 11:35:37AM -0500, Alan Cox wrote: > On 08/10/2014 11:59, Konstantin Belousov wrote: > > Author: kib > > Date: Sun Aug 10 16:59:39 2014 > > New Revision: 269782 > > URL: http://svnweb.freebsd.org/changeset/base/269782 > > > > Log: > > On sparc64, do not keep mappings for the destroyed sf_bufs. Sparc64 > > pmap, unlike i386, and similar to i386/xen pv, does not tolerate > > abandoned mappings for the freed pages. > > =20 > > Reported and tested by: dumbbell > > Diagnosed and reviewed by: alc > > Sponsored by: The FreeBSD Foundation >=20 >=20 > This change fixes things on sparc64, but there is also an opportunity > here to make sf_buf operations much faster on newer sparc64 hardware.=20 > If someone is interested in doing this, then please e-mail me.=20 > Basically, if dcache_color_ignore is non-zero, then sparc64's direct map > can be used. It shouldn't be a difficult change. The following patch should implement use of dcache_color_ignore, like hw_direct_map on powerpc aim. I did not found a way around the machine/tlb.h hack. The patch compiled on ppc64 and sparc64. diff --git a/sys/powerpc/include/vmparam.h b/sys/powerpc/include/vmparam.h index c46f395..965f8e4 100644 --- a/sys/powerpc/include/vmparam.h +++ b/sys/powerpc/include/vmparam.h @@ -210,5 +210,6 @@ struct pmap_physseg { #define SFBUF #define SFBUF_NOMD #define SFBUF_OPTIONAL_DIRECT_MAP hw_direct_map +#define SFBUF_PHYS_DMAP(x) (x) =20 #endif /* _MACHINE_VMPARAM_H_ */ diff --git a/sys/sparc64/include/vmparam.h b/sys/sparc64/include/vmparam.h index 8e7d76c..cc97ade 100644 --- a/sys/sparc64/include/vmparam.h +++ b/sys/sparc64/include/vmparam.h @@ -241,5 +241,8 @@ extern vm_offset_t vm_max_kernel_address; =20 #define SFBUF #define SFBUF_MAP +#define SFBUF_OPTIONAL_DIRECT_MAP dcache_color_ignore +#include +#define SFBUF_PHYS_DMAP(x) TLB_DIRECT_TO_PHYS(x) =20 #endif /* !_MACHINE_VMPARAM_H_ */ diff --git a/sys/sys/sf_buf.h b/sys/sys/sf_buf.h index 8a6c56f..de164a1 100644 --- a/sys/sys/sf_buf.h +++ b/sys/sys/sf_buf.h @@ -112,7 +112,7 @@ sf_buf_kva(struct sf_buf *sf) { #ifdef SFBUF_OPTIONAL_DIRECT_MAP if (SFBUF_OPTIONAL_DIRECT_MAP) - return (VM_PAGE_TO_PHYS((vm_page_t)sf)); + return (SFBUF_PHYS_DMAP(VM_PAGE_TO_PHYS((vm_page_t)sf))); #endif =20 return (sf->kva); --+xNpyl7Qekk2NvDX Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJT6dlUAAoJEJDCuSvBvK1Bu8kP+gIjsYUdftvk7YMY7moi4Pf7 FLY6+SOAi5ZlGNvyPXTVi/yeca73Vz15YSU1aS3X6LQXOLhX3CJ1EI39X/kSDMHc Q3gxhu4ICxRvonX19ygUS1ET1clV8J32eSbDC1AVVAzqq5eunkSzAjFnFUSSqvwx YChm8V3ZvnNR/4vCMc0NcpRu0L4ljWQzlj3WT5Zr66MayrJw37yTbLm1XfnZS70H jdWneJ81FnUhDLHdK3XoPWwFFlhixZnA0NX5QwYATFD7Uw3VZDz5RTNJPXaj81l6 UCu5nyiBBeYGJkgWFFn2XWu5s9PHng1UNMs5hYopUBH3qQx4wWCM2rVq4bEQiLhS jKDKjZPaQlvfpCO2Cwiby5UWNTguNW/exegyaSCVbom60h1PUHR315tv9wkQs8NK dlDWuDXVFFP64kTTkqIid+i873qRA1/9v2Qa7s5Rotz4clGoS1iAjWrnaQjyj/TF C+eSFVNLVXEg31HgENpzuLCWwv98JA3L66E0aPldL0QAPMsCRhTjlivQl45nRTXj Fj/ioMJPEjYKbBXyw8sr02Y97nHcftGuNo2G8KTwGL5IA31ipDevHEJaTZR06kj8 pqogwbrhT59peTAUG0V++uhZt2D7ehZkVJosZcLbO/a3rsc4YcgvKGKEZvXW/oFg pf8Igfi2TVpOtjj4GV4e =6B2s -----END PGP SIGNATURE----- --+xNpyl7Qekk2NvDX-- From owner-svn-src-head@FreeBSD.ORG Tue Aug 12 09:10:14 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF9904DF for ; Tue, 12 Aug 2014 09:10:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8023C2E78 for ; Tue, 12 Aug 2014 09:10:14 +0000 (UTC) Received: from ae (uid 1226) (envelope-from ae@FreeBSD.org) id 6050 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Tue, 12 Aug 2014 09:10:14 +0000 From: Andrey V. Elsukov Date: Tue, 12 Aug 2014 09:10:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269852 - in head: sbin/geom/class/part sys/geom/part X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e9d9f6.6050.76e4ac5b@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2014 09:10:14 -0000 Author: ae Date: Tue Aug 12 09:10:13 2014 New Revision: 269852 URL: http://svnweb.freebsd.org/changeset/base/269852 Log: Add sysctl and loader tunable kern.geom.part.mbr.enforce_chs that is set by default. It can be used to disable automatic alignment to CHS geometry, that GEOM_PART_MBR does. Reviewed by: wblock MFC after: 1 week Modified: head/sbin/geom/class/part/gpart.8 head/sys/geom/part/g_part_mbr.c Modified: head/sbin/geom/class/part/gpart.8 ============================================================================== --- head/sbin/geom/class/part/gpart.8 Tue Aug 12 02:09:00 2014 (r269851) +++ head/sbin/geom/class/part/gpart.8 Tue Aug 12 09:10:13 2014 (r269852) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 3, 2014 +.Dd August 12, 2014 .Dt GPART 8 .Os .Sh NAME @@ -1183,6 +1183,12 @@ If this variable set to 1 each component present as independent partition. .Em NOTE : This may break a mirrored volume and lead to data damage. +.It Va kern.geom.part.mbr.enforce_chs : No 1 +Specify how the Master Boot Record (MBR) module does alignment. +If this variable is set to a non-zero value, the module will automatically +recalculate the user-specified offset and size for alignment with the CHS +geometry. +Otherwise the values will be left unchanged. .El .Sh EXIT STATUS Exit status is 0 on success, and 1 if the command fails. Modified: head/sys/geom/part/g_part_mbr.c ============================================================================== --- head/sys/geom/part/g_part_mbr.c Tue Aug 12 02:09:00 2014 (r269851) +++ head/sys/geom/part/g_part_mbr.c Tue Aug 12 09:10:13 2014 (r269852) @@ -49,6 +49,14 @@ __FBSDID("$FreeBSD$"); FEATURE(geom_part_mbr, "GEOM partitioning class for MBR support"); +SYSCTL_DECL(_kern_geom_part); +static SYSCTL_NODE(_kern_geom_part, OID_AUTO, mbr, CTLFLAG_RW, 0, + "GEOM_PART_MBR Master Boot Record"); + +static u_int enforce_chs = 1; +SYSCTL_UINT(_kern_geom_part_mbr, OID_AUTO, enforce_chs, + CTLFLAG_RWTUN, &enforce_chs, 1, "Enforce alignment to CHS addressing"); + #define MBRSIZE 512 struct g_part_mbr_table { @@ -200,6 +208,8 @@ mbr_align(struct g_part_table *basetable { uint32_t sectors; + if (enforce_chs == 0) + return (0); sectors = basetable->gpt_sectors; if (*size < sectors) return (EINVAL); From owner-svn-src-head@FreeBSD.ORG Tue Aug 12 09:33:01 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 88EC4C9E for ; Tue, 12 Aug 2014 09:33:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E88621F2 for ; Tue, 12 Aug 2014 09:33:01 +0000 (UTC) Received: from kib (uid 1100) (envelope-from kib@FreeBSD.org) id 69f6 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Tue, 12 Aug 2014 09:33:01 +0000 From: Konstantin Belousov Date: Tue, 12 Aug 2014 09:33:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269853 - head/sys/ufs/ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e9df4d.69f6.3503b168@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2014 09:33:01 -0000 Author: kib Date: Tue Aug 12 09:33:00 2014 New Revision: 269853 URL: http://svnweb.freebsd.org/changeset/base/269853 Log: Revision r269457 removed the Giant around mount and unmount code, but r269533, which was tested before r269457 was committed, implicitely relied on the Giant to protect the manipulations of the softdepmounts list. Use softdep global lock consistently to guarantee the list structure now. Insert the new struct mount_softdeps into the softdepmounts only after it is sufficiently initialized, to prevent softdep_speedup() from accessing bare memory. Similarly, remove struct mount_softdeps for the unmounted filesystem from the tailq before destroying structure rwlock. Reported and tested by: pho Reviewed by: mckusick Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/ufs/ffs/ffs_softdep.c Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Tue Aug 12 09:10:13 2014 (r269852) +++ head/sys/ufs/ffs/ffs_softdep.c Tue Aug 12 09:33:00 2014 (r269853) @@ -2453,7 +2453,6 @@ softdep_mount(devvp, mp, fs, cred) ump->um_softdep = sdp; MNT_IUNLOCK(mp); rw_init(LOCK_PTR(ump), "Per-Filesystem Softdep Lock"); - TAILQ_INSERT_TAIL(&softdepmounts, sdp, sd_next); sdp->sd_ump = ump; LIST_INIT(&ump->softdep_workitem_pending); LIST_INIT(&ump->softdep_journal_pending); @@ -2479,6 +2478,9 @@ softdep_mount(devvp, mp, fs, cred) ump->indir_hash_size = i - 1; for (i = 0; i <= ump->indir_hash_size; i++) TAILQ_INIT(&ump->indir_hashtbl[i]); + ACQUIRE_GBLLOCK(&lk); + TAILQ_INSERT_TAIL(&softdepmounts, sdp, sd_next); + FREE_GBLLOCK(&lk); if ((fs->fs_flags & FS_SUJ) && (error = journal_mount(mp, fs, cred)) != 0) { printf("Failed to start journal: %d\n", error); @@ -2562,8 +2564,10 @@ softdep_unmount(mp) /* * Free up our resources. */ - rw_destroy(LOCK_PTR(ump)); + ACQUIRE_GBLLOCK(&lk); TAILQ_REMOVE(&softdepmounts, ump->um_softdep, sd_next); + FREE_GBLLOCK(&lk); + rw_destroy(LOCK_PTR(ump)); hashdestroy(ump->pagedep_hashtbl, M_PAGEDEP, ump->pagedep_hash_size); hashdestroy(ump->inodedep_hashtbl, M_INODEDEP, ump->inodedep_hash_size); hashdestroy(ump->newblk_hashtbl, M_NEWBLK, ump->newblk_hash_size); From owner-svn-src-head@FreeBSD.ORG Tue Aug 12 09:34:53 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9370EE06 for ; Tue, 12 Aug 2014 09:34:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69513220C for ; Tue, 12 Aug 2014 09:34:53 +0000 (UTC) Received: from ae (uid 1226) (envelope-from ae@FreeBSD.org) id 6a0b by svn.freebsd.org (DragonFly Mail Agent v0.9+); Tue, 12 Aug 2014 09:34:53 +0000 From: Andrey V. Elsukov Date: Tue, 12 Aug 2014 09:34:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269854 - head/sbin/geom/class/part X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e9dfbd.6a0b.74cdab5c@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2014 09:34:53 -0000 Author: ae Date: Tue Aug 12 09:34:53 2014 New Revision: 269854 URL: http://svnweb.freebsd.org/changeset/base/269854 Log: Remove duplicate entry. Modified: head/sbin/geom/class/part/gpart.8 Modified: head/sbin/geom/class/part/gpart.8 ============================================================================== --- head/sbin/geom/class/part/gpart.8 Tue Aug 12 09:33:00 2014 (r269853) +++ head/sbin/geom/class/part/gpart.8 Tue Aug 12 09:34:53 2014 (r269854) @@ -659,13 +659,6 @@ Another symbolic names that can be used .Cm gpart utility are: .Bl -tag -width ".Cm dragonfly-disklabel64" -.It Cm apple-boot -An Apple Mac OS X partition dedicated to bootloader. -The scheme-specific types are -.Qq Li "!Apple_Bootstrap" -for APM and -.Qq Li "!426f6f74-0000-11aa-aa11-00306543ecac" -for GPT. .It Cm apple-hfs An Apple Mac OS X partition that contains a HFS or HFS+ filesystem. The scheme-specific types are From owner-svn-src-head@FreeBSD.ORG Tue Aug 12 10:31:32 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7CE02C0A for ; Tue, 12 Aug 2014 10:31:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52A0727FD for ; Tue, 12 Aug 2014 10:31:32 +0000 (UTC) Received: from ae (uid 1226) (envelope-from ae@FreeBSD.org) id 6a65 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Tue, 12 Aug 2014 10:31:32 +0000 From: Andrey V. Elsukov Date: Tue, 12 Aug 2014 10:31:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269857 - in head: sbin/geom/class/part sys/geom/part X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e9ed04.6a65.3bc68d43@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2014 10:31:32 -0000 Author: ae Date: Tue Aug 12 10:31:31 2014 New Revision: 269857 URL: http://svnweb.freebsd.org/changeset/base/269857 Log: Turn off kern.geom.part.mbr.enforce_chs by default. Modified: head/sbin/geom/class/part/gpart.8 head/sys/geom/part/g_part_mbr.c Modified: head/sbin/geom/class/part/gpart.8 ============================================================================== --- head/sbin/geom/class/part/gpart.8 Tue Aug 12 10:22:46 2014 (r269856) +++ head/sbin/geom/class/part/gpart.8 Tue Aug 12 10:31:31 2014 (r269857) @@ -1176,7 +1176,7 @@ If this variable set to 1 each component present as independent partition. .Em NOTE : This may break a mirrored volume and lead to data damage. -.It Va kern.geom.part.mbr.enforce_chs : No 1 +.It Va kern.geom.part.mbr.enforce_chs : No 0 Specify how the Master Boot Record (MBR) module does alignment. If this variable is set to a non-zero value, the module will automatically recalculate the user-specified offset and size for alignment with the CHS Modified: head/sys/geom/part/g_part_mbr.c ============================================================================== --- head/sys/geom/part/g_part_mbr.c Tue Aug 12 10:22:46 2014 (r269856) +++ head/sys/geom/part/g_part_mbr.c Tue Aug 12 10:31:31 2014 (r269857) @@ -53,9 +53,9 @@ SYSCTL_DECL(_kern_geom_part); static SYSCTL_NODE(_kern_geom_part, OID_AUTO, mbr, CTLFLAG_RW, 0, "GEOM_PART_MBR Master Boot Record"); -static u_int enforce_chs = 1; +static u_int enforce_chs = 0; SYSCTL_UINT(_kern_geom_part_mbr, OID_AUTO, enforce_chs, - CTLFLAG_RWTUN, &enforce_chs, 1, "Enforce alignment to CHS addressing"); + CTLFLAG_RWTUN, &enforce_chs, 0, "Enforce alignment to CHS addressing"); #define MBRSIZE 512 From owner-svn-src-head@FreeBSD.ORG Tue Aug 12 11:30:20 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B6C0BD2 for ; Tue, 12 Aug 2014 11:30:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 378CF2075 for ; Tue, 12 Aug 2014 11:30:20 +0000 (UTC) Received: from tuexen (uid 1198) (envelope-from tuexen@FreeBSD.org) id 6e09 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Tue, 12 Aug 2014 11:30:17 +0000 From: Michael Tuexen Date: Tue, 12 Aug 2014 11:30:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269858 - in head: lib/libc/net sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e9fac9.6e09.1cc546b0@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2014 11:30:20 -0000 Author: tuexen Date: Tue Aug 12 11:30:16 2014 New Revision: 269858 URL: http://svnweb.freebsd.org/changeset/base/269858 Log: Add support for the SCTP_AUTH_SUPPORTED and SCTP_ASCONF_SUPPORTED socket options. Add also a sysctl to control the support of ASCONF. MFC after: 1 week Modified: head/lib/libc/net/sctp_sys_calls.c head/sys/netinet/sctp.h head/sys/netinet/sctp_asconf.c head/sys/netinet/sctp_auth.c head/sys/netinet/sctp_auth.h head/sys/netinet/sctp_input.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_pcb.h head/sys/netinet/sctp_peeloff.c head/sys/netinet/sctp_structs.h head/sys/netinet/sctp_sysctl.c head/sys/netinet/sctp_sysctl.h head/sys/netinet/sctp_usrreq.c head/sys/netinet/sctputil.c Modified: head/lib/libc/net/sctp_sys_calls.c ============================================================================== --- head/lib/libc/net/sctp_sys_calls.c Tue Aug 12 10:31:31 2014 (r269857) +++ head/lib/libc/net/sctp_sys_calls.c Tue Aug 12 11:30:16 2014 (r269858) @@ -356,6 +356,12 @@ sctp_opt_info(int sd, sctp_assoc_t id, i case SCTP_PR_SUPPORTED: ((struct sctp_assoc_value *)arg)->assoc_id = id; break; + case SCTP_AUTH_SUPPORTED: + ((struct sctp_assoc_value *)arg)->assoc_id = id; + break; + case SCTP_ASCONF_SUPPORTED: + ((struct sctp_assoc_value *)arg)->assoc_id = id; + break; case SCTP_RECONFIG_SUPPORTED: ((struct sctp_assoc_value *)arg)->assoc_id = id; break; @@ -590,6 +596,7 @@ sctp_sendmsg(int s, cmsg->cmsg_type = SCTP_SNDRCV; cmsg->cmsg_len = CMSG_LEN(sizeof(struct sctp_sndrcvinfo)); sinfo = (struct sctp_sndrcvinfo *)CMSG_DATA(cmsg); + memset(sinfo, 0, sizeof(struct sctp_sndrcvinfo)); sinfo->sinfo_stream = stream_no; sinfo->sinfo_ssn = 0; sinfo->sinfo_flags = flags; Modified: head/sys/netinet/sctp.h ============================================================================== --- head/sys/netinet/sctp.h Tue Aug 12 10:31:31 2014 (r269857) +++ head/sys/netinet/sctp.h Tue Aug 12 11:30:16 2014 (r269858) @@ -123,9 +123,11 @@ struct sctp_paramhdr { #define SCTP_REMOTE_UDP_ENCAPS_PORT 0x00000024 #define SCTP_ECN_SUPPORTED 0x00000025 #define SCTP_PR_SUPPORTED 0x00000026 -#define SCTP_NRSACK_SUPPORTED 0x00000027 -#define SCTP_PKTDROP_SUPPORTED 0x00000028 +#define SCTP_AUTH_SUPPORTED 0x00000027 +#define SCTP_ASCONF_SUPPORTED 0x00000028 #define SCTP_RECONFIG_SUPPORTED 0x00000029 +#define SCTP_NRSACK_SUPPORTED 0x00000030 +#define SCTP_PKTDROP_SUPPORTED 0x00000031 /* * read-only options Modified: head/sys/netinet/sctp_asconf.c ============================================================================== --- head/sys/netinet/sctp_asconf.c Tue Aug 12 10:31:31 2014 (r269857) +++ head/sys/netinet/sctp_asconf.c Tue Aug 12 11:30:16 2014 (r269858) @@ -724,13 +724,11 @@ sctp_handle_asconf(struct mbuf *m, unsig } switch (param_type) { case SCTP_ADD_IP_ADDRESS: - asoc->peer_supports_asconf = 1; m_result = sctp_process_asconf_add_ip(src, aph, stcb, (cnt < SCTP_BASE_SYSCTL(sctp_hb_maxburst)), error); cnt++; break; case SCTP_DEL_IP_ADDRESS: - asoc->peer_supports_asconf = 1; m_result = sctp_process_asconf_delete_ip(src, aph, stcb, error); break; @@ -738,7 +736,6 @@ sctp_handle_asconf(struct mbuf *m, unsig /* not valid in an ASCONF chunk */ break; case SCTP_SET_PRIM_ADDR: - asoc->peer_supports_asconf = 1; m_result = sctp_process_asconf_set_primary(src, aph, stcb, error); break; @@ -930,8 +927,6 @@ sctp_addr_match(struct sctp_paramhdr *ph void sctp_asconf_cleanup(struct sctp_tcb *stcb, struct sctp_nets *net) { - /* mark peer as ASCONF incapable */ - stcb->asoc.peer_supports_asconf = 0; /* * clear out any existing asconfs going out */ @@ -1340,7 +1335,7 @@ sctp_asconf_queue_add(struct sctp_tcb *s int pending_delete_queued = 0; /* see if peer supports ASCONF */ - if (stcb->asoc.peer_supports_asconf == 0) { + if (stcb->asoc.asconf_supported == 0) { return (-1); } /* @@ -1430,7 +1425,7 @@ sctp_asconf_queue_sa_delete(struct sctp_ return (-1); } /* see if peer supports ASCONF */ - if (stcb->asoc.peer_supports_asconf == 0) { + if (stcb->asoc.asconf_supported == 0) { return (-1); } /* make sure the request isn't already in the queue */ @@ -1550,7 +1545,7 @@ sctp_asconf_find_param(struct sctp_tcb * * notifications based on the error response */ static void -sctp_asconf_process_error(struct sctp_tcb *stcb, +sctp_asconf_process_error(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_asconf_paramhdr *aph) { struct sctp_error_cause *eh; @@ -1588,10 +1583,7 @@ sctp_asconf_process_error(struct sctp_tc switch (param_type) { case SCTP_ADD_IP_ADDRESS: case SCTP_DEL_IP_ADDRESS: - stcb->asoc.peer_supports_asconf = 0; - break; case SCTP_SET_PRIM_ADDR: - stcb->asoc.peer_supports_asconf = 0; break; default: break; @@ -1627,8 +1619,6 @@ sctp_asconf_process_param_ack(struct sct SCTPDBG(SCTP_DEBUG_ASCONF1, "process_param_ack: set primary IP address\n"); /* nothing to do... peer may start using this addr */ - if (flag == 0) - stcb->asoc.peer_supports_asconf = 0; break; default: /* should NEVER happen */ @@ -1646,11 +1636,11 @@ sctp_asconf_process_param_ack(struct sct * cleanup from a bad asconf ack parameter */ static void -sctp_asconf_ack_clear(struct sctp_tcb *stcb) +sctp_asconf_ack_clear(struct sctp_tcb *stcb SCTP_UNUSED) { /* assume peer doesn't really know how to do asconfs */ - stcb->asoc.peer_supports_asconf = 0; /* XXX we could free the pending queue here */ + } void @@ -1988,7 +1978,7 @@ sctp_addr_mgmt_assoc(struct sctp_inpcb * /* queue an asconf for this address add/delete */ if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_DO_ASCONF)) { /* does the peer do asconf? */ - if (stcb->asoc.peer_supports_asconf) { + if (stcb->asoc.asconf_supported) { /* queue an asconf for this addr */ status = sctp_asconf_queue_add(stcb, ifa, type); @@ -2238,7 +2228,7 @@ sctp_asconf_iterator_stcb(struct sctp_in } /* queue an asconf for this address add/delete */ if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_DO_ASCONF) && - stcb->asoc.peer_supports_asconf) { + stcb->asoc.asconf_supported == 1) { /* queue an asconf for this addr */ status = sctp_asconf_queue_add(stcb, ifa, type); /* @@ -2886,7 +2876,7 @@ sctp_process_initack_addresses(struct sc /* are ASCONFs allowed ? */ if ((sctp_is_feature_on(stcb->sctp_ep, SCTP_PCB_FLAGS_DO_ASCONF)) && - stcb->asoc.peer_supports_asconf) { + stcb->asoc.asconf_supported) { /* queue an ASCONF DEL_IP_ADDRESS */ status = sctp_asconf_queue_sa_delete(stcb, sa); /* Modified: head/sys/netinet/sctp_auth.c ============================================================================== --- head/sys/netinet/sctp_auth.c Tue Aug 12 10:31:31 2014 (r269857) +++ head/sys/netinet/sctp_auth.c Tue Aug 12 11:30:16 2014 (r269858) @@ -133,11 +133,6 @@ sctp_auth_delete_chunk(uint8_t chunk, sc if (list == NULL) return (-1); - /* is chunk restricted? */ - if ((chunk == SCTP_ASCONF) || - (chunk == SCTP_ASCONF_ACK)) { - return (-1); - } if (list->chunks[chunk] == 1) { list->chunks[chunk] = 0; list->num_chunks--; @@ -158,16 +153,6 @@ sctp_auth_get_chklist_size(const sctp_au } /* - * set the default list of chunks requiring AUTH - */ -void -sctp_auth_set_default_chunks(sctp_auth_chklist_t * list) -{ - (void)sctp_auth_add_chunk(SCTP_ASCONF, list); - (void)sctp_auth_add_chunk(SCTP_ASCONF_ACK, list); -} - -/* * return the current number and list of required chunks caller must * guarantee ptr has space for up to 256 bytes */ Modified: head/sys/netinet/sctp_auth.h ============================================================================== --- head/sys/netinet/sctp_auth.h Tue Aug 12 10:31:31 2014 (r269857) +++ head/sys/netinet/sctp_auth.h Tue Aug 12 11:30:16 2014 (r269858) @@ -112,7 +112,6 @@ extern sctp_auth_chklist_t *sctp_copy_ch extern int sctp_auth_add_chunk(uint8_t chunk, sctp_auth_chklist_t * list); extern int sctp_auth_delete_chunk(uint8_t chunk, sctp_auth_chklist_t * list); extern size_t sctp_auth_get_chklist_size(const sctp_auth_chklist_t * list); -extern void sctp_auth_set_default_chunks(sctp_auth_chklist_t * list); extern int sctp_serialize_auth_chunks(const sctp_auth_chklist_t * list, uint8_t * ptr); Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Tue Aug 12 10:31:31 2014 (r269857) +++ head/sys/netinet/sctp_input.c Tue Aug 12 11:30:16 2014 (r269858) @@ -480,7 +480,7 @@ sctp_process_init_ack(struct mbuf *m, in return (-1); } /* if the peer doesn't support asconf, flush the asconf queue */ - if (asoc->peer_supports_asconf == 0) { + if (asoc->asconf_supported == 0) { struct sctp_asconf_addr *param, *nparam; TAILQ_FOREACH_SAFE(param, &asoc->asconf_queue, next, nparam) { @@ -756,7 +756,7 @@ sctp_handle_nat_missing_state(struct sct * return 0 means we want you to proceed with the abort non-zero * means no abort processing */ - if (stcb->asoc.peer_supports_auth == 0) { + if (stcb->asoc.auth_supported == 0) { SCTPDBG(SCTP_DEBUG_INPUT2, "sctp_handle_nat_missing_state: Peer does not support AUTH, cannot send an asconf\n"); return (0); } @@ -1096,6 +1096,7 @@ sctp_process_unrecog_chunk(struct sctp_t * Skip past the param header and then we will find the param that caused the * problem. There are a number of param's in a ASCONF OR the prsctp param * these will turn of specific features. + * XXX: Is this the right thing to do? */ static void sctp_process_unrecog_param(struct sctp_tcb *stcb, struct sctp_paramhdr *phdr) @@ -1117,14 +1118,14 @@ sctp_process_unrecog_param(struct sctp_t case SCTP_ADD_IP_ADDRESS: case SCTP_DEL_IP_ADDRESS: case SCTP_SET_PRIM_ADDR: - stcb->asoc.peer_supports_asconf = 0; + stcb->asoc.asconf_supported = 0; break; case SCTP_SUCCESS_REPORT: case SCTP_ERROR_CAUSE_IND: SCTPDBG(SCTP_DEBUG_INPUT2, "Huh, the peer does not support success? or error cause?\n"); SCTPDBG(SCTP_DEBUG_INPUT2, "Turning off ASCONF to this strange peer\n"); - stcb->asoc.peer_supports_asconf = 0; + stcb->asoc.asconf_supported = 0; break; default: SCTPDBG(SCTP_DEBUG_INPUT2, @@ -2787,6 +2788,8 @@ sctp_handle_cookie_echo(struct mbuf *m, inp->sctp_cmt_on_off = (*inp_p)->sctp_cmt_on_off; inp->ecn_supported = (*inp_p)->ecn_supported; inp->prsctp_supported = (*inp_p)->prsctp_supported; + inp->auth_supported = (*inp_p)->auth_supported; + inp->asconf_supported = (*inp_p)->asconf_supported; inp->reconfig_supported = (*inp_p)->reconfig_supported; inp->nrsack_supported = (*inp_p)->nrsack_supported; inp->pktdrop_supported = (*inp_p)->pktdrop_supported; @@ -2966,7 +2969,7 @@ sctp_handle_cookie_ack(struct sctp_cooki * in flight) */ if ((sctp_is_feature_on(stcb->sctp_ep, SCTP_PCB_FLAGS_DO_ASCONF)) && - (stcb->asoc.peer_supports_asconf) && + (stcb->asoc.asconf_supported == 1) && (!TAILQ_EMPTY(&stcb->asoc.asconf_queue))) { #ifdef SCTP_TIMER_BASED_ASCONF sctp_timer_start(SCTP_TIMER_TYPE_ASCONF, @@ -4439,7 +4442,7 @@ __attribute__((noinline)) */ if ((ch->chunk_type == SCTP_AUTHENTICATION) && (stcb == NULL) && - !SCTP_BASE_SYSCTL(sctp_auth_disable)) { + (inp->auth_supported == 1)) { /* save this chunk for later processing */ auth_skipped = 1; auth_offset = *offset; @@ -4706,7 +4709,7 @@ process_control_chunks: /* check to see if this chunk required auth, but isn't */ if ((stcb != NULL) && - !SCTP_BASE_SYSCTL(sctp_auth_disable) && + (stcb->asoc.auth_supported == 1) && sctp_auth_is_required_chunk(ch->chunk_type, stcb->asoc.local_auth_chunks) && !stcb->asoc.authenticated) { /* "silently" ignore */ @@ -5225,6 +5228,9 @@ process_control_chunks: return (NULL); } if (stcb) { + if (stcb->asoc.ecn_supported == 0) { + goto unknown_chunk; + } if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_THRESHOLD_LOGGING) { sctp_misc_ints(SCTP_THRESHOLD_CLEAR, stcb->asoc.overall_error_count, @@ -5250,6 +5256,9 @@ process_control_chunks: return (NULL); } if (stcb) { + if (stcb->asoc.ecn_supported == 0) { + goto unknown_chunk; + } if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_THRESHOLD_LOGGING) { sctp_misc_ints(SCTP_THRESHOLD_CLEAR, stcb->asoc.overall_error_count, @@ -5283,6 +5292,9 @@ process_control_chunks: SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_ASCONF\n"); /* He's alive so give him credit */ if (stcb) { + if (stcb->asoc.asconf_supported == 0) { + goto unknown_chunk; + } if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_THRESHOLD_LOGGING) { sctp_misc_ints(SCTP_THRESHOLD_CLEAR, stcb->asoc.overall_error_count, @@ -5307,6 +5319,9 @@ process_control_chunks: return (NULL); } if ((stcb) && netp && *netp) { + if (stcb->asoc.asconf_supported == 0) { + goto unknown_chunk; + } /* He's alive so give him credit */ if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_THRESHOLD_LOGGING) { sctp_misc_ints(SCTP_THRESHOLD_CLEAR, @@ -5336,6 +5351,9 @@ process_control_chunks: if (stcb) { int abort_flag = 0; + if (stcb->asoc.prsctp_supported == 0) { + goto unknown_chunk; + } stcb->asoc.overall_error_count = 0; if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_THRESHOLD_LOGGING) { sctp_misc_ints(SCTP_THRESHOLD_CLEAR, @@ -5391,12 +5409,7 @@ process_control_chunks: return (NULL); } if (stcb->asoc.reconfig_supported == 0) { - /* - * hmm, peer should have announced this, but - * we will turn it on since he is sending us - * a stream reset. - */ - stcb->asoc.reconfig_supported = 1; + goto unknown_chunk; } if (sctp_handle_stream_reset(stcb, m, *offset, ch)) { /* stop processing */ @@ -5416,18 +5429,17 @@ process_control_chunks: return (NULL); } if (ch && (stcb) && netp && (*netp)) { + if (stcb->asoc.pktdrop_supported == 0) { + goto unknown_chunk; + } sctp_handle_packet_dropped((struct sctp_pktdrop_chunk *)ch, stcb, *netp, min(chk_length, (sizeof(chunk_buf) - 4))); } break; - case SCTP_AUTHENTICATION: SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_AUTHENTICATION\n"); - if (SCTP_BASE_SYSCTL(sctp_auth_disable)) - goto unknown_chunk; - if (stcb == NULL) { /* save the first AUTH for later processing */ if (auth_skipped == 0) { @@ -5438,6 +5450,9 @@ process_control_chunks: /* skip this chunk (temporarily) */ goto next_chunk; } + if (stcb->asoc.auth_supported == 0) { + goto unknown_chunk; + } if ((chk_length < (sizeof(struct sctp_auth_chunk))) || (chk_length > (sizeof(struct sctp_auth_chunk) + SCTP_AUTH_DIGEST_LEN_MAX))) { @@ -5778,7 +5793,7 @@ sctp_common_input_processing(struct mbuf * chunks */ if ((stcb != NULL) && - !SCTP_BASE_SYSCTL(sctp_auth_disable) && + (stcb->asoc.auth_supported == 1) && sctp_auth_is_required_chunk(SCTP_DATA, stcb->asoc.local_auth_chunks)) { /* "silently" ignore */ SCTP_STAT_INCR(sctps_recvauthmissing); @@ -5820,7 +5835,7 @@ sctp_common_input_processing(struct mbuf */ if ((length > offset) && (stcb != NULL) && - !SCTP_BASE_SYSCTL(sctp_auth_disable) && + (stcb->asoc.auth_supported == 1) && sctp_auth_is_required_chunk(SCTP_DATA, stcb->asoc.local_auth_chunks) && !stcb->asoc.authenticated) { /* "silently" ignore */ Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Tue Aug 12 10:31:31 2014 (r269857) +++ head/sys/netinet/sctp_output.c Tue Aug 12 11:30:16 2014 (r269858) @@ -4753,12 +4753,6 @@ sctp_send_initiate(struct sctp_inpcb *in } chunk_len = (uint16_t) sizeof(struct sctp_init_chunk); padding_len = 0; - /* - * assume peer supports asconf in order to be able to queue local - * address changes while an INIT is in flight and before the assoc - * is established. - */ - stcb->asoc.peer_supports_asconf = 1; /* Now lets put the chunk header in place */ init = mtod(m, struct sctp_init_chunk *); /* now the chunk header */ @@ -4811,31 +4805,34 @@ sctp_send_initiate(struct sctp_inpcb *in /* And now tell the peer which extensions we support */ num_ext = 0; pr_supported = (struct sctp_supported_chunk_types_param *)(mtod(m, caddr_t)+chunk_len); - pr_supported->ph.param_type = htons(SCTP_SUPPORTED_CHUNK_EXT); - pr_supported->chunk_types[num_ext++] = SCTP_ASCONF; - pr_supported->chunk_types[num_ext++] = SCTP_ASCONF_ACK; if (stcb->asoc.prsctp_supported == 1) { pr_supported->chunk_types[num_ext++] = SCTP_FORWARD_CUM_TSN; } - if (stcb->asoc.pktdrop_supported == 1) { - pr_supported->chunk_types[num_ext++] = SCTP_PACKET_DROPPED; + if (stcb->asoc.auth_supported == 1) { + pr_supported->chunk_types[num_ext++] = SCTP_AUTHENTICATION; + } + if (stcb->asoc.asconf_supported == 1) { + pr_supported->chunk_types[num_ext++] = SCTP_ASCONF; + pr_supported->chunk_types[num_ext++] = SCTP_ASCONF_ACK; } if (stcb->asoc.reconfig_supported == 1) { pr_supported->chunk_types[num_ext++] = SCTP_STREAM_RESET; } - if (!SCTP_BASE_SYSCTL(sctp_auth_disable)) { - pr_supported->chunk_types[num_ext++] = SCTP_AUTHENTICATION; - } if (stcb->asoc.nrsack_supported == 1) { pr_supported->chunk_types[num_ext++] = SCTP_NR_SELECTIVE_ACK; } - parameter_len = (uint16_t) sizeof(struct sctp_supported_chunk_types_param) + num_ext; - pr_supported->ph.param_length = htons(parameter_len); - padding_len = SCTP_SIZE32(parameter_len) - parameter_len; - chunk_len += parameter_len; - + if (stcb->asoc.pktdrop_supported == 1) { + pr_supported->chunk_types[num_ext++] = SCTP_PACKET_DROPPED; + } + if (num_ext > 0) { + parameter_len = (uint16_t) sizeof(struct sctp_supported_chunk_types_param) + num_ext; + pr_supported->ph.param_type = htons(SCTP_SUPPORTED_CHUNK_EXT); + pr_supported->ph.param_length = htons(parameter_len); + padding_len = SCTP_SIZE32(parameter_len) - parameter_len; + chunk_len += parameter_len; + } /* add authentication parameters */ - if (!SCTP_BASE_SYSCTL(sctp_auth_disable)) { + if (stcb->asoc.auth_supported) { /* attach RANDOM parameter, if available */ if (stcb->asoc.authinfo.random != NULL) { struct sctp_auth_random *randp; @@ -4853,8 +4850,7 @@ sctp_send_initiate(struct sctp_inpcb *in chunk_len += parameter_len; } /* add HMAC_ALGO parameter */ - if ((stcb->asoc.local_hmacs != NULL) && - (stcb->asoc.local_hmacs->num_algo > 0)) { + if (stcb->asoc.local_hmacs != NULL) { struct sctp_auth_hmac_algo *hmacs; if (padding_len > 0) { @@ -4872,7 +4868,7 @@ sctp_send_initiate(struct sctp_inpcb *in chunk_len += parameter_len; } /* add CHUNKS parameter */ - if (sctp_auth_get_chklist_size(stcb->asoc.local_auth_chunks) > 0) { + if (stcb->asoc.local_auth_chunks != NULL) { struct sctp_auth_chunk_list *chunks; if (padding_len > 0) { @@ -5917,35 +5913,41 @@ do_a_abort: /* And now tell the peer which extensions we support */ num_ext = 0; pr_supported = (struct sctp_supported_chunk_types_param *)(mtod(m, caddr_t)+chunk_len); - pr_supported->ph.param_type = htons(SCTP_SUPPORTED_CHUNK_EXT); - pr_supported->chunk_types[num_ext++] = SCTP_ASCONF; - pr_supported->chunk_types[num_ext++] = SCTP_ASCONF_ACK; if (((asoc != NULL) && (asoc->prsctp_supported == 1)) || ((asoc == NULL) && (inp->prsctp_supported == 1))) { pr_supported->chunk_types[num_ext++] = SCTP_FORWARD_CUM_TSN; } - if (((asoc != NULL) && (asoc->pktdrop_supported == 1)) || - ((asoc == NULL) && (inp->pktdrop_supported == 1))) { - pr_supported->chunk_types[num_ext++] = SCTP_PACKET_DROPPED; + if (((asoc != NULL) && (asoc->auth_supported == 1)) || + ((asoc == NULL) && (inp->auth_supported == 1))) { + pr_supported->chunk_types[num_ext++] = SCTP_AUTHENTICATION; + } + if (((asoc != NULL) && (asoc->asconf_supported == 1)) || + ((asoc == NULL) && (inp->asconf_supported == 1))) { + pr_supported->chunk_types[num_ext++] = SCTP_ASCONF; + pr_supported->chunk_types[num_ext++] = SCTP_ASCONF_ACK; } if (((asoc != NULL) && (asoc->reconfig_supported == 1)) || ((asoc == NULL) && (inp->reconfig_supported == 1))) { pr_supported->chunk_types[num_ext++] = SCTP_STREAM_RESET; } - if (!SCTP_BASE_SYSCTL(sctp_auth_disable)) { - pr_supported->chunk_types[num_ext++] = SCTP_AUTHENTICATION; - } if (((asoc != NULL) && (asoc->nrsack_supported == 1)) || ((asoc == NULL) && (inp->nrsack_supported == 1))) { pr_supported->chunk_types[num_ext++] = SCTP_NR_SELECTIVE_ACK; } - parameter_len = (uint16_t) sizeof(struct sctp_supported_chunk_types_param) + num_ext; - pr_supported->ph.param_length = htons(parameter_len); - padding_len = SCTP_SIZE32(parameter_len) - parameter_len; - chunk_len += parameter_len; - + if (((asoc != NULL) && (asoc->pktdrop_supported == 1)) || + ((asoc == NULL) && (inp->pktdrop_supported == 1))) { + pr_supported->chunk_types[num_ext++] = SCTP_PACKET_DROPPED; + } + if (num_ext > 0) { + parameter_len = (uint16_t) sizeof(struct sctp_supported_chunk_types_param) + num_ext; + pr_supported->ph.param_type = htons(SCTP_SUPPORTED_CHUNK_EXT); + pr_supported->ph.param_length = htons(parameter_len); + padding_len = SCTP_SIZE32(parameter_len) - parameter_len; + chunk_len += parameter_len; + } /* add authentication parameters */ - if (!SCTP_BASE_SYSCTL(sctp_auth_disable)) { + if (((asoc != NULL) && (asoc->auth_supported == 1)) || + ((asoc == NULL) && (inp->auth_supported == 1))) { struct sctp_auth_random *randp; struct sctp_auth_hmac_algo *hmacs; struct sctp_auth_chunk_list *chunks; @@ -7806,7 +7808,6 @@ sctp_med_chunk_output(struct sctp_inpcb *num_out = 0; auth_keyid = stcb->asoc.authinfo.active_keyid; - if ((asoc->state & SCTP_STATE_SHUTDOWN_PENDING) || (asoc->state & SCTP_STATE_SHUTDOWN_RECEIVED) || (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_EXPLICIT_EOR))) { @@ -13417,12 +13418,7 @@ sctp_add_auth_chunk(struct mbuf *m, stru (stcb == NULL)) return (m); - /* sysctl disabled auth? */ - if (SCTP_BASE_SYSCTL(sctp_auth_disable)) - return (m); - - /* peer doesn't do auth... */ - if (!stcb->asoc.peer_supports_auth) { + if (stcb->asoc.auth_supported == 0) { return (m); } /* does the requested chunk require auth? */ Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Tue Aug 12 10:31:31 2014 (r269857) +++ head/sys/netinet/sctp_pcb.c Tue Aug 12 11:30:16 2014 (r269858) @@ -2485,6 +2485,12 @@ sctp_inpcb_alloc(struct socket *so, uint inp->sctp_cmt_on_off = SCTP_BASE_SYSCTL(sctp_cmt_on_off); inp->ecn_supported = (uint8_t) SCTP_BASE_SYSCTL(sctp_ecn_enable); inp->prsctp_supported = (uint8_t) SCTP_BASE_SYSCTL(sctp_pr_enable); + if (SCTP_BASE_SYSCTL(sctp_auth_disable)) { + inp->auth_supported = 0; + } else { + inp->auth_supported = 1; + } + inp->asconf_supported = (uint8_t) SCTP_BASE_SYSCTL(sctp_asconf_enable); inp->reconfig_supported = (uint8_t) SCTP_BASE_SYSCTL(sctp_reconfig_enable); inp->nrsack_supported = (uint8_t) SCTP_BASE_SYSCTL(sctp_nrsack_enable); inp->pktdrop_supported = (uint8_t) SCTP_BASE_SYSCTL(sctp_pktdrop_enable); @@ -2651,12 +2657,15 @@ sctp_inpcb_alloc(struct socket *so, uint */ m->local_hmacs = sctp_default_supported_hmaclist(); m->local_auth_chunks = sctp_alloc_chunklist(); + if (inp->asconf_supported) { + sctp_auth_add_chunk(SCTP_ASCONF, m->local_auth_chunks); + sctp_auth_add_chunk(SCTP_ASCONF_ACK, m->local_auth_chunks); + } m->default_dscp = 0; #ifdef INET6 m->default_flowlabel = 0; #endif m->port = 0; /* encapsulation disabled by default */ - sctp_auth_set_default_chunks(m->local_auth_chunks); LIST_INIT(&m->shared_keys); /* add default NULL key as key id 0 */ null_key = sctp_alloc_sharedkey(); @@ -6085,11 +6094,14 @@ sctp_load_addresses_from_init(struct sct sctp_key_t *new_key; uint32_t keylen; int got_random = 0, got_hmacs = 0, got_chklist = 0; - uint8_t ecn_supported; - uint8_t prsctp_supported; - uint8_t reconfig_supported; - uint8_t nrsack_supported; - uint8_t pktdrop_supported; + uint8_t peer_supports_ecn; + uint8_t peer_supports_prsctp; + uint8_t peer_supports_auth; + uint8_t peer_supports_asconf; + uint8_t peer_supports_asconf_ack; + uint8_t peer_supports_reconfig; + uint8_t peer_supports_nrsack; + uint8_t peer_supports_pktdrop; #ifdef INET struct sockaddr_in sin; @@ -6118,11 +6130,14 @@ sctp_load_addresses_from_init(struct sct } else { sa = src; } - ecn_supported = 0; - prsctp_supported = 0; - reconfig_supported = 0; - nrsack_supported = 0; - pktdrop_supported = 0; + peer_supports_ecn = 0; + peer_supports_prsctp = 0; + peer_supports_auth = 0; + peer_supports_asconf = 0; + peer_supports_asconf = 0; + peer_supports_reconfig = 0; + peer_supports_nrsack = 0; + peer_supports_pktdrop = 0; TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { /* mark all addresses that we have currently on the list */ net->dest_state |= SCTP_ADDR_NOT_IN_ASSOC; @@ -6172,12 +6187,6 @@ sctp_load_addresses_from_init(struct sct /* the assoc was freed? */ return (-4); } - /* - * peer must explicitly turn this on. This may have been initialized - * to be "on" in order to allow local addr changes while INIT's are - * in flight. - */ - stcb->asoc.peer_supports_asconf = 0; /* now we must go through each of the params. */ phdr = sctp_get_next_param(m, offset, &parm_buf, sizeof(parm_buf)); while (phdr) { @@ -6371,7 +6380,7 @@ sctp_load_addresses_from_init(struct sct } else #endif if (ptype == SCTP_ECN_CAPABLE) { - ecn_supported = 1; + peer_supports_ecn = 1; } else if (ptype == SCTP_ULP_ADAPTATION) { if (stcb->asoc.state != SCTP_STATE_OPEN) { struct sctp_adaptation_layer_indication ai, @@ -6395,7 +6404,9 @@ sctp_load_addresses_from_init(struct sct #endif - stcb->asoc.peer_supports_asconf = 1; + if (stcb->asoc.asconf_supported == 0) { + return (-100); + } if (plen > sizeof(lstore)) { return (-23); } @@ -6447,7 +6458,7 @@ sctp_load_addresses_from_init(struct sct stcb->asoc.peer_supports_nat = 1; } else if (ptype == SCTP_PRSCTP_SUPPORTED) { /* Peer supports pr-sctp */ - prsctp_supported = 1; + peer_supports_prsctp = 1; } else if (ptype == SCTP_SUPPORTED_CHUNK_EXT) { /* A supported extension chunk */ struct sctp_supported_chunk_types_param *pr_supported; @@ -6459,30 +6470,29 @@ sctp_load_addresses_from_init(struct sct if (phdr == NULL) { return (-25); } - stcb->asoc.peer_supports_asconf = 0; - stcb->asoc.peer_supports_auth = 0; pr_supported = (struct sctp_supported_chunk_types_param *)phdr; num_ent = plen - sizeof(struct sctp_paramhdr); for (i = 0; i < num_ent; i++) { switch (pr_supported->chunk_types[i]) { case SCTP_ASCONF: + peer_supports_asconf = 1; case SCTP_ASCONF_ACK: - stcb->asoc.peer_supports_asconf = 1; + peer_supports_asconf_ack = 1; break; case SCTP_FORWARD_CUM_TSN: - prsctp_supported = 1; + peer_supports_prsctp = 1; break; case SCTP_PACKET_DROPPED: - pktdrop_supported = 1; + peer_supports_pktdrop = 1; break; case SCTP_NR_SELECTIVE_ACK: - nrsack_supported = 1; + peer_supports_nrsack = 1; break; case SCTP_STREAM_RESET: - reconfig_supported = 1; + peer_supports_reconfig = 1; break; case SCTP_AUTHENTICATION: - stcb->asoc.peer_supports_auth = 1; + peer_supports_auth = 1; break; default: /* one I have not learned yet */ @@ -6619,25 +6629,47 @@ next_param: } } } - stcb->asoc.ecn_supported &= ecn_supported; - stcb->asoc.prsctp_supported &= prsctp_supported; - stcb->asoc.reconfig_supported &= reconfig_supported; - stcb->asoc.nrsack_supported &= nrsack_supported; - stcb->asoc.pktdrop_supported &= pktdrop_supported; - /* validate authentication required parameters */ - if (got_random && got_hmacs) { - stcb->asoc.peer_supports_auth = 1; - } else { - stcb->asoc.peer_supports_auth = 0; + if ((stcb->asoc.ecn_supported == 1) && + (peer_supports_ecn == 0)) { + stcb->asoc.ecn_supported = 0; + } + if ((stcb->asoc.prsctp_supported == 1) && + (peer_supports_prsctp == 0)) { + stcb->asoc.prsctp_supported = 0; + } + if ((stcb->asoc.auth_supported == 1) && + ((peer_supports_auth == 0) || + (got_random == 0) || (got_hmacs == 0))) { + stcb->asoc.auth_supported = 0; + } + if ((stcb->asoc.asconf_supported == 1) && + ((peer_supports_asconf == 0) || (peer_supports_asconf_ack == 0) || + (stcb->asoc.auth_supported == 0) || + (saw_asconf == 0) || (saw_asconf_ack == 0))) { + stcb->asoc.asconf_supported = 0; + } + if ((stcb->asoc.reconfig_supported == 1) && + (peer_supports_reconfig == 0)) { + stcb->asoc.reconfig_supported = 0; + } + if ((stcb->asoc.nrsack_supported == 1) && + (peer_supports_nrsack == 0)) { + stcb->asoc.nrsack_supported = 0; + } + if ((stcb->asoc.pktdrop_supported == 1) && + (peer_supports_pktdrop == 0)) { + stcb->asoc.pktdrop_supported = 0; } - if (!stcb->asoc.peer_supports_auth && got_chklist) { + /* validate authentication required parameters */ + if ((peer_supports_auth == 0) && (got_chklist == 1)) { /* peer does not support auth but sent a chunks list? */ return (-31); } - if (stcb->asoc.peer_supports_asconf && !stcb->asoc.peer_supports_auth) { + if ((peer_supports_asconf == 1) && (peer_supports_auth == 0)) { /* peer supports asconf but not auth? */ return (-32); - } else if ((stcb->asoc.peer_supports_asconf) && (stcb->asoc.peer_supports_auth) && + } else if ((peer_supports_asconf == 1) && + (peer_supports_auth == 1) && ((saw_asconf == 0) || (saw_asconf_ack == 0))) { return (-33); } Modified: head/sys/netinet/sctp_pcb.h ============================================================================== --- head/sys/netinet/sctp_pcb.h Tue Aug 12 10:31:31 2014 (r269857) +++ head/sys/netinet/sctp_pcb.h Tue Aug 12 11:30:16 2014 (r269858) @@ -408,6 +408,8 @@ struct sctp_inpcb { uint32_t sctp_cmt_on_off; uint8_t ecn_supported; uint8_t prsctp_supported; + uint8_t auth_supported; + uint8_t asconf_supported; uint8_t reconfig_supported; uint8_t nrsack_supported; uint8_t pktdrop_supported; Modified: head/sys/netinet/sctp_peeloff.c ============================================================================== --- head/sys/netinet/sctp_peeloff.c Tue Aug 12 10:31:31 2014 (r269857) +++ head/sys/netinet/sctp_peeloff.c Tue Aug 12 11:30:16 2014 (r269858) @@ -120,6 +120,8 @@ sctp_do_peeloff(struct socket *head, str n_inp->sctp_cmt_on_off = inp->sctp_cmt_on_off; n_inp->ecn_supported = inp->ecn_supported; n_inp->prsctp_supported = inp->prsctp_supported; + n_inp->auth_supported = inp->auth_supported; + n_inp->asconf_supported = inp->asconf_supported; n_inp->reconfig_supported = inp->reconfig_supported; n_inp->nrsack_supported = inp->nrsack_supported; n_inp->pktdrop_supported = inp->pktdrop_supported; Modified: head/sys/netinet/sctp_structs.h ============================================================================== --- head/sys/netinet/sctp_structs.h Tue Aug 12 10:31:31 2014 (r269857) +++ head/sys/netinet/sctp_structs.h Tue Aug 12 11:30:16 2014 (r269858) @@ -1153,6 +1153,8 @@ struct sctp_association { /* Flags whether an extension is supported or not */ uint8_t ecn_supported; uint8_t prsctp_supported; + uint8_t auth_supported; + uint8_t asconf_supported; uint8_t reconfig_supported; uint8_t nrsack_supported; uint8_t pktdrop_supported; @@ -1160,10 +1162,6 @@ struct sctp_association { /* Did the peer make the stream config (add out) request */ uint8_t peer_req_out; - /* flag to indicate if peer can do asconf */ - uint8_t peer_supports_asconf; - /* peer authentication support flag */ - uint8_t peer_supports_auth; uint8_t local_strreset_support; uint8_t peer_supports_nat; Modified: head/sys/netinet/sctp_sysctl.c ============================================================================== --- head/sys/netinet/sctp_sysctl.c Tue Aug 12 10:31:31 2014 (r269857) +++ head/sys/netinet/sctp_sysctl.c Tue Aug 12 11:30:16 2014 (r269858) @@ -55,6 +55,8 @@ sctp_init_sysctls() SCTP_BASE_SYSCTL(sctp_multiple_asconfs) = SCTPCTL_MULTIPLEASCONFS_DEFAULT; SCTP_BASE_SYSCTL(sctp_ecn_enable) = SCTPCTL_ECN_ENABLE_DEFAULT; SCTP_BASE_SYSCTL(sctp_pr_enable) = SCTPCTL_PR_ENABLE_DEFAULT; + SCTP_BASE_SYSCTL(sctp_auth_disable) = SCTPCTL_AUTH_DISABLE_DEFAULT; + SCTP_BASE_SYSCTL(sctp_asconf_enable) = SCTPCTL_ASCONF_ENABLE_DEFAULT; SCTP_BASE_SYSCTL(sctp_reconfig_enable) = SCTPCTL_RECONFIG_ENABLE_DEFAULT; SCTP_BASE_SYSCTL(sctp_nrsack_enable) = SCTPCTL_NRSACK_ENABLE_DEFAULT; SCTP_BASE_SYSCTL(sctp_pktdrop_enable) = SCTPCTL_PKTDROP_ENABLE_DEFAULT; @@ -90,7 +92,6 @@ sctp_init_sysctls() SCTP_BASE_SYSCTL(sctp_cmt_on_off) = SCTPCTL_CMT_ON_OFF_DEFAULT; SCTP_BASE_SYSCTL(sctp_cmt_use_dac) = SCTPCTL_CMT_USE_DAC_DEFAULT; SCTP_BASE_SYSCTL(sctp_use_cwnd_based_maxburst) = SCTPCTL_CWND_MAXBURST_DEFAULT; - SCTP_BASE_SYSCTL(sctp_auth_disable) = SCTPCTL_AUTH_DISABLE_DEFAULT; SCTP_BASE_SYSCTL(sctp_nat_friendly) = SCTPCTL_NAT_FRIENDLY_DEFAULT; SCTP_BASE_SYSCTL(sctp_L2_abc_variable) = SCTPCTL_ABC_L_VAR_DEFAULT; SCTP_BASE_SYSCTL(sctp_mbuf_threshold_count) = SCTPCTL_MAX_CHAINED_MBUFS_DEFAULT; @@ -638,7 +639,6 @@ sysctl_sctp_check(SYSCTL_HANDLER_ARGS) RANGECHK(SCTP_BASE_SYSCTL(sctp_cmt_on_off), SCTPCTL_CMT_ON_OFF_MIN, SCTPCTL_CMT_ON_OFF_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_cmt_use_dac), SCTPCTL_CMT_USE_DAC_MIN, SCTPCTL_CMT_USE_DAC_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_use_cwnd_based_maxburst), SCTPCTL_CWND_MAXBURST_MIN, SCTPCTL_CWND_MAXBURST_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_auth_disable), SCTPCTL_AUTH_DISABLE_MIN, SCTPCTL_AUTH_DISABLE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_nat_friendly), SCTPCTL_NAT_FRIENDLY_MIN, SCTPCTL_NAT_FRIENDLY_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_L2_abc_variable), SCTPCTL_ABC_L_VAR_MIN, SCTPCTL_ABC_L_VAR_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_mbuf_threshold_count), SCTPCTL_MAX_CHAINED_MBUFS_MIN, SCTPCTL_MAX_CHAINED_MBUFS_MAX); @@ -677,6 +677,56 @@ sysctl_sctp_check(SYSCTL_HANDLER_ARGS) return (error); } +static int +sysctl_sctp_auth_check(SYSCTL_HANDLER_ARGS) +{ + int error; + + error = sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, req); + if (error == 0) { + if (SCTP_BASE_SYSCTL(sctp_auth_disable) < SCTPCTL_AUTH_DISABLE_MIN) { + SCTP_BASE_SYSCTL(sctp_auth_disable) = SCTPCTL_AUTH_DISABLE_MIN; + } + if (SCTP_BASE_SYSCTL(sctp_auth_disable) > SCTPCTL_AUTH_DISABLE_MAX) { + SCTP_BASE_SYSCTL(sctp_auth_disable) = SCTPCTL_AUTH_DISABLE_MAX; + } + if ((SCTP_BASE_SYSCTL(sctp_auth_disable) == 1) && + (SCTP_BASE_SYSCTL(sctp_asconf_enable) == 1)) { + /* + * You can't disable AUTH with disabling ASCONF + * first + */ + SCTP_BASE_SYSCTL(sctp_auth_disable) = 0; + } + } + return (error); +} + +static int +sysctl_sctp_asconf_check(SYSCTL_HANDLER_ARGS) +{ + int error; + + error = sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, req); + if (error == 0) { + if (SCTP_BASE_SYSCTL(sctp_asconf_enable) < SCTPCTL_ASCONF_ENABLE_MIN) { + SCTP_BASE_SYSCTL(sctp_asconf_enable) = SCTPCTL_ASCONF_ENABLE_MIN; + } + if (SCTP_BASE_SYSCTL(sctp_asconf_enable) > SCTPCTL_ASCONF_ENABLE_MAX) { + SCTP_BASE_SYSCTL(sctp_asconf_enable) = SCTPCTL_ASCONF_ENABLE_MAX; + } + if ((SCTP_BASE_SYSCTL(sctp_asconf_enable) == 1) && + (SCTP_BASE_SYSCTL(sctp_auth_disable) == 1)) { + /* + * You can't enable ASCONF without enabling AUTH + * first + */ + SCTP_BASE_SYSCTL(sctp_asconf_enable) = 0; + } + } + return (error); +} + #if defined(__FreeBSD__) && defined(SMP) && defined(SCTP_USE_PERCPU_STAT) static int sysctl_stat_get(SYSCTL_HANDLER_ARGS) @@ -869,6 +919,14 @@ SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUT &SCTP_BASE_SYSCTL(sctp_pr_enable), 0, sysctl_sctp_check, "IU", SCTPCTL_PR_ENABLE_DESC); +SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, auth_disable, CTLTYPE_UINT | CTLFLAG_RW, + &SCTP_BASE_SYSCTL(sctp_auth_disable), 0, sysctl_sctp_auth_check, "IU", + SCTPCTL_AUTH_DISABLE_DESC); + +SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, asconf_enable, CTLTYPE_UINT | CTLFLAG_RW, + &SCTP_BASE_SYSCTL(sctp_asconf_enable), 0, sysctl_sctp_asconf_check, "IU", + SCTPCTL_ASCONF_ENABLE_DESC); + SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, reconfig_enable, CTLTYPE_UINT | CTLFLAG_RW, &SCTP_BASE_SYSCTL(sctp_reconfig_enable), 0, sysctl_sctp_check, "IU", SCTPCTL_RECONFIG_ENABLE_DESC); @@ -1010,10 +1068,6 @@ SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUT &SCTP_BASE_SYSCTL(sctp_use_cwnd_based_maxburst), 0, sysctl_sctp_check, "IU", SCTPCTL_CWND_MAXBURST_DESC); -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, auth_disable, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_auth_disable), 0, sysctl_sctp_check, "IU", - SCTPCTL_AUTH_DISABLE_DESC); - SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, nat_friendly, CTLTYPE_UINT | CTLFLAG_RW, &SCTP_BASE_SYSCTL(sctp_nat_friendly), 0, sysctl_sctp_check, "IU", SCTPCTL_NAT_FRIENDLY_DESC); Modified: head/sys/netinet/sctp_sysctl.h ============================================================================== --- head/sys/netinet/sctp_sysctl.h Tue Aug 12 10:31:31 2014 (r269857) +++ head/sys/netinet/sctp_sysctl.h Tue Aug 12 11:30:16 2014 (r269858) @@ -46,6 +46,8 @@ struct sctp_sysctl { uint32_t sctp_multiple_asconfs; uint32_t sctp_ecn_enable; uint32_t sctp_pr_enable; + uint32_t sctp_auth_disable; + uint32_t sctp_asconf_enable; uint32_t sctp_reconfig_enable; uint32_t sctp_nrsack_enable; uint32_t sctp_pktdrop_enable; @@ -81,7 +83,6 @@ struct sctp_sysctl { uint32_t sctp_cmt_on_off; uint32_t sctp_cmt_use_dac; uint32_t sctp_use_cwnd_based_maxburst; - uint32_t sctp_auth_disable; uint32_t sctp_nat_friendly; uint32_t sctp_L2_abc_variable; uint32_t sctp_mbuf_threshold_count; @@ -162,6 +163,18 @@ struct sctp_sysctl { #define SCTPCTL_PR_ENABLE_MAX 1 #define SCTPCTL_PR_ENABLE_DEFAULT 1 +/* auth_disable: Disable SCTP AUTH function */ +#define SCTPCTL_AUTH_DISABLE_DESC "Disable SCTP AUTH function" +#define SCTPCTL_AUTH_DISABLE_MIN 0 +#define SCTPCTL_AUTH_DISABLE_MAX 1 +#define SCTPCTL_AUTH_DISABLE_DEFAULT 0 + +/* asconf_enable: Enable SCTP ASCONF */ +#define SCTPCTL_ASCONF_ENABLE_DESC "Enable SCTP ASCONF" +#define SCTPCTL_ASCONF_ENABLE_MIN 0 +#define SCTPCTL_ASCONF_ENABLE_MAX 1 +#define SCTPCTL_ASCONF_ENABLE_DEFAULT 1 + /* reconfig_enable: Enable SCTP RE-CONFIG */ #define SCTPCTL_RECONFIG_ENABLE_DESC "Enable SCTP RE-CONFIG" #define SCTPCTL_RECONFIG_ENABLE_MIN 0 @@ -379,12 +392,6 @@ struct sctp_sysctl { #define SCTPCTL_CWND_MAXBURST_MAX 1 #define SCTPCTL_CWND_MAXBURST_DEFAULT 1 -/* auth_disable: Disable SCTP AUTH function */ -#define SCTPCTL_AUTH_DISABLE_DESC "Disable SCTP AUTH function" -#define SCTPCTL_AUTH_DISABLE_MIN 0 -#define SCTPCTL_AUTH_DISABLE_MAX 1 -#define SCTPCTL_AUTH_DISABLE_DEFAULT 0 - /* nat_friendly: SCTP NAT friendly operation */ #define SCTPCTL_NAT_FRIENDLY_DESC "SCTP NAT friendly operation" #define SCTPCTL_NAT_FRIENDLY_MIN 0 Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Tue Aug 12 10:31:31 2014 (r269857) +++ head/sys/netinet/sctp_usrreq.c Tue Aug 12 11:30:16 2014 (r269858) @@ -3348,6 +3348,60 @@ flags_out: } break; } + case SCTP_AUTH_SUPPORTED: + { + struct sctp_assoc_value *av; + + SCTP_CHECK_AND_CAST(av, optval, struct sctp_assoc_value, *optsize); + SCTP_FIND_STCB(inp, stcb, av->assoc_id); + + if (stcb) { + av->assoc_value = stcb->asoc.auth_supported; + SCTP_TCB_UNLOCK(stcb); + } else { + if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || + (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || + (av->assoc_id == SCTP_FUTURE_ASSOC)) { + SCTP_INP_RLOCK(inp); + av->assoc_value = inp->auth_supported; + SCTP_INP_RUNLOCK(inp); + } else { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Aug 12 11:45:58 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 72EDEFFE for ; Tue, 12 Aug 2014 11:45:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43A0F21A7 for ; Tue, 12 Aug 2014 11:45:58 +0000 (UTC) Received: from hselasky (uid 1241) (envelope-from hselasky@FreeBSD.org) id 649f by svn.freebsd.org (DragonFly Mail Agent v0.9+); Tue, 12 Aug 2014 11:45:58 +0000 From: Hans Petter Selasky Date: Tue, 12 Aug 2014 11:45:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269859 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e9fe76.649f.38b47800@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2014 11:45:58 -0000 Author: hselasky Date: Tue Aug 12 11:45:57 2014 New Revision: 269859 URL: http://svnweb.freebsd.org/changeset/base/269859 Log: - Fix radix tree memory leakage when unloading modules using radix trees. This happens because the logic inserting items into the radix tree is allocating empty radix levels, when index zero does not contain any items. - Add proper error case handling, so that the radix tree does not end up in a bad state, if memory cannot be allocated during insertion of an item. - Add check for inserting NULL items into the radix tree. - Add check for radix tree getting too big. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/linux_radix.c Modified: head/sys/ofed/include/linux/linux_radix.c ============================================================================== --- head/sys/ofed/include/linux/linux_radix.c Tue Aug 12 11:30:16 2014 (r269858) +++ head/sys/ofed/include/linux/linux_radix.c Tue Aug 12 11:45:57 2014 (r269859) @@ -123,40 +123,84 @@ int radix_tree_insert(struct radix_tree_root *root, unsigned long index, void *item) { struct radix_tree_node *node; + struct radix_tree_node *temp[RADIX_TREE_MAX_HEIGHT - 1]; int height; int idx; - /* - * Expand the tree to fit indexes as big as requested. - */ - while (root->rnode == NULL || radix_max(root) < index) { + /* bail out upon insertion of a NULL item */ + if (item == NULL) + return (-EINVAL); + + /* get root node, if any */ + node = root->rnode; + + /* allocate root node, if any */ + if (node == NULL) { node = malloc(sizeof(*node), M_RADIX, root->gfp_mask | M_ZERO); if (node == NULL) return (-ENOMEM); - node->slots[0] = root->rnode; - if (root->rnode) - node->count++; root->rnode = node; root->height++; } - node = root->rnode; - height = root->height - 1; - /* - * Walk down the tree finding the correct node and allocating any - * missing nodes along the way. - */ - while (height) { - idx = radix_pos(index, height); - if (node->slots[idx] == NULL) { - node->slots[idx] = malloc(sizeof(*node), M_RADIX, - root->gfp_mask | M_ZERO); - if (node->slots[idx] == NULL) + + /* expand radix tree as needed */ + while (radix_max(root) < index) { + + /* check if the radix tree is getting too big */ + if (root->height == RADIX_TREE_MAX_HEIGHT) + return (-E2BIG); + + /* + * If the root radix level is not empty, we need to + * allocate a new radix level: + */ + if (node->count != 0) { + node = malloc(sizeof(*node), M_RADIX, root->gfp_mask | M_ZERO); + if (node == NULL) return (-ENOMEM); + node->slots[0] = root->rnode; node->count++; + root->rnode = node; } + root->height++; + } + + /* get radix tree height index */ + height = root->height - 1; + + /* walk down the tree until the first missing node, if any */ + for ( ; height != 0; height--) { + idx = radix_pos(index, height); + if (node->slots[idx] == NULL) + break; + node = node->slots[idx]; + } + + /* allocate the missing radix levels, if any */ + for (idx = 0; idx != height; idx++) { + temp[idx] = malloc(sizeof(*node), M_RADIX, + root->gfp_mask | M_ZERO); + if (temp[idx] == NULL) { + while(idx--) + free(temp[idx], M_RADIX); + /* check if we should free the root node aswell */ + if (root->rnode->count == 0) { + free(root->rnode, M_RADIX); + root->rnode = NULL; + root->height = 0; + } + return (-ENOMEM); + } + } + + /* setup new radix levels, if any */ + for ( ; height != 0; height--) { + idx = radix_pos(index, height); + node->slots[idx] = temp[height - 1]; + node->count++; node = node->slots[idx]; - height--; } + /* * Insert and adjust count if the item does not already exist. */ From owner-svn-src-head@FreeBSD.ORG Tue Aug 12 12:25:56 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E72864AA for ; Tue, 12 Aug 2014 12:25:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBF962708 for ; Tue, 12 Aug 2014 12:25:56 +0000 (UTC) Received: from ume (uid 812) (envelope-from ume@FreeBSD.org) id 6244 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Tue, 12 Aug 2014 12:25:56 +0000 From: Hajimu UMEMOTO Date: Tue, 12 Aug 2014 12:25:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269865 - in head/lib/libc: . md X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53ea07d4.6244.7ff9af9b@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2014 12:25:57 -0000 Author: ume Date: Tue Aug 12 12:25:56 2014 New Revision: 269865 URL: http://svnweb.freebsd.org/changeset/base/269865 Log: Bring the md5 functions into libc for internal use only. It is required to support ID randomization for our stub resolver. Added: head/lib/libc/md/ head/lib/libc/md/Makefile.inc (contents, props changed) Modified: head/lib/libc/Makefile Modified: head/lib/libc/Makefile ============================================================================== --- head/lib/libc/Makefile Tue Aug 12 12:22:39 2014 (r269864) +++ head/lib/libc/Makefile Tue Aug 12 12:25:56 2014 (r269865) @@ -75,6 +75,7 @@ NOASM= .include "${LIBC_SRCTOP}/inet/Makefile.inc" .include "${LIBC_SRCTOP}/isc/Makefile.inc" .include "${LIBC_SRCTOP}/locale/Makefile.inc" +.include "${LIBC_SRCTOP}/md/Makefile.inc" .include "${LIBC_SRCTOP}/nameser/Makefile.inc" .include "${LIBC_SRCTOP}/net/Makefile.inc" .include "${LIBC_SRCTOP}/nls/Makefile.inc" Added: head/lib/libc/md/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/md/Makefile.inc Tue Aug 12 12:25:56 2014 (r269865) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +.PATH: ${LIBC_SRCTOP}/../libmd + +SRCS+= md5c.c From owner-svn-src-head@FreeBSD.ORG Tue Aug 12 12:36:11 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8CCF1874 for ; Tue, 12 Aug 2014 12:36:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75366281E for ; Tue, 12 Aug 2014 12:36:11 +0000 (UTC) Received: from ume (uid 812) (envelope-from ume@FreeBSD.org) id 665f by svn.freebsd.org (DragonFly Mail Agent v0.9+); Tue, 12 Aug 2014 12:36:06 +0000 From: Hajimu UMEMOTO Date: Tue, 12 Aug 2014 12:36:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269867 - in head: include include/arpa lib/libc/include lib/libc/include/isc lib/libc/inet lib/libc/isc lib/libc/nameser lib/libc/resolv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53ea0a36.665f.74abd785@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2014 12:36:11 -0000 Author: ume Date: Tue Aug 12 12:36:06 2014 New Revision: 269867 URL: http://svnweb.freebsd.org/changeset/base/269867 Log: Update our stub resolver to final version of libbind. Obtained from: ISC Modified: head/include/arpa/inet.h head/include/arpa/nameser.h head/include/arpa/nameser_compat.h head/include/res_update.h head/include/resolv.h head/lib/libc/include/isc/eventlib.h head/lib/libc/include/isc/list.h head/lib/libc/include/port_before.h head/lib/libc/inet/inet_addr.c head/lib/libc/inet/inet_cidr_ntop.c head/lib/libc/inet/inet_cidr_pton.c head/lib/libc/inet/inet_net_ntop.c head/lib/libc/inet/inet_net_pton.c head/lib/libc/inet/inet_neta.c head/lib/libc/inet/inet_ntoa.c head/lib/libc/inet/inet_ntop.c head/lib/libc/inet/inet_pton.c head/lib/libc/inet/nsap_addr.c head/lib/libc/isc/ev_streams.c head/lib/libc/isc/ev_timers.c head/lib/libc/isc/eventlib_p.h head/lib/libc/nameser/Symbol.map head/lib/libc/nameser/ns_name.c head/lib/libc/nameser/ns_netint.c head/lib/libc/nameser/ns_parse.c head/lib/libc/nameser/ns_print.c head/lib/libc/nameser/ns_samedomain.c head/lib/libc/nameser/ns_ttl.c head/lib/libc/resolv/Makefile.inc head/lib/libc/resolv/Symbol.map head/lib/libc/resolv/herror.c head/lib/libc/resolv/res_comp.c head/lib/libc/resolv/res_data.c head/lib/libc/resolv/res_debug.c head/lib/libc/resolv/res_findzonecut.c head/lib/libc/resolv/res_init.c head/lib/libc/resolv/res_mkquery.c head/lib/libc/resolv/res_mkupdate.c head/lib/libc/resolv/res_query.c head/lib/libc/resolv/res_send.c head/lib/libc/resolv/res_update.c Directory Properties: head/include/ (props changed) head/lib/libc/ (props changed) Modified: head/include/arpa/inet.h ============================================================================== --- head/include/arpa/inet.h Tue Aug 12 12:26:12 2014 (r269866) +++ head/include/arpa/inet.h Tue Aug 12 12:36:06 2014 (r269867) @@ -51,7 +51,7 @@ /*% * @(#)inet.h 8.1 (Berkeley) 6/2/93 - * $Id: inet.h,v 1.2.18.1 2005/04/27 05:00:50 sra Exp $ + * $Id: inet.h,v 1.3 2005/04/27 04:56:16 sra Exp $ * $FreeBSD$ */ Modified: head/include/arpa/nameser.h ============================================================================== --- head/include/arpa/nameser.h Tue Aug 12 12:26:12 2014 (r269866) +++ head/include/arpa/nameser.h Tue Aug 12 12:36:06 2014 (r269867) @@ -1,7 +1,24 @@ /* + * Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") + * Portions Copyright (C) 1996-2003 Internet Software Consortium. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, + * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +/* * Copyright (c) 1983, 1989, 1993 * The Regents of the University of California. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -13,7 +30,7 @@ * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -28,24 +45,7 @@ */ /* - * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") - * Copyright (c) 1996-1999 by Internet Software Consortium. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -/* - * $Id: nameser.h,v 1.7.18.2 2008/04/03 23:15:15 marka Exp $ + * $Id: nameser.h,v 1.16 2009/03/03 01:52:48 each Exp $ * $FreeBSD$ */ @@ -68,15 +68,18 @@ * contains a new enough lib/nameser/ to support the feature you need. */ -#define __NAMESER 19991006 /*%< New interface version stamp. */ +#define __NAMESER 20090302 /*%< New interface version stamp. */ /* * Define constants based on RFC0883, RFC1034, RFC 1035 */ #define NS_PACKETSZ 512 /*%< default UDP packet size */ -#define NS_MAXDNAME 1025 /*%< maximum domain name */ +#define NS_MAXDNAME 1025 /*%< maximum domain name (presentation format)*/ #define NS_MAXMSG 65535 /*%< maximum message size */ #define NS_MAXCDNAME 255 /*%< maximum compressed domain name */ #define NS_MAXLABEL 63 /*%< maximum length of domain label */ +#define NS_MAXLABELS 128 /*%< theoretical max #/labels per domain name */ +#define NS_MAXNNAME 256 /*%< maximum uncompressed (binary) domain name*/ +#define NS_MAXPADDR (sizeof "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff") #define NS_HFIXEDSZ 12 /*%< #/bytes of fixed data in header */ #define NS_QFIXEDSZ 4 /*%< #/bytes of fixed data in query */ #define NS_RRFIXEDSZ 10 /*%< #/bytes of fixed data in r record */ @@ -103,6 +106,18 @@ typedef enum __ns_sect { } ns_sect; /*% + * Network name (compressed or not) type. Equivilent to a pointer when used + * in a function prototype. Can be const'd. + */ +typedef u_char ns_nname[NS_MAXNNAME]; +typedef const u_char *ns_nname_ct; +typedef u_char *ns_nname_t; + +struct ns_namemap { ns_nname_ct base; int len; }; +typedef struct ns_namemap *ns_namemap_t; +typedef const struct ns_namemap *ns_namemap_ct; + +/*% * This is a message handle. It is caller allocated and has no dynamic data. * This structure is intended to be opaque to all but ns_parse.c, thus the * leading _'s on the member names. Use the accessor functions, not the _'s. @@ -116,6 +131,17 @@ typedef struct __ns_msg { const u_char *_msg_ptr; } ns_msg; +/* + * This is a newmsg handle, used when constructing new messages with + * ns_newmsg_init, et al. + */ +struct ns_newmsg { + ns_msg msg; + const u_char *dnptrs[25]; + const u_char **lastdnptr; +}; +typedef struct ns_newmsg ns_newmsg; + /* Private data structure - do not use from outside library. */ struct _ns_flagdata { int mask, shift; }; extern struct _ns_flagdata _ns_flagdata[]; @@ -140,8 +166,23 @@ typedef struct __ns_rr { const u_char * rdata; } ns_rr; +/* + * Same thing, but using uncompressed network binary names, and real C types. + */ +typedef struct __ns_rr2 { + ns_nname nname; + size_t nnamel; + int type; + int rr_class; + u_int ttl; + int rdlength; + const u_char * rdata; +} ns_rr2; + /* Accessor macros - this is part of the public interface. */ #define ns_rr_name(rr) (((rr).name[0] != '\0') ? (rr).name : ".") +#define ns_rr_nname(rr) ((const ns_nname_t)(rr).nname) +#define ns_rr_nnamel(rr) ((rr).nnamel + 0) #define ns_rr_type(rr) ((ns_type)((rr).type + 0)) #define ns_rr_class(rr) ((ns_class)((rr).rr_class + 0)) #define ns_rr_ttl(rr) ((rr).ttl + 0) @@ -216,9 +257,9 @@ typedef enum __ns_update_operation { * This structure is used for TSIG authenticated messages */ struct ns_tsig_key { - char name[NS_MAXDNAME], alg[NS_MAXDNAME]; - unsigned char *data; - int len; + char name[NS_MAXDNAME], alg[NS_MAXDNAME]; + unsigned char *data; + int len; }; typedef struct ns_tsig_key ns_tsig_key; @@ -274,7 +315,7 @@ typedef enum __ns_type { ns_t_key = 25, /*%< Security key. */ ns_t_px = 26, /*%< X.400 mail mapping. */ ns_t_gpos = 27, /*%< Geographical position (withdrawn). */ - ns_t_aaaa = 28, /*%< Ip6 Address. */ + ns_t_aaaa = 28, /*%< IPv6 Address. */ ns_t_loc = 29, /*%< Location Information. */ ns_t_nxt = 30, /*%< Next domain (security). */ ns_t_eid = 31, /*%< Endpoint identifier. */ @@ -284,11 +325,22 @@ typedef enum __ns_type { ns_t_naptr = 35, /*%< Naming Authority PoinTeR */ ns_t_kx = 36, /*%< Key Exchange */ ns_t_cert = 37, /*%< Certification record */ - ns_t_a6 = 38, /*%< IPv6 address (deprecates AAAA) */ - ns_t_dname = 39, /*%< Non-terminal DNAME (for IPv6) */ + ns_t_a6 = 38, /*%< IPv6 address (experimental) */ + ns_t_dname = 39, /*%< Non-terminal DNAME */ ns_t_sink = 40, /*%< Kitchen sink (experimentatl) */ ns_t_opt = 41, /*%< EDNS0 option (meta-RR) */ ns_t_apl = 42, /*%< Address prefix list (RFC3123) */ + ns_t_ds = 43, /*%< Delegation Signer */ + ns_t_sshfp = 44, /*%< SSH Fingerprint */ + ns_t_ipseckey = 45, /*%< IPSEC Key */ + ns_t_rrsig = 46, /*%< RRset Signature */ + ns_t_nsec = 47, /*%< Negative security */ + ns_t_dnskey = 48, /*%< DNS Key */ + ns_t_dhcid = 49, /*%< Dynamic host configuratin identifier */ + ns_t_nsec3 = 50, /*%< Negative security type 3 */ + ns_t_nsec3param = 51, /*%< Negative security type 3 parameters */ + ns_t_hip = 55, /*%< Host Identity Protocol */ + ns_t_spf = 99, /*%< Sender Policy Framework */ ns_t_tkey = 249, /*%< Transaction key */ ns_t_tsig = 250, /*%< Transaction signature. */ ns_t_ixfr = 251, /*%< Incremental zone transfer. */ @@ -297,6 +349,7 @@ typedef enum __ns_type { ns_t_maila = 254, /*%< Transfer mail agent records. */ ns_t_any = 255, /*%< Wildcard match. */ ns_t_zxfr = 256, /*%< BIND-specific, nonstandard. */ + ns_t_dlv = 32769, /*%< DNSSEC look-aside validatation. */ ns_t_max = 65536 } ns_type; @@ -475,6 +528,7 @@ typedef enum __ns_cert_types { #define ns_initparse __ns_initparse #define ns_skiprr __ns_skiprr #define ns_parserr __ns_parserr +#define ns_parserr2 __ns_parserr2 #define ns_sprintrr __ns_sprintrr #define ns_sprintrrf __ns_sprintrrf #define ns_format_ttl __ns_format_ttl @@ -485,12 +539,19 @@ typedef enum __ns_cert_types { #define ns_name_ntol __ns_name_ntol #define ns_name_ntop __ns_name_ntop #define ns_name_pton __ns_name_pton +#define ns_name_pton2 __ns_name_pton2 #define ns_name_unpack __ns_name_unpack +#define ns_name_unpack2 __ns_name_unpack2 #define ns_name_pack __ns_name_pack #define ns_name_compress __ns_name_compress #define ns_name_uncompress __ns_name_uncompress #define ns_name_skip __ns_name_skip #define ns_name_rollback __ns_name_rollback +#define ns_name_length __ns_name_length +#define ns_name_eq __ns_name_eq +#define ns_name_owned __ns_name_owned +#define ns_name_map __ns_name_map +#define ns_name_labels __ns_name_labels #if 0 #define ns_sign __ns_sign #define ns_sign2 __ns_sign2 @@ -508,6 +569,16 @@ typedef enum __ns_cert_types { #endif #define ns_makecanon __ns_makecanon #define ns_samename __ns_samename +#define ns_newmsg_init __ns_newmsg_init +#define ns_newmsg_copy __ns_newmsg_copy +#define ns_newmsg_id __ns_newmsg_id +#define ns_newmsg_flag __ns_newmsg_flag +#define ns_newmsg_q __ns_newmsg_q +#define ns_newmsg_rr __ns_newmsg_rr +#define ns_newmsg_done __ns_newmsg_done +#define ns_rdata_unpack __ns_rdata_unpack +#define ns_rdata_equal __ns_rdata_equal +#define ns_rdata_refers __ns_rdata_refers __BEGIN_DECLS int ns_msg_getflag(ns_msg, int); @@ -518,6 +589,7 @@ void ns_put32(u_long, u_char *); int ns_initparse(const u_char *, int, ns_msg *); int ns_skiprr(const u_char *, const u_char *, ns_sect, int); int ns_parserr(ns_msg *, ns_sect, int, ns_rr *); +int ns_parserr2(ns_msg *, ns_sect, int, ns_rr2 *); int ns_sprintrr(const ns_msg *, const ns_rr *, const char *, const char *, char *, size_t); int ns_sprintrrf(const u_char *, size_t, const char *, @@ -532,8 +604,12 @@ u_int32_t ns_datetosecs(const char *cp, int ns_name_ntol(const u_char *, u_char *, size_t); int ns_name_ntop(const u_char *, char *, size_t); int ns_name_pton(const char *, u_char *, size_t); +int ns_name_pton2(const char *, u_char *, size_t, size_t *); int ns_name_unpack(const u_char *, const u_char *, const u_char *, u_char *, size_t); +int ns_name_unpack2(const u_char *, const u_char *, + const u_char *, u_char *, size_t, + size_t *); int ns_name_pack(const u_char *, u_char *, int, const u_char **, const u_char **); int ns_name_uncompress(const u_char *, const u_char *, @@ -543,6 +619,11 @@ int ns_name_compress(const char *, u_ch int ns_name_skip(const u_char **, const u_char *); void ns_name_rollback(const u_char *, const u_char **, const u_char **); +ssize_t ns_name_length(ns_nname_ct, size_t); +int ns_name_eq(ns_nname_ct, size_t, ns_nname_ct, size_t); +int ns_name_owned(ns_namemap_ct, int, ns_namemap_ct, int); +int ns_name_map(ns_nname_ct, size_t, ns_namemap_t, int); +int ns_name_labels(ns_nname_ct, size_t); #if 0 int ns_sign(u_char *, int *, int, int, void *, const u_char *, int, u_char *, int *, time_t); @@ -570,6 +651,25 @@ int ns_subdomain(const char *, const ch #endif int ns_makecanon(const char *, char *, size_t); int ns_samename(const char *, const char *); +int ns_newmsg_init(u_char *buffer, size_t bufsiz, ns_newmsg *); +int ns_newmsg_copy(ns_newmsg *, ns_msg *); +void ns_newmsg_id(ns_newmsg *handle, u_int16_t id); +void ns_newmsg_flag(ns_newmsg *handle, ns_flag flag, u_int value); +int ns_newmsg_q(ns_newmsg *handle, ns_nname_ct qname, + ns_type qtype, ns_class qclass); +int ns_newmsg_rr(ns_newmsg *handle, ns_sect sect, + ns_nname_ct name, ns_type type, + ns_class rr_class, u_int32_t ttl, + u_int16_t rdlen, const u_char *rdata); +size_t ns_newmsg_done(ns_newmsg *handle); +ssize_t ns_rdata_unpack(const u_char *, const u_char *, ns_type, + const u_char *, size_t, u_char *, size_t); +int ns_rdata_equal(ns_type, + const u_char *, size_t, + const u_char *, size_t); +int ns_rdata_refers(ns_type, + const u_char *, size_t, + const u_char *); __END_DECLS #ifdef BIND_4_COMPAT Modified: head/include/arpa/nameser_compat.h ============================================================================== --- head/include/arpa/nameser_compat.h Tue Aug 12 12:26:12 2014 (r269866) +++ head/include/arpa/nameser_compat.h Tue Aug 12 12:36:06 2014 (r269867) @@ -28,7 +28,7 @@ /*% * from nameser.h 8.1 (Berkeley) 6/2/93 - * $Id: nameser_compat.h,v 1.5.18.3 2006/05/19 02:36:00 marka Exp $ + * $Id: nameser_compat.h,v 1.8 2006/05/19 02:33:40 marka Exp $ * $FreeBSD$ */ Modified: head/include/res_update.h ============================================================================== --- head/include/res_update.h Tue Aug 12 12:26:12 2014 (r269866) +++ head/include/res_update.h Tue Aug 12 12:36:06 2014 (r269867) @@ -16,7 +16,7 @@ */ /* - * $Id: res_update.h,v 1.2.18.1 2005/04/27 05:00:49 sra Exp $ + * $Id: res_update.h,v 1.3 2005/04/27 04:56:15 sra Exp $ * $FreeBSD$ */ Modified: head/include/resolv.h ============================================================================== --- head/include/resolv.h Tue Aug 12 12:26:12 2014 (r269866) +++ head/include/resolv.h Tue Aug 12 12:36:06 2014 (r269867) @@ -1,7 +1,24 @@ /* + * Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") + * Portions Copyright (C) 1995-2003 Internet Software Consortium. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, + * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +/* * Copyright (c) 1983, 1987, 1989 * The Regents of the University of California. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -13,7 +30,7 @@ * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -27,26 +44,9 @@ * SUCH DAMAGE. */ -/* - * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") - * Portions Copyright (c) 1996-1999 by Internet Software Consortium. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - /*% * @(#)resolv.h 8.1 (Berkeley) 6/2/93 - * $Id: resolv.h,v 1.19.18.4 2008/04/03 23:15:15 marka Exp $ + * $Id: resolv.h,v 1.30 2009/03/03 01:52:48 each Exp $ * $FreeBSD$ */ @@ -68,7 +68,7 @@ * is new enough to contain a certain feature. */ -#define __RES 20030124 +#define __RES 20090302 /*% * This used to be defined in res_query.c, now it's in herror.c. @@ -179,7 +179,7 @@ struct __res_state { u_int _pad; /*%< make _u 64 bit aligned */ union { /* On an 32-bit arch this means 512b total. */ - char pad[72 - 4*sizeof (int) - 2*sizeof (void *)]; + char pad[72 - 4*sizeof (int) - 3*sizeof (void *)]; struct { u_int16_t nscount; u_int16_t nstimes[MAXNS]; /*%< ms. */ @@ -187,6 +187,7 @@ struct __res_state { struct __res_state_ext *ext; /*%< extension for IPv6 */ } _ext; } _u; + u_char *_rnd; /*%< PRIVATE: random state */ }; typedef struct __res_state *res_state; @@ -320,7 +321,7 @@ __END_DECLS #if !defined(SHARED_LIBBIND) || defined(LIB) /* * If libbind is a shared object (well, DLL anyway) - * these externs break the linker when resolv.h is + * these externs break the linker when resolv.h is * included by a lib client (like named) * Make them go away if a client is including this * @@ -378,7 +379,9 @@ extern const struct res_sym __p_rcode_sy #define res_nisourserver __res_nisourserver #define res_ownok __res_ownok #define res_queriesmatch __res_queriesmatch +#define res_rndinit __res_rndinit #define res_randomid __res_randomid +#define res_nrandomid __res_nrandomid #define sym_ntop __sym_ntop #define sym_ntos __sym_ntos #define sym_ston __sym_ston @@ -441,7 +444,9 @@ int dn_count_labels(const char *); int dn_comp(const char *, u_char *, int, u_char **, u_char **); int dn_expand(const u_char *, const u_char *, const u_char *, char *, int); +void res_rndinit(res_state); u_int res_randomid(void); +u_int res_nrandomid(res_state); int res_nameinquery(const char *, int, int, const u_char *, const u_char *); int res_queriesmatch(const u_char *, const u_char *, Modified: head/lib/libc/include/isc/eventlib.h ============================================================================== --- head/lib/libc/include/isc/eventlib.h Tue Aug 12 12:26:12 2014 (r269866) +++ head/lib/libc/include/isc/eventlib.h Tue Aug 12 12:36:06 2014 (r269867) @@ -1,24 +1,24 @@ /* - * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") - * Copyright (c) 1995-1999 by Internet Software Consortium + * Copyright (C) 2004, 2005, 2008 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 1995-1999, 2001, 2003 Internet Software Consortium. * - * Permission to use, copy, modify, and distribute this software for any + * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * - * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, + * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. */ /* eventlib.h - exported interfaces for eventlib * vix 09sep95 [initial] * - * $Id: eventlib.h,v 1.3.18.3 2008/01/23 02:12:01 marka Exp $ + * $Id: eventlib.h,v 1.7 2008/11/14 02:36:51 marka Exp $ */ #ifndef _EVENTLIB_H Modified: head/lib/libc/include/isc/list.h ============================================================================== --- head/lib/libc/include/isc/list.h Tue Aug 12 12:26:12 2014 (r269866) +++ head/lib/libc/include/isc/list.h Tue Aug 12 12:36:06 2014 (r269867) @@ -38,7 +38,8 @@ } while (0) #define INIT_LINK(elt, link) \ INIT_LINK_TYPE(elt, link, void) -#define LINKED(elt, link) ((void *)((elt)->link.prev) != (void *)(-1)) +#define LINKED(elt, link) ((void *)((elt)->link.prev) != (void *)(-1) && \ + (void *)((elt)->link.next) != (void *)(-1)) #define HEAD(list) ((list).head) #define TAIL(list) ((list).tail) Modified: head/lib/libc/include/port_before.h ============================================================================== --- head/lib/libc/include/port_before.h Tue Aug 12 12:26:12 2014 (r269866) +++ head/lib/libc/include/port_before.h Tue Aug 12 12:36:06 2014 (r269867) @@ -6,6 +6,7 @@ #define _LIBC 1 #define DO_PTHREADS 1 #define USE_POLL 1 +#define HAVE_MD5 1 #define ISC_SOCKLEN_T socklen_t #define ISC_FORMAT_PRINTF(fmt, args) \ Modified: head/lib/libc/inet/inet_addr.c ============================================================================== --- head/lib/libc/inet/inet_addr.c Tue Aug 12 12:26:12 2014 (r269866) +++ head/lib/libc/inet/inet_addr.c Tue Aug 12 12:36:06 2014 (r269867) @@ -66,7 +66,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93"; -static const char rcsid[] = "$Id: inet_addr.c,v 1.4.18.1 2005/04/27 05:00:52 sra Exp $"; +static const char rcsid[] = "$Id: inet_addr.c,v 1.5 2005/04/27 04:56:19 sra Exp $"; #endif /* LIBC_SCCS and not lint */ #include __FBSDID("$FreeBSD$"); Modified: head/lib/libc/inet/inet_cidr_ntop.c ============================================================================== --- head/lib/libc/inet/inet_cidr_ntop.c Tue Aug 12 12:26:12 2014 (r269866) +++ head/lib/libc/inet/inet_cidr_ntop.c Tue Aug 12 12:36:06 2014 (r269867) @@ -16,8 +16,10 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: inet_cidr_ntop.c,v 1.4.18.3 2006/10/11 02:32:47 marka Exp $"; +static const char rcsid[] = "$Id: inet_cidr_ntop.c,v 1.7 2006/10/11 02:18:18 marka Exp $"; #endif +#include +__FBSDID("$FreeBSD$"); #include "port_before.h" Modified: head/lib/libc/inet/inet_cidr_pton.c ============================================================================== --- head/lib/libc/inet/inet_cidr_pton.c Tue Aug 12 12:26:12 2014 (r269866) +++ head/lib/libc/inet/inet_cidr_pton.c Tue Aug 12 12:36:06 2014 (r269867) @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: inet_cidr_pton.c,v 1.5.18.1 2005/04/27 05:00:53 sra Exp $"; +static const char rcsid[] = "$Id: inet_cidr_pton.c,v 1.6 2005/04/27 04:56:19 sra Exp $"; #endif #include __FBSDID("$FreeBSD$"); Modified: head/lib/libc/inet/inet_net_ntop.c ============================================================================== --- head/lib/libc/inet/inet_net_ntop.c Tue Aug 12 12:26:12 2014 (r269866) +++ head/lib/libc/inet/inet_net_ntop.c Tue Aug 12 12:36:06 2014 (r269867) @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: inet_net_ntop.c,v 1.3.18.2 2006/06/20 02:51:32 marka Exp $"; +static const char rcsid[] = "$Id: inet_net_ntop.c,v 1.5 2006/06/20 02:50:14 marka Exp $"; #endif #include __FBSDID("$FreeBSD$"); Modified: head/lib/libc/inet/inet_net_pton.c ============================================================================== --- head/lib/libc/inet/inet_net_pton.c Tue Aug 12 12:26:12 2014 (r269866) +++ head/lib/libc/inet/inet_net_pton.c Tue Aug 12 12:36:06 2014 (r269867) @@ -1,22 +1,22 @@ /* - * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") - * Copyright (c) 1996,1999 by Internet Software Consortium. + * Copyright (C) 2004, 2005, 2008 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 1996, 1998, 1999, 2001, 2003 Internet Software Consortium. * - * Permission to use, copy, modify, and distribute this software for any + * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * - * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, + * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: inet_net_pton.c,v 1.7.18.2 2008/08/26 04:42:43 marka Exp $"; +static const char rcsid[] = "$Id: inet_net_pton.c,v 1.10 2008/11/14 02:36:51 marka Exp $"; #endif #include __FBSDID("$FreeBSD$"); Modified: head/lib/libc/inet/inet_neta.c ============================================================================== --- head/lib/libc/inet/inet_neta.c Tue Aug 12 12:26:12 2014 (r269866) +++ head/lib/libc/inet/inet_neta.c Tue Aug 12 12:36:06 2014 (r269867) @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: inet_neta.c,v 1.2.18.1 2005/04/27 05:00:53 sra Exp $"; +static const char rcsid[] = "$Id: inet_neta.c,v 1.3 2005/04/27 04:56:20 sra Exp $"; #endif #include __FBSDID("$FreeBSD$"); Modified: head/lib/libc/inet/inet_ntoa.c ============================================================================== --- head/lib/libc/inet/inet_ntoa.c Tue Aug 12 12:26:12 2014 (r269866) +++ head/lib/libc/inet/inet_ntoa.c Tue Aug 12 12:36:06 2014 (r269867) @@ -29,7 +29,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)inet_ntoa.c 8.1 (Berkeley) 6/4/93"; -static const char rcsid[] = "$Id: inet_ntoa.c,v 1.1.352.1 2005/04/27 05:00:54 sra Exp $"; +static const char rcsid[] = "$Id: inet_ntoa.c,v 1.2 2005/04/27 04:56:21 sra Exp $"; #endif /* LIBC_SCCS and not lint */ #include __FBSDID("$FreeBSD$"); Modified: head/lib/libc/inet/inet_ntop.c ============================================================================== --- head/lib/libc/inet/inet_ntop.c Tue Aug 12 12:26:12 2014 (r269866) +++ head/lib/libc/inet/inet_ntop.c Tue Aug 12 12:36:06 2014 (r269867) @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: inet_ntop.c,v 1.3.18.2 2005/11/03 23:02:22 marka Exp $"; +static const char rcsid[] = "$Id: inet_ntop.c,v 1.5 2005/11/03 22:59:52 marka Exp $"; #endif /* LIBC_SCCS and not lint */ #include __FBSDID("$FreeBSD$"); Modified: head/lib/libc/inet/inet_pton.c ============================================================================== --- head/lib/libc/inet/inet_pton.c Tue Aug 12 12:26:12 2014 (r269866) +++ head/lib/libc/inet/inet_pton.c Tue Aug 12 12:36:06 2014 (r269867) @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: inet_pton.c,v 1.3.18.2 2005/07/28 07:38:07 marka Exp $"; +static const char rcsid[] = "$Id: inet_pton.c,v 1.5 2005/07/28 06:51:47 marka Exp $"; #endif /* LIBC_SCCS and not lint */ #include __FBSDID("$FreeBSD$"); Modified: head/lib/libc/inet/nsap_addr.c ============================================================================== --- head/lib/libc/inet/nsap_addr.c Tue Aug 12 12:26:12 2014 (r269866) +++ head/lib/libc/inet/nsap_addr.c Tue Aug 12 12:36:06 2014 (r269867) @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: nsap_addr.c,v 1.3.18.2 2005/07/28 07:38:08 marka Exp $"; +static const char rcsid[] = "$Id: nsap_addr.c,v 1.5 2005/07/28 06:51:48 marka Exp $"; #endif /* LIBC_SCCS and not lint */ #include __FBSDID("$FreeBSD$"); Modified: head/lib/libc/isc/ev_streams.c ============================================================================== --- head/lib/libc/isc/ev_streams.c Tue Aug 12 12:26:12 2014 (r269866) +++ head/lib/libc/isc/ev_streams.c Tue Aug 12 12:36:06 2014 (r269867) @@ -20,7 +20,7 @@ */ #if !defined(LINT) && !defined(CODECENTER) -static const char rcsid[] = "$Id: ev_streams.c,v 1.4.18.1 2005/04/27 05:01:06 sra Exp $"; +static const char rcsid[] = "$Id: ev_streams.c,v 1.5 2005/04/27 04:56:36 sra Exp $"; #endif #include __FBSDID("$FreeBSD$"); Modified: head/lib/libc/isc/ev_timers.c ============================================================================== --- head/lib/libc/isc/ev_timers.c Tue Aug 12 12:26:12 2014 (r269866) +++ head/lib/libc/isc/ev_timers.c Tue Aug 12 12:36:06 2014 (r269867) @@ -20,7 +20,7 @@ */ #if !defined(LINT) && !defined(CODECENTER) -static const char rcsid[] = "$Id: ev_timers.c,v 1.5.18.1 2005/04/27 05:01:06 sra Exp $"; +static const char rcsid[] = "$Id: ev_timers.c,v 1.6 2005/04/27 04:56:36 sra Exp $"; #endif #include __FBSDID("$FreeBSD$"); Modified: head/lib/libc/isc/eventlib_p.h ============================================================================== --- head/lib/libc/isc/eventlib_p.h Tue Aug 12 12:26:12 2014 (r269866) +++ head/lib/libc/isc/eventlib_p.h Tue Aug 12 12:36:06 2014 (r269867) @@ -19,7 +19,7 @@ * \brief private interfaces for eventlib * \author vix 09sep95 [initial] * - * $Id: eventlib_p.h,v 1.5.18.4 2006/03/10 00:20:08 marka Exp $ + * $Id: eventlib_p.h,v 1.9 2006/03/09 23:57:56 marka Exp $ * $FreeBSD$ */ Modified: head/lib/libc/nameser/Symbol.map ============================================================================== --- head/lib/libc/nameser/Symbol.map Tue Aug 12 12:26:12 2014 (r269866) +++ head/lib/libc/nameser/Symbol.map Tue Aug 12 12:36:06 2014 (r269867) @@ -29,3 +29,24 @@ FBSD_1.0 { __ns_format_ttl; __ns_parse_ttl; }; + +FBSD_1.4 { + __ns_parserr2; + __ns_name_pton2; + __ns_name_unpack2; + __ns_name_length; + __ns_name_eq; + __ns_name_owned; + __ns_name_map; + __ns_name_labels; + __ns_newmsg_init; + __ns_newmsg_copy; + __ns_newmsg_id; + __ns_newmsg_flag; + __ns_newmsg_q; + __ns_newmsg_rr; + __ns_newmsg_done; + __ns_rdata_unpack; + __ns_rdata_equal; + __ns_rdata_refers; +}; Modified: head/lib/libc/nameser/ns_name.c ============================================================================== --- head/lib/libc/nameser/ns_name.c Tue Aug 12 12:26:12 2014 (r269866) +++ head/lib/libc/nameser/ns_name.c Tue Aug 12 12:36:06 2014 (r269867) @@ -16,8 +16,10 @@ */ #ifndef lint -static const char rcsid[] = "$Id: ns_name.c,v 1.8.18.2 2005/04/27 05:01:08 sra Exp $"; +static const char rcsid[] = "$Id: ns_name.c,v 1.11 2009/01/23 19:59:16 each Exp $"; #endif +#include +__FBSDID("$FreeBSD$"); #include "port_before.h" @@ -121,7 +123,7 @@ ns_name_ntop(const u_char *src, char *ds } if ((l = labellen(cp - 1)) < 0) { errno = EMSGSIZE; /*%< XXX */ - return(-1); + return (-1); } if (dn + l >= eom) { errno = EMSGSIZE; @@ -133,12 +135,12 @@ ns_name_ntop(const u_char *src, char *ds if (n != DNS_LABELTYPE_BITSTRING) { /* XXX: labellen should reject this case */ errno = EINVAL; - return(-1); + return (-1); } if ((m = decode_bitstring(&cp, dn, eom)) < 0) { errno = EMSGSIZE; - return(-1); + return (-1); } dn += m; continue; @@ -197,10 +199,25 @@ ns_name_ntop(const u_char *src, char *ds * notes: *\li Enforces label and domain length limits. */ +int +ns_name_pton(const char *src, u_char *dst, size_t dstsiz) { + return (ns_name_pton2(src, dst, dstsiz, NULL)); +} +/* + * ns_name_pton2(src, dst, dstsiz, *dstlen) + * Convert a ascii string into an encoded domain name as per RFC1035. + * return: + * -1 if it fails + * 1 if string was fully qualified + * 0 is string was not fully qualified + * side effects: + * fills in *dstlen (if non-NULL) + * notes: + * Enforces label and domain length limits. + */ int -ns_name_pton(const char *src, u_char *dst, size_t dstsiz) -{ +ns_name_pton2(const char *src, u_char *dst, size_t dstsiz, size_t *dstlen) { u_char *label, *bp, *eom; int c, n, escaped, e = 0; char *cp; @@ -215,13 +232,13 @@ ns_name_pton(const char *src, u_char *ds if (c == '[') { /*%< start a bit string label */ if ((cp = strchr(src, ']')) == NULL) { errno = EINVAL; /*%< ??? */ - return(-1); + return (-1); } if ((e = encode_bitsring(&src, cp + 2, &label, &bp, eom)) != 0) { errno = e; - return(-1); + return (-1); } escaped = 0; label = bp++; @@ -229,7 +246,7 @@ ns_name_pton(const char *src, u_char *ds goto done; else if (c != '.') { errno = EINVAL; - return(-1); + return (-1); } continue; } @@ -281,6 +298,8 @@ ns_name_pton(const char *src, u_char *ds errno = EMSGSIZE; return (-1); } + if (dstlen != NULL) + *dstlen = (bp - dst); return (1); } if (c == 0 || *src == '.') { @@ -318,6 +337,8 @@ ns_name_pton(const char *src, u_char *ds errno = EMSGSIZE; return (-1); } + if (dstlen != NULL) + *dstlen = (bp - dst); return (0); } @@ -365,7 +386,7 @@ ns_name_ntol(const u_char *src, u_char * } for ((void)NULL; l > 0; l--) { c = *cp++; - if (isupper(c)) + if (isascii(c) && isupper(c)) *dn++ = tolower(c); else *dn++ = c; @@ -385,6 +406,21 @@ int ns_name_unpack(const u_char *msg, const u_char *eom, const u_char *src, u_char *dst, size_t dstsiz) { + return (ns_name_unpack2(msg, eom, src, dst, dstsiz, NULL)); +} + +/* + * ns_name_unpack2(msg, eom, src, dst, dstsiz, *dstlen) + * Unpack a domain name from a message, source may be compressed. + * return: + * -1 if it fails, or consumed octets if it succeeds. + * side effect: + * fills in *dstlen (if non-NULL). + */ +int +ns_name_unpack2(const u_char *msg, const u_char *eom, const u_char *src, + u_char *dst, size_t dstsiz, size_t *dstlen) +{ const u_char *srcp, *dstlim; u_char *dstp; int n, len, checked, l; @@ -407,7 +443,7 @@ ns_name_unpack(const u_char *msg, const /* Limit checks. */ if ((l = labellen(srcp - 1)) < 0) { errno = EMSGSIZE; - return(-1); + return (-1); } if (dstp + l + 1 >= dstlim || srcp + l >= eom) { errno = EMSGSIZE; @@ -449,7 +485,9 @@ ns_name_unpack(const u_char *msg, const return (-1); /*%< flag error */ } } - *dstp = '\0'; + *dstp++ = 0; + if (dstlen != NULL) + *dstlen = dstp - dst; if (len < 0) len = srcp - src; return (len); @@ -508,7 +546,7 @@ ns_name_pack(const u_char *src, u_char * } if ((l0 = labellen(srcp)) < 0) { errno = EINVAL; - return(-1); + return (-1); } l += l0 + 1; if (l > MAXCDNAME) { @@ -655,7 +693,7 @@ ns_name_skip(const u_char **ptrptr, cons case NS_TYPE_ELT: /*%< EDNS0 extended label */ if ((l = labellen(cp - 1)) < 0) { errno = EMSGSIZE; /*%< XXX */ - return(-1); + return (-1); } cp += l; continue; @@ -676,6 +714,150 @@ ns_name_skip(const u_char **ptrptr, cons return (0); } +/* Find the number of octets an nname takes up, including the root label. + * (This is basically ns_name_skip() without compression-pointer support.) + * ((NOTE: can only return zero if passed-in namesiz argument is zero.)) + */ +ssize_t +ns_name_length(ns_nname_ct nname, size_t namesiz) { + ns_nname_ct orig = nname; + u_int n; + + while (namesiz-- > 0 && (n = *nname++) != 0) { + if ((n & NS_CMPRSFLGS) != 0) { + errno = EISDIR; + return (-1); + } + if (n > namesiz) { + errno = EMSGSIZE; + return (-1); + } + nname += n; + namesiz -= n; + } + return (nname - orig); +} + +/* Compare two nname's for equality. Return -1 on error (setting errno). + */ +int +ns_name_eq(ns_nname_ct a, size_t as, ns_nname_ct b, size_t bs) { + ns_nname_ct ae = a + as, be = b + bs; + int ac, bc; + + while (ac = *a, bc = *b, ac != 0 && bc != 0) { + if ((ac & NS_CMPRSFLGS) != 0 || (bc & NS_CMPRSFLGS) != 0) { + errno = EISDIR; + return (-1); + } + if (a + ac >= ae || b + bc >= be) { + errno = EMSGSIZE; + return (-1); + } + if (ac != bc || strncasecmp((const char *) ++a, + (const char *) ++b, ac) != 0) + return (0); + a += ac, b += bc; + } + return (ac == 0 && bc == 0); +} + +/* Is domain "A" owned by (at or below) domain "B"? + */ +int +ns_name_owned(ns_namemap_ct a, int an, ns_namemap_ct b, int bn) { + /* If A is shorter, it cannot be owned by B. */ + if (an < bn) + return (0); + + /* If they are unequal before the length of the shorter, A cannot... */ + while (bn > 0) { + if (a->len != b->len || + strncasecmp((const char *) a->base, + (const char *) b->base, a->len) != 0) + return (0); + a++, an--; + b++, bn--; + } + + /* A might be longer or not, but either way, B owns it. */ + return (1); +} + +/* Build an array of tuples from an nname, top-down order. + * Return the number of tuples (labels) thus discovered. + */ +int +ns_name_map(ns_nname_ct nname, size_t namelen, ns_namemap_t map, int mapsize) { + u_int n; + int l; + + n = *nname++; + namelen--; + + /* Root zone? */ + if (n == 0) { + /* Extra data follows name? */ + if (namelen > 0) { + errno = EMSGSIZE; + return (-1); + } + return (0); + } + + /* Compression pointer? */ + if ((n & NS_CMPRSFLGS) != 0) { + errno = EISDIR; + return (-1); + } + + /* Label too long? */ + if (n > namelen) { + errno = EMSGSIZE; + return (-1); + } + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Aug 12 12:44:53 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 727B0FD6 for ; Tue, 12 Aug 2014 12:44:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48CA8292E for ; Tue, 12 Aug 2014 12:44:53 +0000 (UTC) Received: from gavin (uid 1136) (envelope-from gavin@FreeBSD.org) id 6a8b by svn.freebsd.org (DragonFly Mail Agent v0.9+); Tue, 12 Aug 2014 12:44:53 +0000 From: Gavin Atkinson Date: Tue, 12 Aug 2014 12:44:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269871 - head/share/man/man3 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53ea0c45.6a8b.75ce4698@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2014 12:44:53 -0000 Author: gavin Date: Tue Aug 12 12:44:52 2014 New Revision: 269871 URL: http://svnweb.freebsd.org/changeset/base/269871 Log: Clarify descriptions of pthread_cond_wait() and pthread_cond_timedwait() Requested by: Malcolm Douglas via freebsd-doc Reviewed by: jhb MFC after: 1 week Modified: head/share/man/man3/pthread.3 Modified: head/share/man/man3/pthread.3 ============================================================================== --- head/share/man/man3/pthread.3 Tue Aug 12 12:44:40 2014 (r269870) +++ head/share/man/man3/pthread.3 Tue Aug 12 12:44:52 2014 (r269871) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 8, 2010 +.Dd August 12, 2014 .Dt PTHREAD 3 .Os .Sh NAME @@ -344,13 +344,13 @@ Unblock at least one of the threads bloc .Fa "const struct timespec *abstime" .Fc .Xc -Wait no longer than the specified time for a condition -and lock the specified mutex. +Unlock the specified mutex, wait no longer than the specified time for +a condition, and then relock the mutex. .It Xo .Ft int .Fn pthread_cond_wait "pthread_cond_t *" "pthread_mutex_t *mutex" .Xc -Wait for a condition and lock the specified mutex. +Unlock the specified mutex, wait for a condition, and relock the mutex. .El .Ss Read/Write Lock Routines .Bl -tag -width indent From owner-svn-src-head@FreeBSD.ORG Tue Aug 12 13:09:32 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E7873B10 for ; Tue, 12 Aug 2014 13:09:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BDA352C61 for ; Tue, 12 Aug 2014 13:09:32 +0000 (UTC) Received: from ume (uid 812) (envelope-from ume@FreeBSD.org) id 6165 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Tue, 12 Aug 2014 13:09:32 +0000 From: Hajimu UMEMOTO Date: Tue, 12 Aug 2014 13:09:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269873 - head/lib/libc/nameser X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53ea120c.6165.1de1e179@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2014 13:09:33 -0000 Author: ume Date: Tue Aug 12 13:09:32 2014 New Revision: 269873 URL: http://svnweb.freebsd.org/changeset/base/269873 Log: Fix broken pointer overflow check ns_name_unpack() Many compilers may optimize away the overflow check `msg + l < msg', where `msg' is a pointer and `l' is an integer, because pointer overflow is undefined behavior in C. Use a safe precondition test `l >= eom - msg' instead. Reference: https://android-review.googlesource.com/#/c/50570/ Requested by: pfg Obtained from: NetBSD (CVS rev. 1.10) Modified: head/lib/libc/nameser/ns_name.c Directory Properties: head/lib/libc/ (props changed) Modified: head/lib/libc/nameser/ns_name.c ============================================================================== --- head/lib/libc/nameser/ns_name.c Tue Aug 12 12:45:30 2014 (r269872) +++ head/lib/libc/nameser/ns_name.c Tue Aug 12 13:09:32 2014 (r269873) @@ -463,11 +463,12 @@ ns_name_unpack2(const u_char *msg, const } if (len < 0) len = srcp - src + 1; - srcp = msg + (((n & 0x3f) << 8) | (*srcp & 0xff)); - if (srcp < msg || srcp >= eom) { /*%< Out of range. */ + l = ((n & 0x3f) << 8) | (*srcp & 0xff); + if (l >= eom - msg) { /*%< Out of range. */ errno = EMSGSIZE; return (-1); } + srcp = msg + l; checked += 2; /* * Check for loops in the compressed name; From owner-svn-src-head@FreeBSD.ORG Tue Aug 12 13:13:12 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB36BCA5 for ; Tue, 12 Aug 2014 13:13:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C99B02D51 for ; Tue, 12 Aug 2014 13:13:12 +0000 (UTC) Received: from tuexen (uid 1198) (envelope-from tuexen@FreeBSD.org) id 64cc by svn.freebsd.org (DragonFly Mail Agent v0.9+); Tue, 12 Aug 2014 13:13:12 +0000 From: Michael Tuexen Date: Tue, 12 Aug 2014 13:13:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269874 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53ea12e8.64cc.2ba9bcf3@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2014 13:13:13 -0000 Author: tuexen Date: Tue Aug 12 13:13:11 2014 New Revision: 269874 URL: http://svnweb.freebsd.org/changeset/base/269874 Log: Change SCTP sysctl from auth_disable to auth_enable. This is consistent with other similar sysctl variable used in SCTP. Modified: head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_sysctl.c head/sys/netinet/sctp_sysctl.h Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Tue Aug 12 13:09:32 2014 (r269873) +++ head/sys/netinet/sctp_pcb.c Tue Aug 12 13:13:11 2014 (r269874) @@ -2485,11 +2485,7 @@ sctp_inpcb_alloc(struct socket *so, uint inp->sctp_cmt_on_off = SCTP_BASE_SYSCTL(sctp_cmt_on_off); inp->ecn_supported = (uint8_t) SCTP_BASE_SYSCTL(sctp_ecn_enable); inp->prsctp_supported = (uint8_t) SCTP_BASE_SYSCTL(sctp_pr_enable); - if (SCTP_BASE_SYSCTL(sctp_auth_disable)) { - inp->auth_supported = 0; - } else { - inp->auth_supported = 1; - } + inp->auth_supported = (uint8_t) SCTP_BASE_SYSCTL(sctp_auth_enable); inp->asconf_supported = (uint8_t) SCTP_BASE_SYSCTL(sctp_asconf_enable); inp->reconfig_supported = (uint8_t) SCTP_BASE_SYSCTL(sctp_reconfig_enable); inp->nrsack_supported = (uint8_t) SCTP_BASE_SYSCTL(sctp_nrsack_enable); Modified: head/sys/netinet/sctp_sysctl.c ============================================================================== --- head/sys/netinet/sctp_sysctl.c Tue Aug 12 13:09:32 2014 (r269873) +++ head/sys/netinet/sctp_sysctl.c Tue Aug 12 13:13:11 2014 (r269874) @@ -55,7 +55,7 @@ sctp_init_sysctls() SCTP_BASE_SYSCTL(sctp_multiple_asconfs) = SCTPCTL_MULTIPLEASCONFS_DEFAULT; SCTP_BASE_SYSCTL(sctp_ecn_enable) = SCTPCTL_ECN_ENABLE_DEFAULT; SCTP_BASE_SYSCTL(sctp_pr_enable) = SCTPCTL_PR_ENABLE_DEFAULT; - SCTP_BASE_SYSCTL(sctp_auth_disable) = SCTPCTL_AUTH_DISABLE_DEFAULT; + SCTP_BASE_SYSCTL(sctp_auth_enable) = SCTPCTL_AUTH_ENABLE_DEFAULT; SCTP_BASE_SYSCTL(sctp_asconf_enable) = SCTPCTL_ASCONF_ENABLE_DEFAULT; SCTP_BASE_SYSCTL(sctp_reconfig_enable) = SCTPCTL_RECONFIG_ENABLE_DEFAULT; SCTP_BASE_SYSCTL(sctp_nrsack_enable) = SCTPCTL_NRSACK_ENABLE_DEFAULT; @@ -684,19 +684,19 @@ sysctl_sctp_auth_check(SYSCTL_HANDLER_AR error = sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, req); if (error == 0) { - if (SCTP_BASE_SYSCTL(sctp_auth_disable) < SCTPCTL_AUTH_DISABLE_MIN) { - SCTP_BASE_SYSCTL(sctp_auth_disable) = SCTPCTL_AUTH_DISABLE_MIN; + if (SCTP_BASE_SYSCTL(sctp_auth_enable) < SCTPCTL_AUTH_ENABLE_MIN) { + SCTP_BASE_SYSCTL(sctp_auth_enable) = SCTPCTL_AUTH_ENABLE_MIN; } - if (SCTP_BASE_SYSCTL(sctp_auth_disable) > SCTPCTL_AUTH_DISABLE_MAX) { - SCTP_BASE_SYSCTL(sctp_auth_disable) = SCTPCTL_AUTH_DISABLE_MAX; + if (SCTP_BASE_SYSCTL(sctp_auth_enable) > SCTPCTL_AUTH_ENABLE_MAX) { + SCTP_BASE_SYSCTL(sctp_auth_enable) = SCTPCTL_AUTH_ENABLE_MAX; } - if ((SCTP_BASE_SYSCTL(sctp_auth_disable) == 1) && + if ((SCTP_BASE_SYSCTL(sctp_auth_enable) == 0) && (SCTP_BASE_SYSCTL(sctp_asconf_enable) == 1)) { /* * You can't disable AUTH with disabling ASCONF * first */ - SCTP_BASE_SYSCTL(sctp_auth_disable) = 0; + SCTP_BASE_SYSCTL(sctp_auth_enable) = 1; } } return (error); @@ -716,7 +716,7 @@ sysctl_sctp_asconf_check(SYSCTL_HANDLER_ SCTP_BASE_SYSCTL(sctp_asconf_enable) = SCTPCTL_ASCONF_ENABLE_MAX; } if ((SCTP_BASE_SYSCTL(sctp_asconf_enable) == 1) && - (SCTP_BASE_SYSCTL(sctp_auth_disable) == 1)) { + (SCTP_BASE_SYSCTL(sctp_auth_enable) == 0)) { /* * You can't enable ASCONF without enabling AUTH * first @@ -919,9 +919,9 @@ SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUT &SCTP_BASE_SYSCTL(sctp_pr_enable), 0, sysctl_sctp_check, "IU", SCTPCTL_PR_ENABLE_DESC); -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, auth_disable, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_auth_disable), 0, sysctl_sctp_auth_check, "IU", - SCTPCTL_AUTH_DISABLE_DESC); +SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, auth_enable, CTLTYPE_UINT | CTLFLAG_RW, + &SCTP_BASE_SYSCTL(sctp_auth_enable), 0, sysctl_sctp_auth_check, "IU", + SCTPCTL_AUTH_ENABLE_DESC); SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, asconf_enable, CTLTYPE_UINT | CTLFLAG_RW, &SCTP_BASE_SYSCTL(sctp_asconf_enable), 0, sysctl_sctp_asconf_check, "IU", Modified: head/sys/netinet/sctp_sysctl.h ============================================================================== --- head/sys/netinet/sctp_sysctl.h Tue Aug 12 13:09:32 2014 (r269873) +++ head/sys/netinet/sctp_sysctl.h Tue Aug 12 13:13:11 2014 (r269874) @@ -46,7 +46,7 @@ struct sctp_sysctl { uint32_t sctp_multiple_asconfs; uint32_t sctp_ecn_enable; uint32_t sctp_pr_enable; - uint32_t sctp_auth_disable; + uint32_t sctp_auth_enable; uint32_t sctp_asconf_enable; uint32_t sctp_reconfig_enable; uint32_t sctp_nrsack_enable; @@ -163,11 +163,11 @@ struct sctp_sysctl { #define SCTPCTL_PR_ENABLE_MAX 1 #define SCTPCTL_PR_ENABLE_DEFAULT 1 -/* auth_disable: Disable SCTP AUTH function */ -#define SCTPCTL_AUTH_DISABLE_DESC "Disable SCTP AUTH function" -#define SCTPCTL_AUTH_DISABLE_MIN 0 -#define SCTPCTL_AUTH_DISABLE_MAX 1 -#define SCTPCTL_AUTH_DISABLE_DEFAULT 0 +/* auth_enable: Enable SCTP AUTH function */ +#define SCTPCTL_AUTH_ENABLE_DESC "Enable SCTP AUTH function" +#define SCTPCTL_AUTH_ENABLE_MIN 0 +#define SCTPCTL_AUTH_ENABLE_MAX 1 +#define SCTPCTL_AUTH_ENABLE_DEFAULT 1 /* asconf_enable: Enable SCTP ASCONF */ #define SCTPCTL_ASCONF_ENABLE_DESC "Enable SCTP ASCONF" From owner-svn-src-head@FreeBSD.ORG Tue Aug 12 13:28:47 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C4BBFD for ; Tue, 12 Aug 2014 13:28:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 026EA2EB4 for ; Tue, 12 Aug 2014 13:28:47 +0000 (UTC) Received: from ache (uid 542) (envelope-from ache@FreeBSD.org) id 6811 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Tue, 12 Aug 2014 13:28:46 +0000 From: Andrey A. Chernov Date: Tue, 12 Aug 2014 13:28:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269875 - head/lib/libpam/modules/pam_opie X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53ea168e.6811.1ab9cea0@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2014 13:28:47 -0000 Author: ache Date: Tue Aug 12 13:28:46 2014 New Revision: 269875 URL: http://svnweb.freebsd.org/changeset/base/269875 Log: According to opie code and even direct mention in opie(4) challenge buffer size must be OPIE_CHALLENGE_MAX + 1, not OPIE_CHALLENGE_MAX Reviewed by: des MFC after: 1 week Modified: head/lib/libpam/modules/pam_opie/pam_opie.c Modified: head/lib/libpam/modules/pam_opie/pam_opie.c ============================================================================== --- head/lib/libpam/modules/pam_opie/pam_opie.c Tue Aug 12 13:13:11 2014 (r269874) +++ head/lib/libpam/modules/pam_opie/pam_opie.c Tue Aug 12 13:28:46 2014 (r269875) @@ -62,7 +62,7 @@ pam_sm_authenticate(pam_handle_t *pamh, struct passwd *pwd; int retval, i; const char *(promptstr[]) = { "%s\nPassword: ", "%s\nPassword [echo on]: "}; - char challenge[OPIE_CHALLENGE_MAX]; + char challenge[OPIE_CHALLENGE_MAX + 1]; char principal[OPIE_PRINCIPAL_MAX]; const char *user; char *response; From owner-svn-src-head@FreeBSD.ORG Tue Aug 12 14:37:34 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1984C8BD for ; Tue, 12 Aug 2014 14:37:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E3349283E for ; Tue, 12 Aug 2014 14:37:33 +0000 (UTC) Received: from dvl (uid 1162) (envelope-from dvl@FreeBSD.org) id 6f1a by svn.freebsd.org (DragonFly Mail Agent v0.9+); Tue, 12 Aug 2014 14:37:33 +0000 From: Dan Langille Date: Tue, 12 Aug 2014 14:37:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269878 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53ea26ad.6f1a.1cbf450d@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2014 14:37:34 -0000 Author: dvl (ports committer) Date: Tue Aug 12 14:37:33 2014 New Revision: 269878 URL: http://svnweb.freebsd.org/changeset/base/269878 Log: Add Dan Langille (myself) to committers-ports.dot file with mat and wg as mentors. Approved by: wg (mentor) Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Tue Aug 12 14:19:45 2014 (r269877) +++ head/share/misc/committers-ports.dot Tue Aug 12 14:37:33 2014 (r269878) @@ -86,6 +86,7 @@ delphij [label="Xin Li\ndelphij@FreeBSD. demon [label="Dmitry Sivachenko\ndemon@FreeBSD.org\n2000/11/13"] dhn [label="Dennis Herrmann\ndhn@FreeBSD.org\n2009/03/03"] dryice [label="Dryice Dong Liu\ndryice@FreeBSD.org\n2006/12/25"] +dvl [label="Dan Langille\ndvl@FreeBSD.org\n2014/08/10"] eadler [label="Eitan Adler\neadler@FreeBSD.org\n2011/08/17"] edwin [label="Edwin Groothuis\nedwin@FreeBSD.org\n2002/10/22"] ehaupt [label="Emanuel Haupt\nehaupt@FreeBSD.org\n2005/10/03"] @@ -424,6 +425,7 @@ makc -> jhale makc -> rakuco mat -> bmah +mat -> dvl mat -> thierry mezz -> tmclaugh @@ -558,6 +560,7 @@ wen -> pawel wg -> alexey wg -> danilo +wg -> dvl wg -> nemysis will -> lioux From owner-svn-src-head@FreeBSD.ORG Tue Aug 12 16:51:38 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 92D6DE0C for ; Tue, 12 Aug 2014 16:51:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 706392A6D for ; Tue, 12 Aug 2014 16:51:38 +0000 (UTC) Received: from marck (uid 1030) (envelope-from marck@FreeBSD.org) id 60c6 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Tue, 12 Aug 2014 16:51:38 +0000 From: Dmitry Morozovsky Date: Tue, 12 Aug 2014 16:51:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269882 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53ea461a.60c6.292325be@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2014 16:51:38 -0000 Author: marck (doc committer) Date: Tue Aug 12 16:51:37 2014 New Revision: 269882 URL: http://svnweb.freebsd.org/changeset/base/269882 Log: (belatedly) Document FreeBSD 9.3-R MFC after: 1 week M misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Tue Aug 12 16:08:13 2014 (r269881) +++ head/share/misc/bsd-family-tree Tue Aug 12 16:51:37 2014 (r269882) @@ -291,21 +291,21 @@ FreeBSD 5.2 | | | | | | | | | | FreeBSD | | NetBSD 6.1.2 | | | 9.2 Mac OS X | | | | - | 10.9 | | OpenBSD 5.4 | - | | | | | DragonFly 3.6.0 - | | | | | | - *--FreeBSD | | NetBSD 6.1.3 | | - | 10.0 | | | | | - | | | | | DragonFly 3.6.1 - | | | | | | - | | | | | | - | | | | | DragonFly 3.6.2 - | | | NetBSD 6.1.4 | | - | | | | | - | | | OpenBSD 5.5 | - | | | | DragonFly 3.8.0 - | | | | | - | | | | | + | | 10.9 | | OpenBSD 5.4 | + | `-----. | | | | DragonFly 3.6.0 + | \ | | | | | + *--FreeBSD | | | NetBSD 6.1.3 | | + | 10.0 | | | | | | + | | | | | | DragonFly 3.6.1 + | | | | | | | + | | | | | | | + | | | | | | DragonFly 3.6.2 + | | | | NetBSD 6.1.4 | | + | | | | | | + | | | | OpenBSD 5.5 | + | | | | | DragonFly 3.8.0 + | FreeBSD | | | | + | 9.3 | | | | | | | | | | | | | | | | | | | @@ -640,6 +640,7 @@ NetBSD 6.0.5 2014-04-19 [NDB] NetBSD 6.1.4 2014-04-19 [NDB] OpenBSD 5.5 2014-05-01 [OBD] DragonFly 3.8.0 2014-06-04 [DFB] +FreeBSD 9.3 2014-07-05 [FBD] Bibliography ------------------------ From owner-svn-src-head@FreeBSD.ORG Tue Aug 12 18:10:27 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 749113FE for ; Tue, 12 Aug 2014 18:10:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 073FD3598 for ; Tue, 12 Aug 2014 17:51:27 +0000 (UTC) Received: from ngie (uid 1347) (envelope-from ngie@FreeBSD.org) id 6328 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Tue, 12 Aug 2014 17:51:26 +0000 From: Garrett Cooper Date: Tue, 12 Aug 2014 17:51:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269884 - in head: tools/build/mk usr.bin/yacc/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53ea541e.6328.217eee9b@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2014 18:10:27 -0000 Author: ngie Date: Tue Aug 12 17:51:26 2014 New Revision: 269884 URL: http://svnweb.freebsd.org/changeset/base/269884 Log: Complete the usr.bin/yacc kyua integration work I originally submitted via r268811 - Install the Kyuafile by adding FILES to FILESGROUPS - Run the testcases with an unprivileged user Some of the testcases depend upon behavior that's broken when run as root on FreeBSD because of how permissions are treated with access(2) vs eaccess(2), open(2), etc - Simplify the test driver to just inspect the exit code from run_test because it now exits with 0 if successful and exits with !0 if unsuccessful - Don't do ad hoc temporary directory creation/deletion; let Kyua handle that - Add entries for files removed in r268811 to OptionalObsoleteFiles.inc PR: 191020 X-MFC with: r268811 Approved by: jmmv (mentor) Reviewed by: bapt Sponsored by: EMC / Isilon Storage Division Modified: head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.bin/yacc/tests/Makefile head/usr.bin/yacc/tests/yacc_tests.sh Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Tue Aug 12 17:03:13 2014 (r269883) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Tue Aug 12 17:51:26 2014 (r269884) @@ -4575,6 +4575,24 @@ OLD_DIRS+=usr/tests/usr.bin/make/archive OLD_DIRS+=usr/tests/usr.bin/make/archives/fmt_44bsd OLD_DIRS+=usr/tests/usr.bin/make/archives OLD_DIRS+=usr/tests/usr.bin/make +OLD_FILES+=usr/tests/usr.bin/yacc/legacy_test +OLD_FILES+=usr/tests/usr.bin/yacc/regress.00.out +OLD_FILES+=usr/tests/usr.bin/yacc/regress.01.out +OLD_FILES+=usr/tests/usr.bin/yacc/regress.02.out +OLD_FILES+=usr/tests/usr.bin/yacc/regress.03.out +OLD_FILES+=usr/tests/usr.bin/yacc/regress.04.out +OLD_FILES+=usr/tests/usr.bin/yacc/regress.05.out +OLD_FILES+=usr/tests/usr.bin/yacc/regress.06.out +OLD_FILES+=usr/tests/usr.bin/yacc/regress.07.out +OLD_FILES+=usr/tests/usr.bin/yacc/regress.08.out +OLD_FILES+=usr/tests/usr.bin/yacc/regress.09.out +OLD_FILES+=usr/tests/usr.bin/yacc/regress.10.out +OLD_FILES+=usr/tests/usr.bin/yacc/regress.11.out +OLD_FILES+=usr/tests/usr.bin/yacc/regress.12.out +OLD_FILES+=usr/tests/usr.bin/yacc/regress.13.out +OLD_FILES+=usr/tests/usr.bin/yacc/regress.14.out +OLD_FILES+=usr/tests/usr.bin/yacc/regress.sh +OLD_FILES+=usr/tests/usr.bin/yacc/undefined.y .endif .else # ATF libraries. Modified: head/usr.bin/yacc/tests/Makefile ============================================================================== --- head/usr.bin/yacc/tests/Makefile Tue Aug 12 17:03:13 2014 (r269883) +++ head/usr.bin/yacc/tests/Makefile Tue Aug 12 17:51:26 2014 (r269884) @@ -9,11 +9,15 @@ TEST_DIR= ${.CURDIR}/../../../contrib/by TESTSDIR= ${TESTSBASE}/usr.bin/yacc PLAIN_TESTS_SH= yacc_tests +# NOTE: due to caveats with how permissions are handled on FreeBSD +# with root, this must be run as a non-privileged user; otherwise +# the testcases will fail unexpectedly. +TEST_METADATA.yacc_tests+= required_user="unprivileged" SCRIPTS= run_test SCRIPTSDIR= ${TESTSDIR} -FILESGROUPS= FILEStest FILEStest_yacc +FILESGROUPS= FILES FILEStest FILEStest_yacc FILEStestDIR= ${TESTSDIR} @@ -245,36 +249,30 @@ FILEStest_yacc+= help.error FILEStest_yacc+= help.output FILEStest_yacc+= no_b_opt.error FILEStest_yacc+= no_b_opt.output -# XXX: expected: `f - cannot open "nosuchfile.c"; gets -# `e - line 0 of "nosuchfile.y", unexpected end-of-file`. -#FILEStest_yacc+= no_b_opt1.error -#FILEStest_yacc+= no_b_opt1.output -#FILEStest_yacc+= no_code_c.error -#FILEStest_yacc+= no_code_c.output -#FILEStest_yacc+= no_defines.error -#FILEStest_yacc+= no_defines.output -#FILEStest_yacc+= no_graph.error -#FILEStest_yacc+= no_graph.output -#FILEStest_yacc+= no_include.error -#FILEStest_yacc+= no_include.output +FILEStest_yacc+= no_b_opt1.error +FILEStest_yacc+= no_b_opt1.output +FILEStest_yacc+= no_code_c.error +FILEStest_yacc+= no_code_c.output +FILEStest_yacc+= no_defines.error +FILEStest_yacc+= no_defines.output +FILEStest_yacc+= no_graph.error +FILEStest_yacc+= no_graph.output +FILEStest_yacc+= no_include.error +FILEStest_yacc+= no_include.output FILEStest_yacc+= no_opts.error FILEStest_yacc+= no_opts.output -# XXX: expected: `f - cannot open "nosuchfile.c"; gets -# `e - line 0 of "nosuchfile.y", unexpected end-of-file`. -#FILEStest_yacc+= no_output.error -#FILEStest_yacc+= no_output.output -#FILEStest_yacc+= no_output1.error -#FILEStest_yacc+= no_output1.output +FILEStest_yacc+= no_output.error +FILEStest_yacc+= no_output.output +FILEStest_yacc+= no_output1.error +FILEStest_yacc+= no_output1.output FILEStest_yacc+= no_output2.error FILEStest_yacc+= no_output2.output FILEStest_yacc+= no_p_opt.error FILEStest_yacc+= no_p_opt.output -# XXX: expected: `f - cannot open "nosuchfile.c"; gets -# `e - line 0 of "nosuchfile.y", unexpected end-of-file`. -#FILEStest_yacc+= no_p_opt1.error -#FILEStest_yacc+= no_p_opt1.output -#FILEStest_yacc+= no_verbose.error -#FILEStest_yacc+= no_verbose.output +FILEStest_yacc+= no_p_opt1.error +FILEStest_yacc+= no_p_opt1.output +FILEStest_yacc+= no_verbose.error +FILEStest_yacc+= no_verbose.output FILEStest_yacc+= nostdin.error FILEStest_yacc+= nostdin.output FILEStest_yacc+= ok_syntax1.error Modified: head/usr.bin/yacc/tests/yacc_tests.sh ============================================================================== --- head/usr.bin/yacc/tests/yacc_tests.sh Tue Aug 12 17:03:13 2014 (r269883) +++ head/usr.bin/yacc/tests/yacc_tests.sh Tue Aug 12 17:51:26 2014 (r269884) @@ -3,22 +3,15 @@ set -e -cd $(dirname $0) +# Setup the environment for run_test +# - run_test looks for `#define YYBTYACC` in ../config.h +# - run_test assumes a yacc binary exists in ../yacc instead of running "yacc" +# - run_test spams the test dir with files (polluting subsequent test runs), +# so it's better to copy all the files to a temporary directory created by +# kyua +echo > "./config.h" +mkdir "test" +cp -Rf "$(dirname "$0")"/* "test" +cp -p /usr/bin/yacc ./yacc -TMPDIR=$(mktemp -d /tmp/tmp.XXXXXXXX) -TEST_DIR="$TMPDIR/test" -trap "cd /; rm -Rf $TMPDIR" EXIT INT TERM - -# Setup the environment for run_test.sh -mkdir -p "$TEST_DIR" -cp -Rf * "$TEST_DIR/." -echo > "$TMPDIR/config.h" -ln /usr/bin/yacc $TMPDIR/yacc - -log=$TMPDIR/run_test.log -(cd $TEST_DIR && ./run_test 2>&1 && : > run_test.ok) | tee $log -if [ -f run_test.ok ] && ! egrep "^...(diff|not found)[^\*]+$" $log; then - exit 0 -else - exit 1 -fi +cd "test" && ./run_test From owner-svn-src-head@FreeBSD.ORG Tue Aug 12 18:22:58 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 002F8BF2 for ; Tue, 12 Aug 2014 18:22:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA4CA3C7B for ; Tue, 12 Aug 2014 18:22:57 +0000 (UTC) Received: from jhb (uid 793) (envelope-from jhb@FreeBSD.org) id 6268 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Tue, 12 Aug 2014 18:22:57 +0000 From: John Baldwin Date: Tue, 12 Aug 2014 18:22:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269887 - head/sys/i386/acpica X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53ea5b81.6268.53f25d4c@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2014 18:22:58 -0000 Author: jhb Date: Tue Aug 12 18:22:57 2014 New Revision: 269887 URL: http://svnweb.freebsd.org/changeset/base/269887 Log: Correct a comment brought over from amd64. i386 doesn't use long mode. Modified: head/sys/i386/acpica/acpi_wakecode.S Modified: head/sys/i386/acpica/acpi_wakecode.S ============================================================================== --- head/sys/i386/acpica/acpi_wakecode.S Tue Aug 12 18:02:10 2014 (r269886) +++ head/sys/i386/acpica/acpi_wakecode.S Tue Aug 12 18:22:57 2014 (r269887) @@ -151,14 +151,7 @@ wakeup_32: movl wakeup_cr3 - wakeup_start(%ebx), %eax mov %eax, %cr3 - /* - * Finally, switch to long bit mode by enabling paging. We have - * to be very careful here because all the segmentation disappears - * out from underneath us. The spec says we can depend on the - * subsequent pipelined branch to execute, but *only if* everthing - * is still identity mapped. If any mappings change, the pipeline - * will flush. - */ + /* Enable paging. */ mov %cr0, %eax orl $CR0_PG, %eax mov %eax, %cr0 From owner-svn-src-head@FreeBSD.ORG Tue Aug 12 19:37:50 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B9471F1 for ; Tue, 12 Aug 2014 19:37:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2675E25EA for ; Tue, 12 Aug 2014 19:37:50 +0000 (UTC) Received: from gjb (uid 1237) (envelope-from gjb@FreeBSD.org) id 6e82 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Tue, 12 Aug 2014 19:37:50 +0000 From: Glen Barber Date: Tue, 12 Aug 2014 19:37:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269888 - head/sbin/ifconfig X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53ea6d0e.6e82.5981b44f@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2014 19:37:50 -0000 Author: gjb Date: Tue Aug 12 19:37:49 2014 New Revision: 269888 URL: http://svnweb.freebsd.org/changeset/base/269888 Log: Fix a typo in a comment: s/interprete/interpret/ Submitted by: Sam Fourman Jr. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/sbin/ifconfig/ifconfig.c Modified: head/sbin/ifconfig/ifconfig.c ============================================================================== --- head/sbin/ifconfig/ifconfig.c Tue Aug 12 18:22:57 2014 (r269887) +++ head/sbin/ifconfig/ifconfig.c Tue Aug 12 19:37:49 2014 (r269888) @@ -78,7 +78,7 @@ static const char rcsid[] = /* * Since "struct ifreq" is composed of various union members, callers - * should pay special attention to interprete the value. + * should pay special attention to interpret the value. * (.e.g. little/big endian difference in the structure.) */ struct ifreq ifr; From owner-svn-src-head@FreeBSD.ORG Tue Aug 12 20:29:26 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6EDB3A94 for ; Tue, 12 Aug 2014 20:29:26 +0000 (UTC) Received: from nm22-vm1.bullet.mail.bf1.yahoo.com (nm22-vm1.bullet.mail.bf1.yahoo.com [98.139.212.127]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 035382D5F for ; Tue, 12 Aug 2014 20:29:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1407875358; bh=zh8OwqYvmarQkC6zdvKCeZ5YG/0rMcT84pLElNbjuSo=; h=Received:Received:Received:X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id:References:To:X-Mailer; b=qORS+HAYb++XGrkjjw4PPsWrV2B/H4I3fJejK0jV7DNLx514P81js2nv6IEph9ddbfIQ2i6LsHK1JS0OYTRFF+SfLmQRCUiHae35jnA2c5GCUOxj1uFJ9jGqER7W9ReqwjTN7ya8LUYQE9buYnzG9haH86JjQWu6aEp1VZX7qtGCovx/We+jtMrQwDe/0psyjXHMaiN+EBRfXS9s/KvLSLtNKei9mWfvU147wR6J/dMitiVJWMLXKYqSshdzyCExNRbQ1yWaXgl/rLgOcI7sJmIBcbn7v/gu4apQ8IlV/aqM9V079Y8exgvAvH+yssTYy/pzjLjmpoOoYy0iXdMa5g== DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s2048; d=yahoo.com; b=pEqz0s8QUEwneHW8oxJZ0eSHTsM77U5PeAUXC+SfZ4VknhZ5DAfj9bsGB3S1U4ENfi87FzfnLvcowOXYHJOzy/OdNISeEaLErq7CHVQ4UmDE0tLN180HtJ9tyEymvFu6Dk9M3UTAC8VKDNXEm67FPkqcy41DY3eShyQwOoS2EJd+dbgqFyRzuXZXViFCaoW1sU3vzY/ir6QTdxd7DAjHRYsgUhqSSUr12wYVRy8eZoy03fSmOGjKb+rK4DSJhT2YQ7CSRb963fOwpoYR9Ws1vj7Gr3iAdX6Q76fdUwJMVp1i5hgKNl0hvePIXru2A63VfLvhV2nIeQj3sjZi8SbB9g==; Received: from [98.139.212.150] by nm22.bullet.mail.bf1.yahoo.com with NNFMP; 12 Aug 2014 20:29:18 -0000 Received: from [68.142.230.64] by tm7.bullet.mail.bf1.yahoo.com with NNFMP; 12 Aug 2014 20:29:18 -0000 Received: from [127.0.0.1] by smtp221.mail.bf1.yahoo.com with NNFMP; 12 Aug 2014 20:29:18 -0000 X-Yahoo-Newman-Id: 624854.82764.bm@smtp221.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: Ijw7zOQVM1lIObjRQkW.Mkc4opgPgkehBpdpul7Tjf3Amxx k9Ds0e1VPaOW9XqC_ZF0iSQpWDW.fKHQ5qn6LvOgW4lhbpiQMet9ZpTtz5sN g9M83vdOtQVA3bErs2vgqoufOjqW3cA92qMp3Ji3UmpMevIY4fJbbGfTcuGg LQmtxrIRL_k3nVttcvkkPB6pu.lDJAbXr6QSCzREMwLCA6uFF0EeAgodoyZY V8q0NYh1Maztwin8p5ry3t3WMV7HrllK.7MPIXe833QOh8LVy7B5d0gRAGb6 D8WWf_VtDQat76jWC48M2GrxO3Rx8tjzVqa1VORhDQXtQH_tfFeV7RbGhjWD 3S5cyMLJ4HFcbJNdsmew.i9duf2YYQp11m7xBhZOBDRPXBvEtZzlH6IOxznL EsbJCcz0skFkK_ZaOxpyfXjPTWfSqSErpfQobeVWU_NZSdXXvR3grP6GRP1V LO5YM__EwnkKOTO21L3B7aLI15ZsuzXT6V25IforvyI9Ov3PFAOS9jixDLlY ko4ui6FQV2QdgDzYBho9ki_PkOu6FwzQ2ha5e9dv0dOCeBVNqDgAbLbaDE98 jMLT_R4FygiEWuG3NRiXHGlw7.apVDPvQuRBcoxnYzx4ZHRNgKZVh0ZSUSB5 6EE4q X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r269873 - head/lib/libc/nameser From: Pedro Giffuni In-Reply-To: <53ea120c.6165.1de1e179@svn.freebsd.org> Date: Tue, 12 Aug 2014 15:29:14 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <7608F6C6-3E7C-4D0B-B71A-BBFED422C7B6@freebsd.org> References: <53ea120c.6165.1de1e179@svn.freebsd.org> To: Hajimu UMEMOTO X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2014 20:29:26 -0000 Il giorno 12/ago/2014, alle ore 08:09, Hajimu UMEMOTO = ha scritto: > Author: ume > Date: Tue Aug 12 13:09:32 2014 > New Revision: 269873 > URL: http://svnweb.freebsd.org/changeset/base/269873 >=20 > Log: > Fix broken pointer overflow check ns_name_unpack() >=20 > Many compilers may optimize away the overflow check `msg + l < msg', > where `msg' is a pointer and `l' is an integer, because pointer > overflow is undefined behavior in C. >=20 > Use a safe precondition test `l >=3D eom - msg' instead. >=20 > Reference: > https://android-review.googlesource.com/#/c/50570/ >=20 > Requested by: pfg > Obtained from: NetBSD (CVS rev. 1.10) >=20 Thanks! Pedro.= From owner-svn-src-head@FreeBSD.ORG Tue Aug 12 23:48:38 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B4C5B5E; Tue, 12 Aug 2014 23:48:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 385CC27BB; Tue, 12 Aug 2014 23:48:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7CNmcaE045935; Tue, 12 Aug 2014 23:48:38 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7CNmb06045934; Tue, 12 Aug 2014 23:48:37 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201408122348.s7CNmb06045934@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 12 Aug 2014 23:48:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269895 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2014 23:48:38 -0000 Author: imp Date: Tue Aug 12 23:48:37 2014 New Revision: 269895 URL: http://svnweb.freebsd.org/changeset/base/269895 Log: Truncate the ctfmerge command line, like we do with SYSTEM_LD. Modified: head/sys/conf/kern.post.mk Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Tue Aug 12 21:51:31 2014 (r269894) +++ head/sys/conf/kern.post.mk Tue Aug 12 23:48:37 2014 (r269895) @@ -126,7 +126,8 @@ ${FULLKERNEL}: ${SYSTEM_DEP} vers.o ${MF @echo linking ${.TARGET} ${SYSTEM_LD} .if ${MK_CTF} != "no" - ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SYSTEM_OBJS} vers.o + @echo ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ... + @${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SYSTEM_OBJS} vers.o .endif .if !defined(DEBUG) ${OBJCOPY} --strip-debug ${.TARGET} From owner-svn-src-head@FreeBSD.ORG Wed Aug 13 00:14:27 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 908BD131; Wed, 13 Aug 2014 00:14:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D7332A61; Wed, 13 Aug 2014 00:14:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7D0ER7R059837; Wed, 13 Aug 2014 00:14:27 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7D0ER3j059836; Wed, 13 Aug 2014 00:14:27 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201408130014.s7D0ER3j059836@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Wed, 13 Aug 2014 00:14:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269896 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2014 00:14:27 -0000 Author: neel Date: Wed Aug 13 00:14:26 2014 New Revision: 269896 URL: http://svnweb.freebsd.org/changeset/base/269896 Log: Minor cleanup: - Set 'pirq_cold' to '0' on the first PIRQ allocation. - Make assertions stronger. Reviewed by: jhb CR: https://phabric.freebsd.org/D592 Modified: head/usr.sbin/bhyve/pci_irq.c Modified: head/usr.sbin/bhyve/pci_irq.c ============================================================================== --- head/usr.sbin/bhyve/pci_irq.c Tue Aug 12 23:48:37 2014 (r269895) +++ head/usr.sbin/bhyve/pci_irq.c Wed Aug 13 00:14:26 2014 (r269896) @@ -115,7 +115,7 @@ void pci_irq_reserve(int irq) { - assert(irq < nitems(irq_counts)); + assert(irq >= 0 && irq < nitems(irq_counts)); assert(pirq_cold); assert(irq_counts[irq] == 0 || irq_counts[irq] == IRQ_DISABLED); irq_counts[irq] = IRQ_DISABLED; @@ -125,10 +125,10 @@ void pci_irq_use(int irq) { - assert(irq < nitems(irq_counts)); + assert(irq >= 0 && irq < nitems(irq_counts)); assert(pirq_cold); - if (irq_counts[irq] != IRQ_DISABLED) - irq_counts[irq]++; + assert(irq_counts[irq] != IRQ_DISABLED); + irq_counts[irq]++; } void @@ -197,7 +197,7 @@ pirq_alloc_pin(struct vmctx *ctx) { int best_count, best_irq, best_pin, irq, pin; - pirq_cold = 1; + pirq_cold = 0; /* First, find the least-used PIRQ pin. */ best_pin = 0; @@ -222,7 +222,7 @@ pirq_alloc_pin(struct vmctx *ctx) best_count = irq_counts[irq]; } } - assert(best_irq != 0); + assert(best_irq >= 0); irq_counts[best_irq]++; pirqs[best_pin].reg = best_irq; vm_isa_set_irq_trigger(ctx, best_irq, LEVEL_TRIGGER); @@ -234,9 +234,6 @@ pirq_alloc_pin(struct vmctx *ctx) int pirq_irq(int pin) { - - if (pin == -1) - return (255); assert(pin > 0 && pin <= nitems(pirqs)); return (pirqs[pin - 1].reg & PIRQ_IRQ); } From owner-svn-src-head@FreeBSD.ORG Wed Aug 13 00:18:17 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0682535C; Wed, 13 Aug 2014 00:18:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7A112A8B; Wed, 13 Aug 2014 00:18:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7D0IGBT060420; Wed, 13 Aug 2014 00:18:16 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7D0IG7W060419; Wed, 13 Aug 2014 00:18:16 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201408130018.s7D0IG7W060419@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Wed, 13 Aug 2014 00:18:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269897 - head/sys/dev/acpica X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2014 00:18:17 -0000 Author: neel Date: Wed Aug 13 00:18:16 2014 New Revision: 269897 URL: http://svnweb.freebsd.org/changeset/base/269897 Log: Fix typo when displaying the HPET timer unit number. Modified: head/sys/dev/acpica/acpi_hpet.c Modified: head/sys/dev/acpica/acpi_hpet.c ============================================================================== --- head/sys/dev/acpica/acpi_hpet.c Wed Aug 13 00:14:26 2014 (r269896) +++ head/sys/dev/acpica/acpi_hpet.c Wed Aug 13 00:18:16 2014 (r269897) @@ -558,7 +558,8 @@ hpet_attach(device_t dev) device_get_parent(device_get_parent(dev)), dev, &t->irq))) { device_printf(dev, - "Can't allocate interrupt for t%d.\n", j); + "Can't allocate interrupt for t%d: %d\n", + i, j); } } #endif From owner-svn-src-head@FreeBSD.ORG Wed Aug 13 01:27:53 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 14013744; Wed, 13 Aug 2014 01:27:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB5A822CA; Wed, 13 Aug 2014 01:27:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7D1Rq8O091552; Wed, 13 Aug 2014 01:27:52 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7D1RqcR091549; Wed, 13 Aug 2014 01:27:52 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201408130127.s7D1RqcR091549@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Wed, 13 Aug 2014 01:27:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269899 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2014 01:27:53 -0000 Author: rpaulo Date: Wed Aug 13 01:27:51 2014 New Revision: 269899 URL: http://svnweb.freebsd.org/changeset/base/269899 Log: Make sure the DTrace header files are built before depend and before the build starts. This adds a new variable DHDRS that contains a list of all DTrace header files. Then, we use the beforedepend hook to make sure the heaeder files are built. Introduce a beforebuild dependency (from projects/bmake) based on feedback from Simon J. Gerraty. This lets us generate the header files without running make depend. Reviewed by: sjg, imp MFC after: 3 days Modified: head/share/mk/bsd.dep.mk head/share/mk/bsd.lib.mk head/share/mk/bsd.prog.mk Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Wed Aug 13 00:19:18 2014 (r269898) +++ head/share/mk/bsd.dep.mk Wed Aug 13 01:27:51 2014 (r269899) @@ -129,6 +129,7 @@ CFLAGS+= -D_DTRACE_VERSION=1 -I${.OBJDIR .endif .for _DSRC in ${SRCS:M*.d:N*/*} .for _D in ${_DSRC:R} +DHDRS+= ${_D}.h ${_D}.h: ${_DSRC} ${DTRACE} -xnolibs -h -s ${.ALLSRC} SRCS:= ${SRCS:S/${_DSRC}/${_D}.h/} @@ -148,6 +149,8 @@ ${_D}.po: ${_D}.h ${POBJS:S/${_D}.po//} .endif .endfor .endfor +beforedepend: ${DHDRS} +beforebuild: ${DHDRS} .endif .if !target(depend) Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Wed Aug 13 00:19:18 2014 (r269898) +++ head/share/mk/bsd.lib.mk Wed Aug 13 01:27:51 2014 (r269899) @@ -118,7 +118,8 @@ PO_FLAG=-pg ${CC} ${PICFLAG} -DPIC ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET} ${CTFCONVERT_CMD} -all: objwarn +all: beforebuild .WAIT +beforebuild: objwarn .if defined(PRIVATELIB) _LIBDIR:=${LIBPRIVATEDIR} Modified: head/share/mk/bsd.prog.mk ============================================================================== --- head/share/mk/bsd.prog.mk Wed Aug 13 00:19:18 2014 (r269898) +++ head/share/mk/bsd.prog.mk Wed Aug 13 01:27:51 2014 (r269899) @@ -159,7 +159,8 @@ MAN1= ${MAN} .endif .endif # defined(PROG) -all: objwarn ${PROG} ${SCRIPTS} +all: beforebuild .WAIT ${PROG} ${SCRIPTS} +beforebuild: objwarn .if ${MK_MAN} != "no" all: _manpages .endif From owner-svn-src-head@FreeBSD.ORG Wed Aug 13 03:44:30 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5DD3860; Wed, 13 Aug 2014 03:44:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A29682160; Wed, 13 Aug 2014 03:44:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7D3iUpT055824; Wed, 13 Aug 2014 03:44:30 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7D3iUTL055823; Wed, 13 Aug 2014 03:44:30 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201408130344.s7D3iUTL055823@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 13 Aug 2014 03:44:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269901 - head/lib/libc/stdlib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2014 03:44:30 -0000 Author: pfg Date: Wed Aug 13 03:44:30 2014 New Revision: 269901 URL: http://svnweb.freebsd.org/changeset/base/269901 Log: Minor style tweaks. Obtained from: OpenBSD (CVS rev. 1.7) MFC after: 3 days Modified: head/lib/libc/stdlib/strtonum.c Modified: head/lib/libc/stdlib/strtonum.c ============================================================================== --- head/lib/libc/stdlib/strtonum.c Wed Aug 13 01:43:38 2014 (r269900) +++ head/lib/libc/stdlib/strtonum.c Wed Aug 13 03:44:30 2014 (r269901) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: strtonum.c,v 1.6 2004/08/03 19:38:01 millert Exp $ + * $OpenBSD: strtonum.c,v 1.7 2013/04/17 18:40:58 tedu Exp $ */ #include @@ -24,17 +24,17 @@ __FBSDID("$FreeBSD$"); #include #include -#define INVALID 1 -#define TOOSMALL 2 -#define TOOLARGE 3 +#define INVALID 1 +#define TOOSMALL 2 +#define TOOLARGE 3 long long strtonum(const char *numstr, long long minval, long long maxval, const char **errstrp) { long long ll = 0; - char *ep; int error = 0; + char *ep; struct errval { const char *errstr; int err; @@ -47,9 +47,9 @@ strtonum(const char *numstr, long long m ev[0].err = errno; errno = 0; - if (minval > maxval) + if (minval > maxval) { error = INVALID; - else { + } else { ll = strtoll(numstr, &ep, 10); if (errno == EINVAL || numstr == ep || *ep != '\0') error = INVALID; From owner-svn-src-head@FreeBSD.ORG Wed Aug 13 04:14:54 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E3D19FC0; Wed, 13 Aug 2014 04:14:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD68425E7; Wed, 13 Aug 2014 04:14:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7D4ErH3069393; Wed, 13 Aug 2014 04:14:53 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7D4Eo98069371; Wed, 13 Aug 2014 04:14:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201408130414.s7D4Eo98069371@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 Aug 2014 04:14:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269902 - in head: bin/sh/tests bin/sh/tests/builtins bin/sh/tests/errors bin/sh/tests/execution bin/sh/tests/expansion bin/sh/tests/parameters bin/sh/tests/parser bin/sh/tests/set-e to... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2014 04:14:54 -0000 Author: ngie Date: Wed Aug 13 04:14:50 2014 New Revision: 269902 URL: http://svnweb.freebsd.org/changeset/base/269902 Log: Convert bin/sh/tests to ATF The new code uses a "test discovery mechanism" to determine what tests are available for execution The test shell can be specified via: kyua test -v test_suites.FreeBSD.bin.sh.test_shell=/path/to/test/sh Sponsored by: EMC / Isilon Storage Division Approved by: jmmv (mentor) Reviewed by: jilles (maintainer) Added: head/bin/sh/tests/functional_test.sh (contents, props changed) Deleted: head/bin/sh/tests/legacy_test.sh Modified: head/bin/sh/tests/Makefile head/bin/sh/tests/builtins/Makefile head/bin/sh/tests/errors/Makefile head/bin/sh/tests/errors/bad-parm-exp2.2.stderr head/bin/sh/tests/errors/bad-parm-exp3.2.stderr head/bin/sh/tests/errors/bad-parm-exp4.2.stderr head/bin/sh/tests/errors/bad-parm-exp5.2.stderr head/bin/sh/tests/errors/bad-parm-exp6.2.stderr head/bin/sh/tests/execution/Makefile head/bin/sh/tests/expansion/Makefile head/bin/sh/tests/parameters/Makefile head/bin/sh/tests/parser/Makefile head/bin/sh/tests/set-e/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/bin/sh/tests/Makefile ============================================================================== --- head/bin/sh/tests/Makefile Wed Aug 13 03:44:30 2014 (r269901) +++ head/bin/sh/tests/Makefile Wed Aug 13 04:14:50 2014 (r269902) @@ -4,15 +4,12 @@ TESTSDIR= ${TESTSBASE}/bin/sh -TAP_TESTS_SH= legacy_test -TAP_TESTS_SH_SED_legacy_test= -e 's,__SH__,/bin/sh,g' -# Some tests in here are silently not run when the tests are executed as -# root. Explicitly tell Kyua to drop privileges. -# -# TODO(jmmv): Kyua needs to do this by default, not only when explicitly -# requested. See https://code.google.com/p/kyua/issues/detail?id=6 -TEST_METADATA.legacy_test+= required_user="unprivileged" - -SUBDIR+= builtins errors execution expansion parameters parser set-e +TESTS_SUBDIRS+= builtins +TESTS_SUBDIRS+= errors +TESTS_SUBDIRS+= execution +TESTS_SUBDIRS+= expansion +TESTS_SUBDIRS+= parameters +TESTS_SUBDIRS+= parser +TESTS_SUBDIRS+= set-e .include Modified: head/bin/sh/tests/builtins/Makefile ============================================================================== --- head/bin/sh/tests/builtins/Makefile Wed Aug 13 03:44:30 2014 (r269901) +++ head/bin/sh/tests/builtins/Makefile Wed Aug 13 04:14:50 2014 (r269902) @@ -1,9 +1,13 @@ # $FreeBSD$ -.include +.include -FILESDIR= ${TESTSBASE}/bin/sh/builtins -KYUAFILE= no +TESTSDIR= ${TESTSBASE}/bin/sh/${.CURDIR:T} + +.PATH: ${.CURDIR:H} +ATF_TESTS_SH= functional_test + +FILESDIR= ${TESTSDIR} FILES= alias.0 alias.0.stdout FILES+= alias.1 alias.1.stderr Modified: head/bin/sh/tests/errors/Makefile ============================================================================== --- head/bin/sh/tests/errors/Makefile Wed Aug 13 03:44:30 2014 (r269901) +++ head/bin/sh/tests/errors/Makefile Wed Aug 13 04:14:50 2014 (r269902) @@ -1,9 +1,11 @@ # $FreeBSD$ -.include +TESTSDIR= ${TESTSBASE}/bin/sh/${.CURDIR:T} -FILESDIR= ${TESTSBASE}/bin/sh/errors -KYUAFILE= no +.PATH: ${.CURDIR:H} +ATF_TESTS_SH= functional_test + +FILESDIR= ${TESTSDIR} FILES= assignment-error1.0 FILES+= assignment-error2.0 Modified: head/bin/sh/tests/errors/bad-parm-exp2.2.stderr ============================================================================== --- head/bin/sh/tests/errors/bad-parm-exp2.2.stderr Wed Aug 13 03:44:30 2014 (r269901) +++ head/bin/sh/tests/errors/bad-parm-exp2.2.stderr Wed Aug 13 04:14:50 2014 (r269902) @@ -1 +1 @@ -./errors/bad-parm-exp2.2: ${}: Bad substitution +./bad-parm-exp2.2: ${}: Bad substitution Modified: head/bin/sh/tests/errors/bad-parm-exp3.2.stderr ============================================================================== --- head/bin/sh/tests/errors/bad-parm-exp3.2.stderr Wed Aug 13 03:44:30 2014 (r269901) +++ head/bin/sh/tests/errors/bad-parm-exp3.2.stderr Wed Aug 13 04:14:50 2014 (r269902) @@ -1 +1 @@ -./errors/bad-parm-exp3.2: ${foo/}: Bad substitution +./bad-parm-exp3.2: ${foo/}: Bad substitution Modified: head/bin/sh/tests/errors/bad-parm-exp4.2.stderr ============================================================================== --- head/bin/sh/tests/errors/bad-parm-exp4.2.stderr Wed Aug 13 03:44:30 2014 (r269901) +++ head/bin/sh/tests/errors/bad-parm-exp4.2.stderr Wed Aug 13 04:14:50 2014 (r269902) @@ -1 +1 @@ -./errors/bad-parm-exp4.2: ${foo:@...}: Bad substitution +./bad-parm-exp4.2: ${foo:@...}: Bad substitution Modified: head/bin/sh/tests/errors/bad-parm-exp5.2.stderr ============================================================================== --- head/bin/sh/tests/errors/bad-parm-exp5.2.stderr Wed Aug 13 03:44:30 2014 (r269901) +++ head/bin/sh/tests/errors/bad-parm-exp5.2.stderr Wed Aug 13 04:14:50 2014 (r269902) @@ -1 +1 @@ -./errors/bad-parm-exp5.2: ${/}: Bad substitution +./bad-parm-exp5.2: ${/}: Bad substitution Modified: head/bin/sh/tests/errors/bad-parm-exp6.2.stderr ============================================================================== --- head/bin/sh/tests/errors/bad-parm-exp6.2.stderr Wed Aug 13 03:44:30 2014 (r269901) +++ head/bin/sh/tests/errors/bad-parm-exp6.2.stderr Wed Aug 13 04:14:50 2014 (r269902) @@ -1 +1 @@ -./errors/bad-parm-exp6.2: ${foo...}: Bad substitution +./bad-parm-exp6.2: ${foo...}: Bad substitution Modified: head/bin/sh/tests/execution/Makefile ============================================================================== --- head/bin/sh/tests/execution/Makefile Wed Aug 13 03:44:30 2014 (r269901) +++ head/bin/sh/tests/execution/Makefile Wed Aug 13 04:14:50 2014 (r269902) @@ -1,9 +1,11 @@ # $FreeBSD$ -.include +TESTSDIR= ${TESTSBASE}/bin/sh/${.CURDIR:T} -FILESDIR= ${TESTSBASE}/bin/sh/execution -KYUAFILE= no +.PATH: ${.CURDIR:H} +ATF_TESTS_SH= functional_test + +FILESDIR= ${TESTSDIR} FILES= bg1.0 FILES+= bg2.0 Modified: head/bin/sh/tests/expansion/Makefile ============================================================================== --- head/bin/sh/tests/expansion/Makefile Wed Aug 13 03:44:30 2014 (r269901) +++ head/bin/sh/tests/expansion/Makefile Wed Aug 13 04:14:50 2014 (r269902) @@ -1,9 +1,11 @@ # $FreeBSD$ -.include +TESTSDIR= ${TESTSBASE}/bin/sh/${.CURDIR:T} -FILESDIR= ${TESTSBASE}/bin/sh/expansion -KYUAFILE= no +.PATH: ${.CURDIR:H} +ATF_TESTS_SH= functional_test + +FILESDIR= ${TESTSDIR} FILES= arith1.0 FILES+= arith2.0 Added: head/bin/sh/tests/functional_test.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/functional_test.sh Wed Aug 13 04:14:50 2014 (r269902) @@ -0,0 +1,78 @@ +# +# Copyright 2014 EMC Corp. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# $FreeBSD$ + +SRCDIR=$(atf_get_srcdir) + +check() +{ + local tc=${1}; shift + + export SH=$(atf_config_get bin.sh.test_shell /bin/sh) + + local err_file="${SRCDIR}/${tc}.stderr" + [ -f "${err_file}" ] && err_flag="-e file:${err_file}" + local out_file="${SRCDIR}/${tc}.stdout" + [ -f "${out_file}" ] && out_flag="-o file:${out_file}" + + # We need to copy the testcase scenario file because some of the + # testcases hardcode relative paths in the stderr/stdout. + # + # TODO: we might be able to generate this path at build time + cp ${SRCDIR}/${tc} . + + atf_check -s exit:${tc##*.} ${err_flag} ${out_flag} ${SH} "./${tc}" +} + +add_testcase() +{ + local tc=${1} + local tc_escaped word + + case "${tc%.*}" in + *-*) + local IFS="-" + for word in ${tc%.*}; do + tc_escaped="${tc_escaped:+${tc_escaped}_}${word}" + done + ;; + *) + tc_escaped=${tc%.*} + ;; + esac + + atf_test_case ${tc_escaped} + eval "${tc_escaped}_body() { check ${tc}; }" + atf_add_test_case ${tc_escaped} +} + +atf_init_test_cases() +{ + for path in $(find -Es "${SRCDIR}" -regex '.*\.[0-9]+$'); do + add_testcase ${path##*/} + done +} Modified: head/bin/sh/tests/parameters/Makefile ============================================================================== --- head/bin/sh/tests/parameters/Makefile Wed Aug 13 03:44:30 2014 (r269901) +++ head/bin/sh/tests/parameters/Makefile Wed Aug 13 04:14:50 2014 (r269902) @@ -1,9 +1,11 @@ # $FreeBSD$ -.include +TESTSDIR= ${TESTSBASE}/bin/sh/${.CURDIR:T} -FILESDIR= ${TESTSBASE}/bin/sh/parameters -KYUAFILE= no +.PATH: ${.CURDIR:H} +ATF_TESTS_SH= functional_test + +FILESDIR= ${TESTSDIR} FILES= env1.0 FILES+= exitstatus1.0 Modified: head/bin/sh/tests/parser/Makefile ============================================================================== --- head/bin/sh/tests/parser/Makefile Wed Aug 13 03:44:30 2014 (r269901) +++ head/bin/sh/tests/parser/Makefile Wed Aug 13 04:14:50 2014 (r269902) @@ -1,9 +1,11 @@ # $FreeBSD$ -.include +TESTSDIR= ${TESTSBASE}/bin/sh/${.CURDIR:T} -FILESDIR= ${TESTSBASE}/bin/sh/parser -KYUAFILE= no +.PATH: ${.CURDIR:H} +ATF_TESTS_SH= functional_test + +FILESDIR= ${TESTSDIR} FILES= alias1.0 FILES+= alias2.0 Modified: head/bin/sh/tests/set-e/Makefile ============================================================================== --- head/bin/sh/tests/set-e/Makefile Wed Aug 13 03:44:30 2014 (r269901) +++ head/bin/sh/tests/set-e/Makefile Wed Aug 13 04:14:50 2014 (r269902) @@ -1,9 +1,11 @@ # $FreeBSD$ -.include +TESTSDIR= ${TESTSBASE}/bin/sh/${.CURDIR:T} -FILESDIR= ${TESTSBASE}/bin/sh/set-e -KYUAFILE= no +.PATH: ${.CURDIR:H} +ATF_TESTS_SH= functional_test + +FILESDIR= ${TESTSDIR} FILES= and1.0 FILES+= and2.1 Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Wed Aug 13 03:44:30 2014 (r269901) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Wed Aug 13 04:14:50 2014 (r269902) @@ -4168,6 +4168,7 @@ OLD_FILES+=usr/share/aclocal/atf-common. OLD_FILES+=usr/share/aclocal/atf-sh.m4 OLD_DIRS+=usr/share/aclocal OLD_FILES+=usr/tests/bin/chown/units_basics +OLD_FILES+=usr/tests/bin/sh/legacy_test OLD_FILES+=usr/tests/usr.bin/atf/Kyuafile OLD_FILES+=usr/tests/usr.bin/atf/atf-sh/Kyuafile OLD_FILES+=usr/tests/usr.bin/atf/atf-sh/atf_check_test From owner-svn-src-head@FreeBSD.ORG Wed Aug 13 04:38:44 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 14B2043A; Wed, 13 Aug 2014 04:38:44 +0000 (UTC) Received: from mail-ig0-x22d.google.com (mail-ig0-x22d.google.com [IPv6:2607:f8b0:4001:c05::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BAF952778; Wed, 13 Aug 2014 04:38:43 +0000 (UTC) Received: by mail-ig0-f173.google.com with SMTP id h18so9004760igc.6 for ; Tue, 12 Aug 2014 21:38:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=NCXbhLvyO0iZbe8XPwDaHvuyDYnrrmAibjf9J2ltb50=; b=tWsa7w+CpkTfG+z6Ltj4uqK0bUNNiKT2QzfspzQcyi5SvXiZ0GncDSV7H3QJUBcu03 RkzS+6FgarZPUEyXiNT3g+FQcoCZ4YQs0FGwnsFSrwQ7/rxLRXXTuvmScPZ1j8hYqBkj nJMFg+pTLpPe0f8s5NX3RfJQ/1aclmnF4j5sh0MlnjYvNoOaObCZQmqu/KBWgB2uwRVi hhlrFfVM3FJU/B71QRid65F9OOtKTsnSyaEW9gnwTH0ZhGcEaR0YvfrSiWsQe4AZwA4K sJz5Evnn290xirJ85qFCHbXLUAZW/AsK/WtYYy4IIyE5KNxSQUoQk08t8LQyQhkxg313 44wg== MIME-Version: 1.0 X-Received: by 10.50.66.133 with SMTP id f5mr44900077igt.38.1407904723156; Tue, 12 Aug 2014 21:38:43 -0700 (PDT) Received: by 10.50.76.229 with HTTP; Tue, 12 Aug 2014 21:38:43 -0700 (PDT) In-Reply-To: <201408130414.s7D4Eo98069371@svn.freebsd.org> References: <201408130414.s7D4Eo98069371@svn.freebsd.org> Date: Tue, 12 Aug 2014 21:38:43 -0700 Message-ID: Subject: Re: svn commit: r269902 - in head: bin/sh/tests bin/sh/tests/builtins bin/sh/tests/errors bin/sh/tests/execution bin/sh/tests/expansion bin/sh/tests/parameters bin/sh/tests/parser bin/sh/tests/set-e to... From: Garrett Cooper To: Garrett Cooper Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2014 04:38:44 -0000 On Tue, Aug 12, 2014 at 9:14 PM, Garrett Cooper wrote: > Author: ngie > Date: Wed Aug 13 04:14:50 2014 > New Revision: 269902 > URL: http://svnweb.freebsd.org/changeset/base/269902 > > Log: > Convert bin/sh/tests to ATF > > The new code uses a "test discovery mechanism" to determine > what tests are available for execution > > The test shell can be specified via: > > kyua test -v test_suites.FreeBSD.bin.sh.test_shell=/path/to/test/sh > > Sponsored by: EMC / Isilon Storage Division > Approved by: jmmv (mentor) > Reviewed by: jilles (maintainer) I forgot to note two things: MFC after: 2 weeks Phabric: D547 Thanks! -Garrett From owner-svn-src-head@FreeBSD.ORG Wed Aug 13 04:43:30 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B2825B1; Wed, 13 Aug 2014 04:43:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EBD8C2813; Wed, 13 Aug 2014 04:43:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7D4hTnU082681; Wed, 13 Aug 2014 04:43:29 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7D4hTqj082678; Wed, 13 Aug 2014 04:43:29 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201408130443.s7D4hTqj082678@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 Aug 2014 04:43:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269903 - in head: bin/date/tests tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2014 04:43:30 -0000 Author: ngie Date: Wed Aug 13 04:43:29 2014 New Revision: 269903 URL: http://svnweb.freebsd.org/changeset/base/269903 Log: Port date/bin/tests to ATF Phabric: D545 Approved by: jmmv (mentor) Submitted by: keramida (earlier version) MFC after: 2 weeks Sponsored by: Google, Inc Sponsored by: EMC / Isilon Storage Division Added: head/bin/date/tests/format_string_test.sh (contents, props changed) Deleted: head/bin/date/tests/legacy_test.sh Modified: head/bin/date/tests/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/bin/date/tests/Makefile ============================================================================== --- head/bin/date/tests/Makefile Wed Aug 13 04:14:50 2014 (r269902) +++ head/bin/date/tests/Makefile Wed Aug 13 04:43:29 2014 (r269903) @@ -4,6 +4,6 @@ TESTSDIR= ${TESTSBASE}/bin/date -TAP_TESTS_SH= legacy_test +ATF_TESTS_SH= format_string_test .include Added: head/bin/date/tests/format_string_test.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/date/tests/format_string_test.sh Wed Aug 13 04:43:29 2014 (r269903) @@ -0,0 +1,92 @@ +# +# Regression tests for date(1) +# +# Submitted by Edwin Groothuis +# +# $FreeBSD$ +# + +# +# These two date/times have been chosen carefully -- they +# create both the single digit and double/multidigit version of +# the values. +# +# To create a new one, make sure you are using the UTC timezone! +# + +TEST1=3222243 # 1970-02-07 07:04:03 +TEST2=1005600000 # 2001-11-12 21:11:12 + +check() +{ + local format_string exp_output_1 exp_output_2 + + format_string=${1} + exp_output_1=${2} + exp_output_2=${3} + + atf_check -o "inline:${exp_output_1}\n" \ + date -r ${TEST1} +%${format_string} + atf_check -o "inline:${exp_output_2}\n" \ + date -r ${TEST2} +%${format_string} +} + +format_string_test() +{ + local desc exp_output_1 exp_output_2 flag + + desc=${1} + flag=${2} + exp_output_1=${3} + exp_output_2=${4} + + atf_test_case ${desc}_test + eval " +${desc}_test_body() { + check ${flag} '${exp_output_1}' '${exp_output_2}'; +}" + atf_add_test_case ${desc}_test +} + +atf_init_test_cases() +{ + format_string_test A A Saturday Monday + format_string_test a a Sat Mon + format_string_test B B February November + format_string_test b b Feb Nov + format_string_test C C 19 20 + format_string_test c c "Sat Feb 7 07:04:03 1970" "Mon Nov 12 21:20:00 2001" + format_string_test D D 02/07/70 11/12/01 + format_string_test d d 07 12 + format_string_test e e " 7" 12 + format_string_test F F "1970-02-07" "2001-11-12" + format_string_test G G 1970 2001 + format_string_test g g 70 01 + format_string_test H H 07 21 + format_string_test h h Feb Nov + format_string_test I I 07 09 + format_string_test j j 038 316 + format_string_test k k " 7" 21 + format_string_test l l " 7" " 9" + format_string_test M M 04 20 + format_string_test m m 02 11 + format_string_test p p AM PM + format_string_test R R 07:04 21:20 + format_string_test r r "07:04:03 AM" "09:20:00 PM" + format_string_test S S 03 00 + format_string_test s s ${TEST1} ${TEST2} + format_string_test U U 05 45 + format_string_test u u 6 1 + format_string_test V V 06 46 + format_string_test v v " 7-Feb-1970" "12-Nov-2001" + format_string_test W W 05 46 + format_string_test w w 6 1 + format_string_test X X "07:04:03" "21:20:00" + format_string_test x x "02/07/70" "11/12/01" + format_string_test Y Y 1970 2001 + format_string_test y y 70 01 + format_string_test Z Z UTC UTC + format_string_test z z +0000 +0000 + format_string_test percent % % % + format_string_test plus + "Sat Feb 7 07:04:03 UTC 1970" "Mon Nov 12 21:20:00 UTC 2001" +} Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Wed Aug 13 04:14:50 2014 (r269902) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Wed Aug 13 04:43:29 2014 (r269903) @@ -4168,6 +4168,7 @@ OLD_FILES+=usr/share/aclocal/atf-common. OLD_FILES+=usr/share/aclocal/atf-sh.m4 OLD_DIRS+=usr/share/aclocal OLD_FILES+=usr/tests/bin/chown/units_basics +OLD_FILES+=usr/tests/bin/date/legacy_test OLD_FILES+=usr/tests/bin/sh/legacy_test OLD_FILES+=usr/tests/usr.bin/atf/Kyuafile OLD_FILES+=usr/tests/usr.bin/atf/atf-sh/Kyuafile From owner-svn-src-head@FreeBSD.ORG Wed Aug 13 04:56:30 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 01AB09D2; Wed, 13 Aug 2014 04:56:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6A912927; Wed, 13 Aug 2014 04:56:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7D4uTVC087564; Wed, 13 Aug 2014 04:56:29 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7D4uS9F087555; Wed, 13 Aug 2014 04:56:28 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201408130456.s7D4uS9F087555@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 Aug 2014 04:56:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269904 - in head: lib/libutil lib/libutil/tests tools/regression/lib/libutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2014 04:56:30 -0000 Author: ngie Date: Wed Aug 13 04:56:27 2014 New Revision: 269904 URL: http://svnweb.freebsd.org/changeset/base/269904 Log: Integrate lib/libutil into the build/kyua Remove the .t wrappers Rename all of the TAP test applications from test- to _test to match the convention described in the TestSuite wiki page humanize_number_test.c: - Fix -Wformat warnings with counter variables - Fix minor style(9) issues: -- Header sorting -- Variable declaration alignment/sorting in main(..) -- Fit the lines in <80 columns - Fix an off by one index error in the testcase output [*] - Remove unnecessary `extern char * optarg;` (this is already provided by unistd.h) Phabric: D555 Approved by: jmmv (mentor) MFC after: 2 weeks Obtained from: EMC / Isilon Storage Division [*] Submitted by: Casey Peel [*] Sponsored by: EMC / Isilon Storage Division Added: head/lib/libutil/tests/ head/lib/libutil/tests/Makefile (contents, props changed) head/lib/libutil/tests/flopen_test.c - copied unchanged from r269903, head/tools/regression/lib/libutil/test-flopen.c head/lib/libutil/tests/grp_test.c - copied unchanged from r269562, head/tools/regression/lib/libutil/test-grp.c head/lib/libutil/tests/humanize_number_test.c - copied, changed from r269562, head/tools/regression/lib/libutil/test-humanize_number.c head/lib/libutil/tests/pidfile_test.c - copied unchanged from r269562, head/tools/regression/lib/libutil/test-pidfile.c head/lib/libutil/tests/trimdomain-nodomain_test.c - copied unchanged from r269562, head/tools/regression/lib/libutil/test-trimdomain-nodomain.c head/lib/libutil/tests/trimdomain_test.c - copied unchanged from r269562, head/tools/regression/lib/libutil/test-trimdomain.c Deleted: head/tools/regression/lib/libutil/ Modified: head/lib/libutil/Makefile Modified: head/lib/libutil/Makefile ============================================================================== --- head/lib/libutil/Makefile Wed Aug 13 04:43:29 2014 (r269903) +++ head/lib/libutil/Makefile Wed Aug 13 04:56:27 2014 (r269904) @@ -81,4 +81,8 @@ MLINKS+=pw_util.3 pw_copy.3 \ pw_util.3 pw_tempname.3 \ pw_util.3 pw_tmp.3 +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Added: head/lib/libutil/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libutil/tests/Makefile Wed Aug 13 04:56:27 2014 (r269904) @@ -0,0 +1,15 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/lib/libutil + +TAP_TESTS_C+= flopen_test +TAP_TESTS_C+= grp_test +TAP_TESTS_C+= humanize_number_test +TAP_TESTS_C+= pidfile_test +TAP_TESTS_C+= trimdomain_test +TAP_TESTS_C+= trimdomain-nodomain_test + +DPADD+= ${LIBUTIL} +LDADD+= -lutil + +.include Copied: head/lib/libutil/tests/flopen_test.c (from r269903, head/tools/regression/lib/libutil/test-flopen.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libutil/tests/flopen_test.c Wed Aug 13 04:56:27 2014 (r269904, copy of r269903, head/tools/regression/lib/libutil/test-flopen.c) @@ -0,0 +1,210 @@ +/*- + * Copyright (c) 2007-2009 Dag-Erling Coïdan Smørgrav + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer + * in this position and unchanged. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +/* + * Test that flopen() can create a file. + */ +const char * +test_flopen_create(void) +{ + const char *fn = "test_flopen_create"; + const char *result = NULL; + int fd; + + unlink(fn); + fd = flopen(fn, O_RDWR|O_CREAT, 0640); + if (fd < 0) { + result = strerror(errno); + } else { + close(fd); + } + unlink(fn); + return (result); +} + +/* + * Test that flopen() can open an existing file. + */ +const char * +test_flopen_open(void) +{ + const char *fn = "test_flopen_open"; + const char *result = NULL; + int fd; + + fd = open(fn, O_RDWR|O_CREAT, 0640); + if (fd < 0) { + result = strerror(errno); + } else { + close(fd); + fd = flopen(fn, O_RDWR); + if (fd < 0) { + result = strerror(errno); + } else { + close(fd); + } + } + unlink(fn); + return (result); +} + +/* + * Test that flopen() can lock against itself + */ +const char * +test_flopen_lock_self(void) +{ + const char *fn = "test_flopen_lock_self"; + const char *result = NULL; + int fd1, fd2; + + unlink(fn); + fd1 = flopen(fn, O_RDWR|O_CREAT, 0640); + if (fd1 < 0) { + result = strerror(errno); + } else { + fd2 = flopen(fn, O_RDWR|O_NONBLOCK); + if (fd2 >= 0) { + result = "second open succeeded"; + close(fd2); + } + close(fd1); + } + unlink(fn); + return (result); +} + +/* + * Test that flopen() can lock against other processes + */ +const char * +test_flopen_lock_other(void) +{ + const char *fn = "test_flopen_lock_other"; + const char *result = NULL; + volatile int fd1, fd2; + + unlink(fn); + fd1 = flopen(fn, O_RDWR|O_CREAT, 0640); + if (fd1 < 0) { + result = strerror(errno); + } else { + fd2 = -42; + if (vfork() == 0) { + fd2 = flopen(fn, O_RDWR|O_NONBLOCK); + close(fd2); + _exit(0); + } + if (fd2 == -42) + result = "vfork() doesn't work as expected"; + if (fd2 >= 0) + result = "second open succeeded"; + close(fd1); + } + unlink(fn); + return (result); +} + +/* + * Test that child processes inherit the lock + */ +const char * +test_flopen_lock_child(void) +{ + const char *fn = "test_flopen_lock_child"; + const char *result = NULL; + pid_t pid; + volatile int fd1, fd2; + + unlink(fn); + fd1 = flopen(fn, O_RDWR|O_CREAT, 0640); + if (fd1 < 0) { + result = strerror(errno); + } else { + pid = fork(); + if (pid == -1) { + result = strerror(errno); + } else if (pid == 0) { + select(0, 0, 0, 0, 0); + _exit(0); + } + close(fd1); + if ((fd2 = flopen(fn, O_RDWR|O_NONBLOCK)) != -1) { + result = "second open succeeded"; + close(fd2); + } + kill(pid, SIGINT); + } + unlink(fn); + return (result); +} + +static struct test { + const char *name; + const char *(*func)(void); +} t[] = { + { "flopen_create", test_flopen_create }, + { "flopen_open", test_flopen_open }, + { "flopen_lock_self", test_flopen_lock_self }, + { "flopen_lock_other", test_flopen_lock_other }, + { "flopen_lock_child", test_flopen_lock_child }, +}; + +int +main(void) +{ + const char *result; + int i, nt; + + nt = sizeof(t) / sizeof(*t); + printf("1..%d\n", nt); + for (i = 0; i < nt; ++i) { + if ((result = t[i].func()) != NULL) + printf("not ok %d - %s # %s\n", i + 1, + t[i].name, result); + else + printf("ok %d - %s\n", i + 1, + t[i].name); + } + exit(0); +} Copied: head/lib/libutil/tests/grp_test.c (from r269562, head/tools/regression/lib/libutil/test-grp.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libutil/tests/grp_test.c Wed Aug 13 04:56:27 2014 (r269904, copy of r269562, head/tools/regression/lib/libutil/test-grp.c) @@ -0,0 +1,117 @@ +/*- + * Copyright (c) 2008 Sean C. Farley + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer, + * without modification, immediately at the beginning of the file. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include + + +/* + * Static values for building and testing an artificial group. + */ +static char grpName[] = "groupName"; +static char grpPasswd[] = "groupPwd"; +static gid_t grpGID = 1234; +static char *grpMems[] = { "mem1", "mem2", "mem3", NULL }; +static const char *origStrGrp = "groupName:groupPwd:1234:mem1,mem2,mem3"; + + +/* + * Build a group to test against without depending on a real group to be found + * within /etc/group. + */ +static void +build_grp(struct group *grp) +{ + grp->gr_name = grpName; + grp->gr_passwd = grpPasswd; + grp->gr_gid = grpGID; + grp->gr_mem = grpMems; + + return; +} + + +int +main(void) +{ + char *strGrp; + int testNdx; + struct group *dupGrp; + struct group *scanGrp; + struct group origGrp; + + /* Setup. */ + printf("1..4\n"); + testNdx = 0; + + /* Manually build a group using static values. */ + build_grp(&origGrp); + + /* Copy the group. */ + testNdx++; + if ((dupGrp = gr_dup(&origGrp)) == NULL) + printf("not "); + printf("ok %d - %s\n", testNdx, "gr_dup"); + + /* Compare the original and duplicate groups. */ + testNdx++; + if (! gr_equal(&origGrp, dupGrp)) + printf("not "); + printf("ok %d - %s\n", testNdx, "gr_equal"); + + /* Create group string from the duplicate group structure. */ + testNdx++; + strGrp = gr_make(dupGrp); + if (strcmp(strGrp, origStrGrp) != 0) + printf("not "); + printf("ok %d - %s\n", testNdx, "gr_make"); + + /* + * Create group structure from string and compare it to the original + * group structure. + */ + testNdx++; + if ((scanGrp = gr_scan(strGrp)) == NULL || ! gr_equal(&origGrp, + scanGrp)) + printf("not "); + printf("ok %d - %s\n", testNdx, "gr_scan"); + + /* Clean up. */ + free(scanGrp); + free(strGrp); + free(dupGrp); + + exit(EXIT_SUCCESS); +} Copied and modified: head/lib/libutil/tests/humanize_number_test.c (from r269562, head/tools/regression/lib/libutil/test-humanize_number.c) ============================================================================== --- head/tools/regression/lib/libutil/test-humanize_number.c Tue Aug 5 05:00:22 2014 (r269562, copy source) +++ head/lib/libutil/tests/humanize_number_test.c Wed Aug 13 04:56:27 2014 (r269904) @@ -28,17 +28,15 @@ * */ -#include -#include +#include +#include #include +#include +#include #include +#include #include -#include -#include #include -#include - -extern char * optarg; #define MAX_STR_FLAGS_RESULT 80 #define MAX_INT_STR_DIGITS 12 @@ -490,7 +488,7 @@ static void testskipped(size_t i) { - printf("ok %lu # skip - not turned on\n", i); + printf("ok %zu # skip - not turned on\n", i); } int @@ -498,10 +496,8 @@ main(int argc, char * const argv[]) { char *buf; char *flag_str, *scale_str; - size_t i; - size_t errcnt, tested, skipped; + size_t buflen, errcnt, i, skipped, tested; int r; - size_t buflen; int includeNegScale; int includeExabyteTests; int verbose; @@ -522,8 +518,8 @@ main(int argc, char * const argv[]) if (buflen != 4) printf("Warning: buffer size %zu != 4, expect some results to differ.\n", buflen); - printf("1..%lu\n", sizeof test_args / sizeof *test_args); - for (i = 0; i < sizeof test_args / sizeof *test_args; i++) { + printf("1..%zu\n", nitems(test_args)); + for (i = 0; i < nitems(test_args); i++) { /* KLUDGE */ if (test_args[i].num == INT64_MAX && buflen == 4) { /* Start final tests which require buffer of 6 */ @@ -537,12 +533,12 @@ main(int argc, char * const argv[]) if (test_args[i].scale < 0 && ! includeNegScale) { skipped++; - testskipped(i); + testskipped(i + 1); continue; } if (test_args[i].num >= halfExabyte && ! includeExabyteTests) { skipped++; - testskipped(i); + testskipped(i + 1); continue; } @@ -553,36 +549,46 @@ main(int argc, char * const argv[]) if (r != test_args[i].retval) { if (verbose) - printf("wrong return value on index %lu, buflen: %zu, got: %d + \"%s\", expected %d + \"%s\"; num = %" PRId64 ", scale = %s, flags= %s.\n", + printf("wrong return value on index %zu, " + "buflen: %zu, got: %d + \"%s\", " + "expected %d + \"%s\"; num = %jd, " + "scale = %s, flags= %s.\n", i, buflen, r, buf, test_args[i].retval, - test_args[i].res, test_args[i].num, + test_args[i].res, + (intmax_t)test_args[i].num, scale_str, flag_str); else - printf("not ok %lu # return %d != %d\n", i, r, - test_args[i].retval); + printf("not ok %zu # return %d != %d\n", + i + 1, r, test_args[i].retval); errcnt++; } else if (strcmp(buf, test_args[i].res) != 0) { if (verbose) - printf("result mismatch on index %lu, got: \"%s\", expected \"%s\"; num = %" PRId64 ", scale = %s, flags= %s.\n", - i, buf, test_args[i].res, test_args[i].num, + printf("result mismatch on index %zu, got: " + "\"%s\", expected \"%s\"; num = %jd, " + "scale = %s, flags= %s.\n", + i, buf, test_args[i].res, + (intmax_t)test_args[i].num, scale_str, flag_str); else - printf("not ok %lu # buf \"%s\" != \"%s\"\n", i, - buf, test_args[i].res); + printf("not ok %zu # buf \"%s\" != \"%s\"\n", + i + 1, buf, test_args[i].res); errcnt++; } else { if (verbose) - printf("successful result on index %lu, returned %d, got: \"%s\"; num = %" PRId64 ", scale = %s, flags= %s.\n", - i, r, buf, test_args[i].num, scale_str, - flag_str); + printf("successful result on index %zu, " + "returned %d, got: \"%s\"; num = %jd, " + "scale = %s, flags= %s.\n", + i, r, buf, + (intmax_t)test_args[i].num, + scale_str, flag_str); else - printf("ok %lu\n", i); + printf("ok %zu\n", i + 1); } tested++; } if (verbose) - printf("total errors: %lu/%lu tests, %lu skipped\n", errcnt, + printf("total errors: %zu/%zu tests, %zu skipped\n", errcnt, tested, skipped); if (errcnt) Copied: head/lib/libutil/tests/pidfile_test.c (from r269562, head/tools/regression/lib/libutil/test-pidfile.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libutil/tests/pidfile_test.c Wed Aug 13 04:56:27 2014 (r269904, copy of r269562, head/tools/regression/lib/libutil/test-pidfile.c) @@ -0,0 +1,280 @@ +/*- + * Copyright (c) 2007-2009 Dag-Erling Coïdan Smørgrav + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer + * in this position and unchanged. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +/* + * We need a signal handler so kill(2) will interrupt our child's + * select(2) instead of killing it. + */ +static void +signal_handler(int sig) +{ + (void)sig; +} + +/* + * Test that pidfile_open() can create a pidfile and that pidfile_write() + * can write to it. + */ +static const char * +test_pidfile_uncontested(void) +{ + const char *fn = "test_pidfile_uncontested"; + struct pidfh *pf; + pid_t other = 0; + + unlink(fn); + pf = pidfile_open(fn, 0600, &other); + if (pf == NULL && other != 0) + return ("pidfile exists and is locked"); + if (pf == NULL) + return (strerror(errno)); + if (pidfile_write(pf) != 0) { + pidfile_close(pf); + unlink(fn); + return ("failed to write PID"); + } + pidfile_close(pf); + unlink(fn); + return (NULL); +} + +/* + * Test that pidfile_open() locks against self. + */ +static const char * +test_pidfile_self(void) +{ + const char *fn = "test_pidfile_self"; + struct pidfh *pf1, *pf2; + pid_t other = 0; + int serrno; + + unlink(fn); + pf1 = pidfile_open(fn, 0600, &other); + if (pf1 == NULL && other != 0) + return ("pidfile exists and is locked"); + if (pf1 == NULL) + return (strerror(errno)); + if (pidfile_write(pf1) != 0) { + serrno = errno; + pidfile_close(pf1); + unlink(fn); + return (strerror(serrno)); + } + // second open should fail + pf2 = pidfile_open(fn, 0600, &other); + if (pf2 != NULL) { + pidfile_close(pf1); + pidfile_close(pf2); + unlink(fn); + return ("managed to opened pidfile twice"); + } + if (other != getpid()) { + pidfile_close(pf1); + unlink(fn); + return ("pidfile contained wrong PID"); + } + pidfile_close(pf1); + unlink(fn); + return (NULL); +} + +/* + * Common code for test_pidfile_{contested,inherited}. + */ +static const char * +common_test_pidfile_child(const char *fn, int parent_open) +{ + struct pidfh *pf = NULL; + pid_t other = 0, pid = 0; + int fd[2], serrno, status; + char ch; + + unlink(fn); + if (pipe(fd) != 0) + return (strerror(errno)); + + if (parent_open) { + pf = pidfile_open(fn, 0600, &other); + if (pf == NULL && other != 0) + return ("pidfile exists and is locked"); + if (pf == NULL) + return (strerror(errno)); + } + + pid = fork(); + if (pid == -1) + return (strerror(errno)); + if (pid == 0) { + // child + close(fd[0]); + signal(SIGINT, signal_handler); + if (!parent_open) { + pf = pidfile_open(fn, 0600, &other); + if (pf == NULL && other != 0) + return ("pidfile exists and is locked"); + if (pf == NULL) + return (strerror(errno)); + } + if (pidfile_write(pf) != 0) { + serrno = errno; + pidfile_close(pf); + unlink(fn); + return (strerror(serrno)); + } + if (pf == NULL) + _exit(1); + if (pidfile_write(pf) != 0) + _exit(1); + if (write(fd[1], "*", 1) != 1) + _exit(1); + select(0, 0, 0, 0, 0); + _exit(0); + } + // parent + close(fd[1]); + if (pf) + pidfile_close(pf); + + // wait for the child to signal us + if (read(fd[0], &ch, 1) != 1) { + serrno = errno; + unlink(fn); + kill(pid, SIGTERM); + errno = serrno; + return (strerror(errno)); + } + + // We shouldn't be able to lock the same pidfile as our child + pf = pidfile_open(fn, 0600, &other); + if (pf != NULL) { + pidfile_close(pf); + unlink(fn); + return ("managed to lock contested pidfile"); + } + + // Failed to lock, but not because it was contested + if (other == 0) { + unlink(fn); + return (strerror(errno)); + } + + // Locked by the wrong process + if (other != pid) { + unlink(fn); + return ("pidfile contained wrong PID"); + } + + // check our child's fate + if (pf) + pidfile_close(pf); + unlink(fn); + if (kill(pid, SIGINT) != 0) + return (strerror(errno)); + if (waitpid(pid, &status, 0) == -1) + return (strerror(errno)); + if (WIFSIGNALED(status)) + return ("child caught signal"); + if (WEXITSTATUS(status) != 0) + return ("child returned non-zero status"); + + // success + return (NULL); +} + +/* + * Test that pidfile_open() fails when attempting to open a pidfile that + * is already locked, and that it returns the correct PID. + */ +static const char * +test_pidfile_contested(void) +{ + const char *fn = "test_pidfile_contested"; + const char *result; + + result = common_test_pidfile_child(fn, 0); + return (result); +} + +/* + * Test that the pidfile lock is inherited. + */ +static const char * +test_pidfile_inherited(void) +{ + const char *fn = "test_pidfile_inherited"; + const char *result; + + result = common_test_pidfile_child(fn, 1); + return (result); +} + +static struct test { + const char *name; + const char *(*func)(void); +} t[] = { + { "pidfile_uncontested", test_pidfile_uncontested }, + { "pidfile_self", test_pidfile_self }, + { "pidfile_contested", test_pidfile_contested }, + { "pidfile_inherited", test_pidfile_inherited }, +}; + +int +main(void) +{ + const char *result; + int i, nt; + + nt = sizeof(t) / sizeof(*t); + printf("1..%d\n", nt); + for (i = 0; i < nt; ++i) { + if ((result = t[i].func()) != NULL) + printf("not ok %d - %s # %s\n", i + 1, + t[i].name, result); + else + printf("ok %d - %s\n", i + 1, + t[i].name); + } + exit(0); +} Copied: head/lib/libutil/tests/trimdomain-nodomain_test.c (from r269562, head/tools/regression/lib/libutil/test-trimdomain-nodomain.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libutil/tests/trimdomain-nodomain_test.c Wed Aug 13 04:56:27 2014 (r269904, copy of r269562, head/tools/regression/lib/libutil/test-trimdomain-nodomain.c) @@ -0,0 +1,91 @@ +/* + * Copyright (C) 2005 Brooks Davis. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#define TESTDOMAIN "" +#define TESTHOST "testhost" +#define TESTFQDN "testhost" TESTDOMAIN + +int failures = 0; +int tests = 0; + +/* + * Evily override gethostname(3) so trimdomain always gets the same result. + * This makes the tests much easier to write and less likely to fail on + * oddly configured systems. + */ +int +gethostname(char *name, size_t namelen) +{ + if (strlcpy(name, TESTFQDN, namelen) > namelen) { + errno = ENAMETOOLONG; + return (-1); + } + return (0); +} + +void +testit(const char *input, int hostsize, const char *output, const char *test) +{ + char *testhost; + const char *expected = (output == NULL) ? input : output; + + testhost = strdup(input); + trimdomain(testhost, hostsize < 0 ? (int)strlen(testhost) : hostsize); + tests++; + if (strcmp(testhost, expected) != 0) { + printf("not ok %d - %s\n", tests, test); + printf("# %s -> %s (expected %s)\n", input, testhost, expected); + } else + printf("ok %d - %s\n", tests, test); + free(testhost); + return; +} + +int +main(void) +{ + + printf("1..5\n"); + + testit(TESTFQDN, -1, TESTHOST, "self"); + testit("XXX" TESTDOMAIN, -1, "XXX", "different host, same domain"); + testit("XXX" TESTDOMAIN, 1, NULL, "short hostsize"); + testit("bogus.example.net", -1, NULL, "arbitrary host"); + testit("XXX." TESTFQDN, -1, NULL, "domain is local hostname"); + + return (0); +} Copied: head/lib/libutil/tests/trimdomain_test.c (from r269562, head/tools/regression/lib/libutil/test-trimdomain.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libutil/tests/trimdomain_test.c Wed Aug 13 04:56:27 2014 (r269904, copy of r269562, head/tools/regression/lib/libutil/test-trimdomain.c) @@ -0,0 +1,91 @@ +/* + * Copyright (C) 2005 Brooks Davis. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#define TESTDOMAIN ".domain.example.com" +#define TESTHOST "testhost" +#define TESTFQDN "testhost" TESTDOMAIN + +int failures = 0; +int tests = 0; + +/* + * Evily override gethostname(3) so trimdomain always gets the same result. + * This makes the tests much easier to write and less likely to fail on + * oddly configured systems. + */ +int +gethostname(char *name, size_t namelen) +{ + if (strlcpy(name, TESTFQDN, namelen) > namelen) { + errno = ENAMETOOLONG; + return (-1); + } + return (0); +} + +void +testit(const char *input, int hostsize, const char *output, const char *test) +{ + char *testhost; + const char *expected = (output == NULL) ? input : output; + + testhost = strdup(input); + trimdomain(testhost, hostsize < 0 ? (int)strlen(testhost) : hostsize); + tests++; + if (strcmp(testhost, expected) != 0) { + printf("not ok %d - %s\n", tests, test); + printf("# %s -> %s (expected %s)\n", input, testhost, expected); + } else + printf("ok %d - %s\n", tests, test); + free(testhost); + return; +} + +int +main(void) +{ + + printf("1..5\n"); + + testit(TESTFQDN, -1, TESTHOST, "self"); + testit("XXX" TESTDOMAIN, -1, "XXX", "different host, same domain"); + testit("XXX" TESTDOMAIN, 1, NULL, "short hostsize"); + testit("bogus.example.net", -1, NULL, "arbitrary host"); + testit("XXX." TESTFQDN, -1, NULL, "domain is local hostname"); + + return (0); +} From owner-svn-src-head@FreeBSD.ORG Wed Aug 13 05:15:28 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF5061C2; Wed, 13 Aug 2014 05:15:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC5862B3D; Wed, 13 Aug 2014 05:15:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7D5FS4X096463; Wed, 13 Aug 2014 05:15:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7D5FSUo096462; Wed, 13 Aug 2014 05:15:28 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201408130515.s7D5FSUo096462@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 Aug 2014 05:15:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269906 - head/etc/mtree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2014 05:15:29 -0000 Author: ngie Date: Wed Aug 13 05:15:28 2014 New Revision: 269906 URL: http://svnweb.freebsd.org/changeset/base/269906 Log: Add missing BSD.tests.dist entry for lib/libutil to unbreak installworld with MK_TESTS == no Phabric: D555 X-MFC with: r269904 Approved by: jmmv (mentor, implicit) Pointyhat to: ngie Modified: head/etc/mtree/BSD.tests.dist Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Wed Aug 13 05:03:09 2014 (r269905) +++ head/etc/mtree/BSD.tests.dist Wed Aug 13 05:15:28 2014 (r269906) @@ -89,6 +89,8 @@ .. libnv .. + libutil + .. .. libexec atf From owner-svn-src-head@FreeBSD.ORG Wed Aug 13 05:17:41 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC31641A; Wed, 13 Aug 2014 05:17:41 +0000 (UTC) Received: from mail-ig0-x236.google.com (mail-ig0-x236.google.com [IPv6:2607:f8b0:4001:c05::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9130B2B67; Wed, 13 Aug 2014 05:17:41 +0000 (UTC) Received: by mail-ig0-f182.google.com with SMTP id c1so643367igq.3 for ; Tue, 12 Aug 2014 22:17:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=KF2IpOxM/v9UVAoFOLWJlWxj/lCi9jDIRKuooAGkU6U=; b=nuoIJOhl+75hCVJtmY1DocoKNO0wxQMCZtvVrUIHzbmwV1+nv1HHqmTDnbLB5mpQYF +u8ck5bVqZ1DvU1JDOYLhqV400IwfCQ/6BlqMZepXfBTdI3sa+dMehDWZ7EYLrT7sIUR 7Sz7BjauBPpwqy4Yln7vYVUwsWEcgZImPgSKQKvToInZwS+Z6MLAziyBtac2Xz2UWoNz VqS8v5eQMhWB5tcNf4Wd9ZEXIuAsBaGYAeiyPsIJMNJzuD9cWtICExv8k674A8oU6A/1 SFj3jeqpZXBvZQtIO3iXzEaGfT6zw+pEyDlTb2YFh20RA7KCk/zHfUFx54aj51Rf/HQI uaeA== MIME-Version: 1.0 X-Received: by 10.50.43.164 with SMTP id x4mr20779627igl.27.1407907060928; Tue, 12 Aug 2014 22:17:40 -0700 (PDT) Received: by 10.50.76.229 with HTTP; Tue, 12 Aug 2014 22:17:40 -0700 (PDT) In-Reply-To: <201408130515.s7D5FSUo096462@svn.freebsd.org> References: <201408130515.s7D5FSUo096462@svn.freebsd.org> Date: Tue, 12 Aug 2014 22:17:40 -0700 Message-ID: Subject: Re: svn commit: r269906 - head/etc/mtree From: Garrett Cooper To: Garrett Cooper Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2014 05:17:42 -0000 On Tue, Aug 12, 2014 at 10:15 PM, Garrett Cooper wrote: > Author: ngie > Date: Wed Aug 13 05:15:28 2014 > New Revision: 269906 > URL: http://svnweb.freebsd.org/changeset/base/269906 > > Log: > Add missing BSD.tests.dist entry for lib/libutil to unbreak installworld with > MK_TESTS == no no -> yes I think that's my cue to stop committing for the night :). From owner-svn-src-head@FreeBSD.ORG Wed Aug 13 05:44:09 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B63BF72; Wed, 13 Aug 2014 05:44:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E5012FE3; Wed, 13 Aug 2014 05:44:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7D5i9EG009665; Wed, 13 Aug 2014 05:44:09 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7D5i8TA009662; Wed, 13 Aug 2014 05:44:08 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201408130544.s7D5i8TA009662@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 13 Aug 2014 05:44:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269907 - in head/sys: kern vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2014 05:44:09 -0000 Author: kib Date: Wed Aug 13 05:44:08 2014 New Revision: 269907 URL: http://svnweb.freebsd.org/changeset/base/269907 Log: If vm_page_grab() allocates a new page, the page is not inserted into page queue even when the allocation is not wired. It is responsibility of the vm_page_grab() caller to ensure that the page does not end on the vm_object queue but not on the pagedaemon queue, which would effectively create unpageable unwired page. In exec_map_first_page() and vm_imgact_hold_page(), activate the page immediately after unbusying it, to avoid leak. In the uiomove_object_page(), deactivate page before the object is unlocked. There is no leak, since the page is deactivated after uiomove_fromphys() finished. But allowing non-queued non-wired page in the unlocked object queue makes it impossible to assert that leak does not happen in other places. Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/kern_exec.c head/sys/kern/uipc_shm.c head/sys/vm/vm_glue.c Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Wed Aug 13 05:15:28 2014 (r269906) +++ head/sys/kern/kern_exec.c Wed Aug 13 05:44:08 2014 (r269907) @@ -993,6 +993,7 @@ exec_map_first_page(imgp) vm_page_xunbusy(ma[0]); vm_page_lock(ma[0]); vm_page_hold(ma[0]); + vm_page_activate(ma[0]); vm_page_unlock(ma[0]); VM_OBJECT_WUNLOCK(object); Modified: head/sys/kern/uipc_shm.c ============================================================================== --- head/sys/kern/uipc_shm.c Wed Aug 13 05:15:28 2014 (r269906) +++ head/sys/kern/uipc_shm.c Wed Aug 13 05:44:08 2014 (r269907) @@ -197,6 +197,12 @@ uiomove_object_page(vm_object_t obj, siz vm_page_xunbusy(m); vm_page_lock(m); vm_page_hold(m); + if (m->queue == PQ_NONE) { + vm_page_deactivate(m); + } else { + /* Requeue to maintain LRU ordering. */ + vm_page_requeue(m); + } vm_page_unlock(m); VM_OBJECT_WUNLOCK(obj); error = uiomove_fromphys(&m, offset, tlen, uio); @@ -208,12 +214,6 @@ uiomove_object_page(vm_object_t obj, siz } vm_page_lock(m); vm_page_unhold(m); - if (m->queue == PQ_NONE) { - vm_page_deactivate(m); - } else { - /* Requeue to maintain LRU ordering. */ - vm_page_requeue(m); - } vm_page_unlock(m); return (error); Modified: head/sys/vm/vm_glue.c ============================================================================== --- head/sys/vm/vm_glue.c Wed Aug 13 05:15:28 2014 (r269906) +++ head/sys/vm/vm_glue.c Wed Aug 13 05:44:08 2014 (r269907) @@ -251,6 +251,7 @@ vm_imgact_hold_page(vm_object_t object, vm_page_xunbusy(m); vm_page_lock(m); vm_page_hold(m); + vm_page_activate(m); vm_page_unlock(m); out: VM_OBJECT_WUNLOCK(object); From owner-svn-src-head@FreeBSD.ORG Wed Aug 13 05:47:49 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE80116F; Wed, 13 Aug 2014 05:47:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB98B2FFA; Wed, 13 Aug 2014 05:47:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7D5ln0t010182; Wed, 13 Aug 2014 05:47:49 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7D5lnxn010181; Wed, 13 Aug 2014 05:47:49 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201408130547.s7D5lnxn010181@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 13 Aug 2014 05:47:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269908 - head/lib/libthr/thread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2014 05:47:50 -0000 Author: kib Date: Wed Aug 13 05:47:49 2014 New Revision: 269908 URL: http://svnweb.freebsd.org/changeset/base/269908 Log: Style. Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/lib/libthr/thread/thr_stack.c Modified: head/lib/libthr/thread/thr_stack.c ============================================================================== --- head/lib/libthr/thread/thr_stack.c Wed Aug 13 05:44:08 2014 (r269907) +++ head/lib/libthr/thread/thr_stack.c Wed Aug 13 05:47:49 2014 (r269908) @@ -268,7 +268,7 @@ _thr_stack_alloc(struct pthread_attr *at /* Map the stack and guard page together, and split guard page from allocated space: */ - if ((stackaddr = mmap(stackaddr, stacksize+guardsize, + if ((stackaddr = mmap(stackaddr, stacksize + guardsize, _rtld_get_stack_prot(), MAP_STACK, -1, 0)) != MAP_FAILED && (guardsize == 0 || From owner-svn-src-head@FreeBSD.ORG Wed Aug 13 05:53:42 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9AAF6432; Wed, 13 Aug 2014 05:53:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6EF8420B4; Wed, 13 Aug 2014 05:53:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7D5rgeg014089; Wed, 13 Aug 2014 05:53:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7D5rgIR014087; Wed, 13 Aug 2014 05:53:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201408130553.s7D5rgIR014087@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 13 Aug 2014 05:53:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269909 - head/lib/libthr/thread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2014 05:53:42 -0000 Author: kib Date: Wed Aug 13 05:53:41 2014 New Revision: 269909 URL: http://svnweb.freebsd.org/changeset/base/269909 Log: Add a knob LIBPTHREAD_BIGSTACK_MAIN, which instructs libthr to leave the whole RLIMIT_STACK-sized region of the kernel-allocated stack as the stack of main thread. By default, the main thread stack is clamped at 2MB (4MB on 64bit ABIs) and the rest is used for other threads stack allocation. Since there is no programmatic way to adjust the size of the main thread stack, pthread_attr_setstacksize() is too late, the knob allows user to manage the main stack size both for single-threaded and multi-threaded processes with the rlimit. Reported by: "Ivan A. Kosarev" Tested by: dim Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/lib/libthr/thread/thr_init.c head/lib/libthr/thread/thr_stack.c Modified: head/lib/libthr/thread/thr_init.c ============================================================================== --- head/lib/libthr/thread/thr_init.c Wed Aug 13 05:47:49 2014 (r269908) +++ head/lib/libthr/thread/thr_init.c Wed Aug 13 05:53:41 2014 (r269909) @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -441,6 +442,7 @@ init_main_thread(struct pthread *thread) static void init_private(void) { + struct rlimit rlim; size_t len; int mib[2]; char *env; @@ -471,6 +473,12 @@ init_private(void) len = sizeof (_usrstack); if (sysctl(mib, 2, &_usrstack, &len, NULL, 0) == -1) PANIC("Cannot get kern.usrstack from sysctl"); + env = getenv("LIBPTHREAD_BIGSTACK_MAIN"); + if (env != NULL) { + if (getrlimit(RLIMIT_STACK, &rlim) == -1) + PANIC("Cannot get stack rlimit"); + _thr_stack_initial = rlim.rlim_cur; + } len = sizeof(_thr_is_smp); sysctlbyname("kern.smp.cpus", &_thr_is_smp, &len, NULL, 0); _thr_is_smp = (_thr_is_smp > 1); Modified: head/lib/libthr/thread/thr_stack.c ============================================================================== --- head/lib/libthr/thread/thr_stack.c Wed Aug 13 05:47:49 2014 (r269908) +++ head/lib/libthr/thread/thr_stack.c Wed Aug 13 05:53:41 2014 (r269909) @@ -246,7 +246,10 @@ _thr_stack_alloc(struct pthread_attr *at THREAD_LIST_UNLOCK(curthread); } else { - /* Allocate a stack from usrstack. */ + /* + * Allocate a stack from or below usrstack, depending + * on the LIBPTHREAD_BIGSTACK_MAIN env variable. + */ if (last_stack == NULL) last_stack = _usrstack - _thr_stack_initial - _thr_guard_default; From owner-svn-src-head@FreeBSD.ORG Wed Aug 13 14:49:52 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39F0AB3A; Wed, 13 Aug 2014 14:49:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26A5920FF; Wed, 13 Aug 2014 14:49:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7DEnqml067729; Wed, 13 Aug 2014 14:49:52 GMT (envelope-from pluknet@FreeBSD.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7DEnqv8067728; Wed, 13 Aug 2014 14:49:52 GMT (envelope-from pluknet@FreeBSD.org) Message-Id: <201408131449.s7DEnqv8067728@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pluknet set sender to pluknet@FreeBSD.org using -f From: Sergey Kandaurov Date: Wed, 13 Aug 2014 14:49:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269942 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2014 14:49:52 -0000 Author: pluknet Date: Wed Aug 13 14:49:51 2014 New Revision: 269942 URL: http://svnweb.freebsd.org/changeset/base/269942 Log: Fixed ENOMEM description. MFC after: 1 week Sponsored by: Nginx, Inc. Modified: head/lib/libc/gen/posix_spawnattr_init.3 Modified: head/lib/libc/gen/posix_spawnattr_init.3 ============================================================================== --- head/lib/libc/gen/posix_spawnattr_init.3 Wed Aug 13 12:58:15 2014 (r269941) +++ head/lib/libc/gen/posix_spawnattr_init.3 Wed Aug 13 14:49:51 2014 (r269942) @@ -100,7 +100,7 @@ The function will fail if: .Bl -tag -width Er .It Bq Er ENOMEM -Insufficient memory exists to initialize the spawn file actions object. +Insufficient memory exists to initialize the spawn attributes object. .El .Sh SEE ALSO .Xr posix_spawn 3 , From owner-svn-src-head@FreeBSD.ORG Wed Aug 13 15:50:18 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8EDED5D1; Wed, 13 Aug 2014 15:50:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6124D285E; Wed, 13 Aug 2014 15:50:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7DFoIX6096185; Wed, 13 Aug 2014 15:50:18 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7DFoGnQ096175; Wed, 13 Aug 2014 15:50:16 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201408131550.s7DFoGnQ096175@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 13 Aug 2014 15:50:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269945 - in head: lib/libc/net sys/conf sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2014 15:50:18 -0000 Author: tuexen Date: Wed Aug 13 15:50:16 2014 New Revision: 269945 URL: http://svnweb.freebsd.org/changeset/base/269945 Log: Add support for the SCTP_PR_STREAM_STATUS and SCTP_PR_ASSOC_STATUS socket options. This includes managing the correspoing stat counters. Add the SCTP_DETAILED_STR_STATS kernel option to control per policy counters on every stream. The default is off and only an aggregated counter is available. This is sufficient for the RTCWeb usecase. MFC after: 1 week Modified: head/lib/libc/net/sctp_sys_calls.c head/sys/conf/options head/sys/netinet/sctp.h head/sys/netinet/sctp_input.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_structs.h head/sys/netinet/sctp_uio.h head/sys/netinet/sctp_usrreq.c head/sys/netinet/sctputil.c Modified: head/lib/libc/net/sctp_sys_calls.c ============================================================================== --- head/lib/libc/net/sctp_sys_calls.c Wed Aug 13 15:48:10 2014 (r269944) +++ head/lib/libc/net/sctp_sys_calls.c Wed Aug 13 15:50:16 2014 (r269945) @@ -377,6 +377,12 @@ sctp_opt_info(int sd, sctp_assoc_t id, i case SCTP_ENABLE_STREAM_RESET: ((struct sctp_assoc_value *)arg)->assoc_id = id; break; + case SCTP_PR_STREAM_STATUS: + ((struct sctp_prstatus *)arg)->sprstat_assoc_id = id; + break; + case SCTP_PR_ASSOC_STATUS: + ((struct sctp_prstatus *)arg)->sprstat_assoc_id = id; + break; default: break; } Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Wed Aug 13 15:48:10 2014 (r269944) +++ head/sys/conf/options Wed Aug 13 15:50:16 2014 (r269945) @@ -457,6 +457,7 @@ SCTP_LTRACE_ERRORS opt_sctp.h # Log to K SCTP_USE_PERCPU_STAT opt_sctp.h # Use per cpu stats. SCTP_MCORE_INPUT opt_sctp.h # Have multiple input threads for input mbufs SCTP_LOCAL_TRACE_BUF opt_sctp.h # Use tracebuffer exported via sysctl +SCTP_DETAILED_STR_STATS opt_sctp.h # Use per PR-SCTP policy stream stats # # # Modified: head/sys/netinet/sctp.h ============================================================================== --- head/sys/netinet/sctp.h Wed Aug 13 15:48:10 2014 (r269944) +++ head/sys/netinet/sctp.h Wed Aug 13 15:50:16 2014 (r269945) @@ -140,6 +140,8 @@ struct sctp_paramhdr { #define SCTP_GET_ASSOC_NUMBER 0x00000104 /* ro */ #define SCTP_GET_ASSOC_ID_LIST 0x00000105 /* ro */ #define SCTP_TIMEOUTS 0x00000106 +#define SCTP_PR_STREAM_STATUS 0x00000107 +#define SCTP_PR_ASSOC_STATUS 0x00000108 /* * user socket options: BSD implementation specific Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Wed Aug 13 15:48:10 2014 (r269944) +++ head/sys/netinet/sctp_input.c Wed Aug 13 15:50:16 2014 (r269945) @@ -1469,6 +1469,11 @@ sctp_process_cookie_existing(struct mbuf int spec_flag = 0; uint32_t how_indx; +#if defined(SCTP_DETAILED_STR_STATS) + int j; + +#endif + net = *netp; /* I know that the TCB is non-NULL from the caller */ asoc = &stcb->asoc; @@ -1931,6 +1936,15 @@ sctp_process_cookie_existing(struct mbuf sctp_report_all_outbound(stcb, 0, 1, SCTP_SO_LOCKED); for (i = 0; i < stcb->asoc.streamoutcnt; i++) { stcb->asoc.strmout[i].chunks_on_queues = 0; +#if defined(SCTP_DETAILED_STR_STATS) + for (j = 0; j < SCTP_PR_SCTP_MAX + 1; j++) { + asoc->strmout[i].abandoned_sent[j] = 0; + asoc->strmout[i].abandoned_unsent[j] = 0; + } +#else + asoc->strmout[i].abandoned_sent[0] = 0; + asoc->strmout[i].abandoned_unsent[0] = 0; +#endif stcb->asoc.strmout[i].stream_no = i; stcb->asoc.strmout[i].next_sequence_send = 0; stcb->asoc.strmout[i].last_msg_incomplete = 0; Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Wed Aug 13 15:48:10 2014 (r269944) +++ head/sys/netinet/sctp_output.c Wed Aug 13 15:50:16 2014 (r269945) @@ -3618,6 +3618,11 @@ sctp_process_cmsgs_for_init(struct sctp_ struct sctp_stream_out *tmp_str; unsigned int i; +#if defined(SCTP_DETAILED_STR_STATS) + int j; + +#endif + /* Default is NOT correct */ SCTPDBG(SCTP_DEBUG_OUTPUT1, "Ok, default:%d pre_open:%d\n", stcb->asoc.streamoutcnt, stcb->asoc.pre_open_streams); @@ -3638,6 +3643,15 @@ sctp_process_cmsgs_for_init(struct sctp_ TAILQ_INIT(&stcb->asoc.strmout[i].outqueue); stcb->asoc.strmout[i].chunks_on_queues = 0; stcb->asoc.strmout[i].next_sequence_send = 0; +#if defined(SCTP_DETAILED_STR_STATS) + for (j = 0; j < SCTP_PR_SCTP_MAX + 1; j++) { + stcb->asoc.strmout[i].abandoned_sent[j] = 0; + stcb->asoc.strmout[i].abandoned_unsent[j] = 0; + } +#else + stcb->asoc.strmout[i].abandoned_sent[0] = 0; + stcb->asoc.strmout[i].abandoned_unsent[0] = 0; +#endif stcb->asoc.strmout[i].stream_no = i; stcb->asoc.strmout[i].last_msg_incomplete = 0; stcb->asoc.ss_functions.sctp_ss_init_stream(&stcb->asoc.strmout[i], NULL); @@ -11923,6 +11937,11 @@ sctp_send_str_reset_req(struct sctp_tcb struct sctp_stream_queue_pending *sp, *nsp; int i; +#if defined(SCTP_DETAILED_STR_STATS) + int j; + +#endif + oldstream = stcb->asoc.strmout; /* get some more */ SCTP_MALLOC(stcb->asoc.strmout, struct sctp_stream_out *, @@ -11968,6 +11987,15 @@ sctp_send_str_reset_req(struct sctp_tcb for (i = stcb->asoc.streamoutcnt; i < (stcb->asoc.streamoutcnt + adding_o); i++) { TAILQ_INIT(&stcb->asoc.strmout[i].outqueue); stcb->asoc.strmout[i].chunks_on_queues = 0; +#if defined(SCTP_DETAILED_STR_STATS) + for (j = 0; j < SCTP_PR_SCTP_MAX + 1; j++) { + stcb->asoc.strmout[i].abandoned_sent[j] = 0; + stcb->asoc.strmout[i].abandoned_unsent[j] = 0; + } +#else + stcb->asoc.strmout[i].abandoned_sent[0] = 0; + stcb->asoc.strmout[i].abandoned_unsent[0] = 0; +#endif stcb->asoc.strmout[i].next_sequence_send = 0x0; stcb->asoc.strmout[i].stream_no = i; stcb->asoc.strmout[i].last_msg_incomplete = 0; Modified: head/sys/netinet/sctp_structs.h ============================================================================== --- head/sys/netinet/sctp_structs.h Wed Aug 13 15:48:10 2014 (r269944) +++ head/sys/netinet/sctp_structs.h Wed Aug 13 15:50:16 2014 (r269945) @@ -587,6 +587,14 @@ struct sctp_stream_out { struct sctp_streamhead outqueue; union scheduling_parameters ss_params; uint32_t chunks_on_queues; +#if defined(SCTP_DETAILED_STR_STATS) + uint32_t abandoned_unsent[SCTP_PR_SCTP_MAX + 1]; + uint32_t abandoned_sent[SCTP_PR_SCTP_MAX + 1]; +#else + /* Only the aggregation */ + uint32_t abandoned_unsent[1]; + uint32_t abandoned_sent[1]; +#endif uint16_t stream_no; uint16_t next_sequence_send; /* next one I expect to send out */ uint8_t last_msg_incomplete; @@ -1211,6 +1219,8 @@ struct sctp_association { uint32_t timoshutdownack; struct timeval start_time; struct timeval discontinuity_time; + uint64_t abandoned_unsent[SCTP_PR_SCTP_MAX + 1]; + uint64_t abandoned_sent[SCTP_PR_SCTP_MAX + 1]; }; #endif Modified: head/sys/netinet/sctp_uio.h ============================================================================== --- head/sys/netinet/sctp_uio.h Wed Aug 13 15:48:10 2014 (r269944) +++ head/sys/netinet/sctp_uio.h Wed Aug 13 15:50:16 2014 (r269945) @@ -249,18 +249,23 @@ struct sctp_snd_all_completes { SCTP_SACK_IMMEDIATELY)) != 0) /* for the endpoint */ -/* The lower byte is an enumeration of PR-SCTP policies */ +/* The lower four bits is an enumeration of PR-SCTP policies */ #define SCTP_PR_SCTP_NONE 0x0000/* Reliable transfer */ #define SCTP_PR_SCTP_TTL 0x0001/* Time based PR-SCTP */ #define SCTP_PR_SCTP_BUF 0x0002/* Buffer based PR-SCTP */ #define SCTP_PR_SCTP_RTX 0x0003/* Number of retransmissions based PR-SCTP */ +#define SCTP_PR_SCTP_MAX SCTP_PR_SCTP_RTX +#define SCTP_PR_SCTP_ALL 0x000f/* Used for aggregated stats */ #define PR_SCTP_POLICY(x) ((x) & 0x0f) -#define PR_SCTP_ENABLED(x) (PR_SCTP_POLICY(x) != SCTP_PR_SCTP_NONE) +#define PR_SCTP_ENABLED(x) ((PR_SCTP_POLICY(x) != SCTP_PR_SCTP_NONE) && \ + (PR_SCTP_POLICY(x) != SCTP_PR_SCTP_ALL)) #define PR_SCTP_TTL_ENABLED(x) (PR_SCTP_POLICY(x) == SCTP_PR_SCTP_TTL) #define PR_SCTP_BUF_ENABLED(x) (PR_SCTP_POLICY(x) == SCTP_PR_SCTP_BUF) #define PR_SCTP_RTX_ENABLED(x) (PR_SCTP_POLICY(x) == SCTP_PR_SCTP_RTX) -#define PR_SCTP_INVALID_POLICY(x) (PR_SCTP_POLICY(x) > SCTP_PR_SCTP_RTX) +#define PR_SCTP_INVALID_POLICY(x) (PR_SCTP_POLICY(x) > SCTP_PR_SCTP_MAX) +#define PR_SCTP_VALID_POLICY(x) (PR_SCTP_POLICY(x) <= SCTP_PR_SCTP_MAX) + /* Stat's */ struct sctp_pcbinfo { uint32_t ep_count; @@ -719,6 +724,14 @@ struct sctp_udpencaps { uint16_t sue_port; }; +struct sctp_prstatus { + sctp_assoc_t sprstat_assoc_id; + uint16_t sprstat_sid; + uint16_t sprstat_policy; + uint64_t sprstat_abandoned_unsent; + uint64_t sprstat_abandoned_sent; +}; + struct sctp_cwnd_args { struct sctp_nets *net; /* network to *//* FIXME: LP64 issue */ uint32_t cwnd_new_value;/* cwnd in k */ Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Wed Aug 13 15:48:10 2014 (r269944) +++ head/sys/netinet/sctp_usrreq.c Wed Aug 13 15:50:16 2014 (r269945) @@ -3510,6 +3510,72 @@ flags_out: } break; } + case SCTP_PR_STREAM_STATUS: + { + struct sctp_prstatus *sprstat; + uint16_t sid; + uint16_t policy; + + SCTP_CHECK_AND_CAST(sprstat, optval, struct sctp_prstatus, *optsize); + SCTP_FIND_STCB(inp, stcb, sprstat->sprstat_assoc_id); + + sid = sprstat->sprstat_sid; + policy = sprstat->sprstat_policy; +#if defined(SCTP_DETAILED_STR_STATS) + if ((stcb != NULL) && + (policy != SCTP_PR_SCTP_NONE) && + (sid < stcb->asoc.streamoutcnt) && + ((policy == SCTP_PR_SCTP_ALL) || + (PR_SCTP_VALID_POLICY(policy)))) { +#else + if ((stcb != NULL) && + (policy != SCTP_PR_SCTP_NONE) && + (sid < stcb->asoc.streamoutcnt) && + (policy == SCTP_PR_SCTP_ALL)) { +#endif + if (policy == SCTP_PR_SCTP_ALL) { + sprstat->sprstat_abandoned_unsent = stcb->asoc.strmout[sid].abandoned_unsent[0]; + sprstat->sprstat_abandoned_sent = stcb->asoc.strmout[sid].abandoned_sent[0]; + } else { + sprstat->sprstat_abandoned_unsent = stcb->asoc.strmout[sid].abandoned_unsent[policy]; + sprstat->sprstat_abandoned_sent = stcb->asoc.strmout[sid].abandoned_sent[policy]; + } + SCTP_TCB_UNLOCK(stcb); + *optsize = sizeof(struct sctp_prstatus); + } else { + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); + error = EINVAL; + } + break; + } + case SCTP_PR_ASSOC_STATUS: + { + struct sctp_prstatus *sprstat; + uint16_t policy; + + SCTP_CHECK_AND_CAST(sprstat, optval, struct sctp_prstatus, *optsize); + SCTP_FIND_STCB(inp, stcb, sprstat->sprstat_assoc_id); + + policy = sprstat->sprstat_policy; + if ((stcb != NULL) && + (policy != SCTP_PR_SCTP_NONE) && + ((policy == SCTP_PR_SCTP_ALL) || + (PR_SCTP_VALID_POLICY(policy)))) { + if (policy == SCTP_PR_SCTP_ALL) { + sprstat->sprstat_abandoned_unsent = stcb->asoc.abandoned_unsent[0]; + sprstat->sprstat_abandoned_sent = stcb->asoc.abandoned_sent[0]; + } else { + sprstat->sprstat_abandoned_unsent = stcb->asoc.abandoned_unsent[policy]; + sprstat->sprstat_abandoned_sent = stcb->asoc.abandoned_sent[policy]; + } + SCTP_TCB_UNLOCK(stcb); + *optsize = sizeof(struct sctp_prstatus); + } else { + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); + error = EINVAL; + } + break; + } default: SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, ENOPROTOOPT); error = ENOPROTOOPT; Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Wed Aug 13 15:48:10 2014 (r269944) +++ head/sys/netinet/sctputil.c Wed Aug 13 15:50:16 2014 (r269945) @@ -896,6 +896,11 @@ sctp_init_asoc(struct sctp_inpcb *inp, s */ int i; +#if defined(SCTP_DETAILED_STR_STATS) + int j; + +#endif + asoc = &stcb->asoc; /* init all variables to a known value. */ SCTP_SET_STATE(&stcb->asoc, SCTP_STATE_INUSE); @@ -1056,6 +1061,15 @@ sctp_init_asoc(struct sctp_inpcb *inp, s asoc->strmout[i].next_sequence_send = 0x0; TAILQ_INIT(&asoc->strmout[i].outqueue); asoc->strmout[i].chunks_on_queues = 0; +#if defined(SCTP_DETAILED_STR_STATS) + for (j = 0; j < SCTP_PR_SCTP_MAX + 1; j++) { + asoc->strmout[i].abandoned_sent[j] = 0; + asoc->strmout[i].abandoned_unsent[j] = 0; + } +#else + asoc->strmout[i].abandoned_sent[0] = 0; + asoc->strmout[i].abandoned_unsent[0] = 0; +#endif asoc->strmout[i].stream_no = i; asoc->strmout[i].last_msg_incomplete = 0; asoc->ss_functions.sctp_ss_init_stream(&asoc->strmout[i], NULL); @@ -1111,6 +1125,10 @@ sctp_init_asoc(struct sctp_inpcb *inp, s asoc->timoshutdownack = 0; (void)SCTP_GETTIME_TIMEVAL(&asoc->start_time); asoc->discontinuity_time = asoc->start_time; + for (i = 0; i < SCTP_PR_SCTP_MAX + 1; i++) { + asoc->abandoned_unsent[i] = 0; + asoc->abandoned_sent[i] = 0; + } /* * sa_ignore MEMLEAK {memory is put in the assoc mapping array and * freed later when the association is freed. @@ -4713,6 +4731,21 @@ sctp_release_pr_sctp_chunk(struct sctp_t stream = tp1->rec.data.stream_number; seq = tp1->rec.data.stream_seq; + if (sent || !(tp1->rec.data.rcv_flags & SCTP_DATA_FIRST_FRAG)) { + stcb->asoc.abandoned_sent[0]++; + stcb->asoc.abandoned_sent[PR_SCTP_POLICY(tp1->flags)]++; + stcb->asoc.strmout[stream].abandoned_sent[0]++; +#if defined(SCTP_DETAILED_STR_STATS) + stcb->asoc.strmout[stream].abandoned_sent[PR_SCTP_POLICY(tp1->flags)]++; +#endif + } else { + stcb->asoc.abandoned_unsent[0]++; + stcb->asoc.abandoned_unsent[PR_SCTP_POLICY(tp1->flags)]++; + stcb->asoc.strmout[stream].abandoned_unsent[0]++; +#if defined(SCTP_DETAILED_STR_STATS) + stcb->asoc.strmout[stream].abandoned_unsent[PR_SCTP_POLICY(tp1->flags)]++; +#endif + } do { ret_sz += tp1->book_size; if (tp1->data != NULL) { From owner-svn-src-head@FreeBSD.ORG Wed Aug 13 16:42:45 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4DD879F7; Wed, 13 Aug 2014 16:42:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A7092EE4; Wed, 13 Aug 2014 16:42:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7DGgj8x023263; Wed, 13 Aug 2014 16:42:45 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7DGgj7G023262; Wed, 13 Aug 2014 16:42:45 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201408131642.s7DGgj7G023262@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 13 Aug 2014 16:42:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269948 - head/contrib/gcc/config/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2014 16:42:45 -0000 Author: dim Date: Wed Aug 13 16:42:44 2014 New Revision: 269948 URL: http://svnweb.freebsd.org/changeset/base/269948 Log: Supplement r259111 by also using correct casts in gcc's emmintrin.h for the first argument of the following builtin function: * __builtin_ia32_psrlqi128() takes __v2di instead of __v4si This should fix the following errors when building the graphics/webp port with base gcc: lossless_sse2.c:403: error: incompatible type for argument 1 of '__builtin_ia32_psrlqi128' lossless_sse2.c:404: error: incompatible type for argument 1 of '__builtin_ia32_psrlqi128' Reported by: Jos Chrispijn MFC after: 3 days Modified: head/contrib/gcc/config/i386/emmintrin.h Modified: head/contrib/gcc/config/i386/emmintrin.h ============================================================================== --- head/contrib/gcc/config/i386/emmintrin.h Wed Aug 13 16:20:41 2014 (r269947) +++ head/contrib/gcc/config/i386/emmintrin.h Wed Aug 13 16:42:44 2014 (r269948) @@ -1193,7 +1193,7 @@ _mm_srli_epi64 (__m128i __A, int __B) #define _mm_srli_epi32(__A, __B) \ ((__m128i)__builtin_ia32_psrldi128 ((__v4si)(__A), __B)) #define _mm_srli_epi64(__A, __B) \ - ((__m128i)__builtin_ia32_psrlqi128 ((__v4si)(__A), __B)) + ((__m128i)__builtin_ia32_psrlqi128 ((__v2di)(__A), __B)) #endif static __inline __m128i __attribute__((__always_inline__)) From owner-svn-src-head@FreeBSD.ORG Wed Aug 13 19:06:32 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 12F984FE; Wed, 13 Aug 2014 19:06:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F298E20D7; Wed, 13 Aug 2014 19:06:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7DJ6VW2087057; Wed, 13 Aug 2014 19:06:31 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7DJ6UPN087045; Wed, 13 Aug 2014 19:06:30 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201408131906.s7DJ6UPN087045@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 13 Aug 2014 19:06:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269950 - head/share/vt/keymaps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2014 19:06:32 -0000 Author: emaste Date: Wed Aug 13 19:06:29 2014 New Revision: 269950 URL: http://svnweb.freebsd.org/changeset/base/269950 Log: Copy country-code .iso syscons keymaps for vt(4) Existing syscons ISO 8859-1 keymaps (??.iso.kbd) are usable without change as Unicode keymaps for vt(4). Sponsored by: The FreeBSD Foundation Added: head/share/vt/keymaps/be.kbd - copied unchanged from r269585, head/share/syscons/keymaps/be.iso.kbd head/share/vt/keymaps/fr.kbd - copied unchanged from r269585, head/share/syscons/keymaps/fr.iso.kbd head/share/vt/keymaps/hr.kbd - copied unchanged from r269585, head/share/syscons/keymaps/hr.iso.kbd head/share/vt/keymaps/it.kbd - copied unchanged from r269585, head/share/syscons/keymaps/it.iso.kbd head/share/vt/keymaps/pt.kbd - copied unchanged from r269585, head/share/syscons/keymaps/pt.iso.kbd head/share/vt/keymaps/si.kbd - copied unchanged from r269585, head/share/syscons/keymaps/si.iso.kbd head/share/vt/keymaps/uk.kbd - copied unchanged from r269585, head/share/syscons/keymaps/uk.iso.kbd head/share/vt/keymaps/us.kbd - copied unchanged from r269585, head/share/syscons/keymaps/us.iso.kbd Modified: head/share/vt/keymaps/Makefile Modified: head/share/vt/keymaps/Makefile ============================================================================== --- head/share/vt/keymaps/Makefile Wed Aug 13 16:53:12 2014 (r269949) +++ head/share/vt/keymaps/Makefile Wed Aug 13 19:06:29 2014 (r269950) @@ -1,6 +1,16 @@ # $FreeBSD$ -FILES= pl.kbd ua.kbd ua.shift.alt.kbd +FILES= be.kbd \ + fr.kbd \ + hr.kbd \ + it.kbd \ + pl.kbd \ + pt.kbd \ + si.kbd \ + ua.kbd \ + ua.shift.alt.kbd \ + uk.kbd \ + us.kbd FILESDIR= ${SHAREDIR}/vt/keymaps Copied: head/share/vt/keymaps/be.kbd (from r269585, head/share/syscons/keymaps/be.iso.kbd) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/vt/keymaps/be.kbd Wed Aug 13 19:06:29 2014 (r269950, copy of r269585, head/share/syscons/keymaps/be.iso.kbd) @@ -0,0 +1,114 @@ +# $FreeBSD$ +# alt +# scan cntrl alt alt cntrl lock +# code base shift cntrl shift alt shift cntrl shift state +# ------------------------------------------------------------------ + 000 nop nop nop nop nop nop nop nop O + 001 esc esc esc esc esc esc debug esc O + 002 '&' '1' nop nop '|' '|' nop nop O + 003 233 '2' nul nul '@' '@' nul nul O + 004 '"' '3' nop nop '#' '#' nop nop O + 005 ''' '4' nop nop ''' '4' nop nop O + 006 '(' '5' nop nop '(' '5' nop nop O + 007 167 '6' rs rs '^' '^' rs rs O + 008 232 '7' nop nop 232 '7' nop nop O + 009 '!' '8' nop nop '!' '8' nop nop O + 010 231 '9' nop nop '{' '{' nop nop O + 011 224 '0' nop nop '}' '}' nop nop O + 012 ')' 176 nop nop ')' 176 nop nop O + 013 '-' '_' us us '-' '_' us us O + 014 bs bs del del bs bs del del O + 015 ht btab nop nop ht btab nop nop O + 016 'a' 'A' soh soh 'a' 'A' soh soh C + 017 'z' 'Z' sub sub 'z' 'Z' sub sub C + 018 'e' 'E' enq enq 164 'E' enq enq C + 019 'r' 'R' dc2 dc2 'r' 'R' dc2 dc2 C + 020 't' 'T' dc4 dc4 't' 'T' dc4 dc4 C + 021 'y' 'Y' em em 'y' 'Y' em em C + 022 'u' 'U' nak nak 'u' 'U' nak nak C + 023 'i' 'I' ht ht 'i' 'I' ht ht C + 024 'o' 'O' si si 'o' 'O' si si C + 025 'p' 'P' dle dle 'p' 'P' dle dle C + 026 '^' 168 esc esc '[' '[' esc esc O + 027 '$' '*' gs gs ']' ']' gs gs O + 028 cr cr nl nl cr cr nl nl O + 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O + 030 'q' 'Q' dc1 dc1 'q' 'Q' dc1 dc1 C + 031 's' 'S' dc3 dc3 's' 'S' dc3 dc3 C + 032 'd' 'D' eot eot 'd' 'D' eot eot C + 033 'f' 'F' ack ack 'f' 'F' ack ack C + 034 'g' 'G' bel bel 'g' 'G' bel bel C + 035 'h' 'H' bs bs 'h' 'H' bs bs C + 036 'j' 'J' nl nl 'j' 'J' nl nl C + 037 'k' 'K' vt vt 'k' 'K' vt vt C + 038 'l' 'L' ff ff 'l' 'L' ff ff C + 039 'm' 'M' cr cr 'm' 'M' cr cr C + 040 249 '%' nop nop ''' ''' nop nop O + 041 178 179 nop nop 178 179 nop nop O + 042 lshift lshift lshift lshift lshift lshift lshift lshift O + 043 181 163 nop nop '`' '`' nop nop O + 044 'w' 'W' etb etb 'w' 'W' etb etb C + 045 'x' 'X' can can 'x' 'X' can can C + 046 'c' 'C' etx etx 'c' 'C' etx etx C + 047 'v' 'V' syn syn 'v' 'V' syn syn C + 048 'b' 'B' stx stx 'b' 'B' stx stx C + 049 'n' 'N' so so 'n' 'N' so so C + 050 ',' '?' nop nop ',' '?' nop nop O + 051 ';' '.' nop nop ';' '.' nop nop O + 052 ':' '/' nop nop ':' '/' nop nop O + 053 '=' '+' nop nop '~' '~' nop nop O + 054 rshift rshift rshift rshift rshift rshift rshift rshift O + 055 '*' '*' '*' '*' '*' '*' '*' '*' O + 056 lalt lalt lalt lalt lalt lalt lalt lalt O + 057 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O + 058 clock clock clock clock clock clock clock clock O + 059 fkey01 fkey13 fkey25 fkey37 scr01 scr11 scr01 scr11 O + 060 fkey02 fkey14 fkey26 fkey38 scr02 scr12 scr02 scr12 O + 061 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O + 062 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O + 063 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O + 064 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O + 065 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O + 066 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O + 067 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O + 068 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O + 069 nlock nlock nlock nlock nlock nlock nlock nlock O + 070 slock slock slock slock slock slock slock slock O + 071 fkey49 '7' '7' '7' '7' '7' '7' '7' N + 072 fkey50 '8' '8' '8' '8' '8' '8' '8' N + 073 fkey51 '9' '9' '9' '9' '9' '9' '9' N + 074 fkey52 '-' '-' '-' '-' '-' '-' '-' N + 075 fkey53 '4' '4' '4' '4' '4' '4' '4' N + 076 fkey54 '5' '5' '5' '5' '5' '5' '5' N + 077 fkey55 '6' '6' '6' '6' '6' '6' '6' N + 078 fkey56 '+' '+' '+' '+' '+' '+' '+' N + 079 fkey57 '1' '1' '1' '1' '1' '1' '1' N + 080 fkey58 '2' '2' '2' '2' '2' '2' '2' N + 081 fkey59 '3' '3' '3' '3' '3' '3' '3' N + 082 fkey60 '0' '0' '0' '0' '0' '0' '0' N + 083 del '.' '.' '.' '.' '.' boot boot N + 084 nop nop nop nop nop nop nop nop O + 085 nop nop nop nop nop nop nop nop O + 086 '<' '>' fs fs '\' '\' '\' fs O + 087 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O + 088 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O + 089 cr cr nl nl cr cr nl nl O + 090 rctrl rctrl rctrl rctrl rctrl rctrl rctrl rctrl O + 091 '/' '/' '/' '/' '/' '/' '/' '/' N + 092 nscr pscr debug debug nop nop nop nop O + 093 ralt ralt ralt ralt ralt ralt ralt ralt O + 094 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 O + 095 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 O + 096 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 O + 097 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 O + 098 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 O + 099 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 O + 100 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 O + 101 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O + 102 fkey60 paste fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 O + 103 fkey61 fkey61 fkey61 fkey61 fkey61 fkey61 boot fkey61 O + 104 slock saver slock saver susp nop susp nop O + 105 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 O + 106 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 O + 107 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O + 108 nop nop nop nop nop nop nop nop O Copied: head/share/vt/keymaps/fr.kbd (from r269585, head/share/syscons/keymaps/fr.iso.kbd) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/vt/keymaps/fr.kbd Wed Aug 13 19:06:29 2014 (r269950, copy of r269585, head/share/syscons/keymaps/fr.iso.kbd) @@ -0,0 +1,114 @@ +# $FreeBSD$ +# alt +# scan cntrl alt alt cntrl lock +# code base shift cntrl shift alt shift cntrl shift state +# ------------------------------------------------------------------ + 000 nop nop nop nop nop nop nop nop O + 001 esc esc esc esc esc esc debug esc O + 002 '&' '1' nop nop nop nop nop nop C + 003 233 '2' nul nul '~' nop nop nop C + 004 '"' '3' nop nop '#' nop nop nop C + 005 ''' '4' nop nop '{' nop nop nop C + 006 '(' '5' nop nop '[' nop nop nop C + 007 '-' '6' nop nop '|' nop nop nop C + 008 232 '7' nop nop '`' nop nop nop C + 009 '_' '8' nop nop '\' nop fs nop C + 010 231 '9' nop nop '^' nop nop nop C + 011 224 '0' nop nop '@' nop nop nop C + 012 ')' 176 nop nop ']' nop nop nop C + 013 '=' '+' nop nop '}' nop nop nop C + 014 bs bs del del bs bs del del O + 015 ht btab nop nop ht btab nop nop O + 016 'a' 'A' soh soh 226 228 dc1 dc1 C + 017 'z' 'Z' sub sub 'z' 'Z' etb etb C + 018 'e' 'E' enq enq 164 'E' enq enq C + 019 'r' 'R' dc2 dc2 'r' 'R' dc2 dc2 C + 020 't' 'T' dc4 dc4 't' 'T' dc4 dc4 C + 021 'y' 'Y' em em 237 236 em em C + 022 'u' 'U' nak nak 251 252 nak nak C + 023 'i' 'I' ht ht 238 239 ht ht C + 024 'o' 'O' si si 244 246 si si C + 025 'p' 'P' dle dle 247 230 dle dle C + 026 234 244 esc esc '[' '{' esc esc O + 027 '$' 163 gs gs ']' '}' gs gs O + 028 cr cr nl nl cr cr nl nl O + 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O + 030 'q' 'Q' dc1 dc1 'q' 'Q' soh soh C + 031 's' 'S' dc3 dc3 's' 'S' dc3 dc3 C + 032 'd' 'D' eot eot 'd' 'D' eot eot C + 033 'f' 'F' ack ack 'f' 'F' ack ack C + 034 'g' 'G' bel bel 'g' 'G' bel bel C + 035 'h' 'H' bs bs 'h' 'H' bs bs C + 036 'j' 'J' nl nl 'j' 'J' nl nl C + 037 'k' 'K' vt vt 'k' 'K' vt vt C + 038 'l' 'L' ff ff 'l' 'L' ff ff C + 039 'm' 'M' cr cr 'm' 'M' cr cr C + 040 249 '%' nul nul ''' '@' nul nul O + 041 178 nop nop nop '|' '|' nop nop O + 042 lshift lshift lshift lshift lshift lshift lshift lshift O + 043 '*' 181 nop nop '#' '~' nop nop O + 044 'w' 'W' etb etb 'w' 'W' sub sub C + 045 'x' 'X' can can 'x' 'X' can can C + 046 'c' 'C' etx etx 'c' 'C' etx etx C + 047 'v' 'V' syn syn 'v' 'V' syn syn C + 048 'b' 'B' stx stx 223 'B' stx stx C + 049 'n' 'N' so so 'n' 'N' so so C + 050 ',' '?' nop nop nop nop nop nop O + 051 ';' '.' nop nop ',' '<' nop nop O + 052 ':' '/' nop nop '.' '>' nop nop O + 053 '!' 167 nop nop '/' '?' nop nop O + 054 rshift rshift rshift rshift rshift rshift rshift rshift O + 055 '*' '*' '*' '*' '*' '*' '*' '*' O + 056 lalt lalt lalt lalt lalt lalt lalt lalt O + 057 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O + 058 clock clock clock clock clock clock clock clock O + 059 fkey01 fkey13 fkey25 fkey37 scr01 scr11 scr01 scr11 O + 060 fkey02 fkey14 fkey26 fkey38 scr02 scr12 scr02 scr12 O + 061 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O + 062 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O + 063 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O + 064 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O + 065 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O + 066 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O + 067 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O + 068 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O + 069 nlock nlock nlock nlock nlock nlock nlock nlock O + 070 slock slock slock slock slock slock slock slock O + 071 fkey49 '7' '7' '7' '7' '7' '7' '7' N + 072 fkey50 '8' '8' '8' '8' '8' '8' '8' N + 073 fkey51 '9' '9' '9' '9' '9' '9' '9' N + 074 fkey52 '-' '-' '-' '-' '-' '-' '-' N + 075 fkey53 '4' '4' '4' '4' '4' '4' '4' N + 076 fkey54 '5' '5' '5' '5' '5' '5' '5' N + 077 fkey55 '6' '6' '6' '6' '6' '6' '6' N + 078 fkey56 '+' '+' '+' '+' '+' '+' '+' N + 079 fkey57 '1' '1' '1' '1' '1' '1' '1' N + 080 fkey58 '2' '2' '2' '2' '2' '2' '2' N + 081 fkey59 '3' '3' '3' '3' '3' '3' '3' N + 082 fkey60 '0' '0' '0' '0' '0' '0' '0' N + 083 del '.' '.' '.' '.' '.' boot boot N + 084 nop nop nop nop nop nop nop nop O + 085 nop nop nop nop nop nop nop nop O + 086 '<' '>' fs fs 171 187 fs fs O + 087 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O + 088 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O + 089 cr cr nl nl cr cr nl nl O + 090 rctrl rctrl rctrl rctrl rctrl rctrl rctrl rctrl O + 091 '/' '/' '/' '/' '/' '/' '/' '/' O + 092 nscr pscr debug debug nop nop nop nop O + 093 ralt ralt ralt ralt ralt ralt ralt ralt O + 094 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 O + 095 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 O + 096 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 O + 097 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 O + 098 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 O + 099 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 O + 100 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 O + 101 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O + 102 fkey60 paste fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 O + 103 fkey61 fkey61 fkey61 fkey61 fkey61 fkey61 boot fkey61 O + 104 slock saver slock saver susp nop susp nop O + 105 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 O + 106 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 O + 107 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O + 108 nop nop nop nop nop nop nop nop O Copied: head/share/vt/keymaps/hr.kbd (from r269585, head/share/syscons/keymaps/hr.iso.kbd) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/vt/keymaps/hr.kbd Wed Aug 13 19:06:29 2014 (r269950, copy of r269585, head/share/syscons/keymaps/hr.iso.kbd) @@ -0,0 +1,116 @@ +# Slovenian keyboard +# Blaz Zupan +# $FreeBSD$ +# alt +# scan cntrl alt alt cntrl lock +# code base shift cntrl shift alt shift cntrl shift state +# ------------------------------------------------------------------ + 000 nop nop nop nop nop nop nop nop O + 001 esc esc esc esc esc esc debug esc O + 002 '1' '!' nop nop '~' '~' nop nop O + 003 '2' '"' nul nul 183 183 nul nul O + 004 '3' '#' nop nop '^' '^' nop nop O + 005 '4' '$' nop nop 162 162 nop nop O + 006 '5' '%' nop nop 176 176 nop nop O + 007 '6' '&' rs rs 178 178 rs rs O + 008 '7' '/' nop nop '`' '`' nop nop O + 009 '8' '(' nop nop 255 255 nop nop O + 010 '9' ')' nop nop ''' ''' nop nop O + 011 '0' '=' nop nop 189 189 nop nop O + 012 ''' '?' us us 168 168 us us O + 013 '+' '*' nop nop 184 184 nop nop O + 014 bs bs del del bs bs del del O + 015 ht btab nop nop ht btab nop nop O + 016 'q' 'Q' dc1 dc1 '\' '\' dc1 dc1 C + 017 'w' 'W' etb etb '|' '|' etb etb C + 018 'e' 'E' enq enq 'e' 'E' enq enq C + 019 'r' 'R' dc2 dc2 'r' 'R' dc2 dc2 C + 020 't' 'T' dc4 dc4 't' 'T' dc4 dc4 C + 021 'z' 'Z' sub sub 'z' 'Z' sub sub C + 022 'u' 'U' nak nak 'u' 'U' nak nak C + 023 'i' 'I' ht ht 'i' 'I' ht ht C + 024 'o' 'O' si si 'o' 'O' si si C + 025 'p' 'P' dle dle 'p' 'P' dle dle C + 026 185 169 esc esc 247 247 esc esc C + 027 240 208 gs gs 215 215 gs gs C + 028 cr cr nl nl cr cr nl nl O + 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O + 030 'a' 'A' soh soh 'a' 'A' soh soh C + 031 's' 'S' dc3 dc3 's' 'S' dc3 dc3 C + 032 'd' 'D' eot eot 'd' 'D' eot eot C + 033 'f' 'F' ack ack '[' '[' ack ack C + 034 'g' 'G' bel bel ']' ']' bel bel C + 035 'h' 'H' bs bs 'h' 'H' bs bs C + 036 'j' 'J' nl nl 'j' 'J' nl nl C + 037 'k' 'K' vt vt 179 179 vt vt C + 038 'l' 'L' ff ff 163 163 ff ff C + 039 232 200 nop nop 232 200 nop nop C + 040 230 198 nop nop 223 223 nop nop C + 041 184 168 nop nop 184 168 nop nop O + 042 lshift lshift lshift lshift lshift lshift lshift lshift O + 043 190 174 fs fs 164 164 fs fs C + 044 'y' 'Y' em em 'y' 'Y' em em C + 045 'x' 'X' can can 'x' 'X' can can C + 046 'c' 'C' etx etx 'c' 'C' etx etx C + 047 'v' 'V' syn syn '@' '@' syn syn C + 048 'b' 'B' stx stx '{' '{' stx stx C + 049 'n' 'N' so so '}' '}' so so C + 050 'm' 'M' cr cr 167 167 cr cr C + 051 ',' ';' nop nop '<' ';' '<' nop O + 052 '.' ':' nop nop '>' ':' '>' nop O + 053 '-' '_' nop nop '-' '_' nop nop O + 054 rshift rshift rshift rshift rshift rshift rshift rshift O + 055 '*' '*' '*' '*' '*' '*' '*' '*' O + 056 lalt lalt lalt lalt lalt lalt lalt lalt O + 057 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O + 058 clock clock clock clock clock clock clock clock O + 059 fkey01 fkey13 fkey25 fkey37 scr01 scr11 scr01 scr11 O + 060 fkey02 fkey14 fkey26 fkey38 scr02 scr12 scr02 scr12 O + 061 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O + 062 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O + 063 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O + 064 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O + 065 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O + 066 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O + 067 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O + 068 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O + 069 nlock nlock nlock nlock nlock nlock nlock nlock O + 070 slock slock slock slock slock slock slock slock O + 071 fkey49 '7' '7' '7' '7' '7' '7' '7' N + 072 fkey50 '8' '8' '8' '8' '8' '8' '8' N + 073 fkey51 '9' '9' '9' '9' '9' '9' '9' N + 074 fkey52 '-' '-' '-' '-' '-' '-' '-' N + 075 fkey53 '4' '4' '4' '4' '4' '4' '4' N + 076 fkey54 '5' '5' '5' '5' '5' '5' '5' N + 077 fkey55 '6' '6' '6' '6' '6' '6' '6' N + 078 fkey56 '+' '+' '+' '+' '+' '+' '+' N + 079 fkey57 '1' '1' '1' '1' '1' '1' '1' N + 080 fkey58 '2' '2' '2' '2' '2' '2' '2' N + 081 fkey59 '3' '3' '3' '3' '3' '3' '3' N + 082 fkey60 '0' '0' '0' '0' '0' '0' '0' N + 083 del ',' ',' ',' ',' ',' boot boot N + 084 nop nop nop nop nop nop nop nop O + 085 nop nop nop nop nop nop nop nop O + 086 '<' '>' nop nop '<' '>' nop nop O + 087 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O + 088 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O + 089 cr cr nl nl cr cr nl nl O + 090 rctrl rctrl rctrl rctrl rctrl rctrl rctrl rctrl O + 091 '/' '/' '/' '/' '/' '/' '/' '/' N + 092 nscr pscr debug debug nop nop nop nop O + 093 ralt ralt ralt ralt ralt ralt ralt ralt O + 094 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 O + 095 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 O + 096 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 O + 097 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 O + 098 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 O + 099 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 O + 100 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 O + 101 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O + 102 fkey60 paste fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 O + 103 fkey61 fkey61 fkey61 fkey61 fkey61 fkey61 boot fkey61 O + 104 slock saver slock saver susp nop susp nop O + 105 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 O + 106 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 O + 107 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O + 108 nop nop nop nop nop nop nop nop O Copied: head/share/vt/keymaps/it.kbd (from r269585, head/share/syscons/keymaps/it.iso.kbd) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/vt/keymaps/it.kbd Wed Aug 13 19:06:29 2014 (r269950, copy of r269585, head/share/syscons/keymaps/it.iso.kbd) @@ -0,0 +1,172 @@ +# $FreeBSD$ +# +# Aggiunte ad una tastiera italiana standard : +# +# -- ~ : SHIFT + ALT + a accentata +# -- { : SHIFT + [ +# : ALT + 7 +# -- } : SHIFT + ] +# : ALT + 0 +# -- [ : definita anche come ALT + 8 +# -- ] : definita anche come ALT + 9 +# -- ` : ALT + ' +# : CTRL + ' +# +# Per usare la mappatura dare i seguenti comandi: +# +# vidcontrol -f 8x16 iso15-8x16.fnt +# kbdcontrol -l it.iso.kbd +# setenv LANG it_IT.ISO8859-15 +# setenv MM_CHARSET iso-8859-15 +# setenv TERM cons25l1 +# +# Per l'utilizzo della stessa in modo permanente e/o +# per eventuali note su specifiche applicazioni: +# Gruppo utenti FreeBSD Italia - http://www.gufi.org +# Gianmarco Home Page - http://www.gufi.org/~gmarco +# +# +# Credits to: +# +# Gianmarco Giovannelli +# Nicola Vitale +# Marco Trentini +# +#################################################################### +# alt +# scan cntrl alt alt cntrl lock +# code base shift cntrl shift alt shift cntrl shift state +# ------------------------------------------------------------------ + 000 nop nop nop nop nop nop nop nop O + 001 esc esc esc esc esc esc debug esc O + 002 '1' '!' nop nop 185 161 nop nop O + 003 '2' '"' nul duml 178 nop nul nul O + 004 '3' 163 nop nop 179 163 nop nop O + 005 '4' '$' nop nop 188 '$' nop nop O + 006 '5' '%' nop nop 189 nop nop nop O + 007 '6' '&' rs rs 190 nop rs rs O + 008 '7' '/' nop nop '{' nop nop nop O + 009 '8' '(' nop nop '[' nop nop nop O + 010 '9' ')' nop nop ']' 177 nop nop O + 011 '0' '=' nop nop '}' 176 nop nop O + 012 ''' '?' 96 dacu 96 191 us dgra O + 013 236 '^' nop dcir '~' dogo nop dtil O + 014 bs bs del del bs bs del del O + 015 ht btab nop nop ht btab nop nop O + 016 'q' 'Q' dc1 dc1 '@' 'Q' dc1 dc1 C + 017 'w' 'W' etb etb nop nop etb etb C + 018 'e' 'E' enq enq 164 'E' enq enq C + 019 'r' 'R' dc2 dc2 167 174 dc2 dc2 C + 020 't' 'T' dc4 dc4 nop nop dc4 dc4 C + 021 'y' 'Y' em em nop 165 em em C + 022 'u' 'U' nak nak nop nop nak nak C + 023 'i' 'I' ht ht nop nop ht ht C + 024 'o' 'O' si si 248 216 si si C + 025 'p' 'P' dle dle 254 222 dle dle C + 026 232 233 esc esc '[' '{' esc esc O + 027 '+' '*' gs gs ']' '}' gs gs O + 028 cr cr nl nl cr cr nl nl O + 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O + 030 'a' 'A' soh soh 230 198 soh soh C + 031 's' 'S' dc3 dc3 223 167 dc3 dc3 C + 032 'd' 'D' eot eot 240 208 eot eot C + 033 'f' 'F' ack ack nop 170 ack ack C + 034 'g' 'G' bel bel nop nop bel bel C + 035 'h' 'H' bs bs nop nop bs bs C + 036 'j' 'J' nl nl 'j' 'J' nl nl C + 037 'k' 'K' vt vt 'k' '&' vt vt C + 038 'l' 'L' ff ff 'l' 'L' ff ff C + 039 242 231 nop nop '@' ddac nop nop O + 040 224 176 nop drin '#' '~' nop dtil O + 041 '\' '|' fs nop 172 nop nop nop O + 042 lshift lshift lshift lshift lshift lshift lshift lshift O + 043 249 167 fs dgra fs fs fs dbre O + 044 'z' 'Z' sub sub 171 60 sub sub C + 045 'x' 'X' can can 187 62 can can C + 046 'c' 'C' etx etx 162 169 etx etx C + 047 'v' 'V' syn syn nop 96 syn syn C + 048 'b' 'B' stx stx nop 39 stx stx C + 049 'n' 'N' so so 'n' 'N' so so C + 050 'm' 'M' cr cr 181 186 cr cr C + 051 ',' ';' nop nop 95 215 nop nop O + 052 '.' ':' nop nop 183 247 nop nop O + 053 '-' '_' nop nop ddot ddot nop nop O + 054 rshift rshift rshift rshift rshift rshift rshift rshift O + 055 '*' '*' '*' '*' '*' '*' '*' '*' O + 056 lalt lalt lalt lalt lalt lalt lalt lalt O + 057 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O + 058 clock clock clock clock clock clock clock clock O + 059 fkey01 fkey13 fkey25 fkey37 scr01 scr11 scr01 scr11 O + 060 fkey02 fkey14 fkey26 fkey38 scr02 scr12 scr02 scr12 O + 061 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O + 062 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O + 063 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O + 064 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O + 065 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O + 066 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O + 067 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O + 068 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O + 069 nlock nlock nlock nlock nlock nlock nlock nlock O + 070 slock slock slock slock slock slock slock slock O + 071 fkey49 '7' '7' '7' '7' '7' '7' '7' N + 072 fkey50 '8' '8' '8' '8' '8' '8' '8' N + 073 fkey51 '9' '9' '9' '9' '9' '9' '9' N + 074 fkey52 '-' '-' '-' '-' '-' '-' '-' N + 075 fkey53 '4' '4' '4' '4' '4' '4' '4' N + 076 fkey54 '5' '5' '5' '5' '5' '5' '5' N + 077 fkey55 '6' '6' '6' '6' '6' '6' '6' N + 078 fkey56 '+' '+' '+' '+' '+' '+' '+' N + 079 fkey57 '1' '1' '1' '1' '1' '1' '1' N + 080 fkey58 '2' '2' '2' '2' '2' '2' '2' N + 081 fkey59 '3' '3' '3' '3' '3' '3' '3' N + 082 fkey60 '0' '0' '0' '0' '0' '0' '0' N + 083 del '.' '.' '.' '.' '.' boot boot N + 084 nop nop nop nop nop nop nop nop O + 085 nop nop nop nop nop nop nop nop O + 086 '<' '>' nop nop 124 166 nop nop O + 087 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O + 088 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O + 089 cr cr nl nl cr cr nl nl O + 090 rctrl rctrl rctrl rctrl rctrl rctrl rctrl rctrl O + 091 '/' '/' '/' '/' '/' '/' '/' '/' O + 092 nscr nscr debug debug nop nop nop nop O + 093 ralt ralt ralt ralt ralt ralt ralt ralt O + 094 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 O + 095 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 O + 096 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 O + 097 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 O + 098 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 O + 099 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 O + 100 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 O + 101 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O + 102 fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 O + 103 fkey61 fkey61 fkey61 fkey61 fkey61 fkey61 boot pdwn O + 104 slock saver slock saver susp nop susp nop O + 105 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 O + 106 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 O + 107 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O + + dgra '`' ( 'a' 224 ) ( 'A' 192 ) ( 'e' 232 ) ( 'E' 200 ) + ( 'i' 236 ) ( 'I' 204 ) ( 'o' 242 ) ( 'O' 210 ) + ( 'u' 249 ) ( 'U' 217 ) + dacu ''' ( 'a' 225 ) ( 'A' 193 ) ( 'e' 233 ) ( 'E' 201 ) + ( 'i' 237 ) ( 'I' 205 ) ( 'o' 243 ) ( 'O' 211 ) + ( 'u' 250 ) ( 'U' 218 ) ( 'y' 253 ) ( 'Y' 221 ) + dcir '^' ( 'a' 226 ) ( 'A' 194 ) ( 'e' 234 ) ( 'E' 202 ) + ( 'i' 238 ) ( 'I' 206 ) ( 'o' 244 ) ( 'O' 212 ) + ( 'u' 251 ) ( 'U' 219 ) + dtil '~' ( 'a' 227 ) ( 'A' 195 ) ( 'n' 241 ) ( 'N' 209 ) + ( 'o' 245 ) ( 'O' 213 ) + dmac 175 + dbre 000 + ddot 000 + duml 168 ( 'a' 228 ) ( 'A' 196 ) ( 'e' 235 ) ( 'E' 203 ) + ( 'i' 239 ) ( 'I' 207 ) ( 'o' 246 ) ( 'O' 214 ) + ( 'u' 252 ) ( 'U' 220 ) ( 'y' 255 ) + dsla 000 + drin 176 ( 'a' 229 ) ( 'A' 197 ) + dced 184 ( 'c' 231 ) ( 'C' 199 ) + dapo 000 + ddac 000 + dogo 000 + dcar 000 Copied: head/share/vt/keymaps/pt.kbd (from r269585, head/share/syscons/keymaps/pt.iso.kbd) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/vt/keymaps/pt.kbd Wed Aug 13 19:06:29 2014 (r269950, copy of r269585, head/share/syscons/keymaps/pt.iso.kbd) @@ -0,0 +1,116 @@ +#pt.iso.kbd +#by: pm@dee.uc.pt +# $FreeBSD$ +# alt +# scan cntrl alt alt cntrl lock +# code base shift cntrl shift alt shift cntrl shift state +# ------------------------------------------------------------------ + 000 nop nop nop nop nop nop nop nop O + 001 esc esc esc esc esc esc debug esc O + 002 '1' '!' nop nop '1' '!' nop nop O + 003 '2' '"' nul nul '@' '@' nul nul O + 004 '3' '#' nop nop '3' '#' nop nop O + 005 '4' '$' nop nop '4' '$' nop nop O + 006 '5' '%' nop nop '5' '%' nop nop O + 007 '6' '&' rs rs '6' '^' rs rs O + 008 '7' '/' nop nop '{' '&' nop nop O + 009 '8' '(' nop nop '[' '*' nop nop O + 010 '9' ')' nop nop ']' '(' nop nop O + 011 '0' '=' nop nop '}' ')' nop nop O + 012 ''' '?' ns ns '-' '_' ns ns O + 013 '=' '+' nop nop '=' '+' nop nop O + 014 bs bs del del bs bs del del O + 015 ht btab nop nop ht btab nop nop O + 016 'q' 'Q' dc1 dc1 'q' 'Q' dc1 dc1 C + 017 'w' 'W' etb etb 'w' 'W' etb etb C + 018 'e' 'E' enq enq 164 'E' enq enq C + 019 'r' 'R' dc2 dc2 'r' 'R' dc2 dc2 C + 020 't' 'T' dc4 dc4 't' 'T' dc4 dc4 C + 021 'y' 'Y' em em 'y' 'Y' em em C + 022 'u' 'U' nak nak 'u' 'U' nak nak C + 023 'i' 'I' ht ht 'i' 'I' ht ht C + 024 'o' 'O' si si 'o' 'O' si si C + 025 'p' 'P' dle dle 'p' 'P' dle dle C + 026 '+' '*' esc esc 'h' '{' esc esc O + 027 ''' '`' gs gs ']' '}' gs gs O + 028 cr cr nl nl cr cr nl nl O + 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O + 030 'a' 'A' soh soh 'a' 'A' soh soh C + 031 's' 'S' dc3 dc3 's' 'S' dc3 dc3 C + 032 'd' 'D' eot eot 'd' 'D' eot eot C + 033 'f' 'F' ack ack 'f' 'F' ack ack C + 034 'g' 'G' bel bel 'g' 'G' bel bel C + 035 'h' 'H' bs bs 'h' 'H' bs bs C + 036 'j' 'J' nl nl 'j' 'J' nl nl C + 037 'k' 'K' vt vt 'k' 'K' vt vt C + 038 'l' 'L' ff ff 'l' 'L' ff ff C + 039 231 199 nop nop ';' ':' nop nop O + 040 nop nop nop nop ''' '"' nop nop O + 041 '\' '|' nop nop '`' '~' nop nop O + 042 lshift lshift lshift lshift lshift lshift lshift lshift O + 043 '~' '^' fs fs '\' '|' fs fs O + 044 'z' 'Z' sub sub 'z' 'Z' sub sub C + 045 'x' 'X' can can 'x' 'X' can can C + 046 'c' 'C' etx etx 'c' 'C' etx etx C + 047 'v' 'V' syn syn 'v' 'V' syn syn C + 048 'b' 'B' stx stx 'b' 'B' stx stx C + 049 'n' 'N' so so 'n' 'N' so so C + 050 'm' 'M' cr cr 'm' 'M' cr cr C + 051 ',' ';' nop nop nop nop nop nop C + 052 '.' ':' nop nop '.' '>' nop nop O + 053 '-' '_' nop nop '/' '?' nop nop O + 054 rshift rshift rshift rshift rshift rshift rshift rshift O + 055 '*' '*' '*' '*' '*' '*' '*' '*' O + 056 lalt lalt lalt lalt lalt lalt lalt lalt O + 057 ' ' ' ' nul ' ' ' ' ' ' 130 ' ' O + 058 clock clock clock clock clock clock clock clock O + 059 fkey01 fkey13 fkey25 fkey37 scr01 scr11 scr01 scr11 O + 060 fkey02 fkey14 fkey26 fkey38 scr02 scr12 scr02 scr12 O + 061 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O + 062 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O + 063 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O + 064 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O + 065 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O + 066 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O + 067 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O + 068 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O + 069 nlock nlock nlock nlock nlock nlock nlock nlock O + 070 slock slock slock slock slock slock slock slock O + 071 fkey49 '7' '7' '7' '7' '7' '7' '7' N + 072 fkey50 '8' '8' '8' '8' '8' '8' '8' N + 073 fkey51 '9' '9' '9' '9' '9' '9' '9' N + 074 fkey52 '-' '-' '-' '-' '-' '-' '-' N + 075 fkey53 '4' '4' '4' '4' '4' '4' '4' N + 076 fkey54 '5' '5' '5' '5' '5' '5' '5' N + 077 fkey55 '6' '6' '6' '6' '6' '6' '6' N + 078 fkey56 '+' '+' '+' '+' '+' '+' '+' N + 079 fkey57 '1' '1' '1' '1' '1' '1' '1' N + 080 fkey58 '2' '2' '2' '2' '2' '2' '2' N + 081 fkey59 '3' '3' '3' '3' '3' '3' '3' N + 082 fkey60 '0' '0' '0' '0' '0' '0' '0' N + 083 del '.' '.' '.' '.' '.' boot boot N + 084 nop nop nop nop nop nop nop nop O + 085 nop nop nop nop nop nop nop nop O + 086 '<' '>' nop nop nop nop nop nop O + 087 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O + 088 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O + 089 cr cr cr cr cr cr cr cr O + 090 rctrl rctrl rctrl rctrl rctrl rctrl rctrl rctrl O + 091 '/' '/' '/' '/' '/' '/' '/' '/' O + 092 nscr pscr debug debug nop nop nop nop O + 093 ralt ralt ralt ralt ralt ralt ralt ralt O + 094 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 O + 095 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 O + 096 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 O + 097 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 O + 098 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 O + 099 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 O + 100 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 O + 101 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O + 102 fkey60 paste fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 O + 103 fkey61 fkey61 fkey61 fkey61 fkey61 fkey61 boot fkey61 O + 104 slock saver slock saver susp nop susp nop O + 105 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 O + 106 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 O + 107 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O + 108 nop nop nop nop nop nop nop nop O Copied: head/share/vt/keymaps/si.kbd (from r269585, head/share/syscons/keymaps/si.iso.kbd) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/vt/keymaps/si.kbd Wed Aug 13 19:06:29 2014 (r269950, copy of r269585, head/share/syscons/keymaps/si.iso.kbd) @@ -0,0 +1,116 @@ +# Slovenian keyboard +# Blaz Zupan +# $FreeBSD$ +# alt +# scan cntrl alt alt cntrl lock +# code base shift cntrl shift alt shift cntrl shift state +# ------------------------------------------------------------------ + 000 nop nop nop nop nop nop nop nop O + 001 esc esc esc esc esc esc debug esc O + 002 '1' '!' nop nop '~' '~' nop nop O + 003 '2' '"' nul nul 183 183 nul nul O + 004 '3' '#' nop nop '^' '^' nop nop O + 005 '4' '$' nop nop 162 162 nop nop O + 006 '5' '%' nop nop 176 176 nop nop O + 007 '6' '&' rs rs 178 178 rs rs O + 008 '7' '/' nop nop '`' '`' nop nop O + 009 '8' '(' nop nop 255 255 nop nop O + 010 '9' ')' nop nop ''' ''' nop nop O + 011 '0' '=' nop nop 189 189 nop nop O + 012 ''' '?' us us 168 168 us us O + 013 '+' '*' nop nop 184 184 nop nop O + 014 bs bs del del bs bs del del O + 015 ht btab nop nop ht btab nop nop O + 016 'q' 'Q' dc1 dc1 '\' '\' dc1 dc1 C + 017 'w' 'W' etb etb '|' '|' etb etb C + 018 'e' 'E' enq enq 'e' 'E' enq enq C + 019 'r' 'R' dc2 dc2 'r' 'R' dc2 dc2 C + 020 't' 'T' dc4 dc4 't' 'T' dc4 dc4 C + 021 'z' 'Z' sub sub 'z' 'Z' sub sub C + 022 'u' 'U' nak nak 'u' 'U' nak nak C + 023 'i' 'I' ht ht 'i' 'I' ht ht C + 024 'o' 'O' si si 'o' 'O' si si C + 025 'p' 'P' dle dle 'p' 'P' dle dle C + 026 185 169 esc esc 247 247 esc esc C + 027 240 208 gs gs 215 215 gs gs C + 028 cr cr nl nl cr cr nl nl O + 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O + 030 'a' 'A' soh soh 'a' 'A' soh soh C + 031 's' 'S' dc3 dc3 's' 'S' dc3 dc3 C + 032 'd' 'D' eot eot 'd' 'D' eot eot C + 033 'f' 'F' ack ack '[' '[' ack ack C + 034 'g' 'G' bel bel ']' ']' bel bel C + 035 'h' 'H' bs bs 'h' 'H' bs bs C + 036 'j' 'J' nl nl 'j' 'J' nl nl C + 037 'k' 'K' vt vt 179 179 vt vt C + 038 'l' 'L' ff ff 163 163 ff ff C + 039 232 200 nop nop 232 200 nop nop C + 040 230 198 nop nop 223 223 nop nop C + 041 184 168 nop nop 184 168 nop nop O + 042 lshift lshift lshift lshift lshift lshift lshift lshift O + 043 190 174 fs fs 164 164 fs fs C + 044 'y' 'Y' em em 'y' 'Y' em em C + 045 'x' 'X' can can 'x' 'X' can can C + 046 'c' 'C' etx etx 'c' 'C' etx etx C + 047 'v' 'V' syn syn '@' '@' syn syn C + 048 'b' 'B' stx stx '{' '{' stx stx C + 049 'n' 'N' so so '}' '}' so so C + 050 'm' 'M' cr cr 167 167 cr cr C + 051 ',' ';' nop nop ',' ';' nop nop O + 052 '.' ':' nop nop '.' ':' nop nop O + 053 '-' '_' nop nop '-' '_' nop nop O + 054 rshift rshift rshift rshift rshift rshift rshift rshift O + 055 '*' '*' '*' '*' '*' '*' '*' '*' O + 056 lalt lalt lalt lalt lalt lalt lalt lalt O + 057 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O + 058 clock clock clock clock clock clock clock clock O + 059 fkey01 fkey13 fkey25 fkey37 scr01 scr11 scr01 scr11 O + 060 fkey02 fkey14 fkey26 fkey38 scr02 scr12 scr02 scr12 O + 061 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O + 062 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O + 063 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O + 064 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O + 065 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O + 066 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O + 067 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O + 068 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O + 069 nlock nlock nlock nlock nlock nlock nlock nlock O + 070 slock slock slock slock slock slock slock slock O + 071 fkey49 '7' '7' '7' '7' '7' '7' '7' N + 072 fkey50 '8' '8' '8' '8' '8' '8' '8' N + 073 fkey51 '9' '9' '9' '9' '9' '9' '9' N + 074 fkey52 '-' '-' '-' '-' '-' '-' '-' N + 075 fkey53 '4' '4' '4' '4' '4' '4' '4' N + 076 fkey54 '5' '5' '5' '5' '5' '5' '5' N + 077 fkey55 '6' '6' '6' '6' '6' '6' '6' N + 078 fkey56 '+' '+' '+' '+' '+' '+' '+' N + 079 fkey57 '1' '1' '1' '1' '1' '1' '1' N + 080 fkey58 '2' '2' '2' '2' '2' '2' '2' N + 081 fkey59 '3' '3' '3' '3' '3' '3' '3' N + 082 fkey60 '0' '0' '0' '0' '0' '0' '0' N + 083 del ',' ',' ',' ',' ',' boot boot N + 084 nop nop nop nop nop nop nop nop O + 085 nop nop nop nop nop nop nop nop O + 086 '<' '>' nop nop '<' '>' nop nop O + 087 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O + 088 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O + 089 cr cr nl nl cr cr nl nl O + 090 rctrl rctrl rctrl rctrl rctrl rctrl rctrl rctrl O + 091 '/' '/' '/' '/' '/' '/' '/' '/' N + 092 nscr pscr debug debug nop nop nop nop O + 093 ralt ralt ralt ralt ralt ralt ralt ralt O + 094 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 O + 095 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 O + 096 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 O + 097 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 O + 098 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 O + 099 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 O + 100 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 O + 101 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O + 102 fkey60 paste fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 O + 103 fkey61 fkey61 fkey61 fkey61 fkey61 fkey61 boot fkey61 O + 104 slock saver slock saver susp nop susp nop O + 105 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 O + 106 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 O + 107 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O + 108 nop nop nop nop nop nop nop nop O Copied: head/share/vt/keymaps/uk.kbd (from r269585, head/share/syscons/keymaps/uk.iso.kbd) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/vt/keymaps/uk.kbd Wed Aug 13 19:06:29 2014 (r269950, copy of r269585, head/share/syscons/keymaps/uk.iso.kbd) @@ -0,0 +1,114 @@ +# $FreeBSD$ +# alt +# scan cntrl alt alt cntrl lock +# code base shift cntrl shift alt shift cntrl shift state +# ------------------------------------------------------------------ + 000 nop nop nop nop nop nop nop nop O + 001 esc esc esc esc esc esc debug esc O + 002 '1' '!' nop nop '`' '`' nop nop O + 003 '2' '"' nul nul '@' '@' nul nul O + 004 '3' 163 nop nop '#' '#' nop nop O + 005 '4' '$' 164 164 '4' '$' nop nop O + 006 '5' '%' nop nop '5' '%' nop nop O + 007 '6' '^' rs rs '^' '^' rs rs O + 008 '7' '&' nop nop '[' '[' esc esc O + 009 '8' '*' nop nop '8' '*' nop nop O + 010 '9' '(' nop nop ']' ']' gs gs O + 011 '0' ')' nop nop '{' '{' nop nop O + 012 '-' '_' us us '|' '|' us us O + 013 '=' '+' nop nop '}' '}' nop nop O + 014 bs bs del del bs bs del del O + 015 ht btab nop nop ht btab nop nop O + 016 'q' 'Q' dc1 dc1 'q' 'Q' dc1 dc1 C + 017 'w' 'W' etb etb 'w' 'W' etb etb C + 018 'e' 'E' enq enq 164 'E' enq enq C + 019 'r' 'R' dc2 dc2 'r' 'R' dc2 dc2 C + 020 't' 'T' dc4 dc4 't' 'T' dc4 dc4 C + 021 'y' 'Y' em em 'y' 'Y' em em C + 022 'u' 'U' nak nak 'u' 'U' nak nak C + 023 'i' 'I' ht ht 'i' 'I' ht ht C + 024 'o' 'O' si si 'o' 'O' si si C + 025 'p' 'P' dle dle 'p' 'P' dle dle C + 026 '[' '{' esc esc '[' '{' esc esc O + 027 ']' '}' gs gs ']' '}' gs gs O + 028 cr cr nl nl cr cr nl nl O + 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O + 030 'a' 'A' soh soh 'a' 'A' soh soh C + 031 's' 'S' dc3 dc3 's' 'S' dc3 dc3 C + 032 'd' 'D' eot eot 'd' 'D' eot eot C + 033 'f' 'F' ack ack 'f' 'F' ack ack C + 034 'g' 'G' bel bel 'g' 'G' bel bel C + 035 'h' 'H' bs bs 'h' 'H' bs bs C + 036 'j' 'J' nl nl 'j' 'J' nl nl C + 037 'k' 'K' vt vt 'k' 'K' vt vt C + 038 'l' 'L' ff ff 'l' 'L' ff ff C + 039 ';' ':' nop nop ';' ':' nop nop O + 040 ''' '@' nul nul ''' '@' nul nul O + 041 '`' 172 nop nop '|' '|' nop nop O + 042 lshift lshift lshift lshift lshift lshift lshift lshift O + 043 '#' '~' nop nop '~' '~' nop nop O + 044 'z' 'Z' sub sub 'z' 'Z' sub sub C + 045 'x' 'X' can can 'x' 'X' can can C + 046 'c' 'C' etx etx 'c' 'C' etx etx C + 047 'v' 'V' syn syn 'v' 'V' syn syn C + 048 'b' 'B' stx stx 'b' 'B' stx stx C + 049 'n' 'N' so so 'n' 'N' so so C + 050 'm' 'M' cr cr 'm' 'M' cr cr C + 051 ',' '<' nop nop ',' '<' nop nop O + 052 '.' '>' nop nop '.' '>' nop nop O + 053 '/' '?' nop nop '/' '?' nop nop O + 054 rshift rshift rshift rshift rshift rshift rshift rshift O + 055 '*' '*' '*' '*' '*' '*' '*' '*' O + 056 lalt lalt lalt lalt lalt lalt lalt lalt O + 057 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O + 058 clock clock clock clock clock clock clock clock O + 059 fkey01 fkey13 fkey25 fkey37 scr01 scr11 scr01 scr11 O + 060 fkey02 fkey14 fkey26 fkey38 scr02 scr12 scr02 scr12 O + 061 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O + 062 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O + 063 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O + 064 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O + 065 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O + 066 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O + 067 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O + 068 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O + 069 nlock nlock nlock nlock nlock nlock nlock nlock O + 070 slock slock slock slock slock slock slock slock O + 071 fkey49 '7' '7' '7' '7' '7' '7' '7' N + 072 fkey50 '8' '8' '8' '8' '8' '8' '8' N + 073 fkey51 '9' '9' '9' '9' '9' '9' '9' N + 074 fkey52 '-' '-' '-' '-' '-' '-' '-' N + 075 fkey53 '4' '4' '4' '4' '4' '4' '4' N + 076 fkey54 '5' '5' '5' '5' '5' '5' '5' N + 077 fkey55 '6' '6' '6' '6' '6' '6' '6' N + 078 fkey56 '+' '+' '+' '+' '+' '+' '+' N + 079 fkey57 '1' '1' '1' '1' '1' '1' '1' N + 080 fkey58 '2' '2' '2' '2' '2' '2' '2' N + 081 fkey59 '3' '3' '3' '3' '3' '3' '3' N + 082 fkey60 '0' '0' '0' '0' '0' '0' '0' N + 083 del '.' '.' '.' '.' '.' boot boot N + 084 nop nop nop nop nop nop nop nop O + 085 nop nop nop nop nop nop nop nop O + 086 '\' '|' fs fs '\' '|' fs fs O + 087 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O + 088 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O + 089 cr cr nl nl cr cr nl nl O + 090 rctrl rctrl rctrl rctrl rctrl rctrl rctrl rctrl O + 091 '/' '/' '/' '/' '/' '/' '/' '/' N + 092 nscr pscr debug debug nop nop nop nop O + 093 ralt ralt ralt ralt ralt ralt ralt ralt O + 094 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 O + 095 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 O + 096 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 O + 097 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 O + 098 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 O + 099 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 O + 100 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 O + 101 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O + 102 fkey60 paste fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 O + 103 fkey61 fkey61 fkey61 fkey61 fkey61 fkey61 boot fkey61 O + 104 slock saver slock saver susp nop susp nop O + 105 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 O + 106 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 O + 107 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O + 108 nop nop nop nop nop nop nop nop O Copied: head/share/vt/keymaps/us.kbd (from r269585, head/share/syscons/keymaps/us.iso.kbd) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/vt/keymaps/us.kbd Wed Aug 13 19:06:29 2014 (r269950, copy of r269585, head/share/syscons/keymaps/us.iso.kbd) @@ -0,0 +1,114 @@ +# $FreeBSD$ +# alt +# scan cntrl alt alt cntrl lock +# code base shift cntrl shift alt shift cntrl shift state +# ------------------------------------------------------------------ + 000 nop nop nop nop nop nop nop nop O + 001 esc esc esc esc esc esc debug esc O + 002 '1' '!' nop nop '1' '!' nop nop O + 003 '2' '@' nul nul '2' '@' nul nul O + 004 '3' '#' nop nop '3' '#' nop nop O + 005 '4' '$' nop nop '4' '$' nop nop O + 006 '5' '%' nop nop '5' '%' nop nop O + 007 '6' '^' rs rs '6' '^' rs rs O + 008 '7' '&' nop nop '7' '&' nop nop O + 009 '8' '*' nop nop '8' '*' nop nop O + 010 '9' '(' nop nop '9' '(' nop nop O + 011 '0' ')' nop nop '0' ')' nop nop O + 012 '-' '_' us us '-' '_' us us O + 013 '=' '+' nop nop '=' '+' nop nop O + 014 bs bs del del bs bs del del O + 015 ht btab nop nop ht btab nop nop O + 016 'q' 'Q' dc1 dc1 'q' 'Q' dc1 dc1 C + 017 'w' 'W' etb etb 'w' 'W' etb etb C + 018 'e' 'E' enq enq 'e' 'E' enq enq C + 019 'r' 'R' dc2 dc2 'r' 'R' dc2 dc2 C + 020 't' 'T' dc4 dc4 't' 'T' dc4 dc4 C + 021 'y' 'Y' em em 'y' 'Y' em em C + 022 'u' 'U' nak nak 'u' 'U' nak nak C + 023 'i' 'I' ht ht 'i' 'I' ht ht C + 024 'o' 'O' si si 'o' 'O' si si C + 025 'p' 'P' dle dle 'p' 'P' dle dle C + 026 '[' '{' esc esc '[' '{' esc esc O + 027 ']' '}' gs gs ']' '}' gs gs O + 028 cr cr nl nl cr cr nl nl O + 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O + 030 'a' 'A' soh soh 'a' 'A' soh soh C + 031 's' 'S' dc3 dc3 's' 'S' dc3 dc3 C + 032 'd' 'D' eot eot 'd' 'D' eot eot C + 033 'f' 'F' ack ack 'f' 'F' ack ack C + 034 'g' 'G' bel bel 'g' 'G' bel bel C + 035 'h' 'H' bs bs 'h' 'H' bs bs C + 036 'j' 'J' nl nl 'j' 'J' nl nl C + 037 'k' 'K' vt vt 'k' 'K' vt vt C + 038 'l' 'L' ff ff 'l' 'L' ff ff C + 039 ';' ':' nop nop ';' ':' nop nop O + 040 ''' '"' nop nop ''' '"' nop nop O + 041 '`' '~' nop nop '`' '~' nop nop O + 042 lshift lshift lshift lshift lshift lshift lshift lshift O + 043 '\' '|' fs fs '\' '|' fs fs O + 044 'z' 'Z' sub sub 'z' 'Z' sub sub C + 045 'x' 'X' can can 'x' 'X' can can C + 046 'c' 'C' etx etx 'c' 'C' etx etx C + 047 'v' 'V' syn syn 'v' 'V' syn syn C + 048 'b' 'B' stx stx 'b' 'B' stx stx C + 049 'n' 'N' so so 'n' 'N' so so C + 050 'm' 'M' cr cr 'm' 'M' cr cr C + 051 ',' '<' nop nop ',' '<' nop nop O + 052 '.' '>' nop nop '.' '>' nop nop O + 053 '/' '?' nop nop '/' '?' nop nop O + 054 rshift rshift rshift rshift rshift rshift rshift rshift O + 055 '*' '*' '*' '*' '*' '*' '*' '*' O + 056 lalt lalt lalt lalt lalt lalt lalt lalt O + 057 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O + 058 clock clock clock clock clock clock clock clock O + 059 fkey01 fkey13 fkey25 fkey37 scr01 scr11 scr01 scr11 O + 060 fkey02 fkey14 fkey26 fkey38 scr02 scr12 scr02 scr12 O + 061 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O + 062 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O + 063 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O + 064 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O + 065 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O + 066 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O + 067 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O + 068 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O + 069 nlock nlock nlock nlock nlock nlock nlock nlock O + 070 slock slock slock slock slock slock slock slock O + 071 fkey49 '7' '7' '7' '7' '7' '7' '7' N + 072 fkey50 '8' '8' '8' '8' '8' '8' '8' N + 073 fkey51 '9' '9' '9' '9' '9' '9' '9' N + 074 fkey52 '-' '-' '-' '-' '-' '-' '-' N + 075 fkey53 '4' '4' '4' '4' '4' '4' '4' N + 076 fkey54 '5' '5' '5' '5' '5' '5' '5' N + 077 fkey55 '6' '6' '6' '6' '6' '6' '6' N + 078 fkey56 '+' '+' '+' '+' '+' '+' '+' N + 079 fkey57 '1' '1' '1' '1' '1' '1' '1' N + 080 fkey58 '2' '2' '2' '2' '2' '2' '2' N + 081 fkey59 '3' '3' '3' '3' '3' '3' '3' N + 082 fkey60 '0' '0' '0' '0' '0' '0' '0' N + 083 del '.' '.' '.' '.' '.' boot boot N + 084 nop nop nop nop nop nop nop nop O + 085 nop nop nop nop nop nop nop nop O + 086 nop nop nop nop nop nop nop nop O + 087 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O + 088 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Wed Aug 13 19:43:23 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BED05214; Wed, 13 Aug 2014 19:43:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8DCBF25AA; Wed, 13 Aug 2014 19:43:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7DJhNrW005034; Wed, 13 Aug 2014 19:43:23 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7DJhNiq005031; Wed, 13 Aug 2014 19:43:23 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201408131943.s7DJhNiq005031@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 13 Aug 2014 19:43:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269951 - in head: share/mk tools/tools/ath/athaggrstats tools/tools/ath/athstats X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2014 19:43:23 -0000 Author: adrian Date: Wed Aug 13 19:43:22 2014 New Revision: 269951 URL: http://svnweb.freebsd.org/changeset/base/269951 Log: Make the libbsdstat useful again. Modified: head/share/mk/src.libnames.mk head/tools/tools/ath/athaggrstats/Makefile head/tools/tools/ath/athstats/Makefile Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Wed Aug 13 19:06:29 2014 (r269950) +++ head/share/mk/src.libnames.mk Wed Aug 13 19:43:22 2014 (r269951) @@ -17,6 +17,10 @@ LIBATF_CXXDIR= ${ROOTOBJDIR}/lib/atf/lib LDATF_CXX?= ${LIBATF_CXXDIR}/libatf-c++.so LIBATF_CXX?= ${LIBATF_CXXDIR}/libatf-c++.a +LIBBSDSTATDIR= ${ROOTOBJDIR}/lib/libbsdstat +LDBSDSTAT?= ${LIBBSDSTATDIR}/libbsdstat.so +LIBBSDSTAT?= ${LIBBSDSTATDIR}/libbsdstat.a + LIBHEIMIPCCDIR= ${ROOTOBJDIR}/kerberos5/lib/libheimipcc LDHEIMIPCC?= ${LIBHEIMIPCCDIR}/libheimipcc.so LIBHEIMIPCC?= ${LIBHEIMIPCCDIR}/libheimipcc.a Modified: head/tools/tools/ath/athaggrstats/Makefile ============================================================================== --- head/tools/tools/ath/athaggrstats/Makefile Wed Aug 13 19:06:29 2014 (r269950) +++ head/tools/tools/ath/athaggrstats/Makefile Wed Aug 13 19:43:22 2014 (r269951) @@ -12,8 +12,8 @@ CLEANFILES+= opt_ah.h CFLAGS+=-DATH_SUPPORT_ANI CFLAGS+=-DATH_SUPPORT_TDMA -USEPRIVATELIB= -LDADD=-lbsdstat +USEPRIVATELIB=bsdstat +LDADD= ${LDBSDSTAT} opt_ah.h: echo "#define AH_DEBUG 1" > opt_ah.h Modified: head/tools/tools/ath/athstats/Makefile ============================================================================== --- head/tools/tools/ath/athstats/Makefile Wed Aug 13 19:06:29 2014 (r269950) +++ head/tools/tools/ath/athstats/Makefile Wed Aug 13 19:43:22 2014 (r269951) @@ -23,8 +23,9 @@ CFLAGS+=-DATH_SUPPORT_TDMA CFLAGS.clang+= -fbracket-depth=512 -USEPRIVATELIB= -LDADD= -lbsdstat +USEPRIVATELIB= bsdstat + +LDADD= ${LDBSDSTAT} opt_ah.h: echo "#define AH_DEBUG 1" > opt_ah.h From owner-svn-src-head@FreeBSD.ORG Wed Aug 13 19:55:15 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 50BB85BE; Wed, 13 Aug 2014 19:55:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3CAF226B3; Wed, 13 Aug 2014 19:55:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7DJtFHg009829; Wed, 13 Aug 2014 19:55:15 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7DJtFIu009828; Wed, 13 Aug 2014 19:55:15 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201408131955.s7DJtFIu009828@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 13 Aug 2014 19:55:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269952 - head/share/vt/keymaps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2014 19:55:15 -0000 Author: emaste Date: Wed Aug 13 19:55:14 2014 New Revision: 269952 URL: http://svnweb.freebsd.org/changeset/base/269952 Log: Remove trailing whitespace Modified: head/share/vt/keymaps/it.kbd Modified: head/share/vt/keymaps/it.kbd ============================================================================== --- head/share/vt/keymaps/it.kbd Wed Aug 13 19:43:22 2014 (r269951) +++ head/share/vt/keymaps/it.kbd Wed Aug 13 19:55:14 2014 (r269952) @@ -4,12 +4,12 @@ # # -- ~ : SHIFT + ALT + a accentata # -- { : SHIFT + [ -# : ALT + 7 +# : ALT + 7 # -- } : SHIFT + ] # : ALT + 0 -# -- [ : definita anche come ALT + 8 -# -- ] : definita anche come ALT + 9 -# -- ` : ALT + ' +# -- [ : definita anche come ALT + 8 +# -- ] : definita anche come ALT + 9 +# -- ` : ALT + ' # : CTRL + ' # # Per usare la mappatura dare i seguenti comandi: @@ -20,8 +20,8 @@ # setenv MM_CHARSET iso-8859-15 # setenv TERM cons25l1 # -# Per l'utilizzo della stessa in modo permanente e/o -# per eventuali note su specifiche applicazioni: +# Per l'utilizzo della stessa in modo permanente e/o +# per eventuali note su specifiche applicazioni: # Gruppo utenti FreeBSD Italia - http://www.gufi.org # Gianmarco Home Page - http://www.gufi.org/~gmarco # @@ -32,7 +32,7 @@ # Nicola Vitale # Marco Trentini # -#################################################################### +#################################################################### # alt # scan cntrl alt alt cntrl lock # code base shift cntrl shift alt shift cntrl shift state @@ -77,7 +77,7 @@ 037 'k' 'K' vt vt 'k' '&' vt vt C 038 'l' 'L' ff ff 'l' 'L' ff ff C 039 242 231 nop nop '@' ddac nop nop O - 040 224 176 nop drin '#' '~' nop dtil O + 040 224 176 nop drin '#' '~' nop dtil O 041 '\' '|' fs nop 172 nop nop nop O 042 lshift lshift lshift lshift lshift lshift lshift lshift O 043 249 167 fs dgra fs fs fs dbre O @@ -146,22 +146,22 @@ 106 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 O 107 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O - dgra '`' ( 'a' 224 ) ( 'A' 192 ) ( 'e' 232 ) ( 'E' 200 ) - ( 'i' 236 ) ( 'I' 204 ) ( 'o' 242 ) ( 'O' 210 ) + dgra '`' ( 'a' 224 ) ( 'A' 192 ) ( 'e' 232 ) ( 'E' 200 ) + ( 'i' 236 ) ( 'I' 204 ) ( 'o' 242 ) ( 'O' 210 ) ( 'u' 249 ) ( 'U' 217 ) - dacu ''' ( 'a' 225 ) ( 'A' 193 ) ( 'e' 233 ) ( 'E' 201 ) - ( 'i' 237 ) ( 'I' 205 ) ( 'o' 243 ) ( 'O' 211 ) - ( 'u' 250 ) ( 'U' 218 ) ( 'y' 253 ) ( 'Y' 221 ) - dcir '^' ( 'a' 226 ) ( 'A' 194 ) ( 'e' 234 ) ( 'E' 202 ) - ( 'i' 238 ) ( 'I' 206 ) ( 'o' 244 ) ( 'O' 212 ) + dacu ''' ( 'a' 225 ) ( 'A' 193 ) ( 'e' 233 ) ( 'E' 201 ) + ( 'i' 237 ) ( 'I' 205 ) ( 'o' 243 ) ( 'O' 211 ) + ( 'u' 250 ) ( 'U' 218 ) ( 'y' 253 ) ( 'Y' 221 ) + dcir '^' ( 'a' 226 ) ( 'A' 194 ) ( 'e' 234 ) ( 'E' 202 ) + ( 'i' 238 ) ( 'I' 206 ) ( 'o' 244 ) ( 'O' 212 ) ( 'u' 251 ) ( 'U' 219 ) - dtil '~' ( 'a' 227 ) ( 'A' 195 ) ( 'n' 241 ) ( 'N' 209 ) + dtil '~' ( 'a' 227 ) ( 'A' 195 ) ( 'n' 241 ) ( 'N' 209 ) ( 'o' 245 ) ( 'O' 213 ) dmac 175 dbre 000 ddot 000 - duml 168 ( 'a' 228 ) ( 'A' 196 ) ( 'e' 235 ) ( 'E' 203 ) - ( 'i' 239 ) ( 'I' 207 ) ( 'o' 246 ) ( 'O' 214 ) + duml 168 ( 'a' 228 ) ( 'A' 196 ) ( 'e' 235 ) ( 'E' 203 ) + ( 'i' 239 ) ( 'I' 207 ) ( 'o' 246 ) ( 'O' 214 ) ( 'u' 252 ) ( 'U' 220 ) ( 'y' 255 ) dsla 000 drin 176 ( 'a' 229 ) ( 'A' 197 ) From owner-svn-src-head@FreeBSD.ORG Wed Aug 13 21:18:31 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D5E65161; Wed, 13 Aug 2014 21:18:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2C1620B3; Wed, 13 Aug 2014 21:18:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7DLIVZR046743; Wed, 13 Aug 2014 21:18:31 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7DLIVP9046742; Wed, 13 Aug 2014 21:18:31 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201408132118.s7DLIVP9046742@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 13 Aug 2014 21:18:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269953 - head/sbin/newfs_msdos X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2014 21:18:31 -0000 Author: pfg Date: Wed Aug 13 21:18:31 2014 New Revision: 269953 URL: http://svnweb.freebsd.org/changeset/base/269953 Log: Use "NO NAME" as the default unnamed label. Microsoft recommends avoiding the use of spaces in the string structures for FAT. Unfortunately they do just that by default in the case of unlabeled filesystems. Follow the default MS behavior to avoid confusion in common tools like file(1). This was actually the default behavior before r203868. Obtained from: NetBSD (CVS rev. 1.39) MFC after: 3 days Modified: head/sbin/newfs_msdos/newfs_msdos.c Modified: head/sbin/newfs_msdos/newfs_msdos.c ============================================================================== --- head/sbin/newfs_msdos/newfs_msdos.c Wed Aug 13 19:55:14 2014 (r269952) +++ head/sbin/newfs_msdos/newfs_msdos.c Wed Aug 13 21:18:31 2014 (r269953) @@ -689,7 +689,7 @@ main(int argc, char *argv[]) ((u_int)tm->tm_hour << 8 | (u_int)tm->tm_min)); mk4(bsx->exVolumeID, x); - mklabel(bsx->exVolumeLabel, opt_L ? opt_L : "NO_NAME"); + mklabel(bsx->exVolumeLabel, opt_L ? opt_L : "NO NAME"); sprintf(buf, "FAT%u", fat); setstr(bsx->exFileSysType, buf, sizeof(bsx->exFileSysType)); if (!opt_B) { From owner-svn-src-head@FreeBSD.ORG Wed Aug 13 21:38:29 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD40E8BF; Wed, 13 Aug 2014 21:38:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9A6E228F; Wed, 13 Aug 2014 21:38:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7DLcTJW056055; Wed, 13 Aug 2014 21:38:29 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7DLcT6O056053; Wed, 13 Aug 2014 21:38:29 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201408132138.s7DLcT6O056053@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 13 Aug 2014 21:38:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269954 - in head/lib/clang/include: clang/Config llvm/Config X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2014 21:38:29 -0000 Author: dim Date: Wed Aug 13 21:38:29 2014 New Revision: 269954 URL: http://svnweb.freebsd.org/changeset/base/269954 Log: Stop telling people to directly report llvm or clang bugs upstream, point them to the FreeBSD bug tracker instead, since we use our own patches. MFC after: 3 days Modified: head/lib/clang/include/clang/Config/config.h head/lib/clang/include/llvm/Config/config.h Modified: head/lib/clang/include/clang/Config/config.h ============================================================================== --- head/lib/clang/include/clang/Config/config.h Wed Aug 13 21:18:31 2014 (r269953) +++ head/lib/clang/include/clang/Config/config.h Wed Aug 13 21:38:29 2014 (r269954) @@ -6,7 +6,7 @@ #define CONFIG_H /* Bug report URL. */ -#define BUG_REPORT_URL "http://llvm.org/bugs/" +#define BUG_REPORT_URL "https://bugs.freebsd.org/submit/" /* Relative directory for resource files */ #define CLANG_RESOURCE_DIR "" Modified: head/lib/clang/include/llvm/Config/config.h ============================================================================== --- head/lib/clang/include/llvm/Config/config.h Wed Aug 13 21:18:31 2014 (r269953) +++ head/lib/clang/include/llvm/Config/config.h Wed Aug 13 21:38:29 2014 (r269954) @@ -9,7 +9,7 @@ #include /* Bug report URL. */ -#define BUG_REPORT_URL "http://llvm.org/bugs/" +#define BUG_REPORT_URL "https://bugs.freebsd.org/submit/" /* Define if we have libxml2 */ /* #undef CLANG_HAVE_LIBXML */ From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 04:20:15 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6DA15FD; Thu, 14 Aug 2014 04:20:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 928F12B4F; Thu, 14 Aug 2014 04:20:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7E4KFCL043471; Thu, 14 Aug 2014 04:20:15 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7E4KE7M043466; Thu, 14 Aug 2014 04:20:14 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201408140420.s7E4KE7M043466@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 14 Aug 2014 04:20:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269956 - in head: lib/libc/arm/aeabi lib/msun/arm sys/arm/arm sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 04:20:15 -0000 Author: imp Date: Thu Aug 14 04:20:13 2014 New Revision: 269956 URL: http://svnweb.freebsd.org/changeset/base/269956 Log: From https://sourceware.org/ml/newlib/2014/msg00113.html By Richard Earnshaw at ARM > >GCC has for a number of years provides a set of pre-defined macros for >use with determining the ISA and features of the target during >pre-processing. However, the design was always somewhat cumbersome in >that each new architecture revision created a new define and then >removed the previous one. This meant that it was necessary to keep >updating the support code simply to recognise a new architecture being >added. > >The ACLE specification (ARM C Language Extentions) >(http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.set.swdev/index.html) >provides a much more suitable interface and GCC has supported this >since gcc-4.8. > >This patch makes use of the ACLE pre-defines to map to the internal >feature definitions. To support older versions of GCC a compatibility >header is provided that maps the traditional pre-defines onto the new >ACLE ones. Stop using __FreeBSD_ARCH_armv6__ and switch to __ARM_ARCH >= 6 in the couple of places in tree. clang already implements ACLE. Add a define that says we implement version 1.1, even though the implementation isn't quite complete. Added: head/sys/arm/include/acle-compat.h (contents, props changed) Modified: head/lib/libc/arm/aeabi/aeabi_vfp.h head/lib/msun/arm/fenv.c head/sys/arm/arm/disassem.c head/sys/arm/include/param.h Modified: head/lib/libc/arm/aeabi/aeabi_vfp.h ============================================================================== --- head/lib/libc/arm/aeabi/aeabi_vfp.h Wed Aug 13 22:34:14 2014 (r269955) +++ head/lib/libc/arm/aeabi/aeabi_vfp.h Thu Aug 14 04:20:13 2014 (r269956) @@ -30,6 +30,8 @@ #ifndef AEABI_VFP_H #define AEABI_VFP_H +#include + /* * ASM helper macros. These allow the functions to be changed depending on * the endian-ness we are building for. @@ -49,7 +51,7 @@ * point falue. They will load the data from an ARM to a VFP register(s), * or from a VFP to an ARM register */ -#ifdef __ARMEB__ +#ifdef __ARM_BIG_ENDIAN #define LOAD_DREG(vreg, reg0, reg1) vmov vreg, reg1, reg0 #define UNLOAD_DREG(reg0, reg1, vreg) vmov reg1, reg0, vreg #else @@ -65,7 +67,7 @@ * C Helper macros */ -#if defined(__FreeBSD_ARCH_armv6__) || (defined(__ARM_ARCH) && __ARM_ARCH >= 6) +#if __ARM_ARCH >= 6 /* * Generate a function that will either call into the VFP implementation, * or the soft float version for a given __aeabi_* helper. The function Modified: head/lib/msun/arm/fenv.c ============================================================================== --- head/lib/msun/arm/fenv.c Wed Aug 13 22:34:14 2014 (r269955) +++ head/lib/msun/arm/fenv.c Thu Aug 14 04:20:13 2014 (r269956) @@ -30,7 +30,9 @@ #define __fenv_static #include "fenv.h" -#if defined(__FreeBSD_ARCH_armv6__) || (defined(__ARM_ARCH) && __ARM_ARCH >= 6) +#include + +#if __ARM_ARCH >= 6 #define FENV_ARMv6 #endif Modified: head/sys/arm/arm/disassem.c ============================================================================== --- head/sys/arm/arm/disassem.c Wed Aug 13 22:34:14 2014 (r269955) +++ head/sys/arm/arm/disassem.c Thu Aug 14 04:20:13 2014 (r269956) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include /* @@ -130,7 +131,7 @@ static const struct arm32_insn arm32_i[] { 0x0c500000, 0x04100000, "ldr", "daW" }, { 0x0c500000, 0x04400000, "strb", "daW" }, { 0x0c500000, 0x04500000, "ldrb", "daW" }, -#if defined(__FreeBSD_ARCH_armv6__) || (defined(__ARM_ARCH) && __ARM_ARCH >= 6) +#if __ARM_ARCH >= 6 { 0xffffffff, 0xf57ff01f, "clrex", "c" }, { 0x0ff00ff0, 0x01800f90, "strex", "dmo" }, { 0x0ff00fff, 0x01900f9f, "ldrex", "do" }, Added: head/sys/arm/include/acle-compat.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/include/acle-compat.h Thu Aug 14 04:20:13 2014 (r269956) @@ -0,0 +1,185 @@ +/* + * Copyright (c) 2014 ARM Ltd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the company may not be used to endorse or promote + * products derived from this software without specific prior written + * permission. + * + * THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef __ARM_ARCH + +/* ACLE standardises a set of pre-defines that describe the ARM architecture. + These were mostly implemented in GCC around GCC-4.8; older versions + have no, or only partial support. To provide a level of backwards + compatibility we try to work out what the definitions should be, given + the older pre-defines that GCC did produce. This isn't complete, but + it should be enough for use by routines that depend on this header. */ + +/* No need to handle ARMv8, GCC had ACLE support before that. */ + +#define __ARM_ACLE 101 + +# ifdef __ARM_ARCH_7__ +/* The common subset of ARMv7 in all profiles. */ +# define __ARM_ARCH 7 +# define __ARM_ARCH_ISA_THUMB 2 +# define __ARM_FEATURE_CLZ +# define __ARM_FEATURE_LDREX 7 +# define __ARM_FEATURE_UNALIGNED +# endif + +# if defined (__ARM_ARCH_7A__) || defined (__ARM_ARCH_7R__) +# define __ARM_ARCH 7 +# define __ARM_ARCH_ISA_THUMB 2 +# define __ARM_ARCH_ISA_ARM +# define __ARM_FEATURE_CLZ +# define __ARM_FEATURE_SIMD32 +# define __ARM_FEATURE_DSP +# define __ARM_FEATURE_QBIT +# define __ARM_FEATURE_SAT +# define __ARM_FEATURE_LDREX 15 +# define __ARM_FEATURE_UNALIGNED +# ifdef __ARM_ARCH_7A__ +# define __ARM_ARCH_PROFILE 'A' +# else +# define __ARM_ARCH_PROFILE 'R' +# endif +# endif + +# ifdef __ARM_ARCH_7EM__ +# define __ARM_ARCH 7 +# define __ARM_ARCH_ISA_THUMB 2 +# define __ARM_FEATURE_CLZ +# define __ARM_FEATURE_SIMD32 +# define __ARM_FEATURE_DSP +# define __ARM_FEATURE_QBIT +# define __ARM_FEATURE_SAT +# define __ARM_FEATURE_LDREX 7 +# define __ARM_FEATURE_UNALIGNED +# define __ARM_ARCH_PROFILE 'M' +# endif + +# ifdef __ARM_ARCH_7M__ +# define __ARM_ARCH 7 +# define __ARM_ARCH_ISA_THUMB 2 +# define __ARM_FEATURE_CLZ +# define __ARM_FEATURE_QBIT +# define __ARM_FEATURE_SAT +# define __ARM_FEATURE_LDREX 7 +# define __ARM_FEATURE_UNALIGNED +# define __ARM_ARCH_PROFILE 'M' +# endif + +# ifdef __ARM_ARCH_6T2__ +# define __ARM_ARCH 6 +# define __ARM_ARCH_ISA_THUMB 2 +# define __ARM_ARCH_ISA_ARM +# define __ARM_FEATURE_CLZ +# define __ARM_FEATURE_SIMD32 +# define __ARM_FEATURE_DSP +# define __ARM_FEATURE_QBIT +# define __ARM_FEATURE_SAT +# define __ARM_FEATURE_LDREX 4 +# define __ARM_FEATURE_UNALIGNED +# endif + +# ifdef __ARM_ARCH_6M__ +# define __ARM_ARCH 6 +# define __ARM_ARCH_ISA_THUMB 1 +# define __ARM_ARCH_PROFILE 'M' +# endif + +# if defined (__ARM_ARCH_6__) || defined (__ARM_ARCH_6J__) \ + || defined (__ARM_ARCH_6K__) || defined (__ARM_ARCH_6Z__) \ + || defined (__ARM_ARCH_6ZK__) +# define __ARM_ARCH 6 +# define __ARM_ARCH_ISA_THUMB 1 +# define __ARM_ARCH_ISA_ARM +# define __ARM_FEATURE_CLZ +# define __ARM_FEATURE_SIMD32 +# define __ARM_FEATURE_DSP +# define __ARM_FEATURE_QBIT +# define __ARM_FEATURE_SAT +# define __ARM_FEATURE_UNALIGNED +# ifndef __thumb__ +# if defined (__ARM_ARCH_6K__) || defined (__ARM_ARCH_6ZK__) +# define __ARM_FEATURE_LDREX 15 +# else +# define __ARM_FEATURE_LDREX 4 +# endif +# endif +# endif + +# if defined (__ARM_ARCH_5TE__) || defined (__ARM_ARCH_5E__) +# define __ARM_ARCH 5 +# define __ARM_ARCH_ISA_ARM +# ifdef __ARM_ARCH_5TE__ +# define __ARM_ARCH_ISA_THUMB 1 +# endif +# define __ARM_FEATURE_CLZ +# define __ARM_FEATURE_DSP +# endif + +# if defined (__ARM_ARCH_5T__) || defined (__ARM_ARCH_5__) +# define __ARM_ARCH 5 +# define __ARM_ARCH_ISA_ARM +# ifdef __ARM_ARCH_5TE__ +# define __ARM_ARCH_ISA_THUMB 1 +# endif +# define __ARM_FEATURE_CLZ +# endif + +# ifdef __ARM_ARCH_4T__ +# define __ARM_ARCH 4 +# define __ARM_ARCH_ISA_ARM +# define __ARM_ARCH_ISA_THUMB 1 +# endif + +# ifdef __ARM_ARCH_4__ +# define __ARM_ARCH 4 +# define __ARM_ARCH_ISA_ARM +# endif + +# if defined (__ARM_ARCH_3__) || defined (__ARM_ARCH_3M__) +# define __ARM_ARCH 3 +# define __ARM_ARCH_ISA_ARM +# endif + +# ifdef __ARM_ARCH_2__ +# define __ARM_ARCH 2 +# define __ARM_ARCH_ISA_ARM +# endif + +# ifdef __ARMEB__ +# define __ARM_BIG_ENDIAN +# endif + +/* If we still don't know what the target architecture is, then we're + probably not using GCC. */ +# ifndef __ARM_ARCH +# error Unable to determine architecture version. +# endif + +#endif /* __ARM_ARCH */ Modified: head/sys/arm/include/param.h ============================================================================== --- head/sys/arm/include/param.h Wed Aug 13 22:34:14 2014 (r269955) +++ head/sys/arm/include/param.h Thu Aug 14 04:20:13 2014 (r269956) @@ -46,13 +46,14 @@ */ #include +#include #define STACKALIGNBYTES (8 - 1) #define STACKALIGN(p) ((u_int)(p) & ~STACKALIGNBYTES) #define __PCI_REROUTE_INTERRUPT -#if defined(__FreeBSD_ARCH_armv6__) || (defined(__ARM_ARCH) && __ARM_ARCH >= 6) +#if __ARM_ARCH >= 6 #define _V6_SUFFIX "v6" #else #define _V6_SUFFIX "" @@ -64,7 +65,7 @@ #define _HF_SUFFIX "" #endif -#ifdef __ARMEB__ +#ifdef __ARM_BIG_ENDIAN #define _EB_SUFFIX "eb" #else #define _EB_SUFFIX "" From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 04:21:15 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B082A761; Thu, 14 Aug 2014 04:21:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 91E422BD1; Thu, 14 Aug 2014 04:21:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7E4LFXI046347; Thu, 14 Aug 2014 04:21:15 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7E4LFdf046343; Thu, 14 Aug 2014 04:21:15 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201408140421.s7E4LFdf046343@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 14 Aug 2014 04:21:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269957 - in head/sys: arm/at91 conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 04:21:15 -0000 Author: imp Date: Thu Aug 14 04:21:14 2014 New Revision: 269957 URL: http://svnweb.freebsd.org/changeset/base/269957 Log: Add support for FDT and !FDT configs on Atmel, though FDT isn't working yet. Bump rev on arm Makefile since files.at91 uses new '!' operator. Modified: head/sys/arm/at91/files.at91 head/sys/conf/Makefile.arm Modified: head/sys/arm/at91/files.at91 ============================================================================== --- head/sys/arm/at91/files.at91 Thu Aug 14 04:20:13 2014 (r269956) +++ head/sys/arm/at91/files.at91 Thu Aug 14 04:21:14 2014 (r269957) @@ -3,28 +3,34 @@ arm/arm/cpufunc_asm_arm9.S standard arm/at91/at91_machdep.c standard arm/at91/at91_aic.c standard arm/at91/at91.c standard -arm/at91/at91_cfata.c optional at91_cfata -arm/at91/at91_mci.c optional at91_mci -dev/nand/nfc_at91.c optional nand +arm/at91/at91_aic.c standard arm/at91/at91_pio.c standard arm/at91/at91_pmc.c standard +arm/at91/at91_smc.c standard +arm/at91/at91_cfata.c optional at91_cfata +arm/at91/at91_common.c optional fdt +arm/at91/at91_mci.c optional at91_mci +arm/at91/at91_pinctrl.c optional fdt arm/at91/at91_pit.c optional at91sam9 arm/at91/at91_reset.S optional at91sam9 arm/at91/at91_rst.c optional at91sam9 arm/at91/at91_rtc.c optional at91_rtc -arm/at91/at91_smc.c standard +arm/at91/at91_sdramc.c optional fdt +arm/at91/at91_shdwc.c optional fdt arm/at91/at91_spi.c optional at91_spi \ dependency "spibus_if.h" arm/at91/at91_ssc.c optional at91_ssc arm/at91/at91_st.c optional at91rm9200 -arm/at91/at91_tc.c optional at91_tc +arm/at91/at91_tcb.c optional fdt arm/at91/at91_twi.c optional at91_twi arm/at91/at91_wdt.c optional at91_wdt arm/at91/if_ate.c optional ate arm/at91/if_macb.c optional macb -arm/at91/uart_bus_at91usart.c optional uart -arm/at91/uart_cpu_at91usart.c optional uart +arm/at91/uart_bus_at91usart.c optional uart ! fdt +arm/at91/uart_cpu_at91usart.c optional uart ! fdt arm/at91/uart_dev_at91usart.c optional uart +dev/uart/uart_cpu_fdt.c optional uart fdt +dev/nand/nfc_at91.c optional nand # # All the "systems on a chip" we support # @@ -54,5 +60,7 @@ arm/at91/board_tsc4370.c optional at91_b # usb # dev/usb/controller/at91dci.c optional at91_dci -dev/usb/controller/at91dci_atmelarm.c optional at91_dci -dev/usb/controller/ohci_atmelarm.c optional ohci +dev/usb/controller/at91dci_atmelarm.c optional at91_dci !fdt +dev/usb/controller/ohci_atmelarm.c optional ohci !fdt +dev/usb/controller/at91dci_fdt.c optional at91_dci fdt +dev/usb/controller/ohci_fdt.c optional ohci fdt Modified: head/sys/conf/Makefile.arm ============================================================================== --- head/sys/conf/Makefile.arm Thu Aug 14 04:20:13 2014 (r269956) +++ head/sys/conf/Makefile.arm Thu Aug 14 04:21:14 2014 (r269957) @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 600012 +%VERSREQ= 600013 STD8X16FONT?= iso From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 04:21:21 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6DE888C1; Thu, 14 Aug 2014 04:21:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5AE992BD7; Thu, 14 Aug 2014 04:21:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7E4LLap046415; Thu, 14 Aug 2014 04:21:21 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7E4LLU6046413; Thu, 14 Aug 2014 04:21:21 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201408140421.s7E4LLU6046413@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 14 Aug 2014 04:21:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269958 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 04:21:21 -0000 Author: imp Date: Thu Aug 14 04:21:20 2014 New Revision: 269958 URL: http://svnweb.freebsd.org/changeset/base/269958 Log: Start to add FDT support. Added: head/sys/arm/at91/at91_common.c (contents, props changed) Modified: head/sys/arm/at91/at91_machdep.c Added: head/sys/arm/at91/at91_common.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/at91/at91_common.c Thu Aug 14 04:21:20 2014 (r269958) @@ -0,0 +1,90 @@ +#include +__FBSDID("$FreeBSD$"); + +#define _ARM32_BUS_DMA_PRIVATE +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern const struct arm_devmap_entry at91_devmap[]; +extern struct bus_space at91_bs_tag; +bus_space_tag_t fdtbus_bs_tag = &at91_bs_tag; + +struct fdt_fixup_entry fdt_fixup_table[] = { + { NULL, NULL } +}; + +static int +fdt_aic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, + int *pol) +{ + int offset; + + if (fdt_is_compatible(node, "atmel,at91rm9200-aic")) + offset = 0; + else + return (ENXIO); + + *interrupt = fdt32_to_cpu(intr[0]) + offset; + *trig = INTR_TRIGGER_CONFORM; + *pol = INTR_POLARITY_CONFORM; + + return (0); +} + +fdt_pic_decode_t fdt_pic_table[] = { + &fdt_aic_decode_ic, + NULL +}; + +static void +at91_eoi(void *unused) +{ + uint32_t *eoicr = (uint32_t *)(0xdffff000 + IC_EOICR); + + *eoicr = 0; +} + + +vm_offset_t +initarm_lastaddr(void) +{ + + return (arm_devmap_lastaddr()); +} + +void +initarm_early_init(void) +{ + + arm_post_filter = at91_eoi; + at91_soc_id(); + arm_devmap_register_table(at91_devmap); +} + +int +initarm_devmap_init(void) +{ + +// arm_devmap_add_entry(0xfff00000, 0x00100000); /* 1MB - uart, aic and timers*/ + + return (0); +} + +void +initarm_gpio_init(void) +{ +} + +void +initarm_late_init(void) +{ +} Modified: head/sys/arm/at91/at91_machdep.c ============================================================================== --- head/sys/arm/at91/at91_machdep.c Thu Aug 14 04:21:14 2014 (r269957) +++ head/sys/arm/at91/at91_machdep.c Thu Aug 14 04:21:20 2014 (r269958) @@ -43,6 +43,8 @@ * Created : 17/09/94 */ +#include "opt_platform.h" + #include __FBSDID("$FreeBSD$"); @@ -111,8 +113,12 @@ __FBSDID("$FreeBSD$"); /* this should be evenly divisable by PAGE_SIZE / L2_TABLE_SIZE_REAL (or 4) */ #define NUM_KERNEL_PTS (KERNEL_PT_AFKERNEL + KERNEL_PT_AFKERNEL_NUM) +extern struct bus_space at91_bs_tag; + struct pv_addr kernel_pt_table[NUM_KERNEL_PTS]; +uint32_t at91_master_clock; + /* Static device mappings. */ const struct arm_devmap_entry at91_devmap[] = { /* @@ -194,15 +200,6 @@ const struct arm_devmap_entry at91_devma { 0, 0, 0, 0, 0, } }; -/* Physical and virtual addresses for some global pages */ - -struct pv_addr systempage; -struct pv_addr msgbufpv; -struct pv_addr irqstack; -struct pv_addr undstack; -struct pv_addr abtstack; -struct pv_addr kernelstack; - #ifdef LINUX_BOOT_ABI extern int membanks; extern int memstart[]; @@ -444,6 +441,16 @@ board_init(void) } #endif +#ifndef FDT +/* Physical and virtual addresses for some global pages */ + +struct pv_addr msgbufpv; +struct pv_addr kernelstack; +struct pv_addr systempage; +struct pv_addr irqstack; +struct pv_addr abtstack; +struct pv_addr undstack; + void * initarm(struct arm_boot_params *abp) { @@ -651,6 +658,7 @@ initarm(struct arm_boot_params *abp) return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP - sizeof(struct pcb))); } +#endif /* * These functions are handled elsewhere, so make them nops here. From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 04:21:27 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B96FA02; Thu, 14 Aug 2014 04:21:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1865F2C04; Thu, 14 Aug 2014 04:21:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7E4LQXe046495; Thu, 14 Aug 2014 04:21:26 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7E4LQ4Y046488; Thu, 14 Aug 2014 04:21:26 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201408140421.s7E4LQ4Y046488@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 14 Aug 2014 04:21:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269959 - in head/sys/arm: arm at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 04:21:27 -0000 Author: imp Date: Thu Aug 14 04:21:25 2014 New Revision: 269959 URL: http://svnweb.freebsd.org/changeset/base/269959 Log: Add support for multipass to Atmel, for both FDT and !FDT cases. Modified: head/sys/arm/arm/nexus.c head/sys/arm/at91/at91_aic.c head/sys/arm/at91/at91_pit.c head/sys/arm/at91/at91_pmc.c head/sys/arm/at91/std.atmel Modified: head/sys/arm/arm/nexus.c ============================================================================== --- head/sys/arm/arm/nexus.c Thu Aug 14 04:21:20 2014 (r269958) +++ head/sys/arm/arm/nexus.c Thu Aug 14 04:21:25 2014 (r269959) @@ -362,4 +362,3 @@ nexus_ofw_map_intr(device_t dev, device_ return (interrupt); } #endif - Modified: head/sys/arm/at91/at91_aic.c ============================================================================== --- head/sys/arm/at91/at91_aic.c Thu Aug 14 04:21:20 2014 (r269958) +++ head/sys/arm/at91/at91_aic.c Thu Aug 14 04:21:25 2014 (r269959) @@ -176,13 +176,9 @@ static driver_t at91_aic_driver = { static devclass_t at91_aic_devclass; #ifdef FDT -DRIVER_MODULE(at91_aic, simplebus, at91_aic_driver, at91_aic_devclass, NULL, - NULL); -#else -DRIVER_MODULE(at91_aic, atmelarm, at91_aic_driver, at91_aic_devclass, NULL, - NULL); -#endif -/* not yet EARLY_DRIVER_MODULE(at91_aic, simplebus, at91_aic_driver, at91_aic_devclass, NULL, NULL, BUS_PASS_INTERRUPT); -*/ +#else +EARLY_DRIVER_MODULE(at91_aic, atmelarm, at91_aic_driver, at91_aic_devclass, + NULL, NULL, BUS_PASS_INTERRUPT); +#endif Modified: head/sys/arm/at91/at91_pit.c ============================================================================== --- head/sys/arm/at91/at91_pit.c Thu Aug 14 04:21:20 2014 (r269958) +++ head/sys/arm/at91/at91_pit.c Thu Aug 14 04:21:25 2014 (r269959) @@ -214,9 +214,9 @@ static driver_t at91_pit_driver = { static devclass_t at91_pit_devclass; #ifdef FDT -DRIVER_MODULE(at91_pit, simplebus, at91_pit_driver, at91_pit_devclass, NULL, - NULL); +EARLY_DRIVER_MODULE(at91_pit, simplebus, at91_pit_driver, at91_pit_devclass, + NULL, NULL, BUS_PASS_TIMER); #else -DRIVER_MODULE(at91_pit, atmelarm, at91_pit_driver, at91_pit_devclass, NULL, - NULL); +EARLY_DRIVER_MODULE(at91_pit, atmelarm, at91_pit_driver, at91_pit_devclass, + NULL, NULL, BUS_PASS_TIMER); #endif Modified: head/sys/arm/at91/at91_pmc.c ============================================================================== --- head/sys/arm/at91/at91_pmc.c Thu Aug 14 04:21:20 2014 (r269958) +++ head/sys/arm/at91/at91_pmc.c Thu Aug 14 04:21:25 2014 (r269959) @@ -709,9 +709,9 @@ static driver_t at91_pmc_driver = { static devclass_t at91_pmc_devclass; #ifdef FDT -DRIVER_MODULE(at91_pmc, simplebus, at91_pmc_driver, at91_pmc_devclass, NULL, - NULL); +EARLY_DRIVER_MODULE(at91_pmc, simplebus, at91_pmc_driver, at91_pmc_devclass, + NULL, NULL, BUS_PASS_CPU); #else -DRIVER_MODULE(at91_pmc, atmelarm, at91_pmc_driver, at91_pmc_devclass, NULL, - NULL); +EARLY_DRIVER_MODULE(at91_pmc, atmelarm, at91_pmc_driver, at91_pmc_devclass, + NULL, NULL, BUS_PASS_CPU); #endif Modified: head/sys/arm/at91/std.atmel ============================================================================== --- head/sys/arm/at91/std.atmel Thu Aug 14 04:21:20 2014 (r269958) +++ head/sys/arm/at91/std.atmel Thu Aug 14 04:21:25 2014 (r269959) @@ -11,3 +11,5 @@ device at91sam9x5 # bring in the sam specific timers and such device at91sam9 + +options ARM_DEVICE_MULTIPASS From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 04:21:32 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7B3B4B69; Thu, 14 Aug 2014 04:21:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 500432C65; Thu, 14 Aug 2014 04:21:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7E4LWXl046565; Thu, 14 Aug 2014 04:21:32 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7E4LV7N046562; Thu, 14 Aug 2014 04:21:31 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201408140421.s7E4LV7N046562@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 14 Aug 2014 04:21:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269960 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 04:21:32 -0000 Author: imp Date: Thu Aug 14 04:21:31 2014 New Revision: 269960 URL: http://svnweb.freebsd.org/changeset/base/269960 Log: Add AIC to at91sam9260 support, now that it is needed for multipass to work. This gets my AT91SAM9260-based boards almost booting with current in multi pass. The MCI driver is broken, but it is equally broken before multi-pass. Modified: head/sys/arm/at91/at91.c head/sys/arm/at91/at91sam9260.c head/sys/arm/at91/at91sam9260reg.h Modified: head/sys/arm/at91/at91.c ============================================================================== --- head/sys/arm/at91/at91.c Thu Aug 14 04:21:25 2014 (r269959) +++ head/sys/arm/at91/at91.c Thu Aug 14 04:21:31 2014 (r269960) @@ -255,7 +255,7 @@ at91_cpu_add_builtin_children(device_t d { int i; - for (i = 1; walker->name; i++, walker++) { + for (i = 0; walker->name; i++, walker++) { at91_add_child(dev, i, walker->name, walker->unit, walker->mem_base, walker->mem_len, walker->irq0, walker->irq1, walker->irq2); Modified: head/sys/arm/at91/at91sam9260.c ============================================================================== --- head/sys/arm/at91/at91sam9260.c Thu Aug 14 04:21:25 2014 (r269959) +++ head/sys/arm/at91/at91sam9260.c Thu Aug 14 04:21:31 2014 (r269960) @@ -103,6 +103,7 @@ static const uint32_t at91_pio_base[] = static const struct cpu_devs at91_devs[] = { + DEVICE("at91_aic", AIC, 0), DEVICE("at91_pmc", PMC, 0), DEVICE("at91_wdt", WDT, 0), DEVICE("at91_rst", RSTC, 0), Modified: head/sys/arm/at91/at91sam9260reg.h ============================================================================== --- head/sys/arm/at91/at91sam9260reg.h Thu Aug 14 04:21:25 2014 (r269959) +++ head/sys/arm/at91/at91sam9260reg.h Thu Aug 14 04:21:31 2014 (r269960) @@ -220,6 +220,7 @@ #define AT91SAM9260_IRQ_RSTC AT91SAM9260_IRQ_SYSTEM #define AT91SAM9260_IRQ_OHCI AT91SAM9260_IRQ_UHP #define AT91SAM9260_IRQ_NAND (-1) +#define AT91SAM9260_IRQ_AIC (-1) #define AT91SAM9260_AIC_BASE 0xffff000 #define AT91SAM9260_AIC_SIZE 0x200 From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 04:42:10 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6568F92; Thu, 14 Aug 2014 04:42:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 933562E44; Thu, 14 Aug 2014 04:42:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7E4gAV0056094; Thu, 14 Aug 2014 04:42:10 GMT (envelope-from ache@FreeBSD.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7E4gAAc056092; Thu, 14 Aug 2014 04:42:10 GMT (envelope-from ache@FreeBSD.org) Message-Id: <201408140442.s7E4gAAc056092@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ache set sender to ache@FreeBSD.org using -f From: "Andrey A. Chernov" Date: Thu, 14 Aug 2014 04:42:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269961 - in head: . lib/libopie X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 04:42:10 -0000 Author: ache Date: Thu Aug 14 04:42:09 2014 New Revision: 269961 URL: http://svnweb.freebsd.org/changeset/base/269961 Log: Bump version because challenge buffer size changed MFC after: 1 week Modified: head/ObsoleteFiles.inc head/lib/libopie/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Aug 14 04:21:31 2014 (r269960) +++ head/ObsoleteFiles.inc Thu Aug 14 04:42:09 2014 (r269961) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20140814: libopie version bump +OLD_LIBS+=usr/lib/libopie.so.7 +OLD_LIBS+=usr/lib32/libopie.so.7 # 20140811: otp-sha renamed to otp-sha1 OLD_FILES+=usr/bin/otp-sha OLD_FILES+=usr/share/man/man1/otp-sha.1.gz Modified: head/lib/libopie/Makefile ============================================================================== --- head/lib/libopie/Makefile Thu Aug 14 04:21:31 2014 (r269960) +++ head/lib/libopie/Makefile Thu Aug 14 04:42:09 2014 (r269961) @@ -4,7 +4,7 @@ # OPIE_DIST?= ${.CURDIR}/../../contrib/opie DIST_DIR= ${OPIE_DIST}/${.CURDIR:T} -SHLIB_MAJOR= 7 +SHLIB_MAJOR= 8 KEYFILE?= \"/etc/opiekeys\" From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 05:00:46 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9EE1D318; Thu, 14 Aug 2014 05:00:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7243D2014; Thu, 14 Aug 2014 05:00:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7E50kEB061767; Thu, 14 Aug 2014 05:00:46 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7E50krj061765; Thu, 14 Aug 2014 05:00:46 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201408140500.s7E50krj061765@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Thu, 14 Aug 2014 05:00:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269962 - in head/sys/amd64/vmm: . intel X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 05:00:46 -0000 Author: neel Date: Thu Aug 14 05:00:45 2014 New Revision: 269962 URL: http://svnweb.freebsd.org/changeset/base/269962 Log: Use the max guest memory address when creating its iommu domain. Also, assert that the GPA being mapped in the domain is less than its maxaddr. Reviewed by: grehan Pointed out by: Anish Gupta (akgupt3@gmail.com) Modified: head/sys/amd64/vmm/intel/vtd.c head/sys/amd64/vmm/vmm.c Modified: head/sys/amd64/vmm/intel/vtd.c ============================================================================== --- head/sys/amd64/vmm/intel/vtd.c Thu Aug 14 04:42:09 2014 (r269961) +++ head/sys/amd64/vmm/intel/vtd.c Thu Aug 14 05:00:45 2014 (r269962) @@ -448,6 +448,11 @@ vtd_update_mapping(void *arg, vm_paddr_t ptpindex = 0; ptpshift = 0; + KASSERT(gpa + len > gpa, ("%s: invalid gpa range %#lx/%#lx", __func__, + gpa, len)); + KASSERT(gpa + len <= dom->maxaddr, ("%s: gpa range %#lx/%#lx beyond " + "domain maxaddr %#lx", __func__, gpa, len, dom->maxaddr)); + if (gpa & PAGE_MASK) panic("vtd_create_mapping: unaligned gpa 0x%0lx", gpa); Modified: head/sys/amd64/vmm/vmm.c ============================================================================== --- head/sys/amd64/vmm/vmm.c Thu Aug 14 04:42:09 2014 (r269961) +++ head/sys/amd64/vmm/vmm.c Thu Aug 14 05:00:45 2014 (r269962) @@ -572,6 +572,21 @@ vm_malloc(struct vm *vm, vm_paddr_t gpa, return (0); } +static vm_paddr_t +vm_maxmem(struct vm *vm) +{ + int i; + vm_paddr_t gpa, maxmem; + + maxmem = 0; + for (i = 0; i < vm->num_mem_segs; i++) { + gpa = vm->mem_segs[i].gpa + vm->mem_segs[i].len; + if (gpa > maxmem) + maxmem = gpa; + } + return (maxmem); +} + static void vm_gpa_unwire(struct vm *vm) { @@ -709,7 +724,7 @@ vm_assign_pptdev(struct vm *vm, int bus, if (ppt_assigned_devices(vm) == 0) { KASSERT(vm->iommu == NULL, ("vm_assign_pptdev: iommu must be NULL")); - maxaddr = vmm_mem_maxaddr(); + maxaddr = vm_maxmem(vm); vm->iommu = iommu_create_domain(maxaddr); error = vm_gpa_wire(vm); From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 05:13:25 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7D7D94F0; Thu, 14 Aug 2014 05:13:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A39B2152; Thu, 14 Aug 2014 05:13:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7E5DP6K069700; Thu, 14 Aug 2014 05:13:25 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7E5DPRb069698; Thu, 14 Aug 2014 05:13:25 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201408140513.s7E5DPRb069698@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 14 Aug 2014 05:13:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269963 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 05:13:25 -0000 Author: delphij Date: Thu Aug 14 05:13:24 2014 New Revision: 269963 URL: http://svnweb.freebsd.org/changeset/base/269963 Log: Re-instate UMA cached backend for 4K - 64K allocations. New consumers like geli(4) uses malloc(9) to allocate temporary buffers that gets free'ed shortly, causing frequent TLB shootdown as observed in hwpmc supported flame graph. Discussed with: jeff, alfred MFC after: 1 week Modified: head/sys/kern/kern_malloc.c Modified: head/sys/kern/kern_malloc.c ============================================================================== --- head/sys/kern/kern_malloc.c Thu Aug 14 05:00:45 2014 (r269962) +++ head/sys/kern/kern_malloc.c Thu Aug 14 05:13:24 2014 (r269963) @@ -120,7 +120,7 @@ static int kmemcount; #define KMEM_ZBASE 16 #define KMEM_ZMASK (KMEM_ZBASE - 1) -#define KMEM_ZMAX PAGE_SIZE +#define KMEM_ZMAX 65536 #define KMEM_ZSIZE (KMEM_ZMAX >> KMEM_ZSHIFT) static uint8_t kmemsize[KMEM_ZSIZE + 1]; @@ -151,21 +151,10 @@ struct { {1024, "1024", }, {2048, "2048", }, {4096, "4096", }, -#if PAGE_SIZE > 4096 {8192, "8192", }, -#if PAGE_SIZE > 8192 {16384, "16384", }, -#if PAGE_SIZE > 16384 {32768, "32768", }, -#if PAGE_SIZE > 32768 {65536, "65536", }, -#if PAGE_SIZE > 65536 -#error "Unsupported PAGE_SIZE" -#endif /* 65536 */ -#endif /* 32768 */ -#endif /* 16384 */ -#endif /* 8192 */ -#endif /* 4096 */ {0, NULL}, }; From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 05:31:40 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6273C8B5; Thu, 14 Aug 2014 05:31:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F85F22DB; Thu, 14 Aug 2014 05:31:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7E5VeaO077793; Thu, 14 Aug 2014 05:31:40 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7E5VeWw077792; Thu, 14 Aug 2014 05:31:40 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201408140531.s7E5VeWw077792@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 14 Aug 2014 05:31:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269964 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 05:31:40 -0000 Author: delphij Date: Thu Aug 14 05:31:39 2014 New Revision: 269964 URL: http://svnweb.freebsd.org/changeset/base/269964 Log: Add a new loader tunable, vm.kmem_zmax which allows a system administrator to limit the maximum allocation size that malloc(9) would consider using the UMA cache allocator as backend. Suggested by: alfred MFC after: 2 weeks Modified: head/sys/kern/kern_malloc.c Modified: head/sys/kern/kern_malloc.c ============================================================================== --- head/sys/kern/kern_malloc.c Thu Aug 14 05:13:24 2014 (r269963) +++ head/sys/kern/kern_malloc.c Thu Aug 14 05:31:39 2014 (r269964) @@ -172,6 +172,10 @@ u_long vm_kmem_size; SYSCTL_ULONG(_vm, OID_AUTO, kmem_size, CTLFLAG_RDTUN, &vm_kmem_size, 0, "Size of kernel memory"); +static u_long kmem_zmax = KMEM_ZMAX; +SYSCTL_ULONG(_vm, OID_AUTO, kmem_zmax, CTLFLAG_RDTUN, &kmem_zmax, 0, + "Maximum allocation size that malloc(9) would use UMA as backend"); + static u_long vm_kmem_size_min; SYSCTL_ULONG(_vm, OID_AUTO, kmem_size_min, CTLFLAG_RDTUN, &vm_kmem_size_min, 0, "Minimum size of kernel memory"); @@ -485,7 +489,7 @@ malloc(unsigned long size, struct malloc size = redzone_size_ntor(size); #endif - if (size <= KMEM_ZMAX) { + if (size <= kmem_zmax) { mtip = mtp->ks_handle; if (size & KMEM_ZMASK) size = (size & ~KMEM_ZMASK) + KMEM_ZBASE; @@ -776,6 +780,9 @@ mallocinit(void *dummy) uma_startup2(); + if (kmem_zmax < PAGE_SIZE || kmem_zmax > KMEM_ZMAX) + kmem_zmax = KMEM_ZMAX; + mt_zone = uma_zcreate("mt_zone", sizeof(struct malloc_type_internal), #ifdef INVARIANTS mtrash_ctor, mtrash_dtor, mtrash_init, mtrash_fini, @@ -800,7 +807,7 @@ mallocinit(void *dummy) } for (;i <= size; i+= KMEM_ZBASE) kmemsize[i >> KMEM_ZSHIFT] = indx; - + } } SYSINIT(kmem, SI_SUB_KMEM, SI_ORDER_SECOND, mallocinit, NULL); From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 05:35:25 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 63B1BA23; Thu, 14 Aug 2014 05:35:25 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "funkthat.com", Issuer "funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 405DD23ED; Thu, 14 Aug 2014 05:35:24 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id s7E5ZIF1082524 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 13 Aug 2014 22:35:18 -0700 (PDT) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id s7E5ZIbA082523; Wed, 13 Aug 2014 22:35:18 -0700 (PDT) (envelope-from jmg) Date: Wed, 13 Aug 2014 22:35:18 -0700 From: John-Mark Gurney To: Xin LI Subject: Re: svn commit: r269963 - head/sys/kern Message-ID: <20140814053518.GO83475@funkthat.com> References: <201408140513.s7E5DPRb069698@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201408140513.s7E5DPRb069698@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Wed, 13 Aug 2014 22:35:18 -0700 (PDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 05:35:25 -0000 Xin LI wrote this message on Thu, Aug 14, 2014 at 05:13 +0000: > Author: delphij > Date: Thu Aug 14 05:13:24 2014 > New Revision: 269963 > URL: http://svnweb.freebsd.org/changeset/base/269963 > > Log: > Re-instate UMA cached backend for 4K - 64K allocations. New consumers > like geli(4) uses malloc(9) to allocate temporary buffers that gets > free'ed shortly, causing frequent TLB shootdown as observed in hwpmc > supported flame graph. Can we do even larger, like 128k for phys io sized blocks? geli can do allocations >128k, which could be broken into two parts, one in the <8k sized range and the other in 128k... Thanks for adding this... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 06:24:14 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CC25E869; Thu, 14 Aug 2014 06:24:14 +0000 (UTC) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id AD3BF27E6; Thu, 14 Aug 2014 06:24:14 +0000 (UTC) Received: from delphij-macbook.local (unknown [IPv6:2001:470:83bf:0:d55:f338:5c8:c05c]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id 9F3CE14D75; Wed, 13 Aug 2014 23:24:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1407997454; x=1408011854; bh=0xhD4VlvI8wJS8wSVz4D9PrFgoCLP3Mms6xr4y0YP5k=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=MZRx3h04v5I47r5UvhTz7QDETr+TJbQQP+g3zxhpLnC4jXdotuShqKs0a2pgIH5eS rLdf+kq/+RURXzN1oziLzBzbAd4sbTAtKTiiKZLo2t5DsGbX+BUBXcITspqBTryM/a xFwj5LvdF8woraJIaDcYpT7cDcJwOi9x4GqPkEPQ= Message-ID: <53EC560B.5000104@delphij.net> Date: Wed, 13 Aug 2014 23:24:11 -0700 From: Xin Li Reply-To: d@delphij.net Organization: The FreeBSD Project MIME-Version: 1.0 To: John-Mark Gurney , Xin LI Subject: Re: svn commit: r269963 - head/sys/kern References: <201408140513.s7E5DPRb069698@svn.freebsd.org> <20140814053518.GO83475@funkthat.com> In-Reply-To: <20140814053518.GO83475@funkthat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 06:24:15 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 8/13/14 10:35 PM, John-Mark Gurney wrote: > Xin LI wrote this message on Thu, Aug 14, 2014 at 05:13 +0000: >> Author: delphij Date: Thu Aug 14 05:13:24 2014 New Revision: >> 269963 URL: http://svnweb.freebsd.org/changeset/base/269963 >> >> Log: Re-instate UMA cached backend for 4K - 64K allocations. New >> consumers like geli(4) uses malloc(9) to allocate temporary >> buffers that gets free'ed shortly, causing frequent TLB shootdown >> as observed in hwpmc supported flame graph. > > Can we do even larger, like 128k for phys io sized blocks? Sure (Actually I'm running with 128k and 256k buckets enabled on my own storage box; with r269964 we can easily add new buckets without actually activating them by default). However, I'm relented to add them right now because the current malloc(9) implementation would use the next bucket size, which is 2x of the previous one, when the requested size is only a little bit larger than the smaller chunk's size. In real world the larger bucket could eat more memory than all smaller but greater than page-sized bucket combined (the actual consumption is still small, though). I think eventually the right way to go is to adopt more sophisticated allocation strategy like the one used in jemalloc(3) and this changeset is more-or-less temporary for now: I committed it mainly because it eliminated a large portion of unwanted TLB shootdowns I have observed with very reasonable overhead (a few megabytes of RAM). > geli can do allocations >128k, which could be broken into two > parts, one in the <8k sized range and the other in 128k... Yes, this is another issue that I'd like to solve. -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJT7FYKAAoJEJW2GBstM+nsfIwP+gI+gPP2msCOIOpYSYK0hP50 xi5Bk4MDOpEZ7J4z4zWwqGXygDdgBUGXTGoAB1+3LwRD4/F+kEVlFFoRuUZTxsBC dstHq9X29omZ8xnLnQ7GTRPWaULHP7gX8RmJvJ8IH2ElYwUwe0whDNIaK4esqKOb Td1Lgse+FcozpMBaP4cIOtTXMBU1xY27n6i9EqXYQL2iuRFrehyD+DHyQ5M6cU5L FdOrX0+SsJ8ybG0KAPRl0VgjZSzBv74AeOz+DOF4EX2YkajcrvTG8JIShyY401Ou WiaE3dMaQvG1InpRH3Yu0twqTsinmu5xvunNJ3/8pE0C+OGSdcvd7Lvt6L4J5Isl f4tcfUbpvV2ja9tIHw//s8YYD6eRdd+AioeOwsOYwEWB9IbG/fE3BZUPKk3Xgtvz /m9SWKzFq8JMYrBOLpGeFSVQvpOHoH3ceiauzL0UqgTbyFX6zQibmpVxhTQLNUYF Fg16hk6HfRmxCQP22OB760pEjIGyQJzDDAjme7XYtkthsqbapU+tJQNb5+MY2T0p nI55dFHxKISBA5dhTNNt22vUN0A7VjKp0kYt9JhtlTJC/SX1BU2O5T1nYa2nsgrK 3xAgmLYBMj9LWl1ncp+/+Yv+FZZ25xgTae2sAGrX2cFHRy6/ifevVpP8BVupw5z0 BPpAtyp11WVwOPB1N4UB =6OMC -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 07:50:41 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0E3BA9D; Thu, 14 Aug 2014 07:50:41 +0000 (UTC) Received: from mailrelay003.isp.belgacom.be (mailrelay003.isp.belgacom.be [195.238.6.53]) by mx1.freebsd.org (Postfix) with ESMTP id CF3CB2091; Thu, 14 Aug 2014 07:50:40 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiENALtp7FNR8aPl/2dsb2JhbABagw1STQuCecp0h0gBgRAXd4QEAQUjMyMQCw4GBAICBSECAg8qHgaIWQEIsFSDLJIUF4EsjW0zB4J5gVMBBJVDhnWBWJMng147 Received: from 229.163-241-81.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([81.241.163.229]) by relay.skynet.be with ESMTP; 14 Aug 2014 09:50:33 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.9/8.14.9) with ESMTP id s7E7oW4j001202; Thu, 14 Aug 2014 09:50:32 +0200 (CEST) (envelope-from tijl@FreeBSD.org) Date: Thu, 14 Aug 2014 09:50:31 +0200 From: Tijl Coosemans To: Ed Maste Subject: Re: svn commit: r269950 - head/share/vt/keymaps Message-ID: <20140814095031.5da55195@kalimero.tijl.coosemans.org> In-Reply-To: <201408131906.s7DJ6UPN087045@svn.freebsd.org> References: <201408131906.s7DJ6UPN087045@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 07:50:41 -0000 On Wed, 13 Aug 2014 19:06:30 +0000 (UTC) Ed Maste wrote: > Author: emaste > Date: Wed Aug 13 19:06:29 2014 > New Revision: 269950 > URL: http://svnweb.freebsd.org/changeset/base/269950 >=20 > Log: > Copy country-code .iso syscons keymaps for vt(4) > =20 > Existing syscons ISO 8859-1 keymaps (??.iso.kbd) are usable without > change as Unicode keymaps for vt(4). On European layouts the alt+e 164 is iso-8859-15 =E2=82=AC and not iso-8859= -1 =C2=A4 From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 13:25:06 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7994F221; Thu, 14 Aug 2014 13:25:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 665D62693; Thu, 14 Aug 2014 13:25:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7EDP6Si095055; Thu, 14 Aug 2014 13:25:06 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7EDP6UE095054; Thu, 14 Aug 2014 13:25:06 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201408141325.s7EDP6UE095054@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Thu, 14 Aug 2014 13:25:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269972 - head/sys/dev/ixgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 13:25:06 -0000 Author: smh Date: Thu Aug 14 13:25:05 2014 New Revision: 269972 URL: http://svnweb.freebsd.org/changeset/base/269972 Log: Renamed hw.ixgbe.unsupported_sfp -> hw.ix.unsupported_sfp This now matches all other ixgbe sysctl / tunables. Sponsored by: Multiplay Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe.c Thu Aug 14 13:24:59 2014 (r269971) +++ head/sys/dev/ixgbe/ixgbe.c Thu Aug 14 13:25:05 2014 (r269972) @@ -317,7 +317,7 @@ SYSCTL_INT(_hw_ix, OID_AUTO, rxd, CTLFLA ** doing so you are on your own :) */ static int allow_unsupported_sfp = FALSE; -TUNABLE_INT("hw.ixgbe.unsupported_sfp", &allow_unsupported_sfp); +TUNABLE_INT("hw.ix.unsupported_sfp", &allow_unsupported_sfp); /* ** HW RSC control: From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 13:45:05 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1F576BF; Thu, 14 Aug 2014 13:45:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE11A286B; Thu, 14 Aug 2014 13:45:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7EDj4SW004362; Thu, 14 Aug 2014 13:45:04 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7EDj391004351; Thu, 14 Aug 2014 13:45:03 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201408141345.s7EDj391004351@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 14 Aug 2014 13:45:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269973 - head/share/vt/keymaps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 13:45:05 -0000 Author: emaste Date: Thu Aug 14 13:45:02 2014 New Revision: 269973 URL: http://svnweb.freebsd.org/changeset/base/269973 Log: Fix euro symbol in copied keymaps These were copied from share/syscons/keymaps/??.iso.kbd. They were not actually ISO 8859-1 as assumed. When interpreted as Unicode they ended up with the generic currency sign (U+00A4) instead of the euro (U+20AC). Reported by: Claude Buisson, tijl@ Modified: head/share/vt/keymaps/be.kbd head/share/vt/keymaps/fr.kbd head/share/vt/keymaps/hr.kbd head/share/vt/keymaps/it.kbd head/share/vt/keymaps/pt.kbd head/share/vt/keymaps/uk.kbd Modified: head/share/vt/keymaps/be.kbd ============================================================================== --- head/share/vt/keymaps/be.kbd Thu Aug 14 13:25:05 2014 (r269972) +++ head/share/vt/keymaps/be.kbd Thu Aug 14 13:45:02 2014 (r269973) @@ -21,7 +21,7 @@ 015 ht btab nop nop ht btab nop nop O 016 'a' 'A' soh soh 'a' 'A' soh soh C 017 'z' 'Z' sub sub 'z' 'Z' sub sub C - 018 'e' 'E' enq enq 164 'E' enq enq C + 018 'e' 'E' enq enq 8364 'E' enq enq C 019 'r' 'R' dc2 dc2 'r' 'R' dc2 dc2 C 020 't' 'T' dc4 dc4 't' 'T' dc4 dc4 C 021 'y' 'Y' em em 'y' 'Y' em em C Modified: head/share/vt/keymaps/fr.kbd ============================================================================== --- head/share/vt/keymaps/fr.kbd Thu Aug 14 13:25:05 2014 (r269972) +++ head/share/vt/keymaps/fr.kbd Thu Aug 14 13:45:02 2014 (r269973) @@ -21,7 +21,7 @@ 015 ht btab nop nop ht btab nop nop O 016 'a' 'A' soh soh 226 228 dc1 dc1 C 017 'z' 'Z' sub sub 'z' 'Z' etb etb C - 018 'e' 'E' enq enq 164 'E' enq enq C + 018 'e' 'E' enq enq 8364 'E' enq enq C 019 'r' 'R' dc2 dc2 'r' 'R' dc2 dc2 C 020 't' 'T' dc4 dc4 't' 'T' dc4 dc4 C 021 'y' 'Y' em em 237 236 em em C Modified: head/share/vt/keymaps/hr.kbd ============================================================================== --- head/share/vt/keymaps/hr.kbd Thu Aug 14 13:25:05 2014 (r269972) +++ head/share/vt/keymaps/hr.kbd Thu Aug 14 13:45:02 2014 (r269973) @@ -48,7 +48,7 @@ 040 230 198 nop nop 223 223 nop nop C 041 184 168 nop nop 184 168 nop nop O 042 lshift lshift lshift lshift lshift lshift lshift lshift O - 043 190 174 fs fs 164 164 fs fs C + 043 190 174 fs fs 8364 8364 fs fs C 044 'y' 'Y' em em 'y' 'Y' em em C 045 'x' 'X' can can 'x' 'X' can can C 046 'c' 'C' etx etx 'c' 'C' etx etx C Modified: head/share/vt/keymaps/it.kbd ============================================================================== --- head/share/vt/keymaps/it.kbd Thu Aug 14 13:25:05 2014 (r269972) +++ head/share/vt/keymaps/it.kbd Thu Aug 14 13:45:02 2014 (r269973) @@ -55,7 +55,7 @@ 015 ht btab nop nop ht btab nop nop O 016 'q' 'Q' dc1 dc1 '@' 'Q' dc1 dc1 C 017 'w' 'W' etb etb nop nop etb etb C - 018 'e' 'E' enq enq 164 'E' enq enq C + 018 'e' 'E' enq enq 8364 'E' enq enq C 019 'r' 'R' dc2 dc2 167 174 dc2 dc2 C 020 't' 'T' dc4 dc4 nop nop dc4 dc4 C 021 'y' 'Y' em em nop 165 em em C Modified: head/share/vt/keymaps/pt.kbd ============================================================================== --- head/share/vt/keymaps/pt.kbd Thu Aug 14 13:25:05 2014 (r269972) +++ head/share/vt/keymaps/pt.kbd Thu Aug 14 13:45:02 2014 (r269973) @@ -23,7 +23,7 @@ 015 ht btab nop nop ht btab nop nop O 016 'q' 'Q' dc1 dc1 'q' 'Q' dc1 dc1 C 017 'w' 'W' etb etb 'w' 'W' etb etb C - 018 'e' 'E' enq enq 164 'E' enq enq C + 018 'e' 'E' enq enq 8364 'E' enq enq C 019 'r' 'R' dc2 dc2 'r' 'R' dc2 dc2 C 020 't' 'T' dc4 dc4 't' 'T' dc4 dc4 C 021 'y' 'Y' em em 'y' 'Y' em em C Modified: head/share/vt/keymaps/uk.kbd ============================================================================== --- head/share/vt/keymaps/uk.kbd Thu Aug 14 13:25:05 2014 (r269972) +++ head/share/vt/keymaps/uk.kbd Thu Aug 14 13:45:02 2014 (r269973) @@ -8,7 +8,7 @@ 002 '1' '!' nop nop '`' '`' nop nop O 003 '2' '"' nul nul '@' '@' nul nul O 004 '3' 163 nop nop '#' '#' nop nop O - 005 '4' '$' 164 164 '4' '$' nop nop O + 005 '4' '$' 8364 8364 '4' '$' nop nop O 006 '5' '%' nop nop '5' '%' nop nop O 007 '6' '^' rs rs '^' '^' rs rs O 008 '7' '&' nop nop '[' '[' esc esc O @@ -21,7 +21,7 @@ 015 ht btab nop nop ht btab nop nop O 016 'q' 'Q' dc1 dc1 'q' 'Q' dc1 dc1 C 017 'w' 'W' etb etb 'w' 'W' etb etb C - 018 'e' 'E' enq enq 164 'E' enq enq C + 018 'e' 'E' enq enq 8364 'E' enq enq C 019 'r' 'R' dc2 dc2 'r' 'R' dc2 dc2 C 020 't' 'T' dc4 dc4 't' 'T' dc4 dc4 C 021 'y' 'Y' em em 'y' 'Y' em em C From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 13:57:18 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DAF88A48; Thu, 14 Aug 2014 13:57:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF1E02992; Thu, 14 Aug 2014 13:57:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7EDvI6T009203; Thu, 14 Aug 2014 13:57:18 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7EDvIj5009201; Thu, 14 Aug 2014 13:57:18 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201408141357.s7EDvIj5009201@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Thu, 14 Aug 2014 13:57:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269974 - in head/sys/cam: ata scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 13:57:19 -0000 Author: smh Date: Thu Aug 14 13:57:17 2014 New Revision: 269974 URL: http://svnweb.freebsd.org/changeset/base/269974 Log: Added 4K quirks for Corsair Force GT and Samsung 840 SSDs MFC after: 1 week Sponsored by: Multiplay Modified: head/sys/cam/ata/ata_da.c head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Thu Aug 14 13:45:02 2014 (r269973) +++ head/sys/cam/ata/ata_da.c Thu Aug 14 13:57:17 2014 (r269974) @@ -299,10 +299,10 @@ static struct ada_quirk_entry ada_quirk_ }, { /* - * Corsair Force GT SSDs + * Corsair Force GT & GS SSDs * 4k optimised & trim only works in 4k requests + 4k aligned */ - { T_DIRECT, SIP_MEDIA_FIXED, "*", "Corsair Force GT*", "*" }, + { T_DIRECT, SIP_MEDIA_FIXED, "*", "Corsair Force G*", "*" }, /*quirks*/ADA_Q_4K }, { @@ -443,6 +443,14 @@ static struct ada_quirk_entry ada_quirk_ }, { /* + * Samsung 840 SSDs + * 4k optimised + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "Samsung SSD 840*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* * SuperTalent TeraDrive CT SSDs * 4k optimised & trim only works in 4k requests + 4k aligned */ Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Thu Aug 14 13:45:02 2014 (r269973) +++ head/sys/cam/scsi/scsi_da.c Thu Aug 14 13:57:17 2014 (r269974) @@ -967,10 +967,10 @@ static struct da_quirk_entry da_quirk_ta }, { /* - * Corsair Force GT SSDs + * Corsair Force GT & GS SSDs * 4k optimised & trim only works in 4k requests + 4k aligned */ - { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "Corsair Force GT*", "*" }, + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "Corsair Force G*", "*" }, /*quirks*/DA_Q_4K }, { @@ -1111,6 +1111,14 @@ static struct da_quirk_entry da_quirk_ta }, { /* + * Samsung 840 SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "Samsung SSD 840*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* * SuperTalent TeraDrive CT SSDs * 4k optimised & trim only works in 4k requests + 4k aligned */ From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 14:17:47 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8FDFE19F; Thu, 14 Aug 2014 14:17:47 +0000 (UTC) Received: from mailrelay005.isp.belgacom.be (mailrelay005.isp.belgacom.be [195.238.6.171]) by mx1.freebsd.org (Postfix) with ESMTP id B1DD22B9B; Thu, 14 Aug 2014 14:17:46 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnYGADPE7FNR8aPl/2dsb2JhbABagw1TTQqCesp3h0kBgRUXd4QEAQUjMyMQCw4KAgIFIQICDyoeBohZAQiwHJU6F4EsjW0zB4J5gVMBBJVDhnWBWJMng147LwGCTgEBAQ Received: from 229.163-241-81.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([81.241.163.229]) by relay.skynet.be with ESMTP; 14 Aug 2014 16:17:39 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.9/8.14.9) with ESMTP id s7EEHciC004844; Thu, 14 Aug 2014 16:17:38 +0200 (CEST) (envelope-from tijl@FreeBSD.org) Date: Thu, 14 Aug 2014 16:17:37 +0200 From: Tijl Coosemans To: Ed Maste Subject: Re: svn commit: r269973 - head/share/vt/keymaps Message-ID: <20140814161737.26eed58f@kalimero.tijl.coosemans.org> In-Reply-To: <201408141345.s7EDj391004351@svn.freebsd.org> References: <201408141345.s7EDj391004351@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 14:17:47 -0000 On Thu, 14 Aug 2014 13:45:03 +0000 (UTC) Ed Maste wrote: > Modified: head/share/vt/keymaps/hr.kbd > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/share/vt/keymaps/hr.kbd Thu Aug 14 13:25:05 2014 (r269972) > +++ head/share/vt/keymaps/hr.kbd Thu Aug 14 13:45:02 2014 (r269973) > @@ -48,7 +48,7 @@ > 040 230 198 nop nop 223 223 nop nop C > 041 184 168 nop nop 184 168 nop nop O > 042 lshift lshift lshift lshift lshift lshift lshift lshift O > - 043 190 174 fs fs 164 164 fs fs C > + 043 190 174 fs fs 8364 8364 fs fs C This was correct I think. See: http://commons.wikimedia.org/wiki/File:Croatian_keyboard_layout.jpg But both hr.kbd and si.kbd are iso-8859-2 or iso-8859-16 so they need other conversions (e.g. 163 is =C5=81). From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 14:22:13 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 877DE34D; Thu, 14 Aug 2014 14:22:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A1C52CC2; Thu, 14 Aug 2014 14:22:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7EEMDfs022325; Thu, 14 Aug 2014 14:22:13 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7EEMDhc022323; Thu, 14 Aug 2014 14:22:13 GMT (envelope-from se@FreeBSD.org) Message-Id: <201408141422.s7EEMDhc022323@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Thu, 14 Aug 2014 14:22:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269976 - head/usr.sbin/kbdmap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 14:22:13 -0000 Author: se Date: Thu Aug 14 14:22:12 2014 New Revision: 269976 URL: http://svnweb.freebsd.org/changeset/base/269976 Log: Add support for NEWCONS to kbdmap and vidfont. The path to keymaps and fonts is selected based on the existence and value of "sysctl kern.vty". MFC after: 1 week Modified: head/usr.sbin/kbdmap/kbdmap.c head/usr.sbin/kbdmap/kbdmap.h Modified: head/usr.sbin/kbdmap/kbdmap.c ============================================================================== --- head/usr.sbin/kbdmap/kbdmap.c Thu Aug 14 14:07:05 2014 (r269975) +++ head/usr.sbin/kbdmap/kbdmap.c Thu Aug 14 14:22:12 2014 (r269976) @@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -47,10 +48,10 @@ static const char *lang_default = DEFAUL static const char *font; static const char *lang; static const char *program; -static const char *keymapdir = DEFAULT_KEYMAP_DIR; -static const char *fontdir = DEFAULT_FONT_DIR; +static const char *keymapdir = DEFAULT_VT_KEYMAP_DIR; +static const char *fontdir = DEFAULT_VT_FONT_DIR; +static const char *font_default = DEFAULT_VT_FONT; static const char *sysconfig = DEFAULT_SYSCONFIG; -static const char *font_default = DEFAULT_FONT; static const char *font_current; static const char *dir; static const char *menu = ""; @@ -146,6 +147,22 @@ add_keymap(const char *desc, int mark, c } /* + * Return 0 if syscons is in use (to select legacy defaults). + */ +static int +check_newcons(void) +{ + size_t len; + char term[3]; + + len = 3; + if (sysctlbyname("kern.vty", &term, &len, NULL, 0) != 0 || + strcmp(term, "vt") != 0) + return 0; + return -1; +} + +/* * Figure out the default language to use. */ static const char * @@ -815,6 +832,12 @@ main(int argc, char **argv) sleep(2); } + if (check_newcons() == 0) { + keymapdir = DEFAULT_SC_KEYMAP_DIR; + fontdir = DEFAULT_SC_FONT_DIR; + font_default = DEFAULT_SC_FONT; + } + SLIST_INIT(&head); lang = get_locale(); Modified: head/usr.sbin/kbdmap/kbdmap.h ============================================================================== --- head/usr.sbin/kbdmap/kbdmap.h Thu Aug 14 14:07:05 2014 (r269975) +++ head/usr.sbin/kbdmap/kbdmap.h Thu Aug 14 14:22:12 2014 (r269976) @@ -28,7 +28,12 @@ #define DEFAULT_LANG "en" -#define DEFAULT_KEYMAP_DIR "/usr/share/syscons/keymaps" -#define DEFAULT_FONT_DIR "/usr/share/syscons/fonts" #define DEFAULT_SYSCONFIG "/etc/rc.conf" -#define DEFAULT_FONT "cp437-8x16.fnt" + +#define DEFAULT_SC_KEYMAP_DIR "/usr/share/syscons/keymaps" +#define DEFAULT_SC_FONT_DIR "/usr/share/syscons/fonts" +#define DEFAULT_SC_FONT "cp437-8x16.fnt" + +#define DEFAULT_VT_KEYMAP_DIR "/usr/share/vt/keymaps" +#define DEFAULT_VT_FONT_DIR "/usr/share/vt/fonts" +#define DEFAULT_VT_FONT "vgarom-thin-8x16.fnt" From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 14:26:25 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1FC57578; Thu, 14 Aug 2014 14:26:25 +0000 (UTC) Received: from mail-ig0-x22b.google.com (mail-ig0-x22b.google.com [IPv6:2607:f8b0:4001:c05::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BA3F92D01; Thu, 14 Aug 2014 14:26:24 +0000 (UTC) Received: by mail-ig0-f171.google.com with SMTP id l13so13714527iga.10 for ; Thu, 14 Aug 2014 07:26:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=VostWDEySvKRk5/Sl1K0BAhmZwzpl+GM4h46EXX5il0=; b=vZTfHZ1GsakGBZsFZhgmqdC6PzJjZDvwnt/fIahd1Uwc35uQQUo7H0RmyUt5sDbS+i 9TsdVcnjv3vY7oXjJiUIIXT9F4cpx8c+aUvs2iCywKOcKSpO1jCzYVS3FQ/a1BTwyZRV jNlkWxozZ9oA6WQbq7DLMeu8N7reR7QB4Ya67gPpGx171bHC5E8UQ5mgnzjEp56IVpdA MMCiuv3naOryiHxnqGBu1gGxTicAFwyeVcky2qtcMzn55mLIxqMOLmCl1mmbJRuBNkby Khr8Rs9izLoJA3HjnszmqMAnRccKZBC3iCDNBXceP0FiT3MtNgYEBk+XPUG0HtQgFov8 IrPA== X-Received: by 10.50.28.75 with SMTP id z11mr59240614igg.11.1408026384060; Thu, 14 Aug 2014 07:26:24 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.131.38 with HTTP; Thu, 14 Aug 2014 07:26:04 -0700 (PDT) In-Reply-To: <20140814161737.26eed58f@kalimero.tijl.coosemans.org> References: <201408141345.s7EDj391004351@svn.freebsd.org> <20140814161737.26eed58f@kalimero.tijl.coosemans.org> From: Ed Maste Date: Thu, 14 Aug 2014 10:26:04 -0400 X-Google-Sender-Auth: K_2xO1ckhONCdX2M7McVkRnGgrk Message-ID: Subject: Re: svn commit: r269973 - head/share/vt/keymaps To: Tijl Coosemans , Stefan Esser Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 14:26:25 -0000 On 14 August 2014 10:17, Tijl Coosemans wrote: > This was correct I think. See: > http://commons.wikimedia.org/wiki/File:Croatian_keyboard_layout.jpg > > But both hr.kbd and si.kbd are iso-8859-2 or iso-8859-16 so they need > other conversions (e.g. 163 is =C5=81). Yeah, it seems I was tripped up by the inconsistent use of '.iso' in the keymap names. In any case, rather than incrementally fixing these I'll just hold off and let Stefan include the fixes in the broader set of keymap fixes, which I believe will arrive in the next day or two. From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 14:59:40 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C19DE1AD; Thu, 14 Aug 2014 14:59:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE202212C; Thu, 14 Aug 2014 14:59:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7EExenD037373; Thu, 14 Aug 2014 14:59:40 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7EExeht037372; Thu, 14 Aug 2014 14:59:40 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201408141459.s7EExeht037372@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 14 Aug 2014 14:59:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269977 - head/bin/pkill/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 14:59:40 -0000 Author: asomers Date: Thu Aug 14 14:59:40 2014 New Revision: 269977 URL: http://svnweb.freebsd.org/changeset/base/269977 Log: Skip pgrep-j and pkill-j if jail or jls is not installed. Even though jail is part of the base system, it can be disabled by src.conf settings. Therefore, it should be listed as a required program for tests that use it. CR: D603 MFC after: 3 days Sponsored by: Spectra Logic Modified: head/bin/pkill/tests/Makefile Modified: head/bin/pkill/tests/Makefile ============================================================================== --- head/bin/pkill/tests/Makefile Thu Aug 14 14:22:12 2014 (r269976) +++ head/bin/pkill/tests/Makefile Thu Aug 14 14:59:40 2014 (r269977) @@ -14,6 +14,7 @@ TAP_TESTS_SH+= pgrep-g_test TAP_TESTS_SH+= pgrep-i_test TAP_TESTS_SH+= pgrep-j_test TEST_METADATA.pgrep-j_test+= required_user="root" +TEST_METADATA.pgrep-j_test+= required_programs="jail jls" TAP_TESTS_SH+= pgrep-l_test TAP_TESTS_SH+= pgrep-n_test TAP_TESTS_SH+= pgrep-o_test @@ -31,6 +32,7 @@ TAP_TESTS_SH+= pkill-g_test TAP_TESTS_SH+= pkill-i_test TAP_TESTS_SH+= pkill-j_test TEST_METADATA.pkill-j_test+= required_user="root" +TEST_METADATA.pkill-j_test+= required_programs="jail jls" TAP_TESTS_SH+= pkill-s_test TAP_TESTS_SH+= pkill-t_test TAP_TESTS_SH+= pkill-x_test From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 15:46:16 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70130621; Thu, 14 Aug 2014 15:46:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D9652744; Thu, 14 Aug 2014 15:46:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7EFkGfB059257; Thu, 14 Aug 2014 15:46:16 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7EFkGgo059256; Thu, 14 Aug 2014 15:46:16 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201408141546.s7EFkGgo059256@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Thu, 14 Aug 2014 15:46:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269978 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 15:46:16 -0000 Author: alc Date: Thu Aug 14 15:46:15 2014 New Revision: 269978 URL: http://svnweb.freebsd.org/changeset/base/269978 Log: Avoid pointless (but harmless) actions on unmanaged pages. Reviewed by: kib Sponsored by: EMC / Isilon Storage Division Modified: head/sys/vm/vm_fault.c Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Thu Aug 14 14:59:40 2014 (r269977) +++ head/sys/vm/vm_fault.c Thu Aug 14 15:46:15 2014 (r269978) @@ -851,8 +851,9 @@ vnode_locked: if (hardfault) fs.entry->next_read = fs.pindex + faultcount - reqpage; - if ((prot & VM_PROT_WRITE) != 0 || - (fault_flags & VM_FAULT_DIRTY) != 0) { + if (((prot & VM_PROT_WRITE) != 0 || + (fault_flags & VM_FAULT_DIRTY) != 0) && + (fs.m->oflags & VPO_UNMANAGED) == 0) { vm_object_set_writeable_dirty(fs.object); /* From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 16:01:34 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D087B67; Thu, 14 Aug 2014 16:01:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE1E428A1; Thu, 14 Aug 2014 16:01:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7EG1XuO067365; Thu, 14 Aug 2014 16:01:33 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7EG1XXT067364; Thu, 14 Aug 2014 16:01:33 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201408141601.s7EG1XXT067364@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 14 Aug 2014 16:01:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269979 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 16:01:34 -0000 Author: imp Date: Thu Aug 14 16:01:33 2014 New Revision: 269979 URL: http://svnweb.freebsd.org/changeset/base/269979 Log: Streamline format extensions. Either the compiler supports them, and we enable them and format wordings. Or it doesn't, and we disable format warnings because the kernel uses the extensions pervasively. Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Thu Aug 14 15:46:15 2014 (r269978) +++ head/sys/conf/kern.mk Thu Aug 14 16:01:33 2014 (r269979) @@ -29,14 +29,13 @@ NO_WSOMETIMES_UNINITIALIZED= -Wno-error- # enough to error out the whole kernel build. Display them anyway, so there is # some incentive to fix them eventually. CWARNEXTRA?= -Wno-error-tautological-compare -Wno-error-empty-body \ - -Wno-error-parentheses-equality -Wno-error-unused-function \ - ${NO_WFORMAT} + -Wno-error-parentheses-equality -Wno-error-unused-function .endif # External compilers may not support our format extensions. Allow them # to be disabled. WARNING: format checking is disabled in this case. .if ${MK_FORMAT_EXTENSIONS} == "no" -NO_WFORMAT= -Wno-format +FORMAT_EXTENSIONS= -Wno-format .else FORMAT_EXTENSIONS= -fformat-extensions .endif From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 16:01:39 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1CC59C9D; Thu, 14 Aug 2014 16:01:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E52272914; Thu, 14 Aug 2014 16:01:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7EG1cIG067425; Thu, 14 Aug 2014 16:01:38 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7EG1cX8067424; Thu, 14 Aug 2014 16:01:38 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201408141601.s7EG1cX8067424@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 14 Aug 2014 16:01:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269980 - head/sys/dev/cs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 16:01:39 -0000 Author: imp Date: Thu Aug 14 16:01:38 2014 New Revision: 269980 URL: http://svnweb.freebsd.org/changeset/base/269980 Log: Delete pp_isadma. It isn't use, and the code that used it has been commented out (temporarily) since 1998 when this driver hit the tree. Also, no need to compute the ethernet header and then never use it. Modified: head/sys/dev/cs/if_cs.c Modified: head/sys/dev/cs/if_cs.c ============================================================================== --- head/sys/dev/cs/if_cs.c Thu Aug 14 16:01:33 2014 (r269979) +++ head/sys/dev/cs/if_cs.c Thu Aug 14 16:01:38 2014 (r269980) @@ -264,7 +264,7 @@ cs_cs89x0_probe(device_t dev) uint16_t id; char chip_revision; uint16_t eeprom_buff[CHKSUM_LEN]; - int chip_type, pp_isaint, pp_isadma; + int chip_type, pp_isaint; sc->dev = dev; error = cs_alloc_port(dev, 0, CS_89x0_IO_PORTS); @@ -299,11 +299,9 @@ cs_cs89x0_probe(device_t dev) if (chip_type == CS8900) { pp_isaint = PP_CS8900_ISAINT; - pp_isadma = PP_CS8900_ISADMA; sc->send_cmd = TX_CS8900_AFTER_ALL; } else { pp_isaint = PP_CS8920_ISAINT; - pp_isadma = PP_CS8920_ISADMA; sc->send_cmd = TX_CS8920_AFTER_ALL; } @@ -381,17 +379,6 @@ cs_cs89x0_probe(device_t dev) if (!(sc->flags & CS_NO_IRQ)) cs_writereg(sc, pp_isaint, irq); - /* - * Temporary disabled - * - if (drq>0) - cs_writereg(sc, pp_isadma, drq); - else { - device_printf(dev, "incorrect drq\n",); - return (0); - } - */ - if (bootverbose) device_printf(dev, "CS89%c0%s rev %c media%s%s%s\n", chip_type == CS8900 ? '0' : '2', @@ -702,7 +689,6 @@ cs_get_packet(struct cs_softc *sc) { struct ifnet *ifp = sc->ifp; int status, length; - struct ether_header *eh; struct mbuf *m; #ifdef CS_DEBUG @@ -746,8 +732,6 @@ cs_get_packet(struct cs_softc *sc) bus_read_multi_2(sc->port_res, RX_FRAME_PORT, mtod(m, uint16_t *), (length + 1) >> 1); - eh = mtod(m, struct ether_header *); - #ifdef CS_DEBUG for (i=0;im_data+i))); From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 16:01:47 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 22B48DD9; Thu, 14 Aug 2014 16:01:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0FADE2928; Thu, 14 Aug 2014 16:01:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7EG1k58067485; Thu, 14 Aug 2014 16:01:46 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7EG1kZp067484; Thu, 14 Aug 2014 16:01:46 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201408141601.s7EG1kZp067484@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 14 Aug 2014 16:01:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269981 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 16:01:47 -0000 Author: imp Date: Thu Aug 14 16:01:46 2014 New Revision: 269981 URL: http://svnweb.freebsd.org/changeset/base/269981 Log: Disable all inline warnings on gcc >= 4.3. Not sure exactly where the cutover is, but we need better tools to cope with inline tuning per compiler version than we have. This is a quick bandaid until such tools are around. Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Thu Aug 14 16:01:38 2014 (r269980) +++ head/sys/conf/kern.mk Thu Aug 14 16:01:46 2014 (r269981) @@ -32,6 +32,10 @@ CWARNEXTRA?= -Wno-error-tautological-com -Wno-error-parentheses-equality -Wno-error-unused-function .endif +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 40300 +CWARNEXTRA?= -Wno-inline +.endif + # External compilers may not support our format extensions. Allow them # to be disabled. WARNING: format checking is disabled in this case. .if ${MK_FORMAT_EXTENSIONS} == "no" From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 16:01:52 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 09D97E42; Thu, 14 Aug 2014 16:01:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EAF31292A; Thu, 14 Aug 2014 16:01:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7EG1pLh067542; Thu, 14 Aug 2014 16:01:51 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7EG1psM067541; Thu, 14 Aug 2014 16:01:51 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201408141601.s7EG1psM067541@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 14 Aug 2014 16:01:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269982 - head/sys/ddb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 16:01:52 -0000 Author: imp Date: Thu Aug 14 16:01:51 2014 New Revision: 269982 URL: http://svnweb.freebsd.org/changeset/base/269982 Log: ins is only set and unused, but only when we're not doing software single stepping. Only set it when we're doing that by bending style(9) rules a little to avoid even worse #ifdef soup. Modified: head/sys/ddb/db_run.c Modified: head/sys/ddb/db_run.c ============================================================================== --- head/sys/ddb/db_run.c Thu Aug 14 16:01:46 2014 (r269981) +++ head/sys/ddb/db_run.c Thu Aug 14 16:01:51 2014 (r269982) @@ -188,14 +188,14 @@ db_restart_at_pc(watchpt) if ((db_run_mode == STEP_COUNT) || (db_run_mode == STEP_RETURN) || (db_run_mode == STEP_CALLT)) { - db_expr_t ins; - /* * We are about to execute this instruction, * so count it now. */ - - ins = db_get_value(pc, sizeof(int), FALSE); +#ifdef SOFTWARE_SSTEP + db_expr_t ins = +#endif + db_get_value(pc, sizeof(int), FALSE); db_inst_count++; db_load_count += inst_load(ins); db_store_count += inst_store(ins); From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 16:17:23 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9CFC5E00; Thu, 14 Aug 2014 16:17:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89B2C2B4E; Thu, 14 Aug 2014 16:17:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7EGHN6g072716; Thu, 14 Aug 2014 16:17:23 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7EGHNMc072715; Thu, 14 Aug 2014 16:17:23 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201408141617.s7EGHNMc072715@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 14 Aug 2014 16:17:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269983 - head/tools/tools/nanobsd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 16:17:23 -0000 Author: imp Date: Thu Aug 14 16:17:23 2014 New Revision: 269983 URL: http://svnweb.freebsd.org/changeset/base/269983 Log: Only install the boot loader if it actually exists. This is a stop-gap change, since larger changes to use geom more exclusively to create partitions is in th works. Modified: head/tools/tools/nanobsd/nanobsd.sh Modified: head/tools/tools/nanobsd/nanobsd.sh ============================================================================== --- head/tools/tools/nanobsd/nanobsd.sh Thu Aug 14 16:01:51 2014 (r269982) +++ head/tools/tools/nanobsd/nanobsd.sh Thu Aug 14 16:17:23 2014 (r269983) @@ -581,8 +581,14 @@ create_i386_diskimage ( ) ( fdisk ${MD} # XXX: params # XXX: pick up cached boot* files, they may not be in image anymore. - boot0cfg -B -b ${NANO_WORLDDIR}/${NANO_BOOTLOADER} ${NANO_BOOT0CFG} ${MD} - bsdlabel -w -B -b ${NANO_WORLDDIR}/boot/boot ${MD}s1 + if [ -f ${NANO_WORLDDIR}/${NANO_BOOTLOADER} ]; then + boot0cfg -B -b ${NANO_WORLDDIR}/${NANO_BOOTLOADER} ${NANO_BOOT0CFG} ${MD} + fi + if [ -f ${NANO_WORLDDIR}/boot/boot ]; then + bsdlabel -w -B -b ${NANO_WORLDDIR}/boot/boot ${MD}s1 + else + bsdlabel -w ${MD}s1 + fi bsdlabel ${MD}s1 # Create first image From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 16:17:31 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7213FF47; Thu, 14 Aug 2014 16:17:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46A7E2B52; Thu, 14 Aug 2014 16:17:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7EGHVJE072782; Thu, 14 Aug 2014 16:17:31 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7EGHUwU072778; Thu, 14 Aug 2014 16:17:30 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201408141617.s7EGHUwU072778@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 14 Aug 2014 16:17:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269984 - in head/tools/tools/nanobsd: . dhcpd rescue X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 16:17:31 -0000 Author: imp Date: Thu Aug 14 16:17:30 2014 New Revision: 269984 URL: http://svnweb.freebsd.org/changeset/base/269984 Log: create_$ARCH_diskimage never really took off. Collapse back down to just one. Modified: head/tools/tools/nanobsd/dhcpd/common head/tools/tools/nanobsd/nanobsd.sh head/tools/tools/nanobsd/rescue/common Modified: head/tools/tools/nanobsd/dhcpd/common ============================================================================== --- head/tools/tools/nanobsd/dhcpd/common Thu Aug 14 16:17:23 2014 (r269983) +++ head/tools/tools/nanobsd/dhcpd/common Thu Aug 14 16:17:30 2014 (r269984) @@ -261,11 +261,6 @@ die() exit 1 } -create_amd64_diskimage() -{ - create_i386_diskimage "$*" -} - # Automatically include the packaging port here so it is always first so it # builds the port and adds the package so we can add other packages. add_port ports-mgmt/pkg Modified: head/tools/tools/nanobsd/nanobsd.sh ============================================================================== --- head/tools/tools/nanobsd/nanobsd.sh Thu Aug 14 16:17:23 2014 (r269983) +++ head/tools/tools/nanobsd/nanobsd.sh Thu Aug 14 16:17:30 2014 (r269984) @@ -487,7 +487,7 @@ populate_data_slice ( ) ( populate_slice "$1" "$2" "$3" "$4" ) -create_i386_diskimage ( ) ( +create_diskimage ( ) ( pprint 2 "build diskimage" pprint 3 "log: ${NANO_OBJ}/_.di" @@ -649,11 +649,6 @@ create_i386_diskimage ( ) ( ) > ${NANO_OBJ}/_.di 2>&1 ) -# i386 and amd64 are identical for disk images -create_amd64_diskimage ( ) ( - create_i386_diskimage -) - last_orders () ( # Redefine this function with any last orders you may have # after the build completed, for instance to copy the finished @@ -1106,7 +1101,7 @@ setup_nanobsd prune_usr run_late_customize if $do_image ; then - create_${NANO_ARCH}_diskimage + create_diskimage else pprint 2 "Skipping image build (as instructed)" fi Modified: head/tools/tools/nanobsd/rescue/common ============================================================================== --- head/tools/tools/nanobsd/rescue/common Thu Aug 14 16:17:23 2014 (r269983) +++ head/tools/tools/nanobsd/rescue/common Thu Aug 14 16:17:30 2014 (r269984) @@ -106,11 +106,3 @@ last_orders () ( -o bootimage="i386;_.w/boot/cdboot" -o no-emul-boot _.disk.iso _.w/ ) ) - -#create_i386_diskimage () { -# #currently not used -#} - -#create_amd64_diskimage () { -# create_i386_diskimage -#} From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 16:25:44 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 725BA556; Thu, 14 Aug 2014 16:25:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F6D72D02; Thu, 14 Aug 2014 16:25:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7EGPiJO077368; Thu, 14 Aug 2014 16:25:44 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7EGPi8X077367; Thu, 14 Aug 2014 16:25:44 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201408141625.s7EGPi8X077367@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 14 Aug 2014 16:25:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269985 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 16:25:44 -0000 Author: gjb Date: Thu Aug 14 16:25:43 2014 New Revision: 269985 URL: http://svnweb.freebsd.org/changeset/base/269985 Log: Update the URL to the phabricator instance. Sponsored by: The FreeBSD Foundation Modified: head/.arcconfig Modified: head/.arcconfig ============================================================================== --- head/.arcconfig Thu Aug 14 16:17:30 2014 (r269984) +++ head/.arcconfig Thu Aug 14 16:25:43 2014 (r269985) @@ -1,5 +1,5 @@ { "project.name": "S", - "phabricator.uri" : "https://phabric.freebsd.org/", + "phabricator.uri" : "https://reviews.freebsd.org/", "history.immutable" : true } From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 18:03:38 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B082F37E; Thu, 14 Aug 2014 18:03:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8354A28AA; Thu, 14 Aug 2014 18:03:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7EI3cdG023758; Thu, 14 Aug 2014 18:03:38 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7EI3c6a023757; Thu, 14 Aug 2014 18:03:38 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201408141803.s7EI3c6a023757@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Thu, 14 Aug 2014 18:03:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269989 - head/sys/amd64/vmm/io X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 18:03:38 -0000 Author: neel Date: Thu Aug 14 18:03:38 2014 New Revision: 269989 URL: http://svnweb.freebsd.org/changeset/base/269989 Log: Reword comment to match the interrupt mode names from the MPtable spec. Reviewed by: tychon Modified: head/sys/amd64/vmm/io/vatpic.c Modified: head/sys/amd64/vmm/io/vatpic.c ============================================================================== --- head/sys/amd64/vmm/io/vatpic.c Thu Aug 14 17:31:04 2014 (r269988) +++ head/sys/amd64/vmm/io/vatpic.c Thu Aug 14 18:03:38 2014 (r269989) @@ -195,26 +195,29 @@ vatpic_notify_intr(struct vatpic *vatpic atpic->mask, atpic->request, atpic->service); /* + * From Section 3.6.2, "Interrupt Modes", in the + * MPtable Specification, Version 1.4 + * * PIC interrupts are routed to both the Local APIC * and the I/O APIC to support operation in 1 of 3 * modes. * * 1. Legacy PIC Mode: the PIC effectively bypasses - * all APIC components. In mode '1' the local APIC is + * all APIC components. In this mode the local APIC is * disabled and LINT0 is reconfigured as INTR to * deliver the PIC interrupt directly to the CPU. * * 2. Virtual Wire Mode: the APIC is treated as a * virtual wire which delivers interrupts from the PIC - * to the CPU. In mode '2' LINT0 is programmed as + * to the CPU. In this mode LINT0 is programmed as * ExtINT to indicate that the PIC is the source of * the interrupt. * - * 3. Symmetric I/O Mode: PIC interrupts are fielded - * by the I/O APIC and delivered to the appropriate - * CPU. In mode '3' the I/O APIC input 0 is - * programmed as ExtINT to indicate that the PIC is - * the source of the interrupt. + * 3. Virtual Wire Mode via I/O APIC: PIC interrupts are + * fielded by the I/O APIC and delivered to the appropriate + * CPU. In this mode the I/O APIC input 0 is programmed + * as ExtINT to indicate that the PIC is the source of the + * interrupt. */ atpic->intr_raised = true; lapic_set_local_intr(vatpic->vm, -1, APIC_LVT_LINT0); From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 18:16:28 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 335448F3; Thu, 14 Aug 2014 18:16:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 064FE2A4D; Thu, 14 Aug 2014 18:16:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7EIGRrG028908; Thu, 14 Aug 2014 18:16:27 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7EIGROq028907; Thu, 14 Aug 2014 18:16:27 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201408141816.s7EIGROq028907@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Thu, 14 Aug 2014 18:16:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269991 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 18:16:28 -0000 Author: gavin Date: Thu Aug 14 18:16:27 2014 New Revision: 269991 URL: http://svnweb.freebsd.org/changeset/base/269991 Log: Allow iwn105fw and iwn135 firmwares to be compiled into the kernel. MFC after: 1 week Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Aug 14 18:08:51 2014 (r269990) +++ head/sys/conf/files Thu Aug 14 18:16:27 2014 (r269991) @@ -1596,6 +1596,34 @@ iwn1000.fw optional iwn1000fw | iwnfw compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn1000.fw" +iwn105fw.c optional iwn105fw | iwnfw \ + compile-with "${AWK} -f $S/tools/fw_stub.awk iwn105.fw:iwn105fw -miwn105fw -c${.TARGET}" \ + no-implicit-rule before-depend local \ + clean "iwn105fw.c" +iwn105fw.fwo optional iwn105fw | iwnfw \ + dependency "iwn105.fw" \ + compile-with "${NORMAL_FWO}" \ + no-implicit-rule \ + clean "iwn105fw.fwo" +iwn105.fw optional iwn105fw | iwnfw \ + dependency "$S/contrib/dev/iwn/iwlwifi-105-6-18.168.6.1.fw.uu" \ + compile-with "${NORMAL_FW}" \ + no-obj no-implicit-rule \ + clean "iwn105.fw" +iwn135fw.c optional iwn135fw | iwnfw \ + compile-with "${AWK} -f $S/tools/fw_stub.awk iwn135.fw:iwn135fw -miwn135fw -c${.TARGET}" \ + no-implicit-rule before-depend local \ + clean "iwn135fw.c" +iwn135fw.fwo optional iwn135fw | iwnfw \ + dependency "iwn135.fw" \ + compile-with "${NORMAL_FWO}" \ + no-implicit-rule \ + clean "iwn135fw.fwo" +iwn135.fw optional iwn135fw | iwnfw \ + dependency "$S/contrib/dev/iwn/iwlwifi-135-6-18.168.6.1.fw.uu" \ + compile-with "${NORMAL_FW}" \ + no-obj no-implicit-rule \ + clean "iwn135.fw" iwn2000fw.c optional iwn2000fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn2000.fw:iwn2000fw -miwn2000fw -c${.TARGET}" \ no-implicit-rule before-depend local \ From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 18:29:56 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67C21D9A; Thu, 14 Aug 2014 18:29:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5437D2B9E; Thu, 14 Aug 2014 18:29:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7EITu8J033849; Thu, 14 Aug 2014 18:29:56 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7EITtZe033846; Thu, 14 Aug 2014 18:29:55 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201408141829.s7EITtZe033846@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Thu, 14 Aug 2014 18:29:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269992 - in head/sys: amd64/conf i386/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 18:29:56 -0000 Author: gavin Date: Thu Aug 14 18:29:55 2014 New Revision: 269992 URL: http://svnweb.freebsd.org/changeset/base/269992 Log: Update i386/NOTES and amd64/NOTES files to contain the complete list of firmwares for iwn(4) and sort them. MFC after: 1 week Modified: head/sys/amd64/conf/NOTES head/sys/i386/conf/NOTES Modified: head/sys/amd64/conf/NOTES ============================================================================== --- head/sys/amd64/conf/NOTES Thu Aug 14 18:16:27 2014 (r269991) +++ head/sys/amd64/conf/NOTES Thu Aug 14 18:29:55 2014 (r269992) @@ -307,7 +307,8 @@ options DRM_DEBUG # Include debug print # Requires the ipw firmware module # iwi: Intel PRO/Wireless 2200BG/2225BG/2915ABG IEEE 802.11 adapters # Requires the iwi firmware module -# iwn: Intel Wireless WiFi Link 4965/1000/5000/6000 802.11 network adapters +# iwn: Intel Wireless WiFi Link 1000/105/135/2000/4965/5000/6000/6050 abgn +# 802.11 network adapters # Requires the iwn firmware module # mlx4ib: Mellanox ConnectX HCA InfiniBand # mlxen: Mellanox ConnectX HCA Ethernet @@ -347,12 +348,18 @@ device wpi # Intel 3945ABG wireless NI # iwiibssfw: IBSS mode firmware # iwimonitorfw: Monitor mode firmware # Intel Wireless WiFi Link 4965/1000/5000/6000 series firmware: -# iwnfw: Single module to support the 4965/1000/5000/5150/6000 -# iwn4965fw: Specific module for the 4965 only +# iwnfw: Single module to support all devices # iwn1000fw: Specific module for the 1000 only +# iwn105fw: Specific module for the 105 only +# iwn135fw: Specific module for the 135 only +# iwn2000fw: Specific module for the 2000 only +# iwn2030fw: Specific module for the 2030 only +# iwn4965fw: Specific module for the 4965 only # iwn5000fw: Specific module for the 5000 only # iwn5150fw: Specific module for the 5150 only # iwn6000fw: Specific module for the 6000 only +# iwn6000g2afw: Specific module for the 6000g2a only +# iwn6000g2bfw: Specific module for the 6000g2b only # iwn6050fw: Specific module for the 6050 only # wpifw: Intel 3945ABG Wireless LAN Controller firmware @@ -365,11 +372,17 @@ device ipwbssfw device ipwibssfw device ipwmonitorfw device iwnfw -device iwn4965fw device iwn1000fw +device iwn105fw +device iwn135fw +device iwn2000fw +device iwn2030fw +device iwn4965fw device iwn5000fw device iwn5150fw device iwn6000fw +device iwn6000g2afw +device iwn6000g2bfw device iwn6050fw device wpifw Modified: head/sys/i386/conf/NOTES ============================================================================== --- head/sys/i386/conf/NOTES Thu Aug 14 18:16:27 2014 (r269991) +++ head/sys/i386/conf/NOTES Thu Aug 14 18:29:55 2014 (r269992) @@ -578,7 +578,8 @@ hint.mse.0.irq="5" # ipw: Intel PRO/Wireless 2100 IEEE 802.11 adapter # iwi: Intel PRO/Wireless 2200BG/2225BG/2915ABG IEEE 802.11 adapters # Requires the iwi firmware module -# iwn: Intel Wireless WiFi Link 4965AGN 802.11 network adapters +# iwn: Intel Wireless WiFi Link 1000/105/135/2000/4965/5000/6000/6050 abgn +# 802.11 network adapters # Requires the iwn firmware module # mlx4ib: Mellanox ConnectX HCA InfiniBand # mlxen: Mellanox ConnectX HCA Ethernet @@ -656,12 +657,18 @@ device wpi # Intel 3945ABG wireless NI # iwiibssfw: IBSS mode firmware # iwimonitorfw: Monitor mode firmware # Intel Wireless WiFi Link 4965/1000/5000/6000 series firmware: -# iwnfw: Single module to support the 4965/1000/5000/5150/6000 -# iwn4965fw: Specific module for the 4965 only +# iwnfw: Single module to support all devices # iwn1000fw: Specific module for the 1000 only +# iwn105fw: Specific module for the 105 only +# iwn135fw: Specific module for the 135 only +# iwn2000fw: Specific module for the 2000 only +# iwn2030fw: Specific module for the 2030 only +# iwn4965fw: Specific module for the 4965 only # iwn5000fw: Specific module for the 5000 only # iwn5150fw: Specific module for the 5150 only # iwn6000fw: Specific module for the 6000 only +# iwn6000g2afw: Specific module for the 6000g2a only +# iwn6000g2bfw: Specific module for the 6000g2b only # iwn6050fw: Specific module for the 6050 only # wpifw: Intel 3945ABG Wireless LAN Controller firmware @@ -674,11 +681,17 @@ device ipwbssfw device ipwibssfw device ipwmonitorfw device iwnfw -device iwn4965fw device iwn1000fw +device iwn105fw +device iwn135fw +device iwn2000fw +device iwn2030fw +device iwn4965fw device iwn5000fw device iwn5150fw device iwn6000fw +device iwn6000g2afw +device iwn6000g2bfw device iwn6050fw device wpifw From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 18:38:38 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AFD0E390; Thu, 14 Aug 2014 18:38:38 +0000 (UTC) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "troutmask.apl.washington.edu", Issuer "troutmask.apl.washington.edu" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 73C392D11; Thu, 14 Aug 2014 18:38:38 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.9/8.14.9) with ESMTP id s7EIcVbj098248 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 14 Aug 2014 11:38:31 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.9/8.14.9/Submit) id s7EIcVV9098247; Thu, 14 Aug 2014 11:38:31 -0700 (PDT) (envelope-from sgk) Date: Thu, 14 Aug 2014 11:38:31 -0700 From: Steve Kargl To: Gavin Atkinson Subject: Re: svn commit: r269992 - in head/sys: amd64/conf i386/conf Message-ID: <20140814183831.GA98162@troutmask.apl.washington.edu> References: <201408141829.s7EITtZe033846@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201408141829.s7EITtZe033846@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 18:38:38 -0000 On Thu, Aug 14, 2014 at 06:29:55PM +0000, Gavin Atkinson wrote: > Author: gavin > Date: Thu Aug 14 18:29:55 2014 > New Revision: 269992 > URL: http://svnweb.freebsd.org/changeset/base/269992 > > Log: > Update i386/NOTES and amd64/NOTES files to contain the complete list of > firmwares for iwn(4) and sort them. > > MFC after: 1 week > 'man iwn' seems to be missing iwn105fw and iwn135fw. I don't build or use modules, so I'm not sure if these can be loaded as modules, but you need something like Index: iwn.4 =================================================================== --- iwn.4 (revision 269758) +++ iwn.4 (working copy) @@ -45,6 +45,8 @@ You also need to select a firmware for your device. Choose one from: .Bd -ragged -offset indent +.Cd "device iwn105fw" +.Cd "device iwn135fw" .Cd "device iwn1000fw" .Cd "device iwn2000fw" .Cd "device iwn2030fw" @@ -69,6 +71,8 @@ .Xr loader.conf 5 : .Bd -literal -offset indent if_iwn_load="YES" +iwn105fw_load="YES" +iwn135fw_load="YES" iwn1000fw_load="YES" iwn2000fw_load="YES" iwn2030fw_load="YES" -- Steve From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 18:57:48 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC5F6EB7; Thu, 14 Aug 2014 18:57:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD7B4201B; Thu, 14 Aug 2014 18:57:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7EIvlCL047355; Thu, 14 Aug 2014 18:57:47 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7EIvkGt047351; Thu, 14 Aug 2014 18:57:46 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201408141857.s7EIvkGt047351@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 14 Aug 2014 18:57:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269998 - in head/sys: net netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 18:57:48 -0000 Author: glebius Date: Thu Aug 14 18:57:46 2014 New Revision: 269998 URL: http://svnweb.freebsd.org/changeset/base/269998 Log: - Count global pf(4) statistics in counter(9). - Do not count global number of states and of src_nodes, use uma_zone_get_cur() to obtain values. - Struct pf_status becomes merely an ioctl API structure, and moves to netpfil/pf/pf.h with its constants. - V_pf_status is now of type struct pf_kstatus. Submitted by: Kajetan Staszkiewicz Sponsored by: InnoGames GmbH Modified: head/sys/net/pfvar.h head/sys/netpfil/pf/pf.c head/sys/netpfil/pf/pf.h head/sys/netpfil/pf/pf_ioctl.c Modified: head/sys/net/pfvar.h ============================================================================== --- head/sys/net/pfvar.h Thu Aug 14 18:46:36 2014 (r269997) +++ head/sys/net/pfvar.h Thu Aug 14 18:57:46 2014 (r269998) @@ -1123,27 +1123,6 @@ struct pf_pdesc { #define PF_DPORT_RANGE 0x01 /* Dest port uses range */ #define PF_RPORT_RANGE 0x02 /* RDR'ed port uses range */ -/* Counters for other things we want to keep track of */ -#define LCNT_STATES 0 /* states */ -#define LCNT_SRCSTATES 1 /* max-src-states */ -#define LCNT_SRCNODES 2 /* max-src-nodes */ -#define LCNT_SRCCONN 3 /* max-src-conn */ -#define LCNT_SRCCONNRATE 4 /* max-src-conn-rate */ -#define LCNT_OVERLOAD_TABLE 5 /* entry added to overload table */ -#define LCNT_OVERLOAD_FLUSH 6 /* state entries flushed */ -#define LCNT_MAX 7 /* total+1 */ - -#define LCNT_NAMES { \ - "max states per rule", \ - "max-src-states", \ - "max-src-nodes", \ - "max-src-conn", \ - "max-src-conn-rate", \ - "overload table insertion", \ - "overload flush states", \ - NULL \ -} - /* UDP state enumeration */ #define PFUDPS_NO_TRAFFIC 0 #define PFUDPS_SINGLE 1 @@ -1172,16 +1151,6 @@ struct pf_pdesc { NULL \ } -#define FCNT_STATE_SEARCH 0 -#define FCNT_STATE_INSERT 1 -#define FCNT_STATE_REMOVALS 2 -#define FCNT_MAX 3 - -#define SCNT_SRC_NODE_SEARCH 0 -#define SCNT_SRC_NODE_INSERT 1 -#define SCNT_SRC_NODE_REMOVALS 2 -#define SCNT_MAX 3 - #define ACTION_SET(a, x) \ do { \ if ((a) != NULL) \ @@ -1193,24 +1162,22 @@ struct pf_pdesc { if ((a) != NULL) \ *(a) = (x); \ if (x < PFRES_MAX) \ - V_pf_status.counters[x]++; \ + counter_u64_add(V_pf_status.counters[x], 1); \ } while (0) -struct pf_status { - u_int64_t counters[PFRES_MAX]; - u_int64_t lcounters[LCNT_MAX]; /* limit counters */ - u_int64_t fcounters[FCNT_MAX]; - u_int64_t scounters[SCNT_MAX]; - u_int64_t pcounters[2][2][3]; - u_int64_t bcounters[2][2]; - u_int32_t running; - u_int32_t states; - u_int32_t src_nodes; - u_int32_t since; - u_int32_t debug; - u_int32_t hostid; +struct pf_kstatus { + counter_u64_t counters[PFRES_MAX]; /* reason for passing/dropping */ + counter_u64_t lcounters[LCNT_MAX]; /* limit counters */ + counter_u64_t fcounters[FCNT_MAX]; /* state operation counters */ + counter_u64_t scounters[SCNT_MAX]; /* src_node operation counters */ + uint32_t states; + uint32_t src_nodes; + uint32_t running; + uint32_t since; + uint32_t debug; + uint32_t hostid; char ifname[IFNAMSIZ]; - u_int8_t pf_chksum[PF_MD5_DIGEST_LENGTH]; + uint8_t pf_chksum[PF_MD5_DIGEST_LENGTH]; }; struct pf_divert { @@ -1704,8 +1671,8 @@ int pf_match_tag(struct mbuf *, struct int pf_tag_packet(struct mbuf *, struct pf_pdesc *, int); void pf_qid2qname(u_int32_t, char *); -VNET_DECLARE(struct pf_status, pf_status); -#define V_pf_status VNET(pf_status) +VNET_DECLARE(struct pf_kstatus, pf_status); +#define V_pf_status VNET(pf_status) struct pf_limit { uma_zone_t zone; Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Thu Aug 14 18:46:36 2014 (r269997) +++ head/sys/netpfil/pf/pf.c Thu Aug 14 18:57:46 2014 (r269998) @@ -110,7 +110,7 @@ VNET_DEFINE(struct pf_altqqueue, pf_alt VNET_DEFINE(struct pf_palist, pf_pabuf); VNET_DEFINE(struct pf_altqqueue *, pf_altqs_active); VNET_DEFINE(struct pf_altqqueue *, pf_altqs_inactive); -VNET_DEFINE(struct pf_status, pf_status); +VNET_DEFINE(struct pf_kstatus, pf_status); VNET_DEFINE(u_int32_t, ticket_altqs_active); VNET_DEFINE(u_int32_t, ticket_altqs_inactive); @@ -469,13 +469,13 @@ pf_src_connlimit(struct pf_state **state if ((*state)->rule.ptr->max_src_conn && (*state)->rule.ptr->max_src_conn < (*state)->src_node->conn) { - V_pf_status.lcounters[LCNT_SRCCONN]++; + counter_u64_add(V_pf_status.lcounters[LCNT_SRCCONN], 1); bad++; } if ((*state)->rule.ptr->max_src_conn_rate.limit && pf_check_threshold(&(*state)->src_node->conn_rate)) { - V_pf_status.lcounters[LCNT_SRCCONNRATE]++; + counter_u64_add(V_pf_status.lcounters[LCNT_SRCCONNRATE], 1); bad++; } @@ -523,7 +523,7 @@ pf_overload_task(void *v, int pending) bzero(&p, sizeof(p)); SLIST_FOREACH(pfoe, &queue, next) { - V_pf_status.lcounters[LCNT_OVERLOAD_TABLE]++; + counter_u64_add(V_pf_status.lcounters[LCNT_OVERLOAD_TABLE], 1); if (V_pf_status.debug >= PF_DEBUG_MISC) { printf("%s: blocking address ", __func__); pf_print_host(&pfoe->addr, 0, pfoe->af); @@ -559,7 +559,8 @@ pf_overload_task(void *v, int pending) SLIST_REMOVE(&queue, pfoe, pf_overload_entry, next); free(pfoe, M_PFTEMP); } else - V_pf_status.lcounters[LCNT_OVERLOAD_FLUSH]++; + counter_u64_add( + V_pf_status.lcounters[LCNT_OVERLOAD_FLUSH], 1); /* If nothing to flush, return. */ if (SLIST_EMPTY(&queue)) { @@ -609,7 +610,7 @@ pf_find_src_node(struct pf_addr *src, st struct pf_srchash *sh; struct pf_src_node *n; - V_pf_status.scounters[SCNT_SRC_NODE_SEARCH]++; + counter_u64_add(V_pf_status.scounters[SCNT_SRC_NODE_SEARCH], 1); sh = &V_pf_srchash[pf_hashsrc(src, af)]; PF_HASHROW_LOCK(sh); @@ -645,7 +646,8 @@ pf_insert_src_node(struct pf_src_node ** counter_u64_fetch(rule->src_nodes) < rule->max_src_nodes) (*sn) = uma_zalloc(V_pf_sources_z, M_NOWAIT | M_ZERO); else - V_pf_status.lcounters[LCNT_SRCNODES]++; + counter_u64_add(V_pf_status.lcounters[LCNT_SRCNODES], + 1); if ((*sn) == NULL) { PF_HASHROW_UNLOCK(sh); return (-1); @@ -664,12 +666,12 @@ pf_insert_src_node(struct pf_src_node ** if ((*sn)->rule.ptr != NULL) counter_u64_add((*sn)->rule.ptr->src_nodes, 1); PF_HASHROW_UNLOCK(sh); - V_pf_status.scounters[SCNT_SRC_NODE_INSERT]++; - V_pf_status.src_nodes++; + counter_u64_add(V_pf_status.scounters[SCNT_SRC_NODE_INSERT], 1); } else { if (rule->max_src_states && (*sn)->states >= rule->max_src_states) { - V_pf_status.lcounters[LCNT_SRCSTATES]++; + counter_u64_add(V_pf_status.lcounters[LCNT_SRCSTATES], + 1); return (-1); } } @@ -688,8 +690,7 @@ pf_unlink_src_node_locked(struct pf_src_ LIST_REMOVE(src, entry); if (src->rule.ptr) counter_u64_add(src->rule.ptr->src_nodes, -1); - V_pf_status.scounters[SCNT_SRC_NODE_REMOVALS]++; - V_pf_status.src_nodes--; + counter_u64_add(V_pf_status.scounters[SCNT_SRC_NODE_REMOVALS], 1); } void @@ -1203,7 +1204,7 @@ pf_state_insert(struct pfi_kif *kif, str /* One for keys, one for ID hash. */ refcount_init(&s->refs, 2); - V_pf_status.fcounters[FCNT_STATE_INSERT]++; + counter_u64_add(V_pf_status.fcounters[FCNT_STATE_INSERT], 1); if (pfsync_insert_state_ptr != NULL) pfsync_insert_state_ptr(s); @@ -1220,7 +1221,7 @@ pf_find_state_byid(uint64_t id, uint32_t struct pf_idhash *ih; struct pf_state *s; - V_pf_status.fcounters[FCNT_STATE_SEARCH]++; + counter_u64_add(V_pf_status.fcounters[FCNT_STATE_SEARCH], 1); ih = &V_pf_idhash[(be64toh(id) % (pf_hashmask + 1))]; @@ -1247,7 +1248,7 @@ pf_find_state(struct pfi_kif *kif, struc struct pf_state *s; int idx; - V_pf_status.fcounters[FCNT_STATE_SEARCH]++; + counter_u64_add(V_pf_status.fcounters[FCNT_STATE_SEARCH], 1); kh = &V_pf_keyhash[pf_hashkey((struct pf_state_key *)key)]; @@ -1291,7 +1292,7 @@ pf_find_state_all(struct pf_state_key_cm struct pf_state *s, *ret = NULL; int idx, inout = 0; - V_pf_status.fcounters[FCNT_STATE_SEARCH]++; + counter_u64_add(V_pf_status.fcounters[FCNT_STATE_SEARCH], 1); kh = &V_pf_keyhash[pf_hashkey((struct pf_state_key *)key)]; @@ -1519,6 +1520,8 @@ pf_purge_expired_src_nodes() } pf_free_src_nodes(&freelist); + + V_pf_status.src_nodes = uma_zone_get_cur(V_pf_sources_z); } static void @@ -1613,7 +1616,7 @@ pf_free_state(struct pf_state *cur) pf_normalize_tcp_cleanup(cur); uma_zfree(V_pf_state_z, cur); - V_pf_status.fcounters[FCNT_STATE_REMOVALS]++; + counter_u64_add(V_pf_status.fcounters[FCNT_STATE_REMOVALS], 1); } /* @@ -3454,7 +3457,7 @@ pf_create_state(struct pf_rule *r, struc /* check maximums */ if (r->max_states && (counter_u64_fetch(r->states_cur) >= r->max_states)) { - V_pf_status.lcounters[LCNT_STATES]++; + counter_u64_add(V_pf_status.lcounters[LCNT_STATES], 1); REASON_SET(&reason, PFRES_MAXSTATES); return (PF_DROP); } Modified: head/sys/netpfil/pf/pf.h ============================================================================== --- head/sys/netpfil/pf/pf.h Thu Aug 14 18:46:36 2014 (r269997) +++ head/sys/netpfil/pf/pf.h Thu Aug 14 18:57:46 2014 (r269998) @@ -145,7 +145,57 @@ enum { PF_ADDR_ADDRMASK, PF_ADDR_NOROUTE NULL \ } +/* Counters for other things we want to keep track of */ +#define LCNT_STATES 0 /* states */ +#define LCNT_SRCSTATES 1 /* max-src-states */ +#define LCNT_SRCNODES 2 /* max-src-nodes */ +#define LCNT_SRCCONN 3 /* max-src-conn */ +#define LCNT_SRCCONNRATE 4 /* max-src-conn-rate */ +#define LCNT_OVERLOAD_TABLE 5 /* entry added to overload table */ +#define LCNT_OVERLOAD_FLUSH 6 /* state entries flushed */ +#define LCNT_MAX 7 /* total+1 */ + +#define LCNT_NAMES { \ + "max states per rule", \ + "max-src-states", \ + "max-src-nodes", \ + "max-src-conn", \ + "max-src-conn-rate", \ + "overload table insertion", \ + "overload flush states", \ + NULL \ +} + +/* state operation counters */ +#define FCNT_STATE_SEARCH 0 +#define FCNT_STATE_INSERT 1 +#define FCNT_STATE_REMOVALS 2 +#define FCNT_MAX 3 + +/* src_node operation counters */ +#define SCNT_SRC_NODE_SEARCH 0 +#define SCNT_SRC_NODE_INSERT 1 +#define SCNT_SRC_NODE_REMOVALS 2 +#define SCNT_MAX 3 + #define PF_TABLE_NAME_SIZE 32 #define PF_QNAME_SIZE 64 +struct pf_status { + uint64_t counters[PFRES_MAX]; + uint64_t lcounters[LCNT_MAX]; + uint64_t fcounters[FCNT_MAX]; + uint64_t scounters[SCNT_MAX]; + uint64_t pcounters[2][2][3]; + uint64_t bcounters[2][2]; + uint32_t running; + uint32_t states; + uint32_t src_nodes; + uint32_t since; + uint32_t debug; + uint32_t hostid; + char ifname[IFNAMSIZ]; + uint8_t pf_chksum[PF_MD5_DIGEST_LENGTH]; +}; + #endif /* _NET_PF_H_ */ Modified: head/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- head/sys/netpfil/pf/pf_ioctl.c Thu Aug 14 18:46:36 2014 (r269997) +++ head/sys/netpfil/pf/pf_ioctl.c Thu Aug 14 18:57:46 2014 (r269998) @@ -265,6 +265,15 @@ pfattach(void) /* XXX do our best to avoid a conflict */ V_pf_status.hostid = arc4random(); + for (int i = 0; i < PFRES_MAX; i++) + V_pf_status.counters[i] = counter_u64_alloc(M_WAITOK); + for (int i = 0; i < LCNT_MAX; i++) + V_pf_status.lcounters[i] = counter_u64_alloc(M_WAITOK); + for (int i = 0; i < FCNT_MAX; i++) + V_pf_status.fcounters[i] = counter_u64_alloc(M_WAITOK); + for (int i = 0; i < SCNT_MAX; i++) + V_pf_status.scounters[i] = counter_u64_alloc(M_WAITOK); + if ((error = kproc_create(pf_purge_thread, curvnet, NULL, 0, 0, "pf purge")) != 0) /* XXXGL: leaked all above. */ @@ -1787,8 +1796,32 @@ DIOCGETSTATES_full: case DIOCGETSTATUS: { struct pf_status *s = (struct pf_status *)addr; + PF_RULES_RLOCK(); - bcopy(&V_pf_status, s, sizeof(struct pf_status)); + s->running = V_pf_status.running; + s->since = V_pf_status.since; + s->debug = V_pf_status.debug; + s->hostid = V_pf_status.hostid; + s->states = V_pf_status.states; + s->src_nodes = V_pf_status.src_nodes; + + for (int i = 0; i < PFRES_MAX; i++) + s->counters[i] = + counter_u64_fetch(V_pf_status.counters[i]); + for (int i = 0; i < LCNT_MAX; i++) + s->lcounters[i] = + counter_u64_fetch(V_pf_status.lcounters[i]); + for (int i = 0; i < FCNT_MAX; i++) + s->fcounters[i] = + counter_u64_fetch(V_pf_status.fcounters[i]); + for (int i = 0; i < SCNT_MAX; i++) + s->scounters[i] = + counter_u64_fetch(V_pf_status.scounters[i]); + + bcopy(V_pf_status.ifname, s->ifname, IFNAMSIZ); + bcopy(V_pf_status.pf_chksum, s->pf_chksum, + PF_MD5_DIGEST_LENGTH); + pfi_update_status(s->ifname, s); PF_RULES_RUNLOCK(); break; @@ -1809,9 +1842,12 @@ DIOCGETSTATES_full: case DIOCCLRSTATUS: { PF_RULES_WLOCK(); - bzero(V_pf_status.counters, sizeof(V_pf_status.counters)); - bzero(V_pf_status.fcounters, sizeof(V_pf_status.fcounters)); - bzero(V_pf_status.scounters, sizeof(V_pf_status.scounters)); + for (int i = 0; i < PFRES_MAX; i++) + counter_u64_zero(V_pf_status.counters[i]); + for (int i = 0; i < FCNT_MAX; i++) + counter_u64_zero(V_pf_status.fcounters[i]); + for (int i = 0; i < SCNT_MAX; i++) + counter_u64_zero(V_pf_status.scounters[i]); V_pf_status.since = time_second; if (*V_pf_status.ifname) pfi_update_status(V_pf_status.ifname, NULL); @@ -3157,7 +3193,6 @@ DIOCCHANGEADDR_error: pf_clear_srcnodes(NULL); pf_purge_expired_src_nodes(); - V_pf_status.src_nodes = 0; break; } @@ -3455,6 +3490,15 @@ shutdown_pf(void) counter_u64_free(V_pf_default_rule.states_tot); counter_u64_free(V_pf_default_rule.src_nodes); + for (int i = 0; i < PFRES_MAX; i++) + counter_u64_free(V_pf_status.counters[i]); + for (int i = 0; i < LCNT_MAX; i++) + counter_u64_free(V_pf_status.lcounters[i]); + for (int i = 0; i < FCNT_MAX; i++) + counter_u64_free(V_pf_status.fcounters[i]); + for (int i = 0; i < SCNT_MAX; i++) + counter_u64_free(V_pf_status.scounters[i]); + do { if ((error = pf_begin_rules(&t[0], PF_RULESET_SCRUB, &nn)) != 0) { From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 19:14:25 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8F44752; Thu, 14 Aug 2014 19:14:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B62D2217; Thu, 14 Aug 2014 19:14:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7EJEPY5056169; Thu, 14 Aug 2014 19:14:25 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7EJEPb3056167; Thu, 14 Aug 2014 19:14:25 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201408141914.s7EJEPb3056167@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Thu, 14 Aug 2014 19:14:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269999 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 19:14:25 -0000 Author: gavin Date: Thu Aug 14 19:14:24 2014 New Revision: 269999 URL: http://svnweb.freebsd.org/changeset/base/269999 Log: Update iwn(4) and iwnfw(4) man pages to reflect all available firmware. MFC after: 1 week Modified: head/share/man/man4/iwn.4 head/share/man/man4/iwnfw.4 Modified: head/share/man/man4/iwn.4 ============================================================================== --- head/share/man/man4/iwn.4 Thu Aug 14 18:57:46 2014 (r269998) +++ head/share/man/man4/iwn.4 Thu Aug 14 19:14:24 2014 (r269999) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 28, 2014 +.Dd August 14, 2014 .Dt IWN 4 .Os .Sh NAME @@ -46,6 +46,8 @@ You also need to select a firmware for y Choose one from: .Bd -ragged -offset indent .Cd "device iwn1000fw" +.Cd "device iwn105fw" +.Cd "device iwn135fw" .Cd "device iwn2000fw" .Cd "device iwn2030fw" .Cd "device iwn4965fw" @@ -70,6 +72,8 @@ module at boot time, place the following .Bd -literal -offset indent if_iwn_load="YES" iwn1000fw_load="YES" +iwn105fw_load="YES" +iwn135fw_load="YES" iwn2000fw_load="YES" iwn2030fw_load="YES" iwn4965fw_load="YES" Modified: head/share/man/man4/iwnfw.4 ============================================================================== --- head/share/man/man4/iwnfw.4 Thu Aug 14 18:57:46 2014 (r269998) +++ head/share/man/man4/iwnfw.4 Thu Aug 14 19:14:24 2014 (r269999) @@ -22,7 +22,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 9, 2014 +.Dd August 14, 2014 .Dt IWNFW 4 .Os .Sh NAME @@ -36,11 +36,15 @@ kernel configuration file: .Cd "device iwnfw" .Ed .Pp -This will include three firmware images inside the kernel. +This will include firmware images for all +.Xr iwn 4 +devices inside the kernel. If you want to pick only the firmware image for your network adapter choose one of the following: .Bd -ragged -offset indent .Cd "device iwn1000fw" +.Cd "device iwn105fw" +.Cd "device iwn135fw" .Cd "device iwn2000fw" .Cd "device iwn2030fw" .Cd "device iwn4965fw" @@ -57,6 +61,8 @@ module at boot time, place the following .Xr loader.conf 5 : .Bd -literal -offset indent iwn1000fw_load="YES" +iwn105fw_load="YES" +iwn135fw_load="YES" iwn2000fw_load="YES" iwn2030fw_load="YES" iwn4965fw_load="YES" @@ -69,7 +75,7 @@ iwn6050fw_load="YES" .Ed .Sh DESCRIPTION This module provides access to firmware sets for the -Intel Wireless WiFi Link 1000, 2000, 2030, 4965, 5000 and 6000 series of +Intel Wireless WiFi Link 105, 135, 1000, 2000, 2030, 4965, 5000 and 6000 series of IEEE 802.11n adapters. It may be statically linked into the kernel, or loaded as a module. From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 19:15:20 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E7E718E5; Thu, 14 Aug 2014 19:15:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4A682224; Thu, 14 Aug 2014 19:15:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7EJFK0u056380; Thu, 14 Aug 2014 19:15:20 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7EJFK5b056379; Thu, 14 Aug 2014 19:15:20 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201408141915.s7EJFK5b056379@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Thu, 14 Aug 2014 19:15:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270000 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 19:15:21 -0000 Author: gavin Date: Thu Aug 14 19:15:20 2014 New Revision: 270000 URL: http://svnweb.freebsd.org/changeset/base/270000 Log: Sync list of supported devices in the man page with the driver. MFC after: 1 week Modified: head/share/man/man4/iwn.4 Modified: head/share/man/man4/iwn.4 ============================================================================== --- head/share/man/man4/iwn.4 Thu Aug 14 19:14:24 2014 (r269999) +++ head/share/man/man4/iwn.4 Thu Aug 14 19:15:20 2014 (r270000) @@ -93,11 +93,13 @@ driver provides support for: .It Intel Centrino Advanced-N 6200 .It Intel Centrino Advanced-N 6205 .It Intel Centrino Advanced-N 6230 +.It Intel Centrino Advanced-N 6235 .It Intel Centrino Advanced-N + WiMAX 6250 .It Intel Centrino Ultimate-N 6300 .It Intel Centrino Wireless-N 100 .It Intel Centrino Wireless-N 105 .It Intel Centrino Wireless-N 130 +.It Intel Centrino Wireless-N 135 .It Intel Centrino Wireless-N 1000 .It Intel Centrino Wireless-N 1030 .It Intel Centrino Wireless-N 2200 From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 19:22:34 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CEBE0B3C; Thu, 14 Aug 2014 19:22:34 +0000 (UTC) Received: from mail-gw12.york.ac.uk (mail-gw12.york.ac.uk [144.32.129.162]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93F25240E; Thu, 14 Aug 2014 19:22:34 +0000 (UTC) Received: from ury.york.ac.uk ([144.32.64.162]:41582) by mail-gw12.york.ac.uk with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1XI0bR-00057s-UO; Thu, 14 Aug 2014 20:22:25 +0100 Date: Thu, 14 Aug 2014 20:22:25 +0100 (BST) From: Gavin Atkinson X-X-Sender: gavin@ury.york.ac.uk To: Steve Kargl Subject: Re: svn commit: r269992 - in head/sys: amd64/conf i386/conf In-Reply-To: <20140814183831.GA98162@troutmask.apl.washington.edu> Message-ID: References: <201408141829.s7EITtZe033846@svn.freebsd.org> <20140814183831.GA98162@troutmask.apl.washington.edu> User-Agent: Alpine 2.11 (BSF 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 19:22:34 -0000 On Thu, 14 Aug 2014, Steve Kargl wrote: > On Thu, Aug 14, 2014 at 06:29:55PM +0000, Gavin Atkinson wrote: > > Author: gavin > > Date: Thu Aug 14 18:29:55 2014 > > New Revision: 269992 > > > > Log: > > Update i386/NOTES and amd64/NOTES files to contain the complete list of > > firmwares for iwn(4) and sort them. > > > 'man iwn' seems to be missing iwn105fw and iwn135fw. > I don't build or use modules, so I'm not sure if > these can be loaded as modules, but you need something > like [...] Thanks, I've just fixed this (unfortunately I committed the changes before seeing your email, otherwise I would have credited you). Gavin From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 22:33:58 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04180FEE; Thu, 14 Aug 2014 22:33:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E22324BA0; Thu, 14 Aug 2014 22:33:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7EMXv3V050768; Thu, 14 Aug 2014 22:33:57 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7EMXurT050762; Thu, 14 Aug 2014 22:33:56 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201408142233.s7EMXurT050762@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 14 Aug 2014 22:33:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270004 - in head: etc/mtree sbin/devd sbin/devd/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 22:33:58 -0000 Author: asomers Date: Thu Aug 14 22:33:56 2014 New Revision: 270004 URL: http://svnweb.freebsd.org/changeset/base/270004 Log: Convert devd's client socket to type SOCK_SEQPACKET. This change consists of two merges from projects/zfsd/head along with the addition of an ATF test case for the new functionality. sbin/devd/tests/Makefile sbin/devd/tests/client_test.c Add ATF test cases for reading events from both devd socket types. r266519: sbin/devd/devd.8 sbin/devd/devd.cc Create a new socket, of type SOCK_SEQPACKET, for communicating with clients. SOCK_SEQPACKET sockets preserve record boundaries, simplying code in the client. The old SOCK_STREAM socket is retained for backwards-compatibility with existing clients. r269993: sbin/devd/devd.8 Fix grammar bug. CR: https://reviews.freebsd.org/rS266519 MFC after: 5 days Sponsored by: Spectra Logic Added: head/sbin/devd/tests/ head/sbin/devd/tests/Makefile (contents, props changed) head/sbin/devd/tests/client_test.c (contents, props changed) Modified: head/etc/mtree/BSD.tests.dist head/sbin/devd/Makefile head/sbin/devd/devd.8 head/sbin/devd/devd.cc Directory Properties: head/ (props changed) head/sbin/ (props changed) Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Thu Aug 14 21:43:20 2014 (r270003) +++ head/etc/mtree/BSD.tests.dist Thu Aug 14 22:33:56 2014 (r270004) @@ -105,6 +105,8 @@ sbin dhclient .. + devd + .. growfs .. mdconfig Modified: head/sbin/devd/Makefile ============================================================================== --- head/sbin/devd/Makefile Thu Aug 14 21:43:20 2014 (r270003) +++ head/sbin/devd/Makefile Thu Aug 14 22:33:56 2014 (r270004) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + PROG_CXX=devd SRCS= devd.cc token.l parse.y y.tab.h MAN= devd.8 devd.conf.5 @@ -16,4 +18,8 @@ CFLAGS+=-I. -I${.CURDIR} CLEANFILES= y.output +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: head/sbin/devd/devd.8 ============================================================================== --- head/sbin/devd/devd.8 Thu Aug 14 21:43:20 2014 (r270003) +++ head/sbin/devd/devd.8 Thu Aug 14 22:33:56 2014 (r270004) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 30, 2013 +.Dd August 14, 2014 .Dt DEVD 8 .Os .Sh NAME @@ -55,9 +55,7 @@ If option .Fl f is specified more than once, the last file specified is used. .It Fl l Ar num -Limit concurrent -.Pa /var/run/devd.pipe -connections to +Limit concurrent socket connections to .Ar num . The default connection limit is 10. .It Fl n @@ -130,22 +128,27 @@ wish to hook into the system without modifying the user's other config files. .Pp -All messages that +Since +.Xr devctl 4 +allows only one active reader, .Nm -receives are forwarded to the +multiplexes it, forwarding all events to any number of connected clients. +Clients connect by opening the SOCK_SEQPACKET .Ux domain socket at -.Pa /var/run/devd.pipe . +.Pa /var/run/devd.seqpacket.pipe . .Sh FILES -.Bl -tag -width ".Pa /var/run/devd.pipe" -compact +.Bl -tag -width ".Pa /var/run/devd.seqpacket.pipe" -compact .It Pa /etc/devd.conf The default .Nm configuration file. -.It Pa /var/run/devd.pipe +.It Pa /var/run/devd.seqpacket.pipe The socket used by .Nm to communicate with its clients. +.It Pa /var/run/devd.pipe +A deprecated socket retained for use with old clients. .El .Sh SEE ALSO .Xr devctl 4 , Modified: head/sbin/devd/devd.cc ============================================================================== --- head/sbin/devd/devd.cc Thu Aug 14 21:43:20 2014 (r270003) +++ head/sbin/devd/devd.cc Thu Aug 14 22:33:56 2014 (r270004) @@ -100,7 +100,8 @@ __FBSDID("$FreeBSD$"); #include "devd.h" /* C compatible definitions */ #include "devd.hh" /* C++ class definitions */ -#define PIPE "/var/run/devd.pipe" +#define STREAMPIPE "/var/run/devd.pipe" +#define SEQPACKETPIPE "/var/run/devd.seqpacket.pipe" #define CF "/etc/devd.conf" #define SYSCTL "hw.bus.devctl_queue" @@ -119,6 +120,11 @@ __FBSDID("$FreeBSD$"); using namespace std; +typedef struct client { + int fd; + int socktype; +} client_t; + extern FILE *yyin; extern int lineno; @@ -822,12 +828,12 @@ process_event(char *buffer) } int -create_socket(const char *name) +create_socket(const char *name, int socktype) { int fd, slen; struct sockaddr_un sun; - if ((fd = socket(PF_LOCAL, SOCK_STREAM, 0)) < 0) + if ((fd = socket(PF_LOCAL, socktype, 0)) < 0) err(1, "socket"); bzero(&sun, sizeof(sun)); sun.sun_family = AF_UNIX; @@ -846,12 +852,13 @@ create_socket(const char *name) unsigned int max_clients = 10; /* Default, can be overriden on cmdline. */ unsigned int num_clients; -list clients; + +list clients; void notify_clients(const char *data, int len) { - list::iterator i; + list::iterator i; /* * Deliver the data to all clients. Throw clients overboard at the @@ -861,11 +868,17 @@ notify_clients(const char *data, int len * kernel memory or tie up the limited number of available connections). */ for (i = clients.begin(); i != clients.end(); ) { - if (write(*i, data, len) != len) { + int flags; + if (i->socktype == SOCK_SEQPACKET) + flags = MSG_EOR; + else + flags = 0; + + if (send(i->fd, data, len, flags) != len) { --num_clients; - close(*i); + close(i->fd); i = clients.erase(i); - devdlog(LOG_WARNING, "notify_clients: write() failed; " + devdlog(LOG_WARNING, "notify_clients: send() failed; " "dropping unresponsive client\n"); } else ++i; @@ -877,7 +890,7 @@ check_clients(void) { int s; struct pollfd pfd; - list::iterator i; + list::iterator i; /* * Check all existing clients to see if any of them have disappeared. @@ -888,12 +901,12 @@ check_clients(void) */ pfd.events = 0; for (i = clients.begin(); i != clients.end(); ) { - pfd.fd = *i; + pfd.fd = i->fd; s = poll(&pfd, 1, 0); if ((s < 0 && s != EINTR ) || (s > 0 && (pfd.revents & POLLHUP))) { --num_clients; - close(*i); + close(i->fd); i = clients.erase(i); devdlog(LOG_NOTICE, "check_clients: " "dropping disconnected client\n"); @@ -903,9 +916,9 @@ check_clients(void) } void -new_client(int fd) +new_client(int fd, int socktype) { - int s; + client_t s; int sndbuf_size; /* @@ -914,13 +927,14 @@ new_client(int fd) * by sending large buffers full of data we'll never read. */ check_clients(); - s = accept(fd, NULL, NULL); - if (s != -1) { + s.socktype = socktype; + s.fd = accept(fd, NULL, NULL); + if (s.fd != -1) { sndbuf_size = CLIENT_BUFSIZE; - if (setsockopt(s, SOL_SOCKET, SO_SNDBUF, &sndbuf_size, + if (setsockopt(s.fd, SOL_SOCKET, SO_SNDBUF, &sndbuf_size, sizeof(sndbuf_size))) err(1, "setsockopt"); - shutdown(s, SHUT_RD); + shutdown(s.fd, SHUT_RD); clients.push_back(s); ++num_clients; } else @@ -934,7 +948,7 @@ event_loop(void) int fd; char buffer[DEVCTL_MAXBUF]; int once = 0; - int server_fd, max_fd; + int stream_fd, seqpacket_fd, max_fd; int accepting; timeval tv; fd_set fds; @@ -942,9 +956,10 @@ event_loop(void) fd = open(PATH_DEVCTL, O_RDONLY | O_CLOEXEC); if (fd == -1) err(1, "Can't open devctl device %s", PATH_DEVCTL); - server_fd = create_socket(PIPE); + stream_fd = create_socket(STREAMPIPE, SOCK_STREAM); + seqpacket_fd = create_socket(SEQPACKETPIPE, SOCK_SEQPACKET); accepting = 1; - max_fd = max(fd, server_fd) + 1; + max_fd = max(fd, max(stream_fd, seqpacket_fd)) + 1; while (!romeo_must_die) { if (!once && !no_daemon && !daemonize_quick) { // Check to see if we have any events pending. @@ -965,24 +980,28 @@ event_loop(void) } /* * When we've already got the max number of clients, stop - * accepting new connections (don't put server_fd in the set), - * shrink the accept() queue to reject connections quickly, and - * poll the existing clients more often, so that we notice more - * quickly when any of them disappear to free up client slots. + * accepting new connections (don't put the listening sockets in + * the set), shrink the accept() queue to reject connections + * quickly, and poll the existing clients more often, so that we + * notice more quickly when any of them disappear to free up + * client slots. */ FD_ZERO(&fds); FD_SET(fd, &fds); if (num_clients < max_clients) { if (!accepting) { - listen(server_fd, max_clients); + listen(stream_fd, max_clients); + listen(seqpacket_fd, max_clients); accepting = 1; } - FD_SET(server_fd, &fds); + FD_SET(stream_fd, &fds); + FD_SET(seqpacket_fd, &fds); tv.tv_sec = 60; tv.tv_usec = 0; } else { if (accepting) { - listen(server_fd, 0); + listen(stream_fd, 0); + listen(seqpacket_fd, 0); accepting = 0; } tv.tv_sec = 2; @@ -1022,8 +1041,14 @@ event_loop(void) break; } } - if (FD_ISSET(server_fd, &fds)) - new_client(server_fd); + if (FD_ISSET(stream_fd, &fds)) + new_client(stream_fd, SOCK_STREAM); + /* + * Aside from the socket type, both sockets use the same + * protocol, so we can process clients the same way. + */ + if (FD_ISSET(seqpacket_fd, &fds)) + new_client(seqpacket_fd, SOCK_SEQPACKET); } close(fd); } Added: head/sbin/devd/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/devd/tests/Makefile Thu Aug 14 22:33:56 2014 (r270004) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/sbin/devd + +ATF_TESTS_C= client_test +TEST_METADATA.client_test= required_programs="devd" +TEST_METADATA.client_test+= required_user="root" +TEST_METADATA.client_test+= timeout=15 + +WARNS?= 5 + +.include Added: head/sbin/devd/tests/client_test.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/devd/tests/client_test.c Thu Aug 14 22:33:56 2014 (r270004) @@ -0,0 +1,192 @@ +/*- + * Copyright (c) 2014 Spectra Logic Corporation. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#include +#include +#include +#include + +#include +/* Helper functions*/ + +/* + * Create two devd events. The easiest way I know of, that requires no special + * hardware, is to create md(4) devices. + */ +static void +create_two_events(void) +{ + FILE *create_stdout; + FILE *destroy_stdout; + char mdname[80]; + char destroy_cmd[80]; + char *error; + + create_stdout = popen("mdconfig -a -s 64 -t null", "r"); + ATF_REQUIRE(create_stdout != NULL); + error = fgets(mdname, sizeof(mdname), create_stdout); + ATF_REQUIRE(error != NULL); + /* We only expect one line of output */ + ATF_REQUIRE_EQ(0, pclose(create_stdout)); + + snprintf(destroy_cmd, nitems(destroy_cmd), "mdconfig -d -u %s", mdname); + destroy_stdout = popen(destroy_cmd, "r"); + /* We expect no output */ + ATF_REQUIRE_EQ(0, pclose(destroy_stdout)); +} + +/* + * Test Cases + */ + +/* + * Open a client connection to devd, create some events, and test that they can + * be read _whole_ and _one_at_a_time_ from the socket + */ +ATF_TC_WITHOUT_HEAD(seqpacket); +ATF_TC_BODY(seqpacket, tc) +{ + int s; + int error; + struct sockaddr_un devd_addr; + bool got_create_event = false; + bool got_destroy_event = false; + const char create_pat[] = + "!system=DEVFS subsystem=CDEV type=CREATE cdev=md"; + const char destroy_pat[] = + "!system=DEVFS subsystem=CDEV type=DESTROY cdev=md"; + + memset(&devd_addr, 0, sizeof(devd_addr)); + devd_addr.sun_family = PF_LOCAL; + strlcpy(devd_addr.sun_path, "/var/run/devd.seqpacket.pipe", + sizeof(devd_addr.sun_path)); + + s = socket(PF_LOCAL, SOCK_SEQPACKET, 0); + ATF_REQUIRE(s >= 0); + error = connect(s, (struct sockaddr*)&devd_addr, SUN_LEN(&devd_addr)); + ATF_REQUIRE_EQ(0, error); + + create_two_events(); + + /* + * Loop until both events are detected on _different_ reads + * There may be extra events due to unrelated system activity + * If we never get both events, then the test will timeout. + */ + while (!(got_create_event && got_destroy_event)) { + int cmp; + ssize_t len; + char event[1024]; + + len = recv(s, event, sizeof(event), MSG_WAITALL); + ATF_REQUIRE(len != -1); + /* NULL terminate the result */ + event[len] = '\0'; + printf("%s", event); + cmp = strncmp(event, create_pat, sizeof(create_pat) - 1); + if (cmp == 0) + got_create_event = true; + + cmp = strncmp(event, destroy_pat, sizeof(destroy_pat) - 1); + if (cmp == 0) + got_destroy_event = true; + } +} + +/* + * Open a client connection to devd using the stream socket, create some + * events, and test that they can be read in any number of reads. + */ +ATF_TC_WITHOUT_HEAD(stream); +ATF_TC_BODY(stream, tc) +{ + int s; + int error; + struct sockaddr_un devd_addr; + bool got_create_event = false; + bool got_destroy_event = false; + const char create_pat[] = + "!system=DEVFS subsystem=CDEV type=CREATE cdev=md"; + const char destroy_pat[] = + "!system=DEVFS subsystem=CDEV type=DESTROY cdev=md"; + ssize_t len = 0; + + memset(&devd_addr, 0, sizeof(devd_addr)); + devd_addr.sun_family = PF_LOCAL; + strlcpy(devd_addr.sun_path, "/var/run/devd.pipe", + sizeof(devd_addr.sun_path)); + + s = socket(PF_LOCAL, SOCK_STREAM, 0); + ATF_REQUIRE(s >= 0); + error = connect(s, (struct sockaddr*)&devd_addr, SUN_LEN(&devd_addr)); + ATF_REQUIRE_EQ(0, error); + + create_two_events(); + + /* + * Loop until both events are detected on _different_ reads + * There may be extra events due to unrelated system activity + * If we never get both events, then the test will timeout. + */ + while (!(got_create_event && got_destroy_event)) { + char event[1024]; + ssize_t newlen; + char *create_pos, *destroy_pos; + + newlen = read(s, &event[len], sizeof(event) - len); + ATF_REQUIRE(newlen != -1); + len += newlen; + /* NULL terminate the result */ + event[newlen] = '\0'; + printf("%s", event); + + create_pos = strstr(event, create_pat); + if (create_pos != NULL); + got_create_event = true; + + destroy_pos = strstr(event, destroy_pat); + if (destroy_pos != NULL); + got_destroy_event = true; + + } +} + +/* + * Main. + */ + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, seqpacket); + ATF_TP_ADD_TC(tp, stream); + + return (atf_no_error()); +} + From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 22:47:25 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 558DE3B9; Thu, 14 Aug 2014 22:47:25 +0000 (UTC) Received: from pp2.rice.edu (proofpoint2.mail.rice.edu [128.42.201.101]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 185B34C8C; Thu, 14 Aug 2014 22:47:24 +0000 (UTC) Received: from pps.filterd (pp2.rice.edu [127.0.0.1]) by pp2.rice.edu (8.14.5/8.14.5) with SMTP id s7EMlIsP008197; Thu, 14 Aug 2014 17:47:18 -0500 Received: from mh1.mail.rice.edu (mh1.mail.rice.edu [128.42.201.20]) by pp2.rice.edu with ESMTP id 1nrys908br-1; Thu, 14 Aug 2014 17:47:17 -0500 X-Virus-Scanned: by amavis-2.7.0 at mh1.mail.rice.edu, auth channel Received: from 108-254-203-201.lightspeed.hstntx.sbcglobal.net (108-254-203-201.lightspeed.hstntx.sbcglobal.net [108.254.203.201]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh1.mail.rice.edu (Postfix) with ESMTPSA id 20A2D460110; Thu, 14 Aug 2014 17:47:11 -0500 (CDT) Message-ID: <53ED3C6E.10204@rice.edu> Date: Thu, 14 Aug 2014 17:47:10 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: d@delphij.net, John-Mark Gurney , Xin LI Subject: Re: svn commit: r269963 - head/sys/kern References: <201408140513.s7E5DPRb069698@svn.freebsd.org> <20140814053518.GO83475@funkthat.com> <53EC560B.5000104@delphij.net> In-Reply-To: <53EC560B.5000104@delphij.net> X-Enigmail-Version: 1.6 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 kscore.is_bulkscore=0 kscore.compositescore=0 circleOfTrustscore=0 compositescore=0.248919945447816 urlsuspect_oldscore=0.248919945447816 suspectscore=13 recipient_domain_to_sender_totalscore=0 phishscore=0 bulkscore=0 kscore.is_spamscore=0 recipient_to_sender_totalscore=0 recipient_domain_to_sender_domain_totalscore=0 rbsscore=0.248919945447816 spamscore=0 recipient_to_sender_domain_totalscore=0 urlsuspectscore=0.9 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1408140260 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 22:47:25 -0000 On 08/14/2014 01:24, Xin Li wrote: > On 8/13/14 10:35 PM, John-Mark Gurney wrote: > > Xin LI wrote this message on Thu, Aug 14, 2014 at 05:13 +0000: > >> Author: delphij Date: Thu Aug 14 05:13:24 2014 New Revision: > >> 269963 URL: http://svnweb.freebsd.org/changeset/base/269963 > >> > >> Log: Re-instate UMA cached backend for 4K - 64K allocations. New > >> consumers like geli(4) uses malloc(9) to allocate temporary > >> buffers that gets free'ed shortly, causing frequent TLB shootdown > >> as observed in hwpmc supported flame graph. > > > Can we do even larger, like 128k for phys io sized blocks? > > Sure (Actually I'm running with 128k and 256k buckets enabled on my > own storage box; with r269964 we can easily add new buckets without > actually activating them by default). > > However, I'm relented to add them right now because the current > malloc(9) implementation would use the next bucket size, which is 2x > of the previous one, when the requested size is only a little bit > larger than the smaller chunk's size. In real world the larger bucket > could eat more memory than all smaller but greater than page-sized > bucket combined (the actual consumption is still small, though). > The current code already supports sizes that are not powers of 2. For example, with Index: kern/kern_malloc.c =================================================================== --- kern/kern_malloc.c (revision 269997) +++ kern/kern_malloc.c (working copy) @@ -152,8 +152,11 @@ struct { {2048, "2048", }, {4096, "4096", }, {8192, "8192", }, + {12228, "12228", }, {16384, "16384", }, + {24576, "24576", }, {32768, "32768", }, + {49152, "49152", }, {65536, "65536", }, {0, NULL}, }; I see ITEM SIZE LIMIT USED FREE REQ FAIL SLEEP UMA Kegs: 384, 0, 94, 6, 94, 0, 0 ... 16: 16, 0, 2501, 260, 36924, 0, 0 32: 32, 0, 2405, 470, 94881, 0, 0 64: 64, 0, 12480, 8042, 1365658, 0, 0 128: 128, 0, 12886, 26019, 211536, 0, 0 256: 256, 0, 5352, 2223, 463546, 0, 0 512: 512, 0, 2797, 7819, 46986, 0, 0 1024: 1024, 0, 70, 126, 89345, 0, 0 2048: 2048, 0, 2037, 1353, 168857, 0, 0 4096: 4096, 0, 289, 17, 108610, 0, 0 8192: 8192, 0, 26, 1, 323, 0, 0 12228: 12228, 0, 9, 0, 159, 0, 0 16384: 16384, 0, 4, 2, 97, 0, 0 24576: 24576, 0, 7, 2, 55, 0, 0 32768: 32768, 0, 1, 1, 34, 0, 0 49152: 49152, 0, 6, 1, 56, 0, 0 65536: 65536, 0, 8, 2, 784, 0, 0 after a few minutes of activity. > I think eventually the right way to go is to adopt more sophisticated > allocation strategy like the one used in jemalloc(3) and this > changeset is more-or-less temporary for now: I committed it mainly > because it eliminated a large portion of unwanted TLB shootdowns I > have observed with very reasonable overhead (a few megabytes of RAM). > > > geli can do allocations >128k, which could be broken into two > > parts, one in the <8k sized range and the other in 128k... > > Yes, this is another issue that I'd like to solve. > > From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 22:52:05 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C76BF5D7; Thu, 14 Aug 2014 22:52:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2DE54D3E; Thu, 14 Aug 2014 22:52:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7EMq5wK059576; Thu, 14 Aug 2014 22:52:05 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7EMq5GL059575; Thu, 14 Aug 2014 22:52:05 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201408142252.s7EMq5GL059575@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 14 Aug 2014 22:52:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270005 - head/usr.sbin/mountd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 22:52:05 -0000 Author: rmacklem Date: Thu Aug 14 22:52:05 2014 New Revision: 270005 URL: http://svnweb.freebsd.org/changeset/base/270005 Log: Try to clarify how file systems are exported for NFSv4. Suggested by: rcarter@pinyon.org MFC after: 1 week Modified: head/usr.sbin/mountd/exports.5 Modified: head/usr.sbin/mountd/exports.5 ============================================================================== --- head/usr.sbin/mountd/exports.5 Thu Aug 14 22:33:56 2014 (r270004) +++ head/usr.sbin/mountd/exports.5 Thu Aug 14 22:52:05 2014 (r270005) @@ -28,7 +28,7 @@ .\" @(#)exports.5 8.3 (Berkeley) 3/29/95 .\" $FreeBSD$ .\" -.Dd December 23, 2012 +.Dd August 14, 2014 .Dt EXPORTS 5 .Os .Sh NAME @@ -91,10 +91,10 @@ option is used on Because NFSv4 does not use the mount protocol, the .Dq administrative controls -are not applied. -Thus, all the above export line(s) should be considered to have the +are not applied and all directories within this server +file system are mountable via NFSv4 even if the .Fl alldirs -flag, even if the line is specified without it. +flag has not been specified. The third form has the string ``V4:'' followed by a single absolute path name, to specify the NFSv4 tree root. This line does not export any file system, but simply marks where the root @@ -310,7 +310,8 @@ interface. For the third form which specifies the NFSv4 tree root, the directory path specifies the location within the server's file system tree which is the root of the NFSv4 tree. -All entries of this form must specify the same directory path. +There can only be one NFSv4 root directory per server. +As such, all entries of this form must specify the same directory path. For file systems other than ZFS, this location can be any directory and does not need to be within an exported file system. If it is not in an exported From owner-svn-src-head@FreeBSD.ORG Thu Aug 14 23:17:34 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 90556BDE; Thu, 14 Aug 2014 23:17:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 637664F4E; Thu, 14 Aug 2014 23:17:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7ENHYII069391; Thu, 14 Aug 2014 23:17:34 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7ENHYig069389; Thu, 14 Aug 2014 23:17:34 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201408142317.s7ENHYig069389@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 14 Aug 2014 23:17:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270006 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 23:17:34 -0000 Author: imp Date: Thu Aug 14 23:17:33 2014 New Revision: 270006 URL: http://svnweb.freebsd.org/changeset/base/270006 Log: Print the symbolic bit names for the status when we get a timeout. Modified: head/sys/arm/at91/at91_mci.c head/sys/arm/at91/at91_mcireg.h Modified: head/sys/arm/at91/at91_mci.c ============================================================================== --- head/sys/arm/at91/at91_mci.c Thu Aug 14 22:52:05 2014 (r270005) +++ head/sys/arm/at91/at91_mci.c Thu Aug 14 23:17:33 2014 (r270006) @@ -1210,8 +1210,8 @@ at91_mci_intr(void *arg) */ if (cmd->opcode != 8) { device_printf(sc->dev, - "IO error; status MCI_SR = 0x%x cmd opcode = %d%s\n", - sr, cmd->opcode, + "IO error; status MCI_SR = 0x%b cmd opcode = %d%s\n", + sr, MCI_SR_BITSTRING, cmd->opcode, (cmd->opcode != 12) ? "" : (sc->flags & CMD_MULTIREAD) ? " after read" : " after write"); at91_mci_reset(sc); Modified: head/sys/arm/at91/at91_mcireg.h ============================================================================== --- head/sys/arm/at91/at91_mcireg.h Thu Aug 14 22:52:05 2014 (r270005) +++ head/sys/arm/at91/at91_mcireg.h Thu Aug 14 23:17:33 2014 (r270006) @@ -118,6 +118,30 @@ #define MCI_SR_OVRE (0x1u << 30) /* (MCI) Overrun flag */ #define MCI_SR_UNRE (0x1u << 31) /* (MCI) Underrun flag */ +/* TXRDY,DTIP,ENDTX,TXBUFE,RTOE */ + +#define MCI_SR_BITSTRING \ + "\020" \ + "\001CMDRDY" \ + "\002RXRDY" \ + "\003TXRDY" \ + "\004BLKE" \ + "\005DTIP" \ + "\006NOTBUSY" \ + "\007ENDRX" \ + "\010ENDTX" \ + "\017RXBUFF" \ + "\020TXBUFE" \ + "\021RINDE" \ + "\022RDIRE" \ + "\023RCRCE" \ + "\024RENDE" \ + "\025RTOE" \ + "\026DCRCE" \ + "\027DTOE" \ + "\037OVRE" \ + "\040UNRE" + /* -------- MCI_IER : (MCI Offset: 0x44) MCI Interrupt Enable Register -------- */ /* -------- MCI_IDR : (MCI Offset: 0x48) MCI Interrupt Disable Register -------- */ /* -------- MCI_IMR : (MCI Offset: 0x4c) MCI Interrupt Mask Register -------- */ From owner-svn-src-head@FreeBSD.ORG Fri Aug 15 02:43:06 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6C1D32B1; Fri, 15 Aug 2014 02:43:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56604242E; Fri, 15 Aug 2014 02:43:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7F2h6rg063324; Fri, 15 Aug 2014 02:43:06 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7F2h3P6063303; Fri, 15 Aug 2014 02:43:03 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201408150243.s7F2h3P6063303@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Fri, 15 Aug 2014 02:43:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270008 - in head/sys: net netinet netinet6 netipsec netpfil/pf sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Aug 2014 02:43:06 -0000 Author: kevlo Date: Fri Aug 15 02:43:02 2014 New Revision: 270008 URL: http://svnweb.freebsd.org/changeset/base/270008 Log: Change pr_output's prototype to avoid the need for explicit casts. This is a follow up to r269699. Phabric: D564 Reviewed by: jhb Modified: head/sys/net/if_gre.c head/sys/net/if_stf.c head/sys/net/rtsock.c head/sys/netinet/in_gif.c head/sys/netinet/ip_carp.c head/sys/netinet/ip_mroute.c head/sys/netinet/ip_var.h head/sys/netinet/raw_ip.c head/sys/netinet6/in6_gif.c head/sys/netinet6/in6_proto.c head/sys/netinet6/ip6_mroute.c head/sys/netipsec/keysock.c head/sys/netipsec/keysock.h head/sys/netpfil/pf/if_pfsync.c head/sys/sys/protosw.h Modified: head/sys/net/if_gre.c ============================================================================== --- head/sys/net/if_gre.c Thu Aug 14 23:38:04 2014 (r270007) +++ head/sys/net/if_gre.c Fri Aug 15 02:43:02 2014 (r270008) @@ -128,7 +128,7 @@ static const struct protosw in_gre_proto .pr_protocol = IPPROTO_GRE, .pr_flags = PR_ATOMIC|PR_ADDR, .pr_input = gre_input, - .pr_output = (pr_output_t *)rip_output, + .pr_output = rip_output, .pr_ctlinput = rip_ctlinput, .pr_ctloutput = rip_ctloutput, .pr_usrreqs = &rip_usrreqs @@ -139,7 +139,7 @@ static const struct protosw in_mobile_pr .pr_protocol = IPPROTO_MOBILE, .pr_flags = PR_ATOMIC|PR_ADDR, .pr_input = gre_mobile_input, - .pr_output = (pr_output_t *)rip_output, + .pr_output = rip_output, .pr_ctlinput = rip_ctlinput, .pr_ctloutput = rip_ctloutput, .pr_usrreqs = &rip_usrreqs Modified: head/sys/net/if_stf.c ============================================================================== --- head/sys/net/if_stf.c Thu Aug 14 23:38:04 2014 (r270007) +++ head/sys/net/if_stf.c Fri Aug 15 02:43:02 2014 (r270008) @@ -171,7 +171,7 @@ struct protosw in_stf_protosw = { .pr_protocol = IPPROTO_IPV6, .pr_flags = PR_ATOMIC|PR_ADDR, .pr_input = in_stf_input, - .pr_output = (pr_output_t *)rip_output, + .pr_output = rip_output, .pr_ctloutput = rip_ctloutput, .pr_usrreqs = &rip_usrreqs }; Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Thu Aug 14 23:38:04 2014 (r270007) +++ head/sys/net/rtsock.c Fri Aug 15 02:43:02 2014 (r270008) @@ -159,7 +159,7 @@ static int rt_xaddrs(caddr_t cp, caddr_t static int sysctl_dumpentry(struct radix_node *rn, void *vw); static int sysctl_iflist(int af, struct walkarg *w); static int sysctl_ifmalist(int af, struct walkarg *w); -static int route_output(struct mbuf *m, struct socket *so); +static int route_output(struct mbuf *m, struct socket *so, ...); static void rt_getmetrics(const struct rtentry *rt, struct rt_metrics *out); static void rt_dispatch(struct mbuf *, sa_family_t); static struct sockaddr *rtsock_fix_netmask(struct sockaddr *dst, @@ -516,7 +516,7 @@ rtm_get_jailed(struct rt_addrinfo *info, /*ARGSUSED*/ static int -route_output(struct mbuf *m, struct socket *so) +route_output(struct mbuf *m, struct socket *so, ...) { struct rt_msghdr *rtm = NULL; struct rtentry *rt = NULL; Modified: head/sys/netinet/in_gif.c ============================================================================== --- head/sys/netinet/in_gif.c Thu Aug 14 23:38:04 2014 (r270007) +++ head/sys/netinet/in_gif.c Fri Aug 15 02:43:02 2014 (r270008) @@ -81,7 +81,7 @@ struct protosw in_gif_protosw = { .pr_protocol = 0/* IPPROTO_IPV[46] */, .pr_flags = PR_ATOMIC|PR_ADDR, .pr_input = in_gif_input, - .pr_output = (pr_output_t *)rip_output, + .pr_output = rip_output, .pr_ctloutput = rip_ctloutput, .pr_usrreqs = &rip_usrreqs }; Modified: head/sys/netinet/ip_carp.c ============================================================================== --- head/sys/netinet/ip_carp.c Thu Aug 14 23:38:04 2014 (r270007) +++ head/sys/netinet/ip_carp.c Fri Aug 15 02:43:02 2014 (r270008) @@ -2054,7 +2054,7 @@ static struct protosw in_carp_protosw = .pr_protocol = IPPROTO_CARP, .pr_flags = PR_ATOMIC|PR_ADDR, .pr_input = carp_input, - .pr_output = (pr_output_t *)rip_output, + .pr_output = rip_output, .pr_ctloutput = rip_ctloutput, .pr_usrreqs = &rip_usrreqs }; @@ -2068,7 +2068,7 @@ static struct protosw in6_carp_protosw = .pr_protocol = IPPROTO_CARP, .pr_flags = PR_ATOMIC|PR_ADDR, .pr_input = carp6_input, - .pr_output = (pr_output_t *)rip6_output, + .pr_output = rip6_output, .pr_ctloutput = rip6_ctloutput, .pr_usrreqs = &rip6_usrreqs }; Modified: head/sys/netinet/ip_mroute.c ============================================================================== --- head/sys/netinet/ip_mroute.c Thu Aug 14 23:38:04 2014 (r270007) +++ head/sys/netinet/ip_mroute.c Fri Aug 15 02:43:02 2014 (r270008) @@ -247,7 +247,7 @@ static const struct protosw in_pim_proto .pr_protocol = IPPROTO_PIM, .pr_flags = PR_ATOMIC|PR_ADDR|PR_LASTHDR, .pr_input = pim_input, - .pr_output = (pr_output_t *)rip_output, + .pr_output = rip_output, .pr_ctloutput = rip_ctloutput, .pr_usrreqs = &rip_usrreqs }; Modified: head/sys/netinet/ip_var.h ============================================================================== --- head/sys/netinet/ip_var.h Thu Aug 14 23:38:04 2014 (r270007) +++ head/sys/netinet/ip_var.h Fri Aug 15 02:43:02 2014 (r270008) @@ -235,7 +235,7 @@ void rip_init(void); void rip_destroy(void); #endif int rip_input(struct mbuf **, int *, int); -int rip_output(struct mbuf *, struct socket *, u_long); +int rip_output(struct mbuf *, struct socket *, ...); int ipip_input(struct mbuf **, int *, int); int rsvp_input(struct mbuf **, int *, int); int ip_rsvp_init(struct socket *); Modified: head/sys/netinet/raw_ip.c ============================================================================== --- head/sys/netinet/raw_ip.c Thu Aug 14 23:38:04 2014 (r270007) +++ head/sys/netinet/raw_ip.c Fri Aug 15 02:43:02 2014 (r270008) @@ -74,6 +74,7 @@ __FBSDID("$FreeBSD$"); #include #endif /*IPSEC*/ +#include #include VNET_DEFINE(int, ip_defttl) = IPDEFTTL; @@ -426,14 +427,20 @@ rip_input(struct mbuf **mp, int *offp, i * have setup with control call. */ int -rip_output(struct mbuf *m, struct socket *so, u_long dst) +rip_output(struct mbuf *m, struct socket *so, ...) { struct ip *ip; int error; struct inpcb *inp = sotoinpcb(so); + va_list ap; + u_long dst; int flags = ((so->so_options & SO_DONTROUTE) ? IP_ROUTETOIF : 0) | IP_ALLOWBROADCAST; + va_start(ap, so); + dst = va_arg(ap, u_long); + va_end(ap); + /* * If the user handed us a complete IP packet, use it. Otherwise, * allocate an mbuf for a header and fill it in. Modified: head/sys/netinet6/in6_gif.c ============================================================================== --- head/sys/netinet6/in6_gif.c Thu Aug 14 23:38:04 2014 (r270007) +++ head/sys/netinet6/in6_gif.c Fri Aug 15 02:43:02 2014 (r270008) @@ -89,7 +89,7 @@ struct protosw in6_gif_protosw = { .pr_protocol = 0, /* IPPROTO_IPV[46] */ .pr_flags = PR_ATOMIC|PR_ADDR, .pr_input = in6_gif_input, - .pr_output = (pr_output_t *)rip6_output, + .pr_output = rip6_output, .pr_ctloutput = rip6_ctloutput, .pr_usrreqs = &rip6_usrreqs }; Modified: head/sys/netinet6/in6_proto.c ============================================================================== --- head/sys/netinet6/in6_proto.c Thu Aug 14 23:38:04 2014 (r270007) +++ head/sys/netinet6/in6_proto.c Fri Aug 15 02:43:02 2014 (r270008) @@ -233,7 +233,7 @@ struct protosw inet6sw[] = { .pr_protocol = IPPROTO_RAW, .pr_flags = PR_ATOMIC|PR_ADDR, .pr_input = rip6_input, - .pr_output = (pr_output_t *)rip6_output, + .pr_output = rip6_output, .pr_ctlinput = rip6_ctlinput, .pr_ctloutput = rip6_ctloutput, #ifndef INET /* Do not call initialization twice. */ @@ -247,7 +247,7 @@ struct protosw inet6sw[] = { .pr_protocol = IPPROTO_ICMPV6, .pr_flags = PR_ATOMIC|PR_ADDR|PR_LASTHDR, .pr_input = icmp6_input, - .pr_output = (pr_output_t *)rip6_output, + .pr_output = rip6_output, .pr_ctlinput = rip6_ctlinput, .pr_ctloutput = rip6_ctloutput, .pr_fasttimo = icmp6_fasttimo, @@ -312,7 +312,7 @@ struct protosw inet6sw[] = { .pr_protocol = IPPROTO_IPV4, .pr_flags = PR_ATOMIC|PR_ADDR|PR_LASTHDR, .pr_input = encap6_input, - .pr_output = (pr_output_t *)rip6_output, + .pr_output = rip6_output, .pr_ctloutput = rip6_ctloutput, .pr_init = encap_init, .pr_usrreqs = &rip6_usrreqs @@ -324,7 +324,7 @@ struct protosw inet6sw[] = { .pr_protocol = IPPROTO_IPV6, .pr_flags = PR_ATOMIC|PR_ADDR|PR_LASTHDR, .pr_input = encap6_input, - .pr_output = (pr_output_t *)rip6_output, + .pr_output = rip6_output, .pr_ctloutput = rip6_ctloutput, .pr_init = encap_init, .pr_usrreqs = &rip6_usrreqs @@ -335,7 +335,7 @@ struct protosw inet6sw[] = { .pr_protocol = IPPROTO_PIM, .pr_flags = PR_ATOMIC|PR_ADDR|PR_LASTHDR, .pr_input = encap6_input, - .pr_output = (pr_output_t *)rip6_output, + .pr_output = rip6_output, .pr_ctloutput = rip6_ctloutput, .pr_usrreqs = &rip6_usrreqs }, @@ -354,7 +354,7 @@ IP6PROTOSPACER, .pr_domain = &inet6domain, .pr_flags = PR_ATOMIC|PR_ADDR, .pr_input = rip6_input, - .pr_output = (pr_output_t *)rip6_output, + .pr_output = rip6_output, .pr_ctloutput = rip6_ctloutput, .pr_usrreqs = &rip6_usrreqs }, Modified: head/sys/netinet6/ip6_mroute.c ============================================================================== --- head/sys/netinet6/ip6_mroute.c Thu Aug 14 23:38:04 2014 (r270007) +++ head/sys/netinet6/ip6_mroute.c Fri Aug 15 02:43:02 2014 (r270008) @@ -146,7 +146,7 @@ static const struct protosw in6_pim_prot .pr_protocol = IPPROTO_PIM, .pr_flags = PR_ATOMIC|PR_ADDR|PR_LASTHDR, .pr_input = pim6_input, - .pr_output = (pr_output_t *)rip6_output, + .pr_output = rip6_output, .pr_ctloutput = rip6_ctloutput, .pr_usrreqs = &rip6_usrreqs }; Modified: head/sys/netipsec/keysock.c ============================================================================== --- head/sys/netipsec/keysock.c Thu Aug 14 23:38:04 2014 (r270007) +++ head/sys/netipsec/keysock.c Fri Aug 15 02:43:02 2014 (r270008) @@ -88,7 +88,7 @@ VNET_PCPUSTAT_SYSUNINIT(pfkeystat); * key_output() */ int -key_output(struct mbuf *m, struct socket *so) +key_output(struct mbuf *m, struct socket *so, ...) { struct sadb_msg *msg; int len, error = 0; Modified: head/sys/netipsec/keysock.h ============================================================================== --- head/sys/netipsec/keysock.h Thu Aug 14 23:38:04 2014 (r270007) +++ head/sys/netipsec/keysock.h Fri Aug 15 02:43:02 2014 (r270008) @@ -76,7 +76,7 @@ VNET_PCPUSTAT_DECLARE(struct pfkeystat, VNET_PCPUSTAT_ADD(struct pfkeystat, pfkeystat, name, (val)) #define PFKEYSTAT_INC(name) PFKEYSTAT_ADD(name, 1) -extern int key_output(struct mbuf *m, struct socket *so); +extern int key_output(struct mbuf *m, struct socket *so, ...); extern int key_usrreq __P((struct socket *, int, struct mbuf *, struct mbuf *, struct mbuf *)); Modified: head/sys/netpfil/pf/if_pfsync.c ============================================================================== --- head/sys/netpfil/pf/if_pfsync.c Thu Aug 14 23:38:04 2014 (r270007) +++ head/sys/netpfil/pf/if_pfsync.c Fri Aug 15 02:43:02 2014 (r270008) @@ -2281,7 +2281,7 @@ static struct protosw in_pfsync_protosw .pr_protocol = IPPROTO_PFSYNC, .pr_flags = PR_ATOMIC|PR_ADDR, .pr_input = pfsync_input, - .pr_output = (pr_output_t *)rip_output, + .pr_output = rip_output, .pr_ctloutput = rip_ctloutput, .pr_usrreqs = &rip_usrreqs }; Modified: head/sys/sys/protosw.h ============================================================================== --- head/sys/sys/protosw.h Thu Aug 14 23:38:04 2014 (r270007) +++ head/sys/sys/protosw.h Fri Aug 15 02:43:02 2014 (r270008) @@ -65,7 +65,7 @@ struct sockopt; */ /* USE THESE FOR YOUR PROTOTYPES ! */ typedef int pr_input_t (struct mbuf **, int*, int); -typedef int pr_output_t (struct mbuf *, struct socket *); +typedef int pr_output_t (struct mbuf *, struct socket *, ...); typedef void pr_ctlinput_t (int, struct sockaddr *, void *); typedef int pr_ctloutput_t (struct socket *, struct sockopt *); typedef void pr_init_t (void); From owner-svn-src-head@FreeBSD.ORG Fri Aug 15 04:35:35 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5461130B; Fri, 15 Aug 2014 04:35:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 40509213B; Fri, 15 Aug 2014 04:35:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7F4ZZxe019241; Fri, 15 Aug 2014 04:35:35 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7F4ZZCK019240; Fri, 15 Aug 2014 04:35:35 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201408150435.s7F4ZZCK019240@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 15 Aug 2014 04:35:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270010 - head/sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Aug 2014 04:35:35 -0000 Author: glebius Date: Fri Aug 15 04:35:34 2014 New Revision: 270010 URL: http://svnweb.freebsd.org/changeset/base/270010 Log: Fix synproxy with IPv6. pf_test6() was missing a check for M_SKIP_FIREWALL. PR: 127920 Submitted by: Kajetan Staszkiewicz Sponsored by: InnoGames GmbH Modified: head/sys/netpfil/pf/pf.c Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Fri Aug 15 03:52:40 2014 (r270009) +++ head/sys/netpfil/pf/pf.c Fri Aug 15 04:35:34 2014 (r270010) @@ -6066,6 +6066,9 @@ pf_test6(int dir, struct ifnet *ifp, str if (kif->pfik_flags & PFI_IFLAG_SKIP) return (PF_PASS); + if (m->m_flags & M_SKIP_FIREWALL) + return (PF_PASS); + PF_RULES_RLOCK(); /* We do IP header normalization and packet reassembly here */ From owner-svn-src-head@FreeBSD.ORG Fri Aug 15 07:30:14 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AC909957; Fri, 15 Aug 2014 07:30:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97E0E2262; Fri, 15 Aug 2014 07:30:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7F7UElj097957; Fri, 15 Aug 2014 07:30:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7F7UEW6097956; Fri, 15 Aug 2014 07:30:14 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201408150730.s7F7UEW6097956@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 15 Aug 2014 07:30:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270011 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Aug 2014 07:30:14 -0000 Author: kib Date: Fri Aug 15 07:30:14 2014 New Revision: 270011 URL: http://svnweb.freebsd.org/changeset/base/270011 Log: Implement 'fast path' for the vm page fault handler. Or, it could be called a scalable path. When several preconditions hold, the vm object lock for the object containing the faulted page is taken in read mode, instead of write, which allows parallel faults processing in the region. Namely, the fast path is taken when the faulted page already exists and does not need copy on write, is already fully valid, and not busy. For technical reasons, fast path is avoided when the fault is the first write on the vnode object, or when the fault is for wiring or debugger read or write. On the fast path, pmap_enter(9) is passed the PMAP_ENTER_NOSLEEP flag, since object lock is kept. Pmap might fail to create the entry, in which case the fallback to slow path is performed. Reviewed by: alc Tested by: pho (previous version) Hardware provided and hosted by: The FreeBSD Foundation and Sentex Data Communications Sponsored by: The FreeBSD Foundation MFC after: 2 week Modified: head/sys/vm/vm_fault.c Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Fri Aug 15 04:35:34 2014 (r270010) +++ head/sys/vm/vm_fault.c Fri Aug 15 07:30:14 2014 (r270011) @@ -237,6 +237,7 @@ vm_fault_hold(vm_map_t map, vm_offset_t int hardfault; struct faultstate fs; struct vnode *vp; + vm_page_t m; int locked, error; hardfault = 0; @@ -290,6 +291,55 @@ RetryFault:; goto RetryFault; } + if (wired) + fault_type = prot | (fault_type & VM_PROT_COPY); + + if (fs.vp == NULL /* avoid locked vnode leak */ && + (fault_flags & (VM_FAULT_CHANGE_WIRING | VM_FAULT_DIRTY)) == 0 && + /* avoid calling vm_object_set_writeable_dirty() */ + ((prot & VM_PROT_WRITE) == 0 || + fs.first_object->type != OBJT_VNODE || + (fs.first_object->flags & OBJ_MIGHTBEDIRTY) != 0)) { + VM_OBJECT_RLOCK(fs.first_object); + if ((prot & VM_PROT_WRITE) != 0 && + fs.first_object->type == OBJT_VNODE && + (fs.first_object->flags & OBJ_MIGHTBEDIRTY) == 0) + goto fast_failed; + m = vm_page_lookup(fs.first_object, fs.first_pindex); + if (m == NULL || vm_page_busied(m) || + m->valid != VM_PAGE_BITS_ALL) + goto fast_failed; + result = pmap_enter(fs.map->pmap, vaddr, m, prot, + fault_type | PMAP_ENTER_NOSLEEP | (wired ? PMAP_ENTER_WIRED : + 0), 0); + if (result != KERN_SUCCESS) + goto fast_failed; + if (m_hold != NULL) { + *m_hold = m; + vm_page_lock(m); + vm_page_hold(m); + vm_page_unlock(m); + } + if ((fault_type & VM_PROT_WRITE) != 0 && + (m->oflags & VPO_UNMANAGED) == 0) { + vm_page_dirty(m); + vm_pager_page_unswapped(m); + } + VM_OBJECT_RUNLOCK(fs.first_object); + if (!wired) + vm_fault_prefault(&fs, vaddr, 0, 0); + vm_map_lookup_done(fs.map, fs.entry); + curthread->td_ru.ru_minflt++; + return (KERN_SUCCESS); +fast_failed: + if (!VM_OBJECT_TRYUPGRADE(fs.first_object)) { + VM_OBJECT_RUNLOCK(fs.first_object); + VM_OBJECT_WLOCK(fs.first_object); + } + } else { + VM_OBJECT_WLOCK(fs.first_object); + } + /* * Make a reference to this object to prevent its disposal while we * are messing with it. Once we have the reference, the map is free @@ -300,15 +350,11 @@ RetryFault:; * truncation operations) during I/O. This must be done after * obtaining the vnode lock in order to avoid possible deadlocks. */ - VM_OBJECT_WLOCK(fs.first_object); vm_object_reference_locked(fs.first_object); vm_object_pip_add(fs.first_object, 1); fs.lookup_still_valid = TRUE; - if (wired) - fault_type = prot | (fault_type & VM_PROT_COPY); - fs.first_m = NULL; /* From owner-svn-src-head@FreeBSD.ORG Fri Aug 15 10:01:34 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 37A0EC82; Fri, 15 Aug 2014 10:01:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2289C2525; Fri, 15 Aug 2014 10:01:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7FA1YGn067432; Fri, 15 Aug 2014 10:01:34 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7FA1Xpa067431; Fri, 15 Aug 2014 10:01:34 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201408151001.s7FA1Xpa067431@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Fri, 15 Aug 2014 10:01:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270019 - head/sbin/devd/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Aug 2014 10:01:34 -0000 Author: bz Date: Fri Aug 15 10:01:33 2014 New Revision: 270019 URL: http://svnweb.freebsd.org/changeset/base/270019 Log: Remove bogus ; at the end of the if condition in order to unbreak gcc builds after r270004. MFC after: 4 days X-MFX with: r270004 Modified: head/sbin/devd/tests/client_test.c Modified: head/sbin/devd/tests/client_test.c ============================================================================== --- head/sbin/devd/tests/client_test.c Fri Aug 15 09:50:09 2014 (r270018) +++ head/sbin/devd/tests/client_test.c Fri Aug 15 10:01:33 2014 (r270019) @@ -168,11 +168,11 @@ ATF_TC_BODY(stream, tc) printf("%s", event); create_pos = strstr(event, create_pat); - if (create_pos != NULL); + if (create_pos != NULL) got_create_event = true; destroy_pos = strstr(event, destroy_pat); - if (destroy_pos != NULL); + if (destroy_pos != NULL) got_destroy_event = true; } From owner-svn-src-head@FreeBSD.ORG Fri Aug 15 14:02:25 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F67D402; Fri, 15 Aug 2014 14:02:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3AB91221B; Fri, 15 Aug 2014 14:02:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7FE2P7x086884; Fri, 15 Aug 2014 14:02:25 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7FE2OHB086882; Fri, 15 Aug 2014 14:02:24 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201408151402.s7FE2OHB086882@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 15 Aug 2014 14:02:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270022 - head/sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Aug 2014 14:02:25 -0000 Author: glebius Date: Fri Aug 15 14:02:24 2014 New Revision: 270022 URL: http://svnweb.freebsd.org/changeset/base/270022 Log: pf_map_addr() can fail and in this case we should drop the packet, otherwise bad consequences including a routing loop can occur. Move pf_set_rt_ifp() earlier in state creation sequence and inline it, cutting some extra code. PR: 183997 Submitted by: Kajetan Staszkiewicz Sponsored by: InnoGames GmbH Modified: head/sys/netpfil/pf/pf.c head/sys/netpfil/pf/pf.h Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Fri Aug 15 12:58:32 2014 (r270021) +++ head/sys/netpfil/pf/pf.c Fri Aug 15 14:02:24 2014 (r270022) @@ -266,8 +266,6 @@ static u_int16_t pf_get_mss(struct mbuf sa_family_t); static u_int16_t pf_calc_mss(struct pf_addr *, sa_family_t, int, u_int16_t); -static void pf_set_rt_ifp(struct pf_state *, - struct pf_addr *); static int pf_check_proto_cksum(struct mbuf *, int, int, u_int8_t, sa_family_t); static void pf_print_state_parts(struct pf_state *, @@ -2957,31 +2955,6 @@ pf_calc_mss(struct pf_addr *addr, sa_fam return (mss); } -static void -pf_set_rt_ifp(struct pf_state *s, struct pf_addr *saddr) -{ - struct pf_rule *r = s->rule.ptr; - struct pf_src_node *sn = NULL; - - s->rt_kif = NULL; - if (!r->rt || r->rt == PF_FASTROUTE) - return; - switch (s->key[PF_SK_WIRE]->af) { -#ifdef INET - case AF_INET: - pf_map_addr(AF_INET, r, saddr, &s->rt_addr, NULL, &sn); - s->rt_kif = r->rpool.cur->kif; - break; -#endif /* INET */ -#ifdef INET6 - case AF_INET6: - pf_map_addr(AF_INET6, r, saddr, &s->rt_addr, NULL, &sn); - s->rt_kif = r->rpool.cur->kif; - break; -#endif /* INET6 */ - } -} - static u_int32_t pf_tcp_iss(struct pf_pdesc *pd) { @@ -3544,6 +3517,19 @@ pf_create_state(struct pf_rule *r, struc s->timeout = PFTM_OTHER_FIRST_PACKET; } + if (r->rt && r->rt != PF_FASTROUTE) { + struct pf_src_node *sn = NULL; + + if (pf_map_addr(pd->af, r, pd->src, &s->rt_addr, NULL, &sn)) { + REASON_SET(&reason, PFRES_MAPFAILED); + pf_src_tree_remove_state(s); + STATE_DEC_COUNTERS(s); + uma_zfree(V_pf_state_z, s); + goto csfailed; + } + s->rt_kif = r->rpool.cur->kif; + } + s->creation = time_uptime; s->expire = time_uptime; @@ -3609,7 +3595,6 @@ pf_create_state(struct pf_rule *r, struc } else *sm = s; - pf_set_rt_ifp(s, pd->src); /* needs s->state_key set */ if (tag > 0) s->tag = tag; if (pd->proto == IPPROTO_TCP && (th->th_flags & (TH_SYN|TH_ACK)) == Modified: head/sys/netpfil/pf/pf.h ============================================================================== --- head/sys/netpfil/pf/pf.h Fri Aug 15 12:58:32 2014 (r270021) +++ head/sys/netpfil/pf/pf.h Fri Aug 15 14:02:24 2014 (r270022) @@ -124,7 +124,8 @@ enum { PF_ADDR_ADDRMASK, PF_ADDR_NOROUTE #define PFRES_MAXSTATES 12 /* State limit */ #define PFRES_SRCLIMIT 13 /* Source node/conn limit */ #define PFRES_SYNPROXY 14 /* SYN proxy */ -#define PFRES_MAX 15 /* total+1 */ +#define PFRES_MAPFAILED 15 /* pf_map_addr() failed */ +#define PFRES_MAX 16 /* total+1 */ #define PFRES_NAMES { \ "match", \ @@ -142,6 +143,7 @@ enum { PF_ADDR_ADDRMASK, PF_ADDR_NOROUTE "state-limit", \ "src-limit", \ "synproxy", \ + "map-failed", \ NULL \ } From owner-svn-src-head@FreeBSD.ORG Fri Aug 15 14:11:02 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D0355C67; Fri, 15 Aug 2014 14:11:02 +0000 (UTC) Received: from nibbler.fubar.geek.nz (nibbler.fubar.geek.nz [199.48.134.198]) by mx1.freebsd.org (Postfix) with ESMTP id B38D123FE; Fri, 15 Aug 2014 14:11:02 +0000 (UTC) Received: from bender.lan (97e07ab1.skybroadband.com [151.224.122.177]) by nibbler.fubar.geek.nz (Postfix) with ESMTPSA id DBF665DEC1; Fri, 15 Aug 2014 14:10:55 +0000 (UTC) Date: Fri, 15 Aug 2014 15:10:47 +0100 From: Andrew Turner To: Warner Losh Subject: Re: svn commit: r269957 - in head/sys: arm/at91 conf Message-ID: <20140815151047.08a00232@bender.lan> In-Reply-To: <201408140421.s7E4LFdf046343@svn.freebsd.org> References: <201408140421.s7E4LFdf046343@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Aug 2014 14:11:02 -0000 On Thu, 14 Aug 2014 04:21:15 +0000 (UTC) Warner Losh wrote: > Author: imp > Date: Thu Aug 14 04:21:14 2014 > New Revision: 269957 > URL: http://svnweb.freebsd.org/changeset/base/269957 > > Log: > Add support for FDT and !FDT configs on Atmel, though FDT isn't > working yet. > Bump rev on arm Makefile since files.at91 uses new '!' operator. > > Modified: > head/sys/arm/at91/files.at91 > head/sys/conf/Makefile.arm > > Modified: head/sys/arm/at91/files.at91 > ============================================================================== > --- head/sys/arm/at91/files.at91 Thu Aug 14 04:20:13 > 2014 (r269956) +++ head/sys/arm/at91/files.at91 Thu Aug > 14 04:21:14 2014 (r269957) @@ -3,28 +3,34 @@ > arm/arm/cpufunc_asm_arm9.S standard > arm/at91/at91_machdep.c standard > arm/at91/at91_aic.c standard > arm/at91/at91.c standard > -arm/at91/at91_cfata.c optional at91_cfata > -arm/at91/at91_mci.c optional at91_mci > -dev/nand/nfc_at91.c optional nand > +arm/at91/at91_aic.c standard > arm/at91/at91_pio.c standard > arm/at91/at91_pmc.c standard > +arm/at91/at91_smc.c standard > +arm/at91/at91_cfata.c optional at91_cfata > +arm/at91/at91_common.c optional fdt > +arm/at91/at91_mci.c optional at91_mci > +arm/at91/at91_pinctrl.c optional fdt This file is missing from the repo breaking LINT. Andrew From owner-svn-src-head@FreeBSD.ORG Fri Aug 15 14:16:09 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55036F74; Fri, 15 Aug 2014 14:16:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 289B124FD; Fri, 15 Aug 2014 14:16:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7FEG91u091830; Fri, 15 Aug 2014 14:16:09 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7FEG8Zu091828; Fri, 15 Aug 2014 14:16:08 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201408151416.s7FEG8Zu091828@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 15 Aug 2014 14:16:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270023 - head/sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Aug 2014 14:16:09 -0000 Author: glebius Date: Fri Aug 15 14:16:08 2014 New Revision: 270023 URL: http://svnweb.freebsd.org/changeset/base/270023 Log: Do not lookup source node twice when pf_map_addr() is used. PR: 184003 Submitted by: Kajetan Staszkiewicz Sponsored by: InnoGames GmbH Modified: head/sys/netpfil/pf/pf.c head/sys/netpfil/pf/pf_lb.c Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Fri Aug 15 14:02:24 2014 (r270022) +++ head/sys/netpfil/pf/pf.c Fri Aug 15 14:16:08 2014 (r270023) @@ -3518,8 +3518,6 @@ pf_create_state(struct pf_rule *r, struc } if (r->rt && r->rt != PF_FASTROUTE) { - struct pf_src_node *sn = NULL; - if (pf_map_addr(pd->af, r, pd->src, &s->rt_addr, NULL, &sn)) { REASON_SET(&reason, PFRES_MAPFAILED); pf_src_tree_remove_state(s); Modified: head/sys/netpfil/pf/pf_lb.c ============================================================================== --- head/sys/netpfil/pf/pf_lb.c Fri Aug 15 14:02:24 2014 (r270022) +++ head/sys/netpfil/pf/pf_lb.c Fri Aug 15 14:16:08 2014 (r270023) @@ -310,22 +310,30 @@ pf_map_addr(sa_family_t af, struct pf_ru struct pf_pool *rpool = &r->rpool; struct pf_addr *raddr = NULL, *rmask = NULL; + /* Try to find a src_node if none was given and this + is a sticky-address rule. */ if (*sn == NULL && r->rpool.opts & PF_POOL_STICKYADDR && - (r->rpool.opts & PF_POOL_TYPEMASK) != PF_POOL_NONE) { + (r->rpool.opts & PF_POOL_TYPEMASK) != PF_POOL_NONE) *sn = pf_find_src_node(saddr, r, af, 0); - if (*sn != NULL && !PF_AZERO(&(*sn)->raddr, af)) { - PF_ACPY(naddr, &(*sn)->raddr, af); - if (V_pf_status.debug >= PF_DEBUG_MISC) { - printf("pf_map_addr: src tracking maps "); - pf_print_host(saddr, 0, af); - printf(" to "); - pf_print_host(naddr, 0, af); - printf("\n"); - } - return (0); + + /* If a src_node was found or explicitly given and it has a non-zero + route address, use this address. A zeroed address is found if the + src node was created just a moment ago in pf_create_state and it + needs to be filled in with routing decision calculated here. */ + if (*sn != NULL && !PF_AZERO(&(*sn)->raddr, af)) { + PF_ACPY(naddr, &(*sn)->raddr, af); + if (V_pf_status.debug >= PF_DEBUG_MISC) { + printf("pf_map_addr: src tracking maps "); + pf_print_host(saddr, 0, af); + printf(" to "); + pf_print_host(naddr, 0, af); + printf("\n"); } + return (0); } + /* Find the route using chosen algorithm. Store the found route + in src_node if it was given or found. */ if (rpool->cur->addr.type == PF_ADDR_NOROUTE) return (1); if (rpool->cur->addr.type == PF_ADDR_DYNIFTL) { From owner-svn-src-head@FreeBSD.ORG Fri Aug 15 15:36:18 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 220533BC for ; Fri, 15 Aug 2014 15:36:18 +0000 (UTC) Received: from mail-ig0-f180.google.com (mail-ig0-f180.google.com [209.85.213.180]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DAB552FF4 for ; Fri, 15 Aug 2014 15:36:17 +0000 (UTC) Received: by mail-ig0-f180.google.com with SMTP id l13so2143327iga.1 for ; Fri, 15 Aug 2014 08:36:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=gM+Ey6va9YuA8Jg+KxJcC8V07prkL3LzrjDVrQxVWXs=; b=XKQnWi6aKJzBwFpxUH09TE+/Dyuk9YWyHguQJZNWj9kD+PKqsM6rHxX2XKGaw0YZDV DAPzPYVFXc8n2uxgfGhcYuFYGyb0dM3mHvv3UF1rtH6qf2ajYvhWepnohF5J0p3BBj2m /MoDadfKatWlJpbOLJ+63vWOyekqdTXcuvr2lF9mS9HrG5wWlpEO5QIL/tFt7pij6YuJ sVtrNiQCol5tHl7CF5TooWomI4N58GaYZ+1ktR+DWe6s7HPFwj927RFHef2WGuRgT2v3 6TerMKO3h1/pe6DMYVmEOo4mUfLU5gA+cVmCETELmxoItb+mjSG05XP4aJcPS5c7Dphw ly0Q== X-Gm-Message-State: ALoCoQnXik+qmUFeubSTO0XGbmjDMX+8bftsSD/JiKy9SL9fSLH6DXlkuFb3O541llBXznnbjdIR X-Received: by 10.43.70.205 with SMTP id yh13mr22007515icb.44.1408116971097; Fri, 15 Aug 2014 08:36:11 -0700 (PDT) Received: from bsdimp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPSA id d10sm8977350igl.13.2014.08.15.08.36.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 15 Aug 2014 08:36:10 -0700 (PDT) Sender: Warner Losh Content-Type: multipart/signed; boundary="Apple-Mail=_964CE696-836F-4151-9E6B-13ABFC34EF46"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r269957 - in head/sys: arm/at91 conf From: Warner Losh In-Reply-To: <20140815151047.08a00232@bender.lan> Date: Fri, 15 Aug 2014 09:36:08 -0600 Message-Id: <53897115-2A9D-4997-8ABD-18D5FDC0787E@bsdimp.com> References: <201408140421.s7E4LFdf046343@svn.freebsd.org> <20140815151047.08a00232@bender.lan> To: Andrew Turner X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Warner Losh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Aug 2014 15:36:18 -0000 --Apple-Mail=_964CE696-836F-4151-9E6B-13ABFC34EF46 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Aug 15, 2014, at 8:10 AM, Andrew Turner wrote: > On Thu, 14 Aug 2014 04:21:15 +0000 (UTC) > Warner Losh wrote: >=20 >> Author: imp >> Date: Thu Aug 14 04:21:14 2014 >> New Revision: 269957 >> URL: http://svnweb.freebsd.org/changeset/base/269957 >>=20 >> Log: >> Add support for FDT and !FDT configs on Atmel, though FDT isn't >> working yet. >> Bump rev on arm Makefile since files.at91 uses new '!' operator. >>=20 >> Modified: >> head/sys/arm/at91/files.at91 >> head/sys/conf/Makefile.arm >>=20 >> Modified: head/sys/arm/at91/files.at91 >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/arm/at91/files.at91 Thu Aug 14 04:20:13 >> 2014 (r269956) +++ head/sys/arm/at91/files.at91 Thu Aug >> 14 04:21:14 2014 (r269957) @@ -3,28 +3,34 @@ >> arm/arm/cpufunc_asm_arm9.S standard >> arm/at91/at91_machdep.c standard >> arm/at91/at91_aic.c standard >> arm/at91/at91.c standard >> -arm/at91/at91_cfata.c optional at91_cfata >> -arm/at91/at91_mci.c optional at91_mci >> -dev/nand/nfc_at91.c optional nand >> +arm/at91/at91_aic.c standard >> arm/at91/at91_pio.c standard >> arm/at91/at91_pmc.c standard >> +arm/at91/at91_smc.c standard >> +arm/at91/at91_cfata.c optional at91_cfata >> +arm/at91/at91_common.c optional fdt >> +arm/at91/at91_mci.c optional at91_mci >> +arm/at91/at91_pinctrl.c optional fdt >=20 > This file is missing from the repo breaking LINT. I have it locally and wanted to work on it a bit more, but I=92ll go = ahead and push it in. I didn=92t think it would active w/o FDT, but = didn=92t think of the LINT case. Warner --Apple-Mail=_964CE696-836F-4151-9E6B-13ABFC34EF46 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJT7ijoAAoJEGwc0Sh9sBEAVvMP/2GuCCdE2KRp+AZCUl9gHtVL mSxNKqrNBK91Jr64ux+lF0i5MuSssy0cOoluJaANkzzkGw7X5bFx9TwCnlIJLlXi ib7ZBN3qihztJelscZHHKHn72CGhwaSAWj4X50OZcwHZfJsrRBdN7jQMT59Ngp7C 2pgJ3boo3tcBzBWW9taVbwRXKej2XgQTrjd/gKvvrj35k2bxaerZZXbiMDO+M7yI IxmDhdgvKRRvyB8Ms2uaVvf+vpVtWJQiQxkpQWNU/ykfdkm3JKTJCI/GEJGHRgcp Lz//QKJyQK8h57+fRg1t48vXhGykxYPRkucci48pBAJuNY23G2sSW/aRLZImkyno nuGEnZzMKYbS6BrR0hPg4nxcFL93sz8kRAFL6S9jYDM6SE5llJ3cbd+NRgCdIdo4 +iNlbE8lRyuiuqECImgMNnVu5X1/PjO3C9GAgjv/Irml4+j2wmqhdtWIdx7e4mQR rovs0g80emmphUDgWoIrQKhmg7GtX64zQxDoO348TmXaVYfxVaGTKH5K6gSzv053 en+S4VYXXxptMUtamIF/Cy3d6PkrXLlee/GJHH/EspUW+9+SE/H1DV522p7NrdEW q6x7YhWoFfHjnXFNxGxqBb7cbHIs8VrYohXHnyUFlrRUGmpXoqcw0IvofaHSlRXU +uR0os1t6SeguCY5KKhX =dx5q -----END PGP SIGNATURE----- --Apple-Mail=_964CE696-836F-4151-9E6B-13ABFC34EF46-- From owner-svn-src-head@FreeBSD.ORG Fri Aug 15 15:42:58 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E00736EA; Fri, 15 Aug 2014 15:42:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CBCD020D1; Fri, 15 Aug 2014 15:42:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7FFgwaD033051; Fri, 15 Aug 2014 15:42:58 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7FFgw4u033050; Fri, 15 Aug 2014 15:42:58 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201408151542.s7FFgw4u033050@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 15 Aug 2014 15:42:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270024 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Aug 2014 15:42:59 -0000 Author: markj Date: Fri Aug 15 15:42:58 2014 New Revision: 270024 URL: http://svnweb.freebsd.org/changeset/base/270024 Log: Correct the order of arguments passed to LIST_INSERT_AFTER(). Reviewed by: kib X-MFC-With: r269656 Modified: head/sys/kern/kern_exit.c Modified: head/sys/kern/kern_exit.c ============================================================================== --- head/sys/kern/kern_exit.c Fri Aug 15 14:16:08 2014 (r270023) +++ head/sys/kern/kern_exit.c Fri Aug 15 15:42:58 2014 (r270024) @@ -1278,8 +1278,8 @@ proc_reparent(struct proc *child, struct LIST_INSERT_HEAD(&child->p_pptr->p_orphans, child, p_orphan); } else { - LIST_INSERT_AFTER(child, - LIST_FIRST(&child->p_pptr->p_orphans), p_orphan); + LIST_INSERT_AFTER(LIST_FIRST(&child->p_pptr->p_orphans), + child, p_orphan); } child->p_treeflag |= P_TREE_ORPHANED; } From owner-svn-src-head@FreeBSD.ORG Fri Aug 15 16:08:53 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4868467C; Fri, 15 Aug 2014 16:08:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 332CC24A0; Fri, 15 Aug 2014 16:08:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7FG8rG9043820; Fri, 15 Aug 2014 16:08:53 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7FG8q61043817; Fri, 15 Aug 2014 16:08:52 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201408151608.s7FG8q61043817@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 15 Aug 2014 16:08:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270025 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Aug 2014 16:08:53 -0000 Author: imp Date: Fri Aug 15 16:08:52 2014 New Revision: 270025 URL: http://svnweb.freebsd.org/changeset/base/270025 Log: Implement the FDT static pinctl/pinmux spec for Atmel. This will configure the mux and config registers for PIO devices based on what we find in the FDT. I developed it per the spec that had been committed to Linux in the January 2014 time frame and haven't updated. In short, bundles of pins are activated in specific ways for specific configurations, and we implement all of that. What's not included is a MI device infrastructure, any dynamic run-time changing of these pins, etc. Also not included are hooks into all the drivers to enable the latter (static at boot no driver changes are needed). These larger questions will need to be answered once we have more drivers like this for more platforms, or somebody has a heck of a lot of time to research a bunch of platforms, the Linux solution (which is good, but has its warts), etc. Added: head/sys/arm/at91/at91_pinctrl.c (contents, props changed) Modified: head/sys/arm/at91/at91_pio.c head/sys/arm/at91/at91_piovar.h Added: head/sys/arm/at91/at91_pinctrl.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/at91/at91_pinctrl.c Fri Aug 15 16:08:52 2014 (r270025) @@ -0,0 +1,524 @@ +/*- + * Copyright (c) 2014 Warner Losh. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include +#include +#include +#include + +#define BUS_PASS_PINMUX (BUS_PASS_INTERRUPT + 1) + +struct pinctrl_range { + uint64_t bus; + uint64_t host; + uint64_t size; +}; + +struct pinctrl_softc { + device_t dev; + phandle_t node; + + struct pinctrl_range *ranges; + int nranges; + + pcell_t acells, scells; + int done_pinmux; +}; + +struct pinctrl_devinfo { + struct ofw_bus_devinfo obdinfo; + struct resource_list rl; +}; + +static int +at91_pinctrl_probe(device_t dev) +{ + + if (!ofw_bus_is_compatible(dev, "atmel,at91rm9200-pinctrl")) + return (ENXIO); + device_set_desc(dev, "pincontrol bus"); + return (0); +} + +/* XXX Make this a subclass of simplebus */ + +static struct pinctrl_devinfo * +at91_pinctrl_setup_dinfo(device_t dev, phandle_t node) +{ + struct pinctrl_softc *sc; + struct pinctrl_devinfo *ndi; + uint32_t *reg, *intr, icells; + uint64_t phys, size; + phandle_t iparent; + int i, j, k; + int nintr; + int nreg; + + sc = device_get_softc(dev); + + ndi = malloc(sizeof(*ndi), M_DEVBUF, M_WAITOK | M_ZERO); + if (ofw_bus_gen_setup_devinfo(&ndi->obdinfo, node) != 0) { + free(ndi, M_DEVBUF); + return (NULL); + } + + resource_list_init(&ndi->rl); + nreg = OF_getencprop_alloc(node, "reg", sizeof(*reg), (void **)®); + if (nreg == -1) + nreg = 0; + if (nreg % (sc->acells + sc->scells) != 0) { +// if (bootverbose) + device_printf(dev, "Malformed reg property on <%s>\n", + ndi->obdinfo.obd_name); + nreg = 0; + } + + for (i = 0, k = 0; i < nreg; i += sc->acells + sc->scells, k++) { + phys = size = 0; + for (j = 0; j < sc->acells; j++) { + phys <<= 32; + phys |= reg[i + j]; + } + for (j = 0; j < sc->scells; j++) { + size <<= 32; + size |= reg[i + sc->acells + j]; + } + + resource_list_add(&ndi->rl, SYS_RES_MEMORY, k, + phys, phys + size - 1, size); + } + free(reg, M_OFWPROP); + + nintr = OF_getencprop_alloc(node, "interrupts", sizeof(*intr), + (void **)&intr); + if (nintr > 0) { + if (OF_searchencprop(node, "interrupt-parent", &iparent, + sizeof(iparent)) == -1) { + device_printf(dev, "No interrupt-parent found, " + "assuming direct parent\n"); + iparent = OF_parent(node); + } + if (OF_searchencprop(OF_xref_phandle(iparent), + "#interrupt-cells", &icells, sizeof(icells)) == -1) { + device_printf(dev, "Missing #interrupt-cells property, " + "assuming <1>\n"); + icells = 1; + } + if (icells < 1 || icells > nintr) { + device_printf(dev, "Invalid #interrupt-cells property " + "value <%d>, assuming <1>\n", icells); + icells = 1; + } + for (i = 0, k = 0; i < nintr; i += icells, k++) { + intr[i] = ofw_bus_map_intr(dev, iparent, icells, + &intr[i]); + resource_list_add(&ndi->rl, SYS_RES_IRQ, k, intr[i], + intr[i], 1); + } + free(intr, M_OFWPROP); + } + + return (ndi); +} + +static int +at91_pinctrl_fill_ranges(phandle_t node, struct pinctrl_softc *sc) +{ + int host_address_cells; + cell_t *base_ranges; + ssize_t nbase_ranges; + int err; + int i, j, k; + + err = OF_searchencprop(OF_parent(node), "#address-cells", + &host_address_cells, sizeof(host_address_cells)); + if (err <= 0) + return (-1); + + nbase_ranges = OF_getproplen(node, "ranges"); + if (nbase_ranges < 0) + return (-1); + sc->nranges = nbase_ranges / sizeof(cell_t) / + (sc->acells + host_address_cells + sc->scells); + if (sc->nranges == 0) + return (0); + + sc->ranges = malloc(sc->nranges * sizeof(sc->ranges[0]), + M_DEVBUF, M_WAITOK); + base_ranges = malloc(nbase_ranges, M_DEVBUF, M_WAITOK); + OF_getencprop(node, "ranges", base_ranges, nbase_ranges); + + for (i = 0, j = 0; i < sc->nranges; i++) { + sc->ranges[i].bus = 0; + for (k = 0; k < sc->acells; k++) { + sc->ranges[i].bus <<= 32; + sc->ranges[i].bus |= base_ranges[j++]; + } + sc->ranges[i].host = 0; + for (k = 0; k < host_address_cells; k++) { + sc->ranges[i].host <<= 32; + sc->ranges[i].host |= base_ranges[j++]; + } + sc->ranges[i].size = 0; + for (k = 0; k < sc->scells; k++) { + sc->ranges[i].size <<= 32; + sc->ranges[i].size |= base_ranges[j++]; + } + } + + free(base_ranges, M_DEVBUF); + return (sc->nranges); +} + +static int +at91_pinctrl_attach(device_t dev) +{ + struct pinctrl_softc *sc; + struct pinctrl_devinfo *di; + phandle_t node; + device_t cdev; + + sc = device_get_softc(dev); + node = ofw_bus_get_node(dev); + + sc->dev = dev; + sc->node = node; + + /* + * Some important numbers + */ + sc->acells = 2; + OF_getencprop(node, "#address-cells", &sc->acells, sizeof(sc->acells)); + sc->scells = 1; + OF_getencprop(node, "#size-cells", &sc->scells, sizeof(sc->scells)); + + if (at91_pinctrl_fill_ranges(node, sc) < 0) { + device_printf(dev, "could not get ranges\n"); + return (ENXIO); + } + + for (node = OF_child(node); node > 0; node = OF_peer(node)) { + if ((di = at91_pinctrl_setup_dinfo(dev, node)) == NULL) + continue; + cdev = device_add_child(dev, NULL, -1); + if (cdev == NULL) { + device_printf(dev, "<%s>: device_add_child failed\n", + di->obdinfo.obd_name); + resource_list_free(&di->rl); + ofw_bus_gen_destroy_devinfo(&di->obdinfo); + free(di, M_DEVBUF); + continue; + } + device_set_ivars(cdev, di); + } + + return (bus_generic_attach(dev)); +} + +static const struct ofw_bus_devinfo * +pinctrl_get_devinfo(device_t bus __unused, device_t child) +{ + struct pinctrl_devinfo *ndi; + + ndi = device_get_ivars(child); + return (&ndi->obdinfo); +} + +static struct resource * +pinctrl_alloc_resource(device_t bus, device_t child, int type, int *rid, + u_long start, u_long end, u_long count, u_int flags) +{ + struct pinctrl_softc *sc; + struct pinctrl_devinfo *di; + struct resource_list_entry *rle; + int j; + + sc = device_get_softc(bus); + + /* + * Request for the default allocation with a given rid: use resource + * list stored in the local device info. + */ + if ((start == 0UL) && (end == ~0UL)) { + if ((di = device_get_ivars(child)) == NULL) + return (NULL); + + if (type == SYS_RES_IOPORT) + type = SYS_RES_MEMORY; + + rle = resource_list_find(&di->rl, type, *rid); + if (rle == NULL) { +// if (bootverbose) + device_printf(bus, "no default resources for " + "rid = %d, type = %d\n", *rid, type); + return (NULL); + } + start = rle->start; + end = rle->end; + count = rle->count; + } + + if (type == SYS_RES_MEMORY) { + /* Remap through ranges property */ + for (j = 0; j < sc->nranges; j++) { + if (start >= sc->ranges[j].bus && end < + sc->ranges[j].bus + sc->ranges[j].size) { + start -= sc->ranges[j].bus; + start += sc->ranges[j].host; + end -= sc->ranges[j].bus; + end += sc->ranges[j].host; + break; + } + } + if (j == sc->nranges && sc->nranges != 0) { +// if (bootverbose) + device_printf(bus, "Could not map resource " + "%#lx-%#lx\n", start, end); + + return (NULL); + } + } + + return (bus_generic_alloc_resource(bus, child, type, rid, start, end, + count, flags)); +} + +static int +pinctrl_print_res(struct pinctrl_devinfo *di) +{ + int rv; + + rv = 0; + rv += resource_list_print_type(&di->rl, "mem", SYS_RES_MEMORY, "%#lx"); + rv += resource_list_print_type(&di->rl, "irq", SYS_RES_IRQ, "%ld"); + return (rv); +} + +static void +pinctrl_probe_nomatch(device_t bus, device_t child) +{ + const char *name, *type, *compat; + +// if (!bootverbose) + return; + + name = ofw_bus_get_name(child); + type = ofw_bus_get_type(child); + compat = ofw_bus_get_compat(child); + + device_printf(bus, "<%s>", name != NULL ? name : "unknown"); + pinctrl_print_res(device_get_ivars(child)); + if (!ofw_bus_status_okay(child)) + printf(" disabled"); + if (type) + printf(" type %s", type); + if (compat) + printf(" compat %s", compat); + printf(" (no driver attached)\n"); +} + +static int +pinctrl_print_child(device_t bus, device_t child) +{ + int rv; + + rv = bus_print_child_header(bus, child); + rv += pinctrl_print_res(device_get_ivars(child)); + if (!ofw_bus_status_okay(child)) + rv += printf(" disabled"); + rv += bus_print_child_footer(bus, child); + return (rv); +} + +const char *periphs[] = {"gpio", "periph A", "periph B", "periph C", "periph D", "periph E" }; + +static void +pinctrl_walk_tree(device_t bus, phandle_t node) +{ + struct pinctrl_softc *sc; + char status[10]; + char name[32]; + phandle_t pinctrl[32], pins[32 * 4], scratch; + ssize_t len, npins; + int i, j; + + sc = device_get_softc(bus); + for (node = OF_child(node); node > 0; node = OF_peer(node)) { + pinctrl_walk_tree(bus, node); + memset(status, 0, sizeof(status)); + memset(name, 0, sizeof(name)); + OF_getprop(node, "status", status, sizeof(status)); + OF_getprop(node, "name", name, sizeof(name)); + if (strcmp(status, "okay") != 0) { +// printf("pinctrl: omitting node %s since it isn't active\n", name); + continue; + } + len = OF_getencprop(node, "pinctrl-0", pinctrl, sizeof(pinctrl)); + if (len <= 0) { +// printf("pinctrl: no pinctrl-0 property for node %s, omitting\n", name); + continue; + } + len /= sizeof(phandle_t); + printf("pinctrl: Found active node %s\n", name); + for (i = 0; i < len; i++) { + scratch = OF_xref_phandle(pinctrl[i]); + npins = OF_getencprop(scratch, "atmel,pins", pins, sizeof(pins)); + if (npins <= 0) { + printf("We're doing it wrong %s\n", name); + continue; + } + memset(name, 0, sizeof(name)); + OF_getprop(scratch, "name", name, sizeof(name)); + npins /= (4 * 4); + printf("----> need to cope with %d more pins for %s\n", npins, name); + for (j = 0; j < npins; j++) { + uint32_t unit = pins[j * 4]; + uint32_t pin = pins[j * 4 + 1]; + uint32_t periph = pins[j * 4 + 2]; + uint32_t flags = pins[j * 4 + 3]; + uint32_t pio = (0xfffffff & sc->ranges[0].bus) + 0x200 * unit; + printf("P%c%d %s %#x\n", unit + 'A', pin, periphs[periph], + flags); + switch (periph) { + case 0: + at91_pio_use_gpio(pio, 1u << pin); + at91_pio_gpio_pullup(pio, 1u << pin, !!(flags & 1)); + at91_pio_gpio_high_z(pio, 1u << pin, !!(flags & 2)); + at91_pio_gpio_set_deglitch(pio, 1u << pin, !!(flags & 4)); + // at91_pio_gpio_pulldown(pio, 1u << pin, !!(flags & 8)); + // at91_pio_gpio_dis_schmidt(pio, 1u << pin, !!(flags & 16)); + break; + case 1: + at91_pio_use_periph_a(pio, 1u << pin, flags); + break; + case 2: + at91_pio_use_periph_b(pio, 1u << pin, flags); + break; + } + } + } + } +} + +static void +pinctrl_new_pass(device_t bus) +{ + struct pinctrl_softc *sc; + phandle_t node; + + sc = device_get_softc(bus); + + bus_generic_new_pass(bus); + + if (sc->done_pinmux || bus_current_pass < BUS_PASS_PINMUX) + return; + sc->done_pinmux++; + + node = OF_peer(0); + if (node == -1) + return; + pinctrl_walk_tree(bus, node); +} + +static device_method_t at91_pinctrl_methods[] = { + DEVMETHOD(device_probe, at91_pinctrl_probe), + DEVMETHOD(device_attach, at91_pinctrl_attach), + + DEVMETHOD(bus_print_child, pinctrl_print_child), + DEVMETHOD(bus_probe_nomatch, pinctrl_probe_nomatch), + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), + DEVMETHOD(bus_alloc_resource, pinctrl_alloc_resource), + DEVMETHOD(bus_release_resource, bus_generic_release_resource), + DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), + DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), + DEVMETHOD(bus_child_pnpinfo_str, ofw_bus_gen_child_pnpinfo_str), + DEVMETHOD(bus_new_pass, pinctrl_new_pass), + + /* ofw_bus interface */ + DEVMETHOD(ofw_bus_get_devinfo, pinctrl_get_devinfo), + DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat), + DEVMETHOD(ofw_bus_get_model, ofw_bus_gen_get_model), + DEVMETHOD(ofw_bus_get_name, ofw_bus_gen_get_name), + DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), + DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), + + DEVMETHOD_END +}; + +static driver_t at91_pinctrl_driver = { + "at91_pinctrl", + at91_pinctrl_methods, + sizeof(struct pinctrl_softc), +}; + +static devclass_t at91_pinctrl_devclass; + +EARLY_DRIVER_MODULE(at91_pinctrl, simplebus, at91_pinctrl_driver, at91_pinctrl_devclass, + NULL, NULL, BUS_PASS_BUS); + +/* + * dummy driver to force pass BUS_PASS_PINMUX to happen. + */ +static int +at91_pingroup_probe(device_t dev) +{ + return ENXIO; +} + +static device_method_t at91_pingroup_methods[] = { + DEVMETHOD(device_probe, at91_pingroup_probe), + + DEVMETHOD_END +}; + + +static driver_t at91_pingroup_driver = { + "at91_pingroup", + at91_pingroup_methods, + 0, +}; + +static devclass_t at91_pingroup_devclass; + +EARLY_DRIVER_MODULE(at91_pingroup, at91_pinctrl, at91_pingroup_driver, at91_pingroup_devclass, + NULL, NULL, BUS_PASS_PINMUX); Modified: head/sys/arm/at91/at91_pio.c ============================================================================== --- head/sys/arm/at91/at91_pio.c Fri Aug 15 15:42:58 2014 (r270024) +++ head/sys/arm/at91/at91_pio.c Fri Aug 15 16:08:52 2014 (r270025) @@ -591,6 +591,17 @@ at91_pio_gpio_set_deglitch(uint32_t pio, } void +at91_pio_gpio_pullup(uint32_t pio, uint32_t data_mask, int do_pullup) +{ + uint32_t *PIO = (uint32_t *)(AT91_BASE + pio); + + if (do_pullup) + PIO[PIO_PUER / 4] = data_mask; + else + PIO[PIO_PUDR / 4] = data_mask; +} + +void at91_pio_gpio_set_interrupt(uint32_t pio, uint32_t data_mask, int enable_interrupt) { @@ -611,12 +622,21 @@ at91_pio_gpio_clear_interrupt(uint32_t p return (PIO[PIO_ISR / 4]); } +static void +at91_pio_new_pass(device_t dev) +{ + + device_printf(dev, "Pass %d\n", bus_current_pass); +} + static device_method_t at91_pio_methods[] = { /* Device interface */ DEVMETHOD(device_probe, at91_pio_probe), DEVMETHOD(device_attach, at91_pio_attach), DEVMETHOD(device_detach, at91_pio_detach), + DEVMETHOD(bus_new_pass, at91_pio_new_pass), + DEVMETHOD_END }; @@ -626,10 +646,5 @@ static driver_t at91_pio_driver = { sizeof(struct at91_pio_softc), }; -#ifdef FDT -DRIVER_MODULE(at91_pio, simplebus, at91_pio_driver, at91_pio_devclass, NULL, - NULL); -#else -DRIVER_MODULE(at91_pio, atmelarm, at91_pio_driver, at91_pio_devclass, NULL, - NULL); -#endif +EARLY_DRIVER_MODULE(at91_pio, at91_pinctrl, at91_pio_driver, at91_pio_devclass, + NULL, NULL, BUS_PASS_INTERRUPT); Modified: head/sys/arm/at91/at91_piovar.h ============================================================================== --- head/sys/arm/at91/at91_piovar.h Fri Aug 15 15:42:58 2014 (r270024) +++ head/sys/arm/at91/at91_piovar.h Fri Aug 15 16:08:52 2014 (r270025) @@ -45,5 +45,6 @@ void at91_pio_gpio_set_deglitch(uint32_t void at91_pio_gpio_set_interrupt(uint32_t pio, uint32_t data_mask, int enable_interrupt); uint32_t at91_pio_gpio_clear_interrupt(uint32_t pio); +void at91_pio_gpio_pullup(uint32_t pio, uint32_t data_mask, int do_pullup); #endif /* ARM_AT91_AT91_PIOVAR_H */ From owner-svn-src-head@FreeBSD.ORG Fri Aug 15 16:37:07 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ADB402DF; Fri, 15 Aug 2014 16:37:07 +0000 (UTC) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8B55E27B7; Fri, 15 Aug 2014 16:37:07 +0000 (UTC) Received: from zeta.ixsystems.com (unknown [69.198.165.132]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id F26EAAEAC; Fri, 15 Aug 2014 09:37:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1408120626; x=1408135026; bh=ifH5JvJzjrp1QVAKgITnKOhG0///M/DyQ+y4z6OWII4=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=1tbKE4h/9k1EW6WI8vseNyNky0oefpkjuIF6T+l2Yqn+59zCfJAxq/6UQx206idl7 fEHEGwEe3f5a10nD9Lv5nPhICsMijQhHWfXKGbULCUaiCYn1IEL6JXS78WHI2ojsHO ofirdBia2/RrA7t5qumrfbZl0DA+ag9+y/X967BM= Message-ID: <53EE3730.60006@delphij.net> Date: Fri, 15 Aug 2014 09:37:04 -0700 From: Xin Li Reply-To: d@delphij.net Organization: The FreeBSD Project MIME-Version: 1.0 To: Alan Cox , d@delphij.net, John-Mark Gurney , Xin LI Subject: Re: svn commit: r269963 - head/sys/kern References: <201408140513.s7E5DPRb069698@svn.freebsd.org> <20140814053518.GO83475@funkthat.com> <53EC560B.5000104@delphij.net> <53ED3C6E.10204@rice.edu> In-Reply-To: <53ED3C6E.10204@rice.edu> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Aug 2014 16:37:07 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 08/14/14 15:47, Alan Cox wrote: > On 08/14/2014 01:24, Xin Li wrote: >> On 8/13/14 10:35 PM, John-Mark Gurney wrote: >>> Xin LI wrote this message on Thu, Aug 14, 2014 at 05:13 +0000: >>>> Author: delphij Date: Thu Aug 14 05:13:24 2014 New Revision: >>>> 269963 URL: http://svnweb.freebsd.org/changeset/base/269963 >>>> >>>> Log: Re-instate UMA cached backend for 4K - 64K allocations. >>>> New consumers like geli(4) uses malloc(9) to allocate >>>> temporary buffers that gets free'ed shortly, causing frequent >>>> TLB shootdown as observed in hwpmc supported flame graph. >> >>> Can we do even larger, like 128k for phys io sized blocks? >> >> Sure (Actually I'm running with 128k and 256k buckets enabled on >> my own storage box; with r269964 we can easily add new buckets >> without actually activating them by default). >> >> However, I'm relented to add them right now because the current >> malloc(9) implementation would use the next bucket size, which is >> 2x of the previous one, when the requested size is only a little >> bit larger than the smaller chunk's size. In real world the >> larger bucket could eat more memory than all smaller but greater >> than page-sized bucket combined (the actual consumption is still >> small, though). >> > > The current code already supports sizes that are not powers of 2. > For example, with > > Index: kern/kern_malloc.c > =================================================================== > > - --- kern/kern_malloc.c (revision 269997) > +++ kern/kern_malloc.c (working copy) @@ -152,8 +152,11 @@ struct > { {2048, "2048", }, {4096, "4096", }, {8192, "8192", }, + > {12228, "12228", }, {16384, "16384", }, + {24576, "24576", > }, {32768, "32768", }, + {49152, "49152", }, {65536, "65536", > }, {0, NULL}, }; Unrelated to the functionality, but this would break 'vmstat -m' which assumes power of two allocations... Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0 iQIcBAEBCgAGBQJT7jcwAAoJEJW2GBstM+nsGH8P/3ghcaRXNjy+w0bkkya0ixsX KpYvah9S2v7mfk8GtN+xSQaTRtVRqmcWCrRnDLgcmAtRQr0q73T2H5w7a8fVG3sN c3X3c4dyn5XDzrNGmrIe4hAfDNK1F0WPF5nkMpAHhh/EXV5cPynLP2hlZHT6wWa9 MO0ZVAqVjfe1ZIi71AmU69GLGqgTTykMWUo2BKfRZg1LoMektW5Ugj4KlUsvD+SF +FpU7wCSc19br3i27MTsUWU7RKyTyycSOrl/FpZtWMMtyB4RELxUa3QYQQsk2FuM YNWRcBtGaMisNqALMghmJT6l2dtmcPGS47AcyyQnR6w+VziWuYe6Lq/D3iz2EgCM QqFGxp/oDauSjBUfgB83CDfdjrp2x277szBIc9OmvgsyhVgAfDoZzdWuyW2azKi5 c7RN10sqwGhFCLYScgtM0Y2TS8wBGc/uJ7nQMdFUjZ7yNsW3xEU0vAHB0QKar5Tt nIXOiigpO3Ql71l0safPIBvkzWNDHviwuBgGnEgrel86T9tGStRmDCE5YtIaamJV R9Wlhaj7e++4+IC5AEUQvSE1yrg5v5GZVVZEsEBcy1MUlDo5+jqzoxU9lp1sDLAN z7S1PkjWmurFykKl8Vvgi5UHXv5e8u6wFEjf1VDoKw/cqvRWLS/9ifS3ou0EwrJl yBW1Vm9lx6QJohCfq+/q =NvIK -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Fri Aug 15 21:22:50 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 982EFFF; Fri, 15 Aug 2014 21:22:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8380B2C9A; Fri, 15 Aug 2014 21:22:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7FLMo1T010690; Fri, 15 Aug 2014 21:22:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7FLMnuU010687; Fri, 15 Aug 2014 21:22:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201408152122.s7FLMnuU010687@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 15 Aug 2014 21:22:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270027 - in head: . sbin/atm/atmconfig X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Aug 2014 21:22:50 -0000 Author: ngie Date: Fri Aug 15 21:22:49 2014 New Revision: 270027 URL: http://svnweb.freebsd.org/changeset/base/270027 Log: Fix atmconfig compilation when MK_ATM == yes and MK_BSNMP == no Makefile.inc1: Always compile gensnmptree with bootstrap-tools when MK_BSNMP != no instead of depending on a potentially stale tool installed on the build host sbin/atm/atmconfig/Makefile: - Always remove oid.h to avoid cluttering up the build/src tree. - Consolidate all of the RESCUE/MK_BSNMP != no logic under one conditional to improve readability - Remove unnecessary ${.OBJDIR} prefixing for oid.h and use ${.TARGET} instead of spelling out oid.h - Add a missing DPADD for ${LIBCRYPTO} when compiled MK_BSNMP == yes and MK_OPENSSL == yes and not compiling for /rescue/rescue sbin/atm/atmconfig/main.c: Change #ifndef RESCUE to #ifdef WITH_BSNMP in main.c to make it clear that we're compiling bsnmp support into atmconfig Approved by: jmmv (mentor) Phabric: D579 PR: 143830 MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 head/sbin/atm/atmconfig/Makefile head/sbin/atm/atmconfig/main.c Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Aug 15 19:06:59 2014 (r270026) +++ head/Makefile.inc1 Fri Aug 15 21:22:49 2014 (r270027) @@ -1239,7 +1239,7 @@ _lex= usr.bin/lex _awk= usr.bin/awk .endif -.if ${MK_BSNMP} != "no" && !exists(/usr/sbin/gensnmptree) +.if ${MK_BSNMP} != "no" _gensnmptree= usr.sbin/bsnmpd/gensnmptree .endif Modified: head/sbin/atm/atmconfig/Makefile ============================================================================== --- head/sbin/atm/atmconfig/Makefile Fri Aug 15 19:06:59 2014 (r270026) +++ head/sbin/atm/atmconfig/Makefile Fri Aug 15 21:22:49 2014 (r270027) @@ -8,29 +8,24 @@ .include PROG= atmconfig -.ifndef RESCUE -SRCS= ${.OBJDIR}/oid.h -.endif -SRCS+= main.c diag.c natm.c -.ifndef RESCUE -SRCS+= atmconfig_device.c -.endif +SRCS= main.c diag.c natm.c MAN= atmconfig.8 # CFLAGS+= -DPATH_HELP='".:/usr/share/doc/atm:/usr/local/share/doc/atm"' CFLAGS+= -I${.OBJDIR} -.ifndef RESCUE -DPADD= ${LIBBSNMP} -LDADD= -lbsnmp +.if !defined(RESCUE) && ${MK_BSNMP} != "no" +CFLAGS+= -DWITH_BSNMP +SRCS+= oid.h atmconfig_device.c +DPADD+= ${LIBBSNMP} +LDADD+= -lbsnmp . if ${MK_DYNAMICROOT} == "no" && ${MK_OPENSSL} != "no" +DPADD+= ${LIBCRYPTO} LDADD+= -lcrypto . endif .endif -.ifndef RESCUE CLEANFILES+= oid.h -.endif # XXX - this is verboten .if ${MACHINE_CPUARCH} == "arm" @@ -43,8 +38,8 @@ FILESDIR= /usr/share/doc/atm SNMP_ATM_DEF= ${.CURDIR}/../../../contrib/ngatm/snmp_atm/atm_tree.def \ ${.CURDIR}/../../../usr.sbin/bsnmpd/modules/snmp_atm/atm_freebsd.def -${.OBJDIR}/oid.h: atm_oid.list ${SNMP_ATM_DEF} +oid.h: atm_oid.list ${SNMP_ATM_DEF} cat ${SNMP_ATM_DEF} | gensnmptree -e `tail -n +2 ${.CURDIR}/atm_oid.list` \ - > ${.OBJDIR}/oid.h + > ${.TARGET} .include Modified: head/sbin/atm/atmconfig/main.c ============================================================================== --- head/sbin/atm/atmconfig/main.c Fri Aug 15 19:06:59 2014 (r270026) +++ head/sbin/atm/atmconfig/main.c Fri Aug 15 21:22:49 2014 (r270027) @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifndef RESCUE +#ifdef WITH_BSNMP #include #include #include @@ -444,7 +444,7 @@ help_func(int argc, char *argv[]) exit(1); } -#ifndef RESCUE +#ifdef WITH_BSNMP /* * Parse a server specification * @@ -527,16 +527,16 @@ main(int argc, char *argv[]) int opt, i; const struct cmdtab *match, *cc, *tab; -#ifndef RESCUE +#ifdef WITH_BSNMP snmp_client_init(&snmp_client); snmp_client.trans = SNMP_TRANS_LOC_STREAM; snmp_client_set_host(&snmp_client, PATH_ILMI_SOCK); #endif -#ifdef RESCUE -#define OPTSTR "htv" -#else +#ifdef WITH_BSNMP #define OPTSTR "htvs:" +#else +#define OPTSTR "htv" #endif while ((opt = getopt(argc, argv, OPTSTR)) != -1) @@ -545,7 +545,7 @@ main(int argc, char *argv[]) case 'h': help_func(0, argv); -#ifndef RESCUE +#ifdef WITH_BSNMP case 's': parse_server(optarg); break; @@ -570,7 +570,7 @@ main(int argc, char *argv[]) err(1, NULL); memcpy(main_tab, static_main_tab, sizeof(static_main_tab)); -#ifndef RESCUE +#ifdef WITH_BSNMP /* XXX while this is compiled in */ device_register(); #endif From owner-svn-src-head@FreeBSD.ORG Fri Aug 15 21:35:32 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AFB08802; Fri, 15 Aug 2014 21:35:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 811512DD4; Fri, 15 Aug 2014 21:35:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7FLZWqF015867; Fri, 15 Aug 2014 21:35:32 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7FLZWEv015865; Fri, 15 Aug 2014 21:35:32 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201408152135.s7FLZWEv015865@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 15 Aug 2014 21:35:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270028 - in head: etc/devd tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Aug 2014 21:35:32 -0000 Author: ngie Date: Fri Aug 15 21:35:31 2014 New Revision: 270028 URL: http://svnweb.freebsd.org/changeset/base/270028 Log: Make the USB and ZFS devd configuration files optional depending on the values of MK_USB/MK_ZFS Making zfs.conf optional resolves PR # 186971 PR: 186971 Phabric: D606 Approved by: jmmv (mentor) Sponsored by: EMC / Isilon Storage Division Modified: head/etc/devd/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/etc/devd/Makefile ============================================================================== --- head/etc/devd/Makefile Fri Aug 15 21:22:49 2014 (r270027) +++ head/etc/devd/Makefile Fri Aug 15 21:35:31 2014 (r270028) @@ -1,6 +1,6 @@ # $FreeBSD$ -FILES= uath.conf usb.conf zfs.conf +.include .if ${MACHINE} == "powerpc" FILES+= apple.conf @@ -10,6 +10,14 @@ FILES+= apple.conf FILES+= asus.conf .endif +.if ${MK_USB} != "no" +FILES+= uath.conf usb.conf +.endif + +.if ${MK_ZFS} != "no" +FILES+= zfs.conf +.endif + NO_OBJ= FILESDIR= /etc/devd FILESMODE= 644 Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Fri Aug 15 21:22:49 2014 (r270027) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Fri Aug 15 21:35:31 2014 (r270028) @@ -444,6 +444,7 @@ OLD_FILES+=usr/share/man/man1/dtrace.1.g OLD_FILES+=boot/gptzfsboot OLD_FILES+=boot/zfsboot OLD_FILES+=boot/zfsloader +OLD_FILES+=etc/devd/zfs.conf OLD_FILES+=etc/periodic/daily/404.status-zfs OLD_FILES+=etc/periodic/daily/800.scrub-zfs OLD_LIBS+=lib/libzfs.so.2 @@ -4677,9 +4678,10 @@ OLD_FILES+=usr/sbin/unbound-control OLD_FILES+=usr/sbin/unbound-control-setup .endif -#.if ${MK_USB} == no -# to be filled in -#.endif +.if ${MK_USB} == no +OLD_FILES+=etc/devd/uauth.conf +OLD_FILES+=etc/devd/usb.conf +.endif .if ${MK_UTMPX} == no OLD_FILES+=etc/periodic/monthly/200.accounting From owner-svn-src-head@FreeBSD.ORG Fri Aug 15 22:36:43 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F907FDE; Fri, 15 Aug 2014 22:36:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E3E252681; Fri, 15 Aug 2014 22:36:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7FMagpe043436; Fri, 15 Aug 2014 22:36:42 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7FMagUJ043433; Fri, 15 Aug 2014 22:36:42 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201408152236.s7FMagUJ043433@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Fri, 15 Aug 2014 22:36:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270029 - in head/bin/sh: . tests/expansion X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Aug 2014 22:36:43 -0000 Author: jilles Date: Fri Aug 15 22:36:41 2014 New Revision: 270029 URL: http://svnweb.freebsd.org/changeset/base/270029 Log: sh: Mask off shift distance (<< and >>) in arithmetic. In C, shift distances equal to or larger than the number of bits in the operand result in undefined behaviour. As part of eliminating undefined behaviour in arithmetic, mask off the distance like Java and JavaScript specify and C on x86 usually does. Assumption: conversion from unsigned to signed retains the two's complement bits. Assumption: uintmax_t has no padding bits. Added: head/bin/sh/tests/expansion/arith14.0 (contents, props changed) Modified: head/bin/sh/arith_yacc.c head/bin/sh/tests/expansion/Makefile Modified: head/bin/sh/arith_yacc.c ============================================================================== --- head/bin/sh/arith_yacc.c Fri Aug 15 21:35:31 2014 (r270028) +++ head/bin/sh/arith_yacc.c Fri Aug 15 22:36:41 2014 (r270029) @@ -139,9 +139,10 @@ static arith_t do_binop(int op, arith_t case ARITH_SUB: return (uintmax_t)a - (uintmax_t)b; case ARITH_LSHIFT: - return (uintmax_t)a << b; + return (uintmax_t)a << + ((uintmax_t)b & (sizeof(uintmax_t) * CHAR_BIT - 1)); case ARITH_RSHIFT: - return a >> b; + return a >> ((uintmax_t)b & (sizeof(uintmax_t) * CHAR_BIT - 1)); case ARITH_LT: return a < b; case ARITH_LE: Modified: head/bin/sh/tests/expansion/Makefile ============================================================================== --- head/bin/sh/tests/expansion/Makefile Fri Aug 15 21:35:31 2014 (r270028) +++ head/bin/sh/tests/expansion/Makefile Fri Aug 15 22:36:41 2014 (r270029) @@ -20,6 +20,7 @@ FILES+= arith10.0 FILES+= arith11.0 FILES+= arith12.0 FILES+= arith13.0 +FILES+= arith14.0 FILES+= assign1.0 FILES+= cmdsubst1.0 FILES+= cmdsubst2.0 Added: head/bin/sh/tests/expansion/arith14.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/expansion/arith14.0 Fri Aug 15 22:36:41 2014 (r270029) @@ -0,0 +1,40 @@ +# $FreeBSD$ +# Check that <> use the low bits of the shift count. + +if [ $((1<<16<<16)) = 0 ]; then + width=32 +elif [ $((1<<32<<32)) = 0 ]; then + width=64 +elif [ $((1<<64<<64)) = 0 ]; then + width=128 +elif [ $((1<<64>>64)) = 1 ]; then + # Integers are wider than 128 bits; assume arbitrary precision. + # Nothing to test here. + exit 0 +else + echo "Cannot determine integer width" + exit 2 +fi + +twowidth=$((width * 2)) +j=43 k=$((1 << (width - 2))) r=0 + +i=0 +while [ $i -lt $twowidth ]; do + if [ "$((j << i))" != "$((j << (i + width)))" ]; then + echo "Problem with $j << $i" + r=2 + fi + i=$((i + 1)) +done + +i=0 +while [ $i -lt $twowidth ]; do + if [ "$((k >> i))" != "$((k >> (i + width)))" ]; then + echo "Problem with $k >> $i" + r=2 + fi + i=$((i + 1)) +done + +exit $r From owner-svn-src-head@FreeBSD.ORG Sat Aug 16 03:05:02 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D4F726CB; Sat, 16 Aug 2014 03:05:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFC5D2080; Sat, 16 Aug 2014 03:05:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7G352TK068016; Sat, 16 Aug 2014 03:05:02 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7G352lr068015; Sat, 16 Aug 2014 03:05:02 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201408160305.s7G352lr068015@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 16 Aug 2014 03:05:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270036 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Aug 2014 03:05:03 -0000 Author: adrian Date: Sat Aug 16 03:05:02 2014 New Revision: 270036 URL: http://svnweb.freebsd.org/changeset/base/270036 Log: Add if_ath_alq code into the non-module build. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sat Aug 16 01:29:49 2014 (r270035) +++ head/sys/conf/files Sat Aug 16 03:05:02 2014 (r270036) @@ -707,6 +707,8 @@ dev/ath/if_ath_ahb.c optional ath_ahb \ # dev/ath/if_ath.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" +dev/ath/if_ath_alq.c optional ath \ + compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_beacon.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_btcoex.c optional ath \ From owner-svn-src-head@FreeBSD.ORG Sat Aug 16 08:31:26 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C0111454; Sat, 16 Aug 2014 08:31:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 91F1F2E8A; Sat, 16 Aug 2014 08:31:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7G8VQ4r010996; Sat, 16 Aug 2014 08:31:26 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7G8VPHs010992; Sat, 16 Aug 2014 08:31:25 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201408160831.s7G8VPHs010992@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 16 Aug 2014 08:31:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270038 - in head/sys: i386/i386 i386/xen sparc64/sparc64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Aug 2014 08:31:26 -0000 Author: kib Date: Sat Aug 16 08:31:25 2014 New Revision: 270038 URL: http://svnweb.freebsd.org/changeset/base/270038 Log: Complete r254667, do not destroy pmap lock if KVA allocation failed. Submitted by: Svatopluk Kraus MFC after: 1 week Modified: head/sys/i386/i386/pmap.c head/sys/i386/xen/pmap.c head/sys/sparc64/sparc64/pmap.c Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Sat Aug 16 07:01:42 2014 (r270037) +++ head/sys/i386/i386/pmap.c Sat Aug 16 08:31:25 2014 (r270038) @@ -1755,10 +1755,8 @@ pmap_pinit(pmap_t pmap) */ if (pmap->pm_pdir == NULL) { pmap->pm_pdir = (pd_entry_t *)kva_alloc(NBPTD); - if (pmap->pm_pdir == NULL) { - PMAP_LOCK_DESTROY(pmap); + if (pmap->pm_pdir == NULL) return (0); - } #ifdef PAE pmap->pm_pdpt = uma_zalloc(pdptzone, M_WAITOK | M_ZERO); KASSERT(((vm_offset_t)pmap->pm_pdpt & Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Sat Aug 16 07:01:42 2014 (r270037) +++ head/sys/i386/xen/pmap.c Sat Aug 16 08:31:25 2014 (r270038) @@ -1459,7 +1459,6 @@ pmap_pinit(pmap_t pmap) if (pmap->pm_pdir == NULL) { pmap->pm_pdir = (pd_entry_t *)kva_alloc(NBPTD); if (pmap->pm_pdir == NULL) { - PMAP_LOCK_DESTROY(pmap); #ifdef HAMFISTED_LOCKING mtx_unlock(&createdelete_lock); #endif Modified: head/sys/sparc64/sparc64/pmap.c ============================================================================== --- head/sys/sparc64/sparc64/pmap.c Sat Aug 16 07:01:42 2014 (r270037) +++ head/sys/sparc64/sparc64/pmap.c Sat Aug 16 08:31:25 2014 (r270038) @@ -1211,11 +1211,9 @@ pmap_pinit(pmap_t pm) */ if (pm->pm_tsb == NULL) { pm->pm_tsb = (struct tte *)kva_alloc(TSB_BSIZE); - if (pm->pm_tsb == NULL) { - PMAP_LOCK_DESTROY(pm); + if (pm->pm_tsb == NULL) return (0); } - } /* * Allocate an object for it. From owner-svn-src-head@FreeBSD.ORG Sat Aug 16 10:47:25 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C01E313; Sat, 16 Aug 2014 10:47:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6790B2B40; Sat, 16 Aug 2014 10:47:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7GAlPlM071098; Sat, 16 Aug 2014 10:47:25 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7GAlPlj071097; Sat, 16 Aug 2014 10:47:25 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201408161047.s7GAlPlj071097@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Sat, 16 Aug 2014 10:47:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270041 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Aug 2014 10:47:25 -0000 Author: royger Date: Sat Aug 16 10:47:24 2014 New Revision: 270041 URL: http://svnweb.freebsd.org/changeset/base/270041 Log: net: move interface removal notification up in if_detach_internal This is needed to prevent having interfaces with ifp->if_addr == NULL on bridge interfaces. Moving the notification event handlers up makes sure the interfaces are removed before doing any more cleanup. Sponsored by: Citrix Systems R&D Reviewed by: melifaro Differential Revision: https://reviews.freebsd.org/D598 net/if.c - Move interface removal notification up in if_detach_internal. Modified: head/sys/net/if.c Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Sat Aug 16 08:38:53 2014 (r270040) +++ head/sys/net/if.c Sat Aug 16 10:47:24 2014 (r270041) @@ -874,6 +874,12 @@ if_detach_internal(struct ifnet *ifp, in #endif if_purgemaddrs(ifp); + /* Announce that the interface is gone. */ + rt_ifannouncemsg(ifp, IFAN_DEPARTURE); + EVENTHANDLER_INVOKE(ifnet_departure_event, ifp); + if (IS_DEFAULT_VNET(curvnet)) + devctl_notify("IFNET", ifp->if_xname, "DETACH", NULL); + if (!vmove) { /* * Prevent further calls into the device driver via ifnet. @@ -911,11 +917,6 @@ if_detach_internal(struct ifnet *ifp, in } } - /* Announce that the interface is gone. */ - rt_ifannouncemsg(ifp, IFAN_DEPARTURE); - EVENTHANDLER_INVOKE(ifnet_departure_event, ifp); - if (IS_DEFAULT_VNET(curvnet)) - devctl_notify("IFNET", ifp->if_xname, "DETACH", NULL); if_delgroups(ifp); /* From owner-svn-src-head@FreeBSD.ORG Sat Aug 16 13:13:18 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4854842E; Sat, 16 Aug 2014 13:13:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33B502A42; Sat, 16 Aug 2014 13:13:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7GDDIUO037279; Sat, 16 Aug 2014 13:13:18 GMT (envelope-from luigi@FreeBSD.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7GDDIk6037278; Sat, 16 Aug 2014 13:13:18 GMT (envelope-from luigi@FreeBSD.org) Message-Id: <201408161313.s7GDDIk6037278@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: luigi set sender to luigi@FreeBSD.org using -f From: Luigi Rizzo Date: Sat, 16 Aug 2014 13:13:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270046 - head/sys/dev/virtio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Aug 2014 13:13:18 -0000 Author: luigi Date: Sat Aug 16 13:13:17 2014 New Revision: 270046 URL: http://svnweb.freebsd.org/changeset/base/270046 Log: print additional debugging info in virtqueue_dump() (not fundamental, but useful to debug performance issues on vtnet) MFC after: 3 days Modified: head/sys/dev/virtio/virtqueue.c Modified: head/sys/dev/virtio/virtqueue.c ============================================================================== --- head/sys/dev/virtio/virtqueue.c Sat Aug 16 13:11:59 2014 (r270045) +++ head/sys/dev/virtio/virtqueue.c Sat Aug 16 13:13:17 2014 (r270046) @@ -605,11 +605,13 @@ virtqueue_dump(struct virtqueue *vq) printf("VQ: %s - size=%d; free=%d; used=%d; queued=%d; " "desc_head_idx=%d; avail.idx=%d; used_cons_idx=%d; " - "used.idx=%d; avail.flags=0x%x; used.flags=0x%x\n", + "used.idx=%d; used_event_idx=%d; avail.flags=0x%x; used.flags=0x%x\n", vq->vq_name, vq->vq_nentries, vq->vq_free_cnt, virtqueue_nused(vq), vq->vq_queued_cnt, vq->vq_desc_head_idx, vq->vq_ring.avail->idx, vq->vq_used_cons_idx, - vq->vq_ring.used->idx, vq->vq_ring.avail->flags, + vq->vq_ring.used->idx, + vring_used_event(&vq->vq_ring), + vq->vq_ring.avail->flags, vq->vq_ring.used->flags); } From owner-svn-src-head@FreeBSD.ORG Sat Aug 16 14:56:12 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D53DB66F; Sat, 16 Aug 2014 14:56:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A68A124FB; Sat, 16 Aug 2014 14:56:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7GEuCt3084663; Sat, 16 Aug 2014 14:56:12 GMT (envelope-from peter@FreeBSD.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7GEuCIg084659; Sat, 16 Aug 2014 14:56:12 GMT (envelope-from peter@FreeBSD.org) Message-Id: <201408161456.s7GEuCIg084659@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: peter set sender to peter@FreeBSD.org using -f From: Peter Wemm Date: Sat, 16 Aug 2014 14:56:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270062 - in head: sbin/umount usr.bin/showmount X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Aug 2014 14:56:12 -0000 Author: peter Date: Sat Aug 16 14:56:11 2014 New Revision: 270062 URL: http://svnweb.freebsd.org/changeset/base/270062 Log: Use mount protocol version 3 by default for showmount and umount. mount_nfs effectively uses mount protocol v3 by default already. v1 mount protocol is being removed along with nfsv2 by a high profile NFS appliance vendor and our legacy v1 mount protocol usage causes rpc errors. Modified: head/sbin/umount/umount.c head/usr.bin/showmount/showmount.8 head/usr.bin/showmount/showmount.c Modified: head/sbin/umount/umount.c ============================================================================== --- head/sbin/umount/umount.c Sat Aug 16 14:30:46 2014 (r270061) +++ head/sbin/umount/umount.c Sat Aug 16 14:56:11 2014 (r270062) @@ -394,7 +394,7 @@ umountfs(struct statfs *sfs) * has been unmounted. */ if (ai != NULL && !(fflag & MNT_FORCE) && do_rpc) { - clp = clnt_create(hostp, MOUNTPROG, MOUNTVERS, "udp"); + clp = clnt_create(hostp, MOUNTPROG, MOUNTVERS3, "udp"); if (clp == NULL) { warnx("%s: %s", hostp, clnt_spcreateerror("MOUNTPROG")); Modified: head/usr.bin/showmount/showmount.8 ============================================================================== --- head/usr.bin/showmount/showmount.8 Sat Aug 16 14:30:46 2014 (r270061) +++ head/usr.bin/showmount/showmount.8 Sat Aug 16 14:56:11 2014 (r270062) @@ -31,7 +31,7 @@ .\" @(#)showmount.8 8.3 (Berkeley) 3/29/95 .\" $FreeBSD$ .\" -.Dd March 29, 1995 +.Dd August 16, 2014 .Dt SHOWMOUNT 8 .Os .Sh NAME @@ -41,6 +41,7 @@ .Nm .Op Fl a | d .Op Fl e +.Op Fl 1 .Op Fl 3 .Op Ar host .Sh DESCRIPTION @@ -76,10 +77,10 @@ List directory paths of mount points ins Show the .Ar host Ns 's exports list. +.It Fl 1 +Use mount protocol Version 1, compatible with legacy servers. .It Fl 3 -Use mount protocol Version 3, compatible with -.Tn NFS -Version 3. +Ignored for backwards compatibility. .El .Sh SEE ALSO .Xr mount 8 , Modified: head/usr.bin/showmount/showmount.c ============================================================================== --- head/usr.bin/showmount/showmount.c Sat Aug 16 14:30:46 2014 (r270061) +++ head/usr.bin/showmount/showmount.c Sat Aug 16 14:56:11 2014 (r270062) @@ -110,11 +110,11 @@ main(int argc, char **argv) { register struct exportslist *exp; register struct grouplist *grp; - register int rpcs = 0, mntvers = 1; + register int rpcs = 0, mntvers = 3; const char *host; int ch, estat; - while ((ch = getopt(argc, argv, "ade3")) != -1) + while ((ch = getopt(argc, argv, "ade13")) != -1) switch (ch) { case 'a': if (type == 0) { @@ -133,6 +133,9 @@ main(int argc, char **argv) case 'e': rpcs |= DOEXPORTS; break; + case '1': + mntvers = 1; + break; case '3': mntvers = 3; break; From owner-svn-src-head@FreeBSD.ORG Sat Aug 16 15:00:03 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8964B8AF; Sat, 16 Aug 2014 15:00:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 71F1E251C; Sat, 16 Aug 2014 15:00:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7GF03pY085557; Sat, 16 Aug 2014 15:00:03 GMT (envelope-from luigi@FreeBSD.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7GF01KC085529; Sat, 16 Aug 2014 15:00:01 GMT (envelope-from luigi@FreeBSD.org) Message-Id: <201408161500.s7GF01KC085529@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: luigi set sender to luigi@FreeBSD.org using -f From: Luigi Rizzo Date: Sat, 16 Aug 2014 15:00:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270063 - in head: sys/conf sys/dev/cxgbe sys/dev/e1000 sys/dev/ixgbe sys/dev/netmap sys/dev/virtio/network sys/net tools/tools/netmap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Aug 2014 15:00:03 -0000 Author: luigi Date: Sat Aug 16 15:00:01 2014 New Revision: 270063 URL: http://svnweb.freebsd.org/changeset/base/270063 Log: Update to the current version of netmap. Mostly bugfixes or features developed in the past 6 months, so this is a 10.1 candidate. Basically no user API changes (some bugfixes in sys/net/netmap_user.h). In detail: 1. netmap support for virtio-net, including in netmap mode. Under bhyve and with a netmap backend [2] we reach over 1Mpps with standard APIs (e.g. libpcap), and 5-8 Mpps in netmap mode. 2. (kernel) add support for multiple memory allocators, so we can better partition physical and virtual interfaces giving access to separate users. The most visible effect is one additional argument to the various kernel functions to compute buffer addresses. All netmap-supported drivers are affected, but changes are mechanical and trivial 3. (kernel) simplify the prototype for *txsync() and *rxsync() driver methods. All netmap drivers affected, changes mostly mechanical. 4. add support for netmap-monitor ports. Think of it as a mirroring port on a physical switch: a netmap monitor port replicates traffic present on the main port. Restrictions apply. Drive carefully. 5. if_lem.c: support for various paravirtualization features, experimental and disabled by default. Most of these are described in our ANCS'13 paper [1]. Paravirtualized support in netmap mode is new, and beats the numbers in the paper by a large factor (under qemu-kvm, we measured gues-host throughput up to 10-12 Mpps). A lot of refactoring and additional documentation in the files in sys/dev/netmap, but apart from #2 and #3 above, almost nothing of this stuff is visible to other kernel parts. Example programs in tools/tools/netmap have been updated with bugfixes and to support more of the existing features. This is meant to go into 10.1 so we plan an MFC before the Aug.22 deadline. A lot of this code has been contributed by my colleagues at UNIPI, including Giuseppe Lettieri, Vincenzo Maffione, Stefano Garzarella. MFC after: 3 days. Added: head/sys/dev/netmap/if_vtnet_netmap.h (contents, props changed) head/sys/dev/netmap/netmap_monitor.c (contents, props changed) head/sys/net/paravirt.h (contents, props changed) Modified: head/sys/conf/files head/sys/dev/cxgbe/t4_netmap.c head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_igb.c head/sys/dev/e1000/if_lem.c head/sys/dev/ixgbe/ixgbe.c head/sys/dev/netmap/if_em_netmap.h head/sys/dev/netmap/if_igb_netmap.h head/sys/dev/netmap/if_lem_netmap.h head/sys/dev/netmap/if_re_netmap.h head/sys/dev/netmap/ixgbe_netmap.h head/sys/dev/netmap/netmap.c head/sys/dev/netmap/netmap_freebsd.c head/sys/dev/netmap/netmap_generic.c head/sys/dev/netmap/netmap_kern.h head/sys/dev/netmap/netmap_mbq.h head/sys/dev/netmap/netmap_mem2.c head/sys/dev/netmap/netmap_mem2.h head/sys/dev/netmap/netmap_offloadings.c head/sys/dev/netmap/netmap_pipe.c head/sys/dev/netmap/netmap_vale.c head/sys/dev/virtio/network/if_vtnet.c head/sys/net/netmap.h head/sys/net/netmap_user.h head/tools/tools/netmap/pkt-gen.c head/tools/tools/netmap/vale-ctl.c Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sat Aug 16 14:56:11 2014 (r270062) +++ head/sys/conf/files Sat Aug 16 15:00:01 2014 (r270063) @@ -1948,6 +1948,7 @@ dev/netmap/netmap_freebsd.c optional net dev/netmap/netmap_generic.c optional netmap dev/netmap/netmap_mbq.c optional netmap dev/netmap/netmap_mem2.c optional netmap +dev/netmap/netmap_monitor.c optional netmap dev/netmap/netmap_offloadings.c optional netmap dev/netmap/netmap_pipe.c optional netmap dev/netmap/netmap_vale.c optional netmap Modified: head/sys/dev/cxgbe/t4_netmap.c ============================================================================== --- head/sys/dev/cxgbe/t4_netmap.c Sat Aug 16 14:56:11 2014 (r270062) +++ head/sys/dev/cxgbe/t4_netmap.c Sat Aug 16 15:00:01 2014 (r270063) @@ -434,19 +434,18 @@ cxgbe_netmap_on(struct adapter *sc, stru hwb = &sc->sge.hw_buf_info[0]; for (i = 0; i < SGE_FLBUF_SIZES; i++, hwb++) { - if (hwb->size == NETMAP_BUF_SIZE) + if (hwb->size == NETMAP_BUF_SIZE(na)) break; } if (i >= SGE_FLBUF_SIZES) { if_printf(ifp, "no hwidx for netmap buffer size %d.\n", - NETMAP_BUF_SIZE); + NETMAP_BUF_SIZE(na)); return (ENXIO); } hwidx = i; /* Must set caps before calling netmap_reset */ - na->na_flags |= (NAF_NATIVE_ON | NAF_NETMAP_ON); - ifp->if_capenable |= IFCAP_NETMAP; + nm_set_native_flags(na); for_each_nm_rxq(pi, i, nm_rxq) { alloc_nm_rxq_hwq(pi, nm_rxq); @@ -460,7 +459,7 @@ cxgbe_netmap_on(struct adapter *sc, stru for (j = 0; j < nm_rxq->fl_sidx - 8; j++) { uint64_t ba; - PNMB(&slot[j], &ba); + PNMB(na, &slot[j], &ba); nm_rxq->fl_desc[j] = htobe64(ba | hwidx); } nm_rxq->fl_pidx = j; @@ -512,8 +511,7 @@ cxgbe_netmap_off(struct adapter *sc, str rc = -t4_enable_vi(sc, sc->mbox, pi->nm_viid, false, false); if (rc != 0) if_printf(ifp, "netmap disable_vi failed: %d\n", rc); - na->na_flags &= ~(NAF_NATIVE_ON | NAF_NETMAP_ON); - ifp->if_capenable &= ~IFCAP_NETMAP; + nm_clear_native_flags(na); /* * XXXNM: We need to make sure that the tx queues are quiet and won't @@ -669,7 +667,7 @@ cxgbe_nm_tx(struct adapter *sc, struct s for (i = 0; i < n; i++) { slot = &ring->slot[kring->nr_hwcur]; - PNMB(slot, &ba); + PNMB(kring->na, slot, &ba); cpl->ctrl0 = nm_txq->cpl_ctrl0; cpl->pack = 0; @@ -786,13 +784,13 @@ reclaim_nm_tx_desc(struct sge_nm_txq *nm } static int -cxgbe_netmap_txsync(struct netmap_adapter *na, u_int ring_nr, int flags) +cxgbe_netmap_txsync(struct netmap_kring *kring, int flags) { - struct netmap_kring *kring = &na->tx_rings[ring_nr]; + struct netmap_adapter *na = kring->na; struct ifnet *ifp = na->ifp; struct port_info *pi = ifp->if_softc; struct adapter *sc = pi->adapter; - struct sge_nm_txq *nm_txq = &sc->sge.nm_txq[pi->first_nm_txq + ring_nr]; + struct sge_nm_txq *nm_txq = &sc->sge.nm_txq[pi->first_nm_txq + kring->ring_id]; const u_int head = kring->rhead; u_int reclaimed = 0; int n, d, npkt_remaining, ndesc_remaining; @@ -851,14 +849,14 @@ cxgbe_netmap_txsync(struct netmap_adapte } static int -cxgbe_netmap_rxsync(struct netmap_adapter *na, u_int ring_nr, int flags) +cxgbe_netmap_rxsync(struct netmap_kring *kring, int flags) { - struct netmap_kring *kring = &na->rx_rings[ring_nr]; + struct netmap_adapter *na = kring->na; struct netmap_ring *ring = kring->ring; struct ifnet *ifp = na->ifp; struct port_info *pi = ifp->if_softc; struct adapter *sc = pi->adapter; - struct sge_nm_rxq *nm_rxq = &sc->sge.nm_rxq[pi->first_nm_rxq + ring_nr]; + struct sge_nm_rxq *nm_rxq = &sc->sge.nm_rxq[pi->first_nm_rxq + kring->ring_id]; u_int const head = nm_rxsync_prologue(kring); u_int n; int force_update = (flags & NAF_FORCE_READ) || kring->nr_kflags & NKR_PENDINTR; @@ -891,7 +889,7 @@ cxgbe_netmap_rxsync(struct netmap_adapte while (n > 0) { for (i = 0; i < 8; i++, fl_pidx++, slot++) { - PNMB(slot, &ba); + PNMB(na, slot, &ba); nm_rxq->fl_desc[fl_pidx] = htobe64(ba | hwidx); slot->flags &= ~NS_BUF_CHANGED; MPASS(fl_pidx <= nm_rxq->fl_sidx); Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Sat Aug 16 14:56:11 2014 (r270062) +++ head/sys/dev/e1000/if_em.c Sat Aug 16 15:00:01 2014 (r270063) @@ -3340,10 +3340,10 @@ em_setup_transmit_ring(struct tx_ring *t uint64_t paddr; void *addr; - addr = PNMB(slot + si, &paddr); + addr = PNMB(na, slot + si, &paddr); txr->tx_base[i].buffer_addr = htole64(paddr); /* reload the map for netmap mode */ - netmap_load_map(txr->txtag, txbuf->map, addr); + netmap_load_map(na, txr->txtag, txbuf->map, addr); } #endif /* DEV_NETMAP */ @@ -4082,8 +4082,8 @@ em_setup_receive_ring(struct rx_ring *rx uint64_t paddr; void *addr; - addr = PNMB(slot + si, &paddr); - netmap_load_map(rxr->rxtag, rxbuf->map, addr); + addr = PNMB(na, slot + si, &paddr); + netmap_load_map(na, rxr->rxtag, rxbuf->map, addr); /* Update descriptor */ rxr->rx_base[j].buffer_addr = htole64(paddr); continue; Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Sat Aug 16 14:56:11 2014 (r270062) +++ head/sys/dev/e1000/if_igb.c Sat Aug 16 15:00:01 2014 (r270063) @@ -3629,7 +3629,7 @@ igb_setup_transmit_ring(struct tx_ring * if (slot) { int si = netmap_idx_n2k(&na->tx_rings[txr->me], i); /* no need to set the address */ - netmap_load_map(txr->txtag, txbuf->map, NMB(slot + si)); + netmap_load_map(na, txr->txtag, txbuf->map, NMB(na, slot + si)); } #endif /* DEV_NETMAP */ /* clear the watch index */ @@ -4433,8 +4433,8 @@ igb_setup_receive_ring(struct rx_ring *r uint64_t paddr; void *addr; - addr = PNMB(slot + sj, &paddr); - netmap_load_map(rxr->ptag, rxbuf->pmap, addr); + addr = PNMB(na, slot + sj, &paddr); + netmap_load_map(na, rxr->ptag, rxbuf->pmap, addr); /* Update descriptor */ rxr->rx_base[j].read.pkt_addr = htole64(paddr); continue; Modified: head/sys/dev/e1000/if_lem.c ============================================================================== --- head/sys/dev/e1000/if_lem.c Sat Aug 16 14:56:11 2014 (r270062) +++ head/sys/dev/e1000/if_lem.c Sat Aug 16 15:00:01 2014 (r270063) @@ -32,6 +32,15 @@ ******************************************************************************/ /*$FreeBSD$*/ +/* + * Uncomment the following extensions for better performance in a VM, + * especially if you have support in the hypervisor. + * See http://info.iet.unipi.it/~luigi/netmap/ + */ +// #define BATCH_DISPATCH +// #define NIC_SEND_COMBINING +// #define NIC_PARAVIRT /* enable virtio-like synchronization */ + #include "opt_inet.h" #include "opt_inet6.h" @@ -291,6 +300,10 @@ static int lem_tx_int_delay_dflt = EM_TI static int lem_rx_int_delay_dflt = EM_TICKS_TO_USECS(EM_RDTR); static int lem_tx_abs_int_delay_dflt = EM_TICKS_TO_USECS(EM_TADV); static int lem_rx_abs_int_delay_dflt = EM_TICKS_TO_USECS(EM_RADV); +/* + * increase lem_rxd and lem_txd to at least 2048 in netmap mode + * for better performance. + */ static int lem_rxd = EM_DEFAULT_RXD; static int lem_txd = EM_DEFAULT_TXD; static int lem_smart_pwr_down = FALSE; @@ -460,6 +473,20 @@ lem_attach(device_t dev) "max number of rx packets to process", &adapter->rx_process_limit, lem_rx_process_limit); +#ifdef NIC_SEND_COMBINING + /* Sysctls to control mitigation */ + lem_add_rx_process_limit(adapter, "sc_enable", + "driver TDT mitigation", &adapter->sc_enable, 0); +#endif /* NIC_SEND_COMBINING */ +#ifdef BATCH_DISPATCH + lem_add_rx_process_limit(adapter, "batch_enable", + "driver rx batch", &adapter->batch_enable, 0); +#endif /* BATCH_DISPATCH */ +#ifdef NIC_PARAVIRT + lem_add_rx_process_limit(adapter, "rx_retries", + "driver rx retries", &adapter->rx_retries, 0); +#endif /* NIC_PARAVIRT */ + /* Sysctl for setting the interface flow control */ lem_set_flow_cntrl(adapter, "flow_control", "flow control setting", @@ -517,6 +544,49 @@ lem_attach(device_t dev) */ adapter->hw.mac.report_tx_early = 1; +#ifdef NIC_PARAVIRT + device_printf(dev, "driver supports paravirt, subdev 0x%x\n", + adapter->hw.subsystem_device_id); + if (adapter->hw.subsystem_device_id == E1000_PARA_SUBDEV) { + uint64_t bus_addr; + + device_printf(dev, "paravirt support on dev %p\n", adapter); + tsize = 4096; // XXX one page for the csb + if (lem_dma_malloc(adapter, tsize, &adapter->csb_mem, BUS_DMA_NOWAIT)) { + device_printf(dev, "Unable to allocate csb memory\n"); + error = ENOMEM; + goto err_csb; + } + /* Setup the Base of the CSB */ + adapter->csb = (struct paravirt_csb *)adapter->csb_mem.dma_vaddr; + /* force the first kick */ + adapter->csb->host_need_txkick = 1; /* txring empty */ + adapter->csb->guest_need_rxkick = 1; /* no rx packets */ + bus_addr = adapter->csb_mem.dma_paddr; + lem_add_rx_process_limit(adapter, "csb_on", + "enable paravirt.", &adapter->csb->guest_csb_on, 0); + lem_add_rx_process_limit(adapter, "txc_lim", + "txc_lim", &adapter->csb->host_txcycles_lim, 1); + + /* some stats */ +#define PA_SC(name, var, val) \ + lem_add_rx_process_limit(adapter, name, name, var, val) + PA_SC("host_need_txkick",&adapter->csb->host_need_txkick, 1); + PA_SC("host_rxkick_at",&adapter->csb->host_rxkick_at, ~0); + PA_SC("guest_need_txkick",&adapter->csb->guest_need_txkick, 0); + PA_SC("guest_need_rxkick",&adapter->csb->guest_need_rxkick, 1); + PA_SC("tdt_reg_count",&adapter->tdt_reg_count, 0); + PA_SC("tdt_csb_count",&adapter->tdt_csb_count, 0); + PA_SC("tdt_int_count",&adapter->tdt_int_count, 0); + PA_SC("guest_need_kick_count",&adapter->guest_need_kick_count, 0); + /* tell the host where the block is */ + E1000_WRITE_REG(&adapter->hw, E1000_CSBAH, + (u32)(bus_addr >> 32)); + E1000_WRITE_REG(&adapter->hw, E1000_CSBAL, + (u32)bus_addr); + } +#endif /* NIC_PARAVIRT */ + tsize = roundup2(adapter->num_tx_desc * sizeof(struct e1000_tx_desc), EM_DBA_ALIGN); @@ -675,6 +745,11 @@ err_hw_init: err_rx_desc: lem_dma_free(adapter, &adapter->txdma); err_tx_desc: +#ifdef NIC_PARAVIRT + lem_dma_free(adapter, &adapter->csb_mem); +err_csb: +#endif /* NIC_PARAVIRT */ + err_pci: if (adapter->ifp != (void *)NULL) if_free_drv(adapter->ifp); @@ -762,6 +837,12 @@ lem_detach(device_t dev) adapter->rx_desc_base = NULL; } +#ifdef NIC_PARAVIRT + if (adapter->csb) { + lem_dma_free(adapter, &adapter->csb_mem); + adapter->csb = NULL; + } +#endif /* NIC_PARAVIRT */ lem_release_hw_control(adapter); free(adapter->mta, M_DEVBUF); EM_TX_LOCK_DESTROY(adapter); @@ -871,6 +952,16 @@ lem_start_locked(if_t ifp) } if (adapter->num_tx_desc_avail <= EM_TX_OP_THRESHOLD) if_setdrvflagbits(ifp, IFF_DRV_OACTIVE, 0); +#ifdef NIC_PARAVIRT + if (if_getdrvflags(ifp) & IFF_DRV_OACTIVE && adapter->csb && + adapter->csb->guest_csb_on && + !(adapter->csb->guest_need_txkick & 1)) { + adapter->csb->guest_need_txkick = 1; + adapter->guest_need_kick_count++; + // XXX memory barrier + lem_txeof(adapter); // XXX possibly clear IFF_DRV_OACTIVE + } +#endif /* NIC_PARAVIRT */ return; } @@ -1716,6 +1807,37 @@ lem_xmit(struct adapter *adapter, struct */ bus_dmamap_sync(adapter->txdma.dma_tag, adapter->txdma.dma_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); + +#ifdef NIC_PARAVIRT + if (adapter->csb) { + adapter->csb->guest_tdt = i; + /* XXX memory barrier ? */ + if (adapter->csb->guest_csb_on && + !(adapter->csb->host_need_txkick & 1)) { + /* XXX maybe useless + * clean the ring. maybe do it before ? + * maybe a little bit of histeresys ? + */ + if (adapter->num_tx_desc_avail <= 64) {// XXX + lem_txeof(adapter); + } + return (0); + } + } +#endif /* NIC_PARAVIRT */ + +#ifdef NIC_SEND_COMBINING + if (adapter->sc_enable) { + if (adapter->shadow_tdt & MIT_PENDING_INT) { + /* signal intr and data pending */ + adapter->shadow_tdt = MIT_PENDING_TDT | (i & 0xffff); + return (0); + } else { + adapter->shadow_tdt = MIT_PENDING_INT; + } + } +#endif /* NIC_SEND_COMBINING */ + if (adapter->hw.mac.type == e1000_82547 && adapter->link_duplex == HALF_DUPLEX) lem_82547_move_tail(adapter); @@ -1959,6 +2081,20 @@ lem_local_timer(void *arg) lem_smartspeed(adapter); +#ifdef NIC_PARAVIRT + /* recover space if needed */ + if (adapter->csb && adapter->csb->guest_csb_on && + (adapter->watchdog_check == TRUE) && + (ticks - adapter->watchdog_time > EM_WATCHDOG) && + (adapter->num_tx_desc_avail != adapter->num_tx_desc) ) { + lem_txeof(adapter); + /* + * lem_txeof() normally (except when space in the queue + * runs low XXX) cleans watchdog_check so that + * we do not hung. + */ + } +#endif /* NIC_PARAVIRT */ /* * We check the watchdog: the time since * the last TX descriptor was cleaned. @@ -2643,10 +2779,10 @@ lem_setup_transmit_structures(struct ada uint64_t paddr; void *addr; - addr = PNMB(slot + si, &paddr); + addr = PNMB(na, slot + si, &paddr); adapter->tx_desc_base[i].buffer_addr = htole64(paddr); /* reload the map for netmap mode */ - netmap_load_map(adapter->txtag, tx_buffer->map, addr); + netmap_load_map(na, adapter->txtag, tx_buffer->map, addr); } #endif /* DEV_NETMAP */ tx_buffer->next_eop = -1; @@ -3021,6 +3157,16 @@ lem_txeof(struct adapter *adapter) adapter->next_tx_to_clean = first; adapter->num_tx_desc_avail = num_avail; +#ifdef NIC_SEND_COMBINING + if ((adapter->shadow_tdt & MIT_PENDING_TDT) == MIT_PENDING_TDT) { + /* a tdt write is pending, do it */ + E1000_WRITE_REG(&adapter->hw, E1000_TDT(0), + 0xffff & adapter->shadow_tdt); + adapter->shadow_tdt = MIT_PENDING_INT; + } else { + adapter->shadow_tdt = 0; // disable + } +#endif /* NIC_SEND_COMBINING */ /* * If we have enough room, clear IFF_DRV_OACTIVE to * tell the stack that it is OK to send packets. @@ -3028,6 +3174,12 @@ lem_txeof(struct adapter *adapter) */ if (adapter->num_tx_desc_avail > EM_TX_CLEANUP_THRESHOLD) { if_setdrvflagbits(ifp, 0, IFF_DRV_OACTIVE); +#ifdef NIC_PARAVIRT + if (adapter->csb) { // XXX also csb_on ? + adapter->csb->guest_need_txkick = 2; /* acked */ + // XXX memory barrier + } +#endif /* NIC_PARAVIRT */ if (adapter->num_tx_desc_avail == adapter->num_tx_desc) { adapter->watchdog_check = FALSE; return; @@ -3213,8 +3365,8 @@ lem_setup_receive_structures(struct adap uint64_t paddr; void *addr; - addr = PNMB(slot + si, &paddr); - netmap_load_map(adapter->rxtag, rx_buffer->map, addr); + addr = PNMB(na, slot + si, &paddr); + netmap_load_map(na, adapter->rxtag, rx_buffer->map, addr); /* Update descriptor */ adapter->rx_desc_base[i].buffer_addr = htole64(paddr); continue; @@ -3413,7 +3565,23 @@ lem_rxeof(struct adapter *adapter, int c int i, rx_sent = 0; struct e1000_rx_desc *current_desc; +#ifdef BATCH_DISPATCH + struct mbuf *mh = NULL, *mt = NULL; +#endif /* BATCH_DISPATCH */ +#ifdef NIC_PARAVIRT + int retries = 0; + struct paravirt_csb* csb = adapter->csb; + int csb_mode = csb && csb->guest_csb_on; + + //ND("clear guest_rxkick at %d", adapter->next_rx_desc_to_check); + if (csb_mode && csb->guest_need_rxkick) + csb->guest_need_rxkick = 0; +#endif /* NIC_PARAVIRT */ EM_RX_LOCK(adapter); + +#ifdef BATCH_DISPATCH + batch_again: +#endif /* BATCH_DISPATCH */ i = adapter->next_rx_desc_to_check; current_desc = &adapter->rx_desc_base[i]; bus_dmamap_sync(adapter->rxdma.dma_tag, adapter->rxdma.dma_map, @@ -3426,19 +3594,45 @@ lem_rxeof(struct adapter *adapter, int c } #endif /* DEV_NETMAP */ +#if 1 // XXX optimization ? if (!((current_desc->status) & E1000_RXD_STAT_DD)) { if (done != NULL) *done = rx_sent; EM_RX_UNLOCK(adapter); return (FALSE); } +#endif /* 0 */ while (count != 0 && if_getdrvflags(ifp) & IFF_DRV_RUNNING) { struct mbuf *m = NULL; status = current_desc->status; - if ((status & E1000_RXD_STAT_DD) == 0) + if ((status & E1000_RXD_STAT_DD) == 0) { +#ifdef NIC_PARAVIRT + if (csb_mode) { + /* buffer not ready yet. Retry a few times before giving up */ + if (++retries <= adapter->rx_retries) { + continue; + } + if (csb->guest_need_rxkick == 0) { + // ND("set guest_rxkick at %d", adapter->next_rx_desc_to_check); + csb->guest_need_rxkick = 1; + // XXX memory barrier, status volatile ? + continue; /* double check */ + } + } + /* no buffer ready, give up */ +#endif /* NIC_PARAVIRT */ break; + } +#ifdef NIC_PARAVIRT + if (csb_mode) { + if (csb->guest_need_rxkick) + // ND("clear again guest_rxkick at %d", adapter->next_rx_desc_to_check); + csb->guest_need_rxkick = 0; + retries = 0; + } +#endif /* NIC_PARAVIRT */ mp = adapter->rx_buffer_area[i].m_head; /* @@ -3563,11 +3757,36 @@ discard: bus_dmamap_sync(adapter->rxdma.dma_tag, adapter->rxdma.dma_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); +#ifdef NIC_PARAVIRT + if (csb_mode) { + /* the buffer at i has been already replaced by lem_get_buf() + * so it is safe to set guest_rdt = i and possibly send a kick. + * XXX see if we can optimize it later. + */ + csb->guest_rdt = i; + // XXX memory barrier + if (i == csb->host_rxkick_at) + E1000_WRITE_REG(&adapter->hw, E1000_RDT(0), i); + } +#endif /* NIC_PARAVIRT */ /* Advance our pointers to the next descriptor. */ if (++i == adapter->num_rx_desc) i = 0; /* Call into the stack */ if (m != NULL) { +#ifdef BATCH_DISPATCH + if (adapter->batch_enable) { + if (mh == NULL) + mh = mt = m; + else + mt->m_nextpkt = m; + mt = m; + m->m_nextpkt = NULL; + rx_sent++; + current_desc = &adapter->rx_desc_base[i]; + continue; + } +#endif /* BATCH_DISPATCH */ adapter->next_rx_desc_to_check = i; EM_RX_UNLOCK(adapter); if_input(ifp, m); @@ -3578,10 +3797,27 @@ discard: current_desc = &adapter->rx_desc_base[i]; } adapter->next_rx_desc_to_check = i; +#ifdef BATCH_DISPATCH + if (mh) { + EM_RX_UNLOCK(adapter); + while ( (mt = mh) != NULL) { + mh = mh->m_nextpkt; + mt->m_nextpkt = NULL; + if_input(ifp, mt); + } + EM_RX_LOCK(adapter); + i = adapter->next_rx_desc_to_check; /* in case of interrupts */ + if (count > 0) + goto batch_again; + } +#endif /* BATCH_DISPATCH */ /* Advance the E1000's Receive Queue #0 "Tail Pointer". */ if (--i < 0) i = adapter->num_rx_desc - 1; +#ifdef NIC_PARAVIRT + if (!csb_mode) /* filter out writes */ +#endif /* NIC_PARAVIRT */ E1000_WRITE_REG(&adapter->hw, E1000_RDT(0), i); if (done != NULL) *done = rx_sent; Modified: head/sys/dev/ixgbe/ixgbe.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe.c Sat Aug 16 14:56:11 2014 (r270062) +++ head/sys/dev/ixgbe/ixgbe.c Sat Aug 16 15:00:01 2014 (r270063) @@ -3155,7 +3155,7 @@ ixgbe_setup_transmit_ring(struct tx_ring */ if (slot) { int si = netmap_idx_n2k(&na->tx_rings[txr->me], i); - netmap_load_map(txr->txtag, txbuf->map, NMB(slot + si)); + netmap_load_map(na, txr->txtag, txbuf->map, NMB(na, slot + si)); } #endif /* DEV_NETMAP */ /* Clear the EOP descriptor pointer */ @@ -4098,8 +4098,8 @@ ixgbe_setup_receive_ring(struct rx_ring uint64_t paddr; void *addr; - addr = PNMB(slot + sj, &paddr); - netmap_load_map(rxr->ptag, rxbuf->pmap, addr); + addr = PNMB(na, slot + sj, &paddr); + netmap_load_map(na, rxr->ptag, rxbuf->pmap, addr); /* Update descriptor and the cached value */ rxr->rx_base[j].read.pkt_addr = htole64(paddr); rxbuf->addr = htole64(paddr); Modified: head/sys/dev/netmap/if_em_netmap.h ============================================================================== --- head/sys/dev/netmap/if_em_netmap.h Sat Aug 16 14:56:11 2014 (r270062) +++ head/sys/dev/netmap/if_em_netmap.h Sat Aug 16 15:00:01 2014 (r270063) @@ -113,10 +113,10 @@ em_netmap_reg(struct netmap_adapter *na, * Reconcile kernel and user view of the transmit ring. */ static int -em_netmap_txsync(struct netmap_adapter *na, u_int ring_nr, int flags) +em_netmap_txsync(struct netmap_kring *kring, int flags) { + struct netmap_adapter *na = kring->na; struct ifnet *ifp = na->ifp; - struct netmap_kring *kring = &na->tx_rings[ring_nr]; struct netmap_ring *ring = kring->ring; u_int nm_i; /* index into the netmap ring */ u_int nic_i; /* index into the NIC ring */ @@ -128,7 +128,7 @@ em_netmap_txsync(struct netmap_adapter * /* device-specific */ struct adapter *adapter = ifp->if_softc; - struct tx_ring *txr = &adapter->tx_rings[ring_nr]; + struct tx_ring *txr = &adapter->tx_rings[kring->ring_id]; bus_dmamap_sync(txr->txdma.dma_tag, txr->txdma.dma_map, BUS_DMASYNC_POSTREAD); @@ -144,7 +144,7 @@ em_netmap_txsync(struct netmap_adapter * struct netmap_slot *slot = &ring->slot[nm_i]; u_int len = slot->len; uint64_t paddr; - void *addr = PNMB(slot, &paddr); + void *addr = PNMB(na, slot, &paddr); /* device-specific */ struct e1000_tx_desc *curr = &txr->tx_base[nic_i]; @@ -153,12 +153,12 @@ em_netmap_txsync(struct netmap_adapter * nic_i == 0 || nic_i == report_frequency) ? E1000_TXD_CMD_RS : 0; - NM_CHECK_ADDR_LEN(addr, len); + NM_CHECK_ADDR_LEN(na, addr, len); if (slot->flags & NS_BUF_CHANGED) { curr->buffer_addr = htole64(paddr); /* buffer has changed, reload map */ - netmap_reload_map(txr->txtag, txbuf->map, addr); + netmap_reload_map(na, txr->txtag, txbuf->map, addr); } slot->flags &= ~(NS_REPORT | NS_BUF_CHANGED); @@ -187,7 +187,7 @@ em_netmap_txsync(struct netmap_adapter * */ if (flags & NAF_FORCE_RECLAIM || nm_kr_txempty(kring)) { /* record completed transmissions using TDH */ - nic_i = E1000_READ_REG(&adapter->hw, E1000_TDH(ring_nr)); + nic_i = E1000_READ_REG(&adapter->hw, E1000_TDH(kring->ring_id)); if (nic_i >= kring->nkr_num_slots) { /* XXX can it happen ? */ D("TDH wrap %d", nic_i); nic_i -= kring->nkr_num_slots; @@ -208,10 +208,10 @@ em_netmap_txsync(struct netmap_adapter * * Reconcile kernel and user view of the receive ring. */ static int -em_netmap_rxsync(struct netmap_adapter *na, u_int ring_nr, int flags) +em_netmap_rxsync(struct netmap_kring *kring, int flags) { + struct netmap_adapter *na = kring->na; struct ifnet *ifp = na->ifp; - struct netmap_kring *kring = &na->rx_rings[ring_nr]; struct netmap_ring *ring = kring->ring; u_int nm_i; /* index into the netmap ring */ u_int nic_i; /* index into the NIC ring */ @@ -222,7 +222,7 @@ em_netmap_rxsync(struct netmap_adapter * /* device-specific */ struct adapter *adapter = ifp->if_softc; - struct rx_ring *rxr = &adapter->rx_rings[ring_nr]; + struct rx_ring *rxr = &adapter->rx_rings[kring->ring_id]; if (head > lim) return netmap_ring_reinit(kring); @@ -271,18 +271,18 @@ em_netmap_rxsync(struct netmap_adapter * for (n = 0; nm_i != head; n++) { struct netmap_slot *slot = &ring->slot[nm_i]; uint64_t paddr; - void *addr = PNMB(slot, &paddr); + void *addr = PNMB(na, slot, &paddr); struct e1000_rx_desc *curr = &rxr->rx_base[nic_i]; struct em_buffer *rxbuf = &rxr->rx_buffers[nic_i]; - if (addr == netmap_buffer_base) /* bad buf */ + if (addr == NETMAP_BUF_BASE(na)) /* bad buf */ goto ring_reset; if (slot->flags & NS_BUF_CHANGED) { /* buffer has changed, reload map */ curr->buffer_addr = htole64(paddr); - netmap_reload_map(rxr->rxtag, rxbuf->map, addr); + netmap_reload_map(na, rxr->rxtag, rxbuf->map, addr); slot->flags &= ~NS_BUF_CHANGED; } curr->status = 0; Modified: head/sys/dev/netmap/if_igb_netmap.h ============================================================================== --- head/sys/dev/netmap/if_igb_netmap.h Sat Aug 16 14:56:11 2014 (r270062) +++ head/sys/dev/netmap/if_igb_netmap.h Sat Aug 16 15:00:01 2014 (r270063) @@ -81,10 +81,10 @@ igb_netmap_reg(struct netmap_adapter *na * Reconcile kernel and user view of the transmit ring. */ static int -igb_netmap_txsync(struct netmap_adapter *na, u_int ring_nr, int flags) +igb_netmap_txsync(struct netmap_kring *kring, int flags) { + struct netmap_adapter *na = kring->na; struct ifnet *ifp = na->ifp; - struct netmap_kring *kring = &na->tx_rings[ring_nr]; struct netmap_ring *ring = kring->ring; u_int nm_i; /* index into the netmap ring */ u_int nic_i; /* index into the NIC ring */ @@ -96,7 +96,7 @@ igb_netmap_txsync(struct netmap_adapter /* device-specific */ struct adapter *adapter = ifp->if_softc; - struct tx_ring *txr = &adapter->tx_rings[ring_nr]; + struct tx_ring *txr = &adapter->tx_rings[kring->ring_id]; /* 82575 needs the queue index added */ u32 olinfo_status = (adapter->hw.mac.type == e1000_82575) ? (txr->me << 4) : 0; @@ -115,7 +115,7 @@ igb_netmap_txsync(struct netmap_adapter struct netmap_slot *slot = &ring->slot[nm_i]; u_int len = slot->len; uint64_t paddr; - void *addr = PNMB(slot, &paddr); + void *addr = PNMB(na, slot, &paddr); /* device-specific */ union e1000_adv_tx_desc *curr = @@ -125,11 +125,11 @@ igb_netmap_txsync(struct netmap_adapter nic_i == 0 || nic_i == report_frequency) ? E1000_ADVTXD_DCMD_RS : 0; - NM_CHECK_ADDR_LEN(addr, len); + NM_CHECK_ADDR_LEN(na, addr, len); if (slot->flags & NS_BUF_CHANGED) { /* buffer has changed, reload map */ - netmap_reload_map(txr->txtag, txbuf->map, addr); + netmap_reload_map(na, txr->txtag, txbuf->map, addr); } slot->flags &= ~(NS_REPORT | NS_BUF_CHANGED); @@ -171,7 +171,7 @@ igb_netmap_txsync(struct netmap_adapter */ if (flags & NAF_FORCE_RECLAIM || nm_kr_txempty(kring)) { /* record completed transmissions using TDH */ - nic_i = E1000_READ_REG(&adapter->hw, E1000_TDH(ring_nr)); + nic_i = E1000_READ_REG(&adapter->hw, E1000_TDH(kring->ring_id)); if (nic_i >= kring->nkr_num_slots) { /* XXX can it happen ? */ D("TDH wrap %d", nic_i); nic_i -= kring->nkr_num_slots; @@ -190,10 +190,10 @@ igb_netmap_txsync(struct netmap_adapter * Reconcile kernel and user view of the receive ring. */ static int -igb_netmap_rxsync(struct netmap_adapter *na, u_int ring_nr, int flags) +igb_netmap_rxsync(struct netmap_kring *kring, int flags) { + struct netmap_adapter *na = kring->na; struct ifnet *ifp = na->ifp; - struct netmap_kring *kring = &na->rx_rings[ring_nr]; struct netmap_ring *ring = kring->ring; u_int nm_i; /* index into the netmap ring */ u_int nic_i; /* index into the NIC ring */ @@ -204,7 +204,7 @@ igb_netmap_rxsync(struct netmap_adapter /* device-specific */ struct adapter *adapter = ifp->if_softc; - struct rx_ring *rxr = &adapter->rx_rings[ring_nr]; + struct rx_ring *rxr = &adapter->rx_rings[kring->ring_id]; if (head > lim) return netmap_ring_reinit(kring); @@ -251,17 +251,17 @@ igb_netmap_rxsync(struct netmap_adapter for (n = 0; nm_i != head; n++) { struct netmap_slot *slot = &ring->slot[nm_i]; uint64_t paddr; - void *addr = PNMB(slot, &paddr); + void *addr = PNMB(na, slot, &paddr); union e1000_adv_rx_desc *curr = &rxr->rx_base[nic_i]; struct igb_rx_buf *rxbuf = &rxr->rx_buffers[nic_i]; - if (addr == netmap_buffer_base) /* bad buf */ + if (addr == NETMAP_BUF_BASE(na)) /* bad buf */ goto ring_reset; if (slot->flags & NS_BUF_CHANGED) { /* buffer has changed, reload map */ - netmap_reload_map(rxr->ptag, rxbuf->pmap, addr); + netmap_reload_map(na, rxr->ptag, rxbuf->pmap, addr); slot->flags &= ~NS_BUF_CHANGED; } curr->wb.upper.status_error = 0; Modified: head/sys/dev/netmap/if_lem_netmap.h ============================================================================== --- head/sys/dev/netmap/if_lem_netmap.h Sat Aug 16 14:56:11 2014 (r270062) +++ head/sys/dev/netmap/if_lem_netmap.h Sat Aug 16 15:00:01 2014 (r270063) @@ -39,6 +39,7 @@ #include /* vtophys ? */ #include +extern int netmap_adaptive_io; /* * Register/unregister. We are already under netmap lock. @@ -84,10 +85,10 @@ lem_netmap_reg(struct netmap_adapter *na * Reconcile kernel and user view of the transmit ring. */ static int -lem_netmap_txsync(struct netmap_adapter *na, u_int ring_nr, int flags) +lem_netmap_txsync(struct netmap_kring *kring, int flags) { + struct netmap_adapter *na = kring->na; struct ifnet *ifp = na->ifp; - struct netmap_kring *kring = &na->tx_rings[ring_nr]; struct netmap_ring *ring = kring->ring; u_int nm_i; /* index into the netmap ring */ u_int nic_i; /* index into the NIC ring */ @@ -98,6 +99,10 @@ lem_netmap_txsync(struct netmap_adapter /* device-specific */ struct adapter *adapter = ifp->if_softc; +#ifdef NIC_PARAVIRT + struct paravirt_csb *csb = adapter->csb; + uint64_t *csbd = (uint64_t *)(csb + 1); +#endif /* NIC_PARAVIRT */ bus_dmamap_sync(adapter->txdma.dma_tag, adapter->txdma.dma_map, BUS_DMASYNC_POSTREAD); @@ -108,12 +113,25 @@ lem_netmap_txsync(struct netmap_adapter nm_i = kring->nr_hwcur; if (nm_i != head) { /* we have new packets to send */ +#ifdef NIC_PARAVIRT + int do_kick = 0; + uint64_t t = 0; // timestamp + int n = head - nm_i; + if (n < 0) + n += lim + 1; + if (csb) { + t = rdtsc(); /* last timestamp */ + csbd[16] += t - csbd[0]; /* total Wg */ + csbd[17] += n; /* Wg count */ + csbd[0] = t; + } +#endif /* NIC_PARAVIRT */ nic_i = netmap_idx_k2n(kring, nm_i); while (nm_i != head) { struct netmap_slot *slot = &ring->slot[nm_i]; u_int len = slot->len; uint64_t paddr; - void *addr = PNMB(slot, &paddr); + void *addr = PNMB(na, slot, &paddr); /* device-specific */ struct e1000_tx_desc *curr = &adapter->tx_desc_base[nic_i]; @@ -122,12 +140,12 @@ lem_netmap_txsync(struct netmap_adapter nic_i == 0 || nic_i == report_frequency) ? E1000_TXD_CMD_RS : 0; - NM_CHECK_ADDR_LEN(addr, len); + NM_CHECK_ADDR_LEN(na, addr, len); if (slot->flags & NS_BUF_CHANGED) { /* buffer has changed, reload map */ curr->buffer_addr = htole64(paddr); - netmap_reload_map(adapter->txtag, txbuf->map, addr); + netmap_reload_map(na, adapter->txtag, txbuf->map, addr); } slot->flags &= ~(NS_REPORT | NS_BUF_CHANGED); @@ -140,6 +158,7 @@ lem_netmap_txsync(struct netmap_adapter nm_i = nm_next(nm_i, lim); nic_i = nm_next(nic_i, lim); + // XXX might try an early kick } kring->nr_hwcur = head; @@ -147,8 +166,38 @@ lem_netmap_txsync(struct netmap_adapter bus_dmamap_sync(adapter->txdma.dma_tag, adapter->txdma.dma_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); +#ifdef NIC_PARAVIRT + /* set unconditionally, then also kick if needed */ + if (csb) { + t = rdtsc(); + if (csb->host_need_txkick == 2) { + /* can compute an update of delta */ + int64_t delta = t - csbd[3]; + if (delta < 0) + delta = -delta; + if (csbd[8] == 0 || delta < csbd[8]) { + csbd[8] = delta; + csbd[9]++; + } + csbd[10]++; + } + csb->guest_tdt = nic_i; + csbd[18] += t - csbd[0]; // total wp + csbd[19] += n; + } + if (!csb || !csb->guest_csb_on || (csb->host_need_txkick & 1)) + do_kick = 1; + if (do_kick) +#endif /* NIC_PARAVIRT */ /* (re)start the tx unit up to slot nic_i (excluded) */ E1000_WRITE_REG(&adapter->hw, E1000_TDT(0), nic_i); +#ifdef NIC_PARAVIRT + if (do_kick) { + uint64_t t1 = rdtsc(); + csbd[20] += t1 - t; // total Np + csbd[21]++; + } +#endif /* NIC_PARAVIRT */ } /* @@ -157,6 +206,93 @@ lem_netmap_txsync(struct netmap_adapter if (ticks != kring->last_reclaim || flags & NAF_FORCE_RECLAIM || nm_kr_txempty(kring)) { kring->last_reclaim = ticks; /* record completed transmissions using TDH */ +#ifdef NIC_PARAVIRT + /* host updates tdh unconditionally, and we have + * no side effects on reads, so we can read from there + * instead of exiting. + */ + if (csb) { + static int drain = 0, nodrain=0, good = 0, bad = 0, fail = 0; + u_int x = adapter->next_tx_to_clean; + csbd[19]++; // XXX count reclaims + nic_i = csb->host_tdh; + if (csb->guest_csb_on) { + if (nic_i == x) { + bad++; + csbd[24]++; // failed reclaims + /* no progress, request kick and retry */ + csb->guest_need_txkick = 1; + mb(); // XXX barrier + nic_i = csb->host_tdh; + } else { + good++; + } + if (nic_i != x) { + csb->guest_need_txkick = 2; + if (nic_i == csb->guest_tdt) + drain++; + else + nodrain++; +#if 1 + if (netmap_adaptive_io) { + /* new mechanism: last half ring (or so) + * released one slot at a time. + * This effectively makes the system spin. + * + * Take next_to_clean + 1 as a reference. + * tdh must be ahead or equal + * On entry, the logical order is + * x < tdh = nic_i + * We first push tdh up to avoid wraps. + * The limit is tdh-ll (half ring). + * if tdh-256 < x we report x; + * else we report tdh-256 + */ + u_int tdh = nic_i; + u_int ll = csbd[15]; + u_int delta = lim/8; + if (netmap_adaptive_io == 2 || ll > delta) + csbd[15] = ll = delta; + else if (netmap_adaptive_io == 1 && ll > 1) { + csbd[15]--; + } + + if (nic_i >= kring->nkr_num_slots) { + RD(5, "bad nic_i %d on input", nic_i); + } + x = nm_next(x, lim); + if (tdh < x) + tdh += lim + 1; + if (tdh <= x + ll) { + nic_i = x; + csbd[25]++; //report n + 1; + } else { + tdh = nic_i; + if (tdh < ll) + tdh += lim + 1; + nic_i = tdh - ll; + csbd[26]++; // report tdh - ll + } + } +#endif + } else { + /* we stop, count whether we are idle or not */ + int bh_active = csb->host_need_txkick & 2 ? 4 : 0; + csbd[27+ csb->host_need_txkick]++; + if (netmap_adaptive_io == 1) { + if (bh_active && csbd[15] > 1) + csbd[15]--; + else if (!bh_active && csbd[15] < lim/2) + csbd[15]++; + } + bad--; + fail++; + } + } + RD(1, "drain %d nodrain %d good %d retry %d fail %d", + drain, nodrain, good, bad, fail); + } else +#endif /* !NIC_PARAVIRT */ nic_i = E1000_READ_REG(&adapter->hw, E1000_TDH(0)); if (nic_i >= kring->nkr_num_slots) { /* XXX can it happen ? */ D("TDH wrap %d", nic_i); @@ -176,10 +312,10 @@ lem_netmap_txsync(struct netmap_adapter * Reconcile kernel and user view of the receive ring. */ static int -lem_netmap_rxsync(struct netmap_adapter *na, u_int ring_nr, int flags) +lem_netmap_rxsync(struct netmap_kring *kring, int flags) { + struct netmap_adapter *na = kring->na; struct ifnet *ifp = na->ifp; - struct netmap_kring *kring = &na->rx_rings[ring_nr]; struct netmap_ring *ring = kring->ring; u_int nm_i; /* index into the netmap ring */ u_int nic_i; /* index into the NIC ring */ @@ -190,10 +326,21 @@ lem_netmap_rxsync(struct netmap_adapter *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sat Aug 16 16:57:02 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 44211ADB; Sat, 16 Aug 2014 16:57:02 +0000 (UTC) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 0560B2039; Sat, 16 Aug 2014 16:57:01 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id D8C507300A; Sat, 16 Aug 2014 19:00:52 +0200 (CEST) Date: Sat, 16 Aug 2014 19:00:52 +0200 From: Luigi Rizzo To: Luigi Rizzo Subject: Re: svn commit: r270063 - in head: sys/conf sys/dev/cxgbe sys/dev/e1000 sys/dev/ixgbe sys/dev/netmap sys/dev/virtio/network sys/net tools/tools/netmap Message-ID: <20140816170052.GA58169@onelab2.iet.unipi.it> References: <201408161500.s7GF01KC085529@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201408161500.s7GF01KC085529@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Aug 2014 16:57:02 -0000 On Sat, Aug 16, 2014 at 03:00:01PM +0000, Luigi Rizzo wrote: > Author: luigi ... > 5. if_lem.c: support for various paravirtualization features, > experimental and disabled by default. > Most of these are described in our ANCS'13 paper [1]. > Paravirtualized support in netmap mode is new, and beats the > numbers in the paper by a large factor (under qemu-kvm, > we measured gues-host throughput up to 10-12 Mpps). ref. [1] is Luigi Rizzo, Giuseppe Lettieri, Vincenzo Maffione, Speeding up packet I/O in virtual machines, ACM/IEEE ANCS'13, October 2013, San Jose you can find a draft of the pdf on my research page http://info.iet.unipi.it/~luigi/research.html cheers luigi From owner-svn-src-head@FreeBSD.ORG Sat Aug 16 17:30:14 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BFFC3352; Sat, 16 Aug 2014 17:30:14 +0000 (UTC) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 76BDC229B; Sat, 16 Aug 2014 17:30:14 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id AA22525D3A98; Sat, 16 Aug 2014 17:30:02 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id CEDA1C26EAC; Sat, 16 Aug 2014 17:30:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id 4YXS1lMFqVaE; Sat, 16 Aug 2014 17:30:00 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4420:cabc:c8ff:fe8b:4fe6] (unknown [IPv6:fde9:577b:c1a9:4420:cabc:c8ff:fe8b:4fe6]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 9E6EEC26EA8; Sat, 16 Aug 2014 17:29:58 +0000 (UTC) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r270063 - in head: sys/conf sys/dev/cxgbe sys/dev/e1000 sys/dev/ixgbe sys/dev/netmap sys/dev/virtio/network sys/net tools/tools/netmap From: "Bjoern A. Zeeb" In-Reply-To: <201408161500.s7GF01KC085529@svn.freebsd.org> Date: Sat, 16 Aug 2014 17:29:56 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201408161500.s7GF01KC085529@svn.freebsd.org> To: Luigi Rizzo X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Aug 2014 17:30:14 -0000 On 16 Aug 2014, at 15:00 , Luigi Rizzo wrote: > Author: luigi > Date: Sat Aug 16 15:00:01 2014 > New Revision: 270063 > URL: http://svnweb.freebsd.org/changeset/base/270063 >=20 > Log: > Update to the current version of netmap. > Mostly bugfixes or features developed in the past 6 months, > so this is a 10.1 candidate. >=20 > Basically no user API changes (some bugfixes in = sys/net/netmap_user.h). > =85 > MFC after: 3 days. >=20 Or not=85 Sparc64: netmap.c:(.text+0x2a74): undefined reference to `netmap_get_monitor_na' i386.LINT and amd64.LINT and related: In file included from = /scratch/tmp/bz/head.svn/sys/modules/virtio/network/../../../dev/virtio/ne= twork/if_vtnet.c:293: @/dev/netmap/if_vtnet_netmap.h:46:1: error: no previous prototype for = function 'vtnet_netmap_free_bufs' [-Werror,-Wmissing-prototypes] vtnet_netmap_free_bufs(struct SOFTC_T* sc) ^ @/dev/netmap/if_vtnet_netmap.h:84:1: error: no previous prototype for = function 'vtnet_netmap_reg' [-Werror,-Wmissing-prototypes] vtnet_netmap_reg(struct netmap_adapter *na, int onoff) ^ @/dev/netmap/if_vtnet_netmap.h:240:26: error: suggest braces around = initialization of subobject [-Werror,-Wmissing-braces] struct sglist sg[1] =3D { ss, 0, 0, 2}; ^~~~~~~~~~~ { } 3 errors generated. --- if_vtnet.o --- *** [if_vtnet.o] Error code 1 No idea what else; it=92s all still compiling. =97=20 Bjoern A. Zeeb "Come on. Learn, goddamn it.", WarGames, 1983 From owner-svn-src-head@FreeBSD.ORG Sat Aug 16 19:13:53 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 41760CEF; Sat, 16 Aug 2014 19:13:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B4102D0E; Sat, 16 Aug 2014 19:13:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7GJDr7f012208; Sat, 16 Aug 2014 19:13:53 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7GJDqtF012204; Sat, 16 Aug 2014 19:13:52 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201408161913.s7GJDqtF012204@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sat, 16 Aug 2014 19:13:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270064 - head/sbin/ifconfig X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Aug 2014 19:13:53 -0000 Author: melifaro Date: Sat Aug 16 19:13:52 2014 New Revision: 270064 URL: http://svnweb.freebsd.org/changeset/base/270064 Log: Add support for reading i2c SFP/SFP+ data from NIC driver and presenting most interesting fields via ifconfig -v. This version supports Intel ixgbe driver only. Tested on: Cisco,Intel,Mellanox,ModuleTech,Molex transceivers MFC after: 2 weeks Added: head/sbin/ifconfig/sfp.c (contents, props changed) Modified: head/sbin/ifconfig/Makefile head/sbin/ifconfig/ifconfig.c head/sbin/ifconfig/ifconfig.h Modified: head/sbin/ifconfig/Makefile ============================================================================== --- head/sbin/ifconfig/Makefile Sat Aug 16 15:00:01 2014 (r270063) +++ head/sbin/ifconfig/Makefile Sat Aug 16 19:13:52 2014 (r270064) @@ -33,6 +33,9 @@ SRCS+= ifvlan.c # SIOC[GS]ETVLAN suppor SRCS+= ifgre.c # GRE keys etc SRCS+= ifgif.c # GIF reversed header workaround +SRCS+= sfp.c # SFP/SFP+ information +LDADD+= -lm + SRCS+= ifieee80211.c regdomain.c # SIOC[GS]IEEE80211 support DPADD+= ${LIBBSDXML} ${LIBSBUF} LDADD+= -lbsdxml -lsbuf Modified: head/sbin/ifconfig/ifconfig.c ============================================================================== --- head/sbin/ifconfig/ifconfig.c Sat Aug 16 15:00:01 2014 (r270063) +++ head/sbin/ifconfig/ifconfig.c Sat Aug 16 19:13:52 2014 (r270064) @@ -1011,6 +1011,9 @@ status(const struct afswtch *afp, const if (ioctl(s, SIOCGIFSTATUS, &ifs) == 0) printf("%s", ifs.ascii); + if (verbose > 0) + sfp_status(s, &ifr, verbose); + close(s); return; } Modified: head/sbin/ifconfig/ifconfig.h ============================================================================== --- head/sbin/ifconfig/ifconfig.h Sat Aug 16 15:00:01 2014 (r270063) +++ head/sbin/ifconfig/ifconfig.h Sat Aug 16 19:13:52 2014 (r270064) @@ -143,6 +143,8 @@ void ifmaybeload(const char *name); typedef void clone_callback_func(int, struct ifreq *); void clone_setdefcallback(const char *, clone_callback_func *); +void sfp_status(int s, struct ifreq *ifr, int verbose); + /* * XXX expose this so modules that neeed to know of any pending * operations on ifmedia can avoid cmd line ordering confusion. Added: head/sbin/ifconfig/sfp.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/ifconfig/sfp.c Sat Aug 16 19:13:52 2014 (r270064) @@ -0,0 +1,543 @@ +/*- + * Copyright (c) 2014 Alexander V. Chernikov. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef lint +static const char rcsid[] = + "$FreeBSD$"; +#endif /* not lint */ + +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "ifconfig.h" + +/* 2wire addresses */ +#define SFP_ADDR_MSA 0xA0 /* Identification data */ +#define SFP_ADDR_DDM 0xA2 /* digital monitoring interface */ + +/* Definitions from Table 3.1 */ +#define SFP_MSA_IDENTIFIER 0 /* Type of transceiver (T. 3.2), 1B */ +#define SFP_MSA_CONNECTOR 2 /* Connector type (T. 3.3), 1B */ + +#define SFP_MSA_TRANSCEIVER_CLASS 3 /* Ethernet/Sonet/IB code, 1B */ + +#define SFP_MSA_VENDOR_NAME 20 /* ASCII vendor name, 16B */ +#define SFP_MSA_VENDOR_PN 40 /* ASCII vendor partnum, 16B */ +#define SFP_MSA_VENDOR_SN 68 /* ASCII vendor serialnum, 16B */ +#define SFP_MSA_VENDOR_DATE 84 /* Vendor's date code, 8B */ +#define SFP_MSA_DMONTYPE 92 /* Type of disagnostic monitoring, 1B */ + +/* Definitions from table 3.17 */ +#define SFP_DDM_TEMP 96 /* Module temperature, 2B */ +#define SFP_DDM_TXPOWER 102 /* Measured TX output power, 2B */ +#define SFP_DDM_RXPOWER 104 /* Measured RX input power, 2B */ + +struct i2c_info; +typedef int (read_i2c)(struct i2c_info *ii, uint8_t addr, uint8_t off, + uint8_t len, caddr_t buf); + +struct i2c_info { + int s; + int error; + struct ifreq *ifr; + read_i2c *f; + uint8_t diag_type; + char *textbuf; + size_t bufsize; +}; + +struct _nv { + int v; + const char *n; +}; + +const char *find_value(struct _nv *x, int value); +const char *find_zero_bit(struct _nv *x, int value, int sz); + + +/* SFF-8472 Rev. 11.4 table 3.2: Identifier values */ +static struct _nv ids[] = { + { 0x00, "Unknown" }, + { 0x01, "GBIC" }, + { 0x02, "SFF" }, + { 0x03, "SFP/SFP+" }, + { 0x04, "300 pin XBI" }, + { 0x05, "Xenpak" }, + { 0x06, "XFP" }, + { 0x07, "XFF" }, + { 0x08, "XFP-E" }, + { 0x09, "XPak" }, + { 0x0A, "X2" }, + { 0x0B, "DWDM-SFP/DWDM-SFP+" }, + { 0x0C, "QSFP" }, + { 0, NULL, }, +}; + +/* SFF-8472 Rev. 11.4 table 3.4: Connector values */ +static struct _nv conn[] = { + { 0x00, "Unknown" }, + { 0x01, "SC" }, + { 0x02, "Fibre Channel Style 1 copper" }, + { 0x03, "Fibre Channel Style 2 copper" }, + { 0x04, "BNC/TNC" }, + { 0x05, "Fibre Channel coaxial" }, + { 0x06, "FiberJack" }, + { 0x07, "LC" }, + { 0x08, "MT-RJ" }, + { 0x09, "MU" }, + { 0x0A, "SG" }, + { 0x0B, "Optical pigtail" }, + { 0x0C, "MPO Parallel Optic" }, + { 0x20, "HSSDC II" }, + { 0x21, "Copper pigtail" }, + { 0x22, "RJ45" }, + { 0, NULL } +}; + +const char * +find_value(struct _nv *x, int value) +{ + for (; x->n != NULL; x++) + if (x->v == value) + return (x->n); + return (NULL); +} + +const char * +find_zero_bit(struct _nv *x, int value, int sz) +{ + int v, m; + const char *s; + + v = 1; + for (v = 1, m = 1 << (8 * sz); v < m; v *= 2) { + if ((value & v) == 0) + continue; + if ((s = find_value(x, value & v)) != NULL) { + value &= ~v; + return (s); + } + } + + return (NULL); +} + +static void +get_sfp_identifier(struct i2c_info *ii, char *buf, size_t size) +{ + const char *x; + uint8_t data; + + ii->f(ii, SFP_ADDR_MSA, SFP_MSA_IDENTIFIER, 1, (caddr_t)&data); + + if ((x = find_value(ids, data)) == NULL) { + if (data > 0x80) + x = "Vendor specific"; + else + x = "Reserved"; + } + + snprintf(buf, size, "%s", x); +} + +static void +get_sfp_connector(struct i2c_info *ii, char *buf, size_t size) +{ + const char *x; + uint8_t data; + + ii->f(ii, SFP_ADDR_MSA, SFP_MSA_CONNECTOR, 1, (caddr_t)&data); + + if ((x = find_value(conn, data)) == NULL) { + if (data >= 0x0D && data <= 0x1F) + x = "Unallocated"; + else if (data >= 0x23 && data <= 0x7F) + x = "Unallocated"; + else + x = "Vendor specific"; + } + + snprintf(buf, size, "%s", x); +} + +/* SFF-8472 Rev. 11.4 table 3.5: Transceiver codes */ +/* 10G Ethernet compliance codes, byte 3 */ +static struct _nv eth_10g[] = { + { 0x80, "10G Base-ER" }, + { 0x40, "10G Base-LRM" }, + { 0x20, "10G Base-LR" }, + { 0x10, "10G Base-SR" }, + { 0x08, "1X SX" }, + { 0x04, "1X LX" }, + { 0x02, "1X Copper Active" }, + { 0x01, "1X Copper Passive" }, + { 0, NULL } +}; + +/* Ethernet compliance codes, byte 6 */ +static struct _nv eth_compat[] = { + { 0x80, "BASE-PX" }, + { 0x40, "BASE-BX10" }, + { 0x20, "100BASE-FX" }, + { 0x10, "100BASE-LX/LX10" }, + { 0x08, "1000BASE-T" }, + { 0x04, "1000BASE-CX" }, + { 0x02, "1000BASE-LX" }, + { 0x01, "1000BASE-SX" }, + { 0, NULL } +}; + +/* FC link length, byte 7 */ +static struct _nv fc_len[] = { + { 0x80, "very long distance" }, + { 0x40, "short distance" }, + { 0x20, "intermediate distance" }, + { 0x10, "long distance" }, + { 0x08, "medium distance" }, + { 0, NULL } +}; + +/* Channel/Cable technology, byte 7-8 */ +static struct _nv cab_tech[] = { + { 0x0400, "Shortwave laser (SA)" }, + { 0x0200, "Longwave laser (LC)" }, + { 0x0100, "Electrical inter-enclosure (EL)" }, + { 0x80, "Electrical intra-enclosure (EL)" }, + { 0x40, "Shortwave laser (SN)" }, + { 0x20, "Shortwave laser (SL)" }, + { 0x10, "Longwave laser (LL)" }, + { 0x08, "Active Cable" }, + { 0x04, "Passive Cable" }, + { 0, NULL } +}; + +/* FC Transmission media, byte 9 */ +static struct _nv fc_media[] = { + { 0x80, "Twin Axial Pair" }, + { 0x40, "Twisted Pair" }, + { 0x20, "Miniature Coax" }, + { 0x10, "Viao Coax" }, + { 0x08, "Miltimode, 62.5um" }, + { 0x04, "Multimode, 50um" }, + { 0x02, "" }, + { 0x01, "Single Mode" }, + { 0, NULL } +}; + +/* FC Speed, byte 10 */ +static struct _nv fc_speed[] = { + { 0x80, "1200 MBytes/sec" }, + { 0x40, "800 MBytes/sec" }, + { 0x20, "1600 MBytes/sec" }, + { 0x10, "400 MBytes/sec" }, + { 0x08, "3200 MBytes/sec" }, + { 0x04, "200 MBytes/sec" }, + { 0x01, "100 MBytes/sec" }, + { 0, NULL } +}; + +static void +printf_sfp_transceiver_descr(struct i2c_info *ii, char *buf, size_t size) +{ + char xbuf[12]; + const char *tech_class, *tech_len, *tech_tech, *tech_media, *tech_speed; + + tech_class = NULL; + tech_len = NULL; + tech_tech = NULL; + tech_media = NULL; + tech_speed = NULL; + + /* Read bytes 3-10 at once */ + ii->f(ii, SFP_ADDR_MSA, 3, 8, &xbuf[3]); + + /* Check 10G first */ + tech_class = find_zero_bit(eth_10g, xbuf[3], 1); + if (tech_class == NULL) { + /* No match. Try 1G */ + tech_class = find_zero_bit(eth_compat, xbuf[6], 1); + } + + tech_len = find_zero_bit(fc_len, xbuf[7], 1); + tech_tech = find_zero_bit(cab_tech, xbuf[7] << 8 | xbuf[8], 2); + tech_media = find_zero_bit(fc_media, xbuf[9], 1); + tech_speed = find_zero_bit(fc_speed, xbuf[10], 1); + + printf("Class: %s\n", tech_class); + printf("Length: %s\n", tech_len); + printf("Tech: %s\n", tech_tech); + printf("Media: %s\n", tech_media); + printf("Speed: %s\n", tech_speed); +} + +static void +get_sfp_transceiver_class(struct i2c_info *ii, char *buf, size_t size) +{ + const char *tech_class; + uint8_t code; + + /* Check 10G Ethernet/IB first */ + ii->f(ii, SFP_ADDR_MSA, SFP_MSA_TRANSCEIVER_CLASS, 1, (caddr_t)&code); + tech_class = find_zero_bit(eth_10g, code, 1); + if (tech_class == NULL) { + /* No match. Try Ethernet 1G */ + ii->f(ii, SFP_ADDR_MSA, 6, 1, (caddr_t)&code); + tech_class = find_zero_bit(eth_compat, code, 1); + } + + if (tech_class == NULL) + tech_class = "Unknown"; + + snprintf(buf, size, "%s", tech_class); +} + + +static void +get_sfp_vendor_name(struct i2c_info *ii, char *buf, size_t size) +{ + char xbuf[17], *p; + + memset(xbuf, 0, sizeof(xbuf)); + /* ASCII String, right-padded with 0x20 */ + ii->f(ii, SFP_ADDR_MSA, SFP_MSA_VENDOR_NAME, 16, xbuf); + for (p = &xbuf[16]; *(p - 1) == 0x20; p--) + ; + *p = '\0'; + + snprintf(buf, size, "%s", xbuf); +} + +static void +get_sfp_vendor_pn(struct i2c_info *ii, char *buf, size_t size) +{ + char xbuf[17], *p; + + memset(xbuf, 0, sizeof(xbuf)); + /* ASCII String, right-padded with 0x20 */ + ii->f(ii, SFP_ADDR_MSA, SFP_MSA_VENDOR_PN, 16, xbuf); + for (p = &xbuf[16]; *(p - 1) == 0x20; p--) + ; + *p = '\0'; + + snprintf(buf, size, "%s", xbuf); +} + +static void +get_sfp_vendor_sn(struct i2c_info *ii, char *buf, size_t size) +{ + char xbuf[17], *p; + + memset(xbuf, 0, sizeof(xbuf)); + /* ASCII String, right-padded with 0x20 */ + ii->f(ii, SFP_ADDR_MSA, SFP_MSA_VENDOR_SN, 16, xbuf); + for (p = &xbuf[16]; *(p - 1) == 0x20; p--) + ; + *p = '\0'; + snprintf(buf, size, "%s", xbuf); +} + +static void +get_sfp_vendor_date(struct i2c_info *ii, char *buf, size_t size) +{ + char xbuf[6]; + + memset(xbuf, 0, sizeof(xbuf)); + /* Date code, see Table 3.8 for description */ + ii->f(ii, SFP_ADDR_MSA, SFP_MSA_VENDOR_DATE, 6, xbuf); + snprintf(buf, size, "20%c%c-%c%c-%c%c", xbuf[0], xbuf[1], + xbuf[2], xbuf[3], xbuf[4], xbuf[5]); +} + +static void +print_sfp_vendor(struct i2c_info *ii, char *buf, size_t size) +{ + char xbuf[80]; + + memset(xbuf, 0, sizeof(xbuf)); + get_sfp_vendor_name(ii, xbuf, 20); + get_sfp_vendor_pn(ii, &xbuf[20], 20); + get_sfp_vendor_sn(ii, &xbuf[40], 20); + get_sfp_vendor_date(ii, &xbuf[60], 20); + + snprintf(buf, size, "vendor: %s PN: %s SN: %s DATE: %s", + xbuf, &xbuf[20], &xbuf[40], &xbuf[60]); +} + +static void +get_sfp_temp(struct i2c_info *ii, char *buf, size_t size) +{ + char xbuf[2]; + + int8_t major; + uint8_t minor; + int k; + + memset(xbuf, 0, sizeof(xbuf)); + ii->f(ii, SFP_ADDR_DDM, SFP_DDM_TEMP, 2, xbuf); + + /* Convert temperature to string according to table 3.13 */ + major = (int8_t)xbuf[0]; + minor = (uint8_t)buf[1]; + k = minor * 1000 / 256; + + snprintf(buf, size, "%d.%d C", major, k / 100); +} + +static void +convert_power(struct i2c_info *ii, char *xbuf, char *buf, size_t size) +{ + uint16_t mW; + double dbm; + + mW = ((uint8_t)xbuf[0] << 8) + (uint8_t)xbuf[1]; + + /* Convert mw to dbm */ + dbm = 10.0 * log10(1.0 * mW / 10000); + + /* Table 3.9, bit 5 is set, internally calibrated */ + if ((ii->diag_type & 0x20) != 0) { + snprintf(buf, size, "%d.%02d mW (%.2f dBm)", + mW / 10000, (mW % 10000) / 100, dbm); + } +} + +static void +get_sfp_rx_power(struct i2c_info *ii, char *buf, size_t size) +{ + char xbuf[2]; + + memset(xbuf, 0, sizeof(xbuf)); + ii->f(ii, SFP_ADDR_DDM, SFP_DDM_RXPOWER, 2, xbuf); + convert_power(ii, xbuf, buf, size); +} + +static void +get_sfp_tx_power(struct i2c_info *ii, char *buf, size_t size) +{ + char xbuf[2]; + + memset(xbuf, 0, sizeof(xbuf)); + ii->f(ii, SFP_ADDR_DDM, SFP_DDM_TXPOWER, 2, xbuf); + convert_power(ii, xbuf, buf, size); +} + +/* Intel ixgbe-specific structures and handlers */ +struct ixgbe_i2c_req { + uint8_t dev_addr; + uint8_t offset; + uint8_t len; + uint8_t data[8]; +}; +#define SIOCGI2C SIOCGIFGENERIC + +static int +read_i2c_ixgbe(struct i2c_info *ii, uint8_t addr, uint8_t off, uint8_t len, + caddr_t buf) +{ + struct ixgbe_i2c_req ixreq; + int i; + + if (ii->error != 0) + return (ii->error); + + ii->ifr->ifr_data = (caddr_t)&ixreq; + + memset(&ixreq, 0, sizeof(ixreq)); + ixreq.dev_addr = addr; + + for (i = 0; i < len; i += 1) { + ixreq.offset = off + i; + ixreq.len = 1; + + if (ioctl(ii->s, SIOCGI2C, ii->ifr) != 0) { + ii->error = errno; + return (errno); + } + memcpy(&buf[i], ixreq.data, 1); + } + + return (0); +} + +void +sfp_status(int s, struct ifreq *ifr, int verbose) +{ + struct i2c_info ii; + char buf[80], buf2[40], buf3[40]; + + /* + * Check if we have i2c support for particular driver. + * TODO: Determine driver by original name. + */ + memset(&ii, 0, sizeof(ii)); + if (strncmp(ifr->ifr_name, "ix", 2) == 0) { + ii.f = read_i2c_ixgbe; + } else + return; + + /* Prepare necessary into to pass to NIC handler */ + ii.s = s; + ii.ifr = ifr; + + /* Read diagnostic monitoring type */ + ii.f(&ii, SFP_ADDR_MSA, SFP_MSA_DMONTYPE, 1, (caddr_t)&ii.diag_type); + + /* Transceiver type */ + get_sfp_identifier(&ii, buf, sizeof(buf)); + get_sfp_transceiver_class(&ii, buf2, sizeof(buf2)); + get_sfp_connector(&ii, buf3, sizeof(buf3)); + if (ii.error == 0) + printf("\ti2c: %s %s (%s)\n", buf, buf2, buf3); + if (verbose > 2) + printf_sfp_transceiver_descr(&ii, buf, sizeof(buf)); + print_sfp_vendor(&ii, buf, sizeof(buf)); + if (ii.error == 0) + printf("\t%s\n", buf); + /* + * Request current measurements iff they are implemented: + * Bit 6 must be set. + */ + if ((ii.diag_type & 0x40) != 0) { + get_sfp_temp(&ii, buf, sizeof(buf)); + get_sfp_rx_power(&ii, buf2, sizeof(buf2)); + get_sfp_tx_power(&ii, buf3, sizeof(buf3)); + printf("\tTemp: %s RX: %s TX: %s\n", buf, buf2, buf3); + } + + close(s); +} + From owner-svn-src-head@FreeBSD.ORG Sat Aug 16 20:44:46 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19962827; Sat, 16 Aug 2014 20:44:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05824281C; Sat, 16 Aug 2014 20:44:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7GKijWD053166; Sat, 16 Aug 2014 20:44:45 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7GKij8h053165; Sat, 16 Aug 2014 20:44:45 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201408162044.s7GKij8h053165@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 16 Aug 2014 20:44:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270065 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Aug 2014 20:44:46 -0000 Author: ian Date: Sat Aug 16 20:44:45 2014 New Revision: 270065 URL: http://svnweb.freebsd.org/changeset/base/270065 Log: Move the imx6 sysctl temperature info to hw.imx6 where all the other soc-wide info lives. It was under dev.imx6_anatop.0. What does anatop mean anyway? Nobody seems to know, so it's probably not where somebody will think to look for imx6 hardware info. Modified: head/sys/arm/freescale/imx/imx6_anatop.c Modified: head/sys/arm/freescale/imx/imx6_anatop.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_anatop.c Sat Aug 16 19:13:52 2014 (r270064) +++ head/sys/arm/freescale/imx/imx6_anatop.c Sat Aug 16 20:44:45 2014 (r270065) @@ -558,7 +558,6 @@ static void initialize_tempmon(struct imx6_anatop_softc *sc) { uint32_t cal; - struct sysctl_ctx_list *ctx; /* * Fetch calibration data: a sensor count at room temperature (25C), @@ -602,11 +601,10 @@ initialize_tempmon(struct imx6_anatop_so callout_reset_sbt(&sc->temp_throttle_callout, sc->temp_throttle_delay, 0, tempmon_throttle_check, sc, 0); - ctx = device_get_sysctl_ctx(sc->dev); - SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(device_get_sysctl_tree(sc->dev)), + SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx6), OID_AUTO, "temperature", CTLTYPE_INT | CTLFLAG_RD, sc, 0, temp_sysctl_handler, "IK", "Current die temperature"); - SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(device_get_sysctl_tree(sc->dev)), + SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx6), OID_AUTO, "throttle_temperature", CTLTYPE_INT | CTLFLAG_RW, sc, 0, temp_throttle_sysctl_handler, "IK", "Throttle CPU when exceeding this temperature"); From owner-svn-src-head@FreeBSD.ORG Sat Aug 16 21:42:56 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C1F3BB; Sat, 16 Aug 2014 21:42:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6699F2026; Sat, 16 Aug 2014 21:42:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7GLguNc081437; Sat, 16 Aug 2014 21:42:56 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7GLgtPF081431; Sat, 16 Aug 2014 21:42:55 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201408162142.s7GLgtPF081431@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 16 Aug 2014 21:42:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270067 - in head/sys: cddl/dev/fbt cddl/dev/fbt/powerpc cddl/dev/fbt/x86 modules/dtrace/fbt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Aug 2014 21:42:56 -0000 Author: markj Date: Sat Aug 16 21:42:55 2014 New Revision: 270067 URL: http://svnweb.freebsd.org/changeset/base/270067 Log: Factor out the common code for function boundary tracing instead of duplicating the entire implementation for both x86 and powerpc. This makes it easier to add support for other architectures and has no functional impact. Phabric: D613 Reviewed by: gnn, jhibbits, rpaulo Tested by: jhibbits (powerpc) MFC after: 2 weeks Added: head/sys/cddl/dev/fbt/fbt.h (contents, props changed) head/sys/cddl/dev/fbt/powerpc/ head/sys/cddl/dev/fbt/powerpc/fbt_isa.c (contents, props changed) head/sys/cddl/dev/fbt/powerpc/fbt_isa.h (contents, props changed) head/sys/cddl/dev/fbt/x86/ head/sys/cddl/dev/fbt/x86/fbt_isa.c (contents, props changed) head/sys/cddl/dev/fbt/x86/fbt_isa.h (contents, props changed) Deleted: head/sys/cddl/dev/fbt/fbt_powerpc.c Modified: head/sys/cddl/dev/fbt/fbt.c head/sys/modules/dtrace/fbt/Makefile Modified: head/sys/cddl/dev/fbt/fbt.c ============================================================================== --- head/sys/cddl/dev/fbt/fbt.c Sat Aug 16 21:36:22 2014 (r270066) +++ head/sys/cddl/dev/fbt/fbt.c Sat Aug 16 21:42:55 2014 (r270067) @@ -61,25 +61,13 @@ #include #include -static MALLOC_DEFINE(M_FBT, "fbt", "Function Boundary Tracing"); +#include "fbt.h" -#define FBT_PUSHL_EBP 0x55 -#define FBT_MOVL_ESP_EBP0_V0 0x8b -#define FBT_MOVL_ESP_EBP1_V0 0xec -#define FBT_MOVL_ESP_EBP0_V1 0x89 -#define FBT_MOVL_ESP_EBP1_V1 0xe5 -#define FBT_REX_RSP_RBP 0x48 - -#define FBT_POPL_EBP 0x5d -#define FBT_RET 0xc3 -#define FBT_RET_IMM16 0xc2 -#define FBT_LEAVE 0xc9 - -#ifdef __amd64__ -#define FBT_PATCHVAL 0xcc -#else -#define FBT_PATCHVAL 0xf0 -#endif +MALLOC_DEFINE(M_FBT, "fbt", "Function Boundary Tracing"); + +dtrace_provider_id_t fbt_id; +fbt_probe_t **fbt_probetab; +int fbt_probetab_mask; static d_open_t fbt_open; static int fbt_unload(void); @@ -92,11 +80,6 @@ static void fbt_load(void *); static void fbt_suspend(void *, dtrace_id_t, void *); static void fbt_resume(void *, dtrace_id_t, void *); -#define FBT_ENTRY "entry" -#define FBT_RETURN "return" -#define FBT_ADDR2NDX(addr) ((((uintptr_t)(addr)) >> 4) & fbt_probetab_mask) -#define FBT_PROBETAB_SIZE 0x8000 /* 32k entries -- 128K total */ - static struct cdevsw fbt_cdevsw = { .d_version = D_VERSION, .d_open = fbt_open, @@ -124,28 +107,8 @@ static dtrace_pops_t fbt_pops = { fbt_destroy }; -typedef struct fbt_probe { - struct fbt_probe *fbtp_hashnext; - uint8_t *fbtp_patchpoint; - int8_t fbtp_rval; - uint8_t fbtp_patchval; - uint8_t fbtp_savedval; - uintptr_t fbtp_roffset; - dtrace_id_t fbtp_id; - const char *fbtp_name; - modctl_t *fbtp_ctl; - int fbtp_loadcnt; - int fbtp_primary; - int fbtp_invop_cnt; - int fbtp_symindx; - struct fbt_probe *fbtp_next; -} fbt_probe_t; - static struct cdev *fbt_cdev; -static dtrace_provider_id_t fbt_id; -static fbt_probe_t **fbt_probetab; static int fbt_probetab_size; -static int fbt_probetab_mask; static int fbt_verbose = 0; static void @@ -162,257 +125,6 @@ fbt_doubletrap(void) } } -static int -fbt_invop(uintptr_t addr, uintptr_t *stack, uintptr_t rval) -{ - solaris_cpu_t *cpu = &solaris_cpu[curcpu]; - uintptr_t stack0, stack1, stack2, stack3, stack4; - fbt_probe_t *fbt = fbt_probetab[FBT_ADDR2NDX(addr)]; - - for (; fbt != NULL; fbt = fbt->fbtp_hashnext) { - if ((uintptr_t)fbt->fbtp_patchpoint == addr) { - fbt->fbtp_invop_cnt++; - if (fbt->fbtp_roffset == 0) { - int i = 0; - /* - * When accessing the arguments on the stack, - * we must protect against accessing beyond - * the stack. We can safely set NOFAULT here - * -- we know that interrupts are already - * disabled. - */ - DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT); - cpu->cpu_dtrace_caller = stack[i++]; - stack0 = stack[i++]; - stack1 = stack[i++]; - stack2 = stack[i++]; - stack3 = stack[i++]; - stack4 = stack[i++]; - DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT | - CPU_DTRACE_BADADDR); - - dtrace_probe(fbt->fbtp_id, stack0, stack1, - stack2, stack3, stack4); - - cpu->cpu_dtrace_caller = 0; - } else { -#ifdef __amd64__ - /* - * On amd64, we instrument the ret, not the - * leave. We therefore need to set the caller - * to assure that the top frame of a stack() - * action is correct. - */ - DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT); - cpu->cpu_dtrace_caller = stack[0]; - DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT | - CPU_DTRACE_BADADDR); -#endif - - dtrace_probe(fbt->fbtp_id, fbt->fbtp_roffset, - rval, 0, 0, 0); - cpu->cpu_dtrace_caller = 0; - } - - return (fbt->fbtp_rval); - } - } - - return (0); -} - -static int -fbt_provide_module_function(linker_file_t lf, int symindx, - linker_symval_t *symval, void *opaque) -{ - char *modname = opaque; - const char *name = symval->name; - fbt_probe_t *fbt, *retfbt; - int j; - int size; - u_int8_t *instr, *limit; - - if ((strncmp(name, "dtrace_", 7) == 0 && - strncmp(name, "dtrace_safe_", 12) != 0) || - strcmp(name, "trap_check") == 0) { - /* - * Anything beginning with "dtrace_" may be called - * from probe context unless it explicitly indicates - * that it won't be called from probe context by - * using the prefix "dtrace_safe_". - * - * Additionally, we avoid instrumenting trap_check() to avoid - * the possibility of generating a fault in probe context before - * DTrace's fault handler is called. - */ - return (0); - } - - if (name[0] == '_' && name[1] == '_') - return (0); - - size = symval->size; - - instr = (u_int8_t *) symval->value; - limit = (u_int8_t *) symval->value + symval->size; - -#ifdef __amd64__ - while (instr < limit) { - if (*instr == FBT_PUSHL_EBP) - break; - - if ((size = dtrace_instr_size(instr)) <= 0) - break; - - instr += size; - } - - if (instr >= limit || *instr != FBT_PUSHL_EBP) { - /* - * We either don't save the frame pointer in this - * function, or we ran into some disassembly - * screw-up. Either way, we bail. - */ - return (0); - } -#else - if (instr[0] != FBT_PUSHL_EBP) - return (0); - - if (!(instr[1] == FBT_MOVL_ESP_EBP0_V0 && - instr[2] == FBT_MOVL_ESP_EBP1_V0) && - !(instr[1] == FBT_MOVL_ESP_EBP0_V1 && - instr[2] == FBT_MOVL_ESP_EBP1_V1)) - return (0); -#endif - - fbt = malloc(sizeof (fbt_probe_t), M_FBT, M_WAITOK | M_ZERO); - fbt->fbtp_name = name; - fbt->fbtp_id = dtrace_probe_create(fbt_id, modname, - name, FBT_ENTRY, 3, fbt); - fbt->fbtp_patchpoint = instr; - fbt->fbtp_ctl = lf; - fbt->fbtp_loadcnt = lf->loadcnt; - fbt->fbtp_rval = DTRACE_INVOP_PUSHL_EBP; - fbt->fbtp_savedval = *instr; - fbt->fbtp_patchval = FBT_PATCHVAL; - fbt->fbtp_symindx = symindx; - - fbt->fbtp_hashnext = fbt_probetab[FBT_ADDR2NDX(instr)]; - fbt_probetab[FBT_ADDR2NDX(instr)] = fbt; - - lf->fbt_nentries++; - - retfbt = NULL; -again: - if (instr >= limit) - return (0); - - /* - * If this disassembly fails, then we've likely walked off into - * a jump table or some other unsuitable area. Bail out of the - * disassembly now. - */ - if ((size = dtrace_instr_size(instr)) <= 0) - return (0); - -#ifdef __amd64__ - /* - * We only instrument "ret" on amd64 -- we don't yet instrument - * ret imm16, largely because the compiler doesn't seem to - * (yet) emit them in the kernel... - */ - if (*instr != FBT_RET) { - instr += size; - goto again; - } -#else - if (!(size == 1 && - (*instr == FBT_POPL_EBP || *instr == FBT_LEAVE) && - (*(instr + 1) == FBT_RET || - *(instr + 1) == FBT_RET_IMM16))) { - instr += size; - goto again; - } -#endif - - /* - * We (desperately) want to avoid erroneously instrumenting a - * jump table, especially given that our markers are pretty - * short: two bytes on x86, and just one byte on amd64. To - * determine if we're looking at a true instruction sequence - * or an inline jump table that happens to contain the same - * byte sequences, we resort to some heuristic sleeze: we - * treat this instruction as being contained within a pointer, - * and see if that pointer points to within the body of the - * function. If it does, we refuse to instrument it. - */ - for (j = 0; j < sizeof (uintptr_t); j++) { - caddr_t check = (caddr_t) instr - j; - uint8_t *ptr; - - if (check < symval->value) - break; - - if (check + sizeof (caddr_t) > (caddr_t)limit) - continue; - - ptr = *(uint8_t **)check; - - if (ptr >= (uint8_t *) symval->value && ptr < limit) { - instr += size; - goto again; - } - } - - /* - * We have a winner! - */ - fbt = malloc(sizeof (fbt_probe_t), M_FBT, M_WAITOK | M_ZERO); - fbt->fbtp_name = name; - - if (retfbt == NULL) { - fbt->fbtp_id = dtrace_probe_create(fbt_id, modname, - name, FBT_RETURN, 3, fbt); - } else { - retfbt->fbtp_next = fbt; - fbt->fbtp_id = retfbt->fbtp_id; - } - - retfbt = fbt; - fbt->fbtp_patchpoint = instr; - fbt->fbtp_ctl = lf; - fbt->fbtp_loadcnt = lf->loadcnt; - fbt->fbtp_symindx = symindx; - -#ifndef __amd64__ - if (*instr == FBT_POPL_EBP) { - fbt->fbtp_rval = DTRACE_INVOP_POPL_EBP; - } else { - ASSERT(*instr == FBT_LEAVE); - fbt->fbtp_rval = DTRACE_INVOP_LEAVE; - } - fbt->fbtp_roffset = - (uintptr_t)(instr - (uint8_t *) symval->value) + 1; - -#else - ASSERT(*instr == FBT_RET); - fbt->fbtp_rval = DTRACE_INVOP_RET; - fbt->fbtp_roffset = - (uintptr_t)(instr - (uint8_t *) symval->value); -#endif - - fbt->fbtp_savedval = *instr; - fbt->fbtp_patchval = FBT_PATCHVAL; - fbt->fbtp_hashnext = fbt_probetab[FBT_ADDR2NDX(instr)]; - fbt_probetab[FBT_ADDR2NDX(instr)] = fbt; - - lf->fbt_nentries++; - - instr += size; - goto again; -} - static void fbt_provide_module(void *arg, modctl_t *lf) { @@ -524,9 +236,8 @@ fbt_enable(void *arg, dtrace_id_t id, vo return; } - for (; fbt != NULL; fbt = fbt->fbtp_next) { - *fbt->fbtp_patchpoint = fbt->fbtp_patchval; - } + for (; fbt != NULL; fbt = fbt->fbtp_next) + fbt_patch_tracepoint(fbt, fbt->fbtp_patchval); } static void @@ -542,7 +253,7 @@ fbt_disable(void *arg, dtrace_id_t id, v return; for (; fbt != NULL; fbt = fbt->fbtp_next) - *fbt->fbtp_patchpoint = fbt->fbtp_savedval; + fbt_patch_tracepoint(fbt, fbt->fbtp_patchval); } static void @@ -557,7 +268,7 @@ fbt_suspend(void *arg, dtrace_id_t id, v return; for (; fbt != NULL; fbt = fbt->fbtp_next) - *fbt->fbtp_patchpoint = fbt->fbtp_savedval; + fbt_patch_tracepoint(fbt, fbt->fbtp_patchval); } static void @@ -572,7 +283,7 @@ fbt_resume(void *arg, dtrace_id_t id, vo return; for (; fbt != NULL; fbt = fbt->fbtp_next) - *fbt->fbtp_patchpoint = fbt->fbtp_patchval; + fbt_patch_tracepoint(fbt, fbt->fbtp_patchval); } static int Added: head/sys/cddl/dev/fbt/fbt.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/cddl/dev/fbt/fbt.h Sat Aug 16 21:42:55 2014 (r270067) @@ -0,0 +1,73 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + * + * Portions Copyright 2006-2008 John Birrell jb@freebsd.org + * + * $FreeBSD$ + * + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#ifndef _FBT_H_ +#define _FBT_H_ + +#include "fbt_isa.h" + +typedef struct fbt_probe { + struct fbt_probe *fbtp_hashnext; + fbt_patchval_t *fbtp_patchpoint; + int8_t fbtp_rval; + fbt_patchval_t fbtp_patchval; + fbt_patchval_t fbtp_savedval; + uintptr_t fbtp_roffset; + dtrace_id_t fbtp_id; + const char *fbtp_name; + modctl_t *fbtp_ctl; + int fbtp_loadcnt; + int fbtp_primary; + int fbtp_invop_cnt; + int fbtp_symindx; + struct fbt_probe *fbtp_next; +} fbt_probe_t; + +struct linker_file; +struct linker_symval; + +int fbt_invop(uintptr_t, uintptr_t *, uintptr_t); +void fbt_patch_tracepoint(fbt_probe_t *, fbt_patchval_t); +int fbt_provide_module_function(struct linker_file *, int, + struct linker_symval *, void *); + +extern dtrace_provider_id_t fbt_id; +extern fbt_probe_t **fbt_probetab; +extern int fbt_probetab_mask; + +#define FBT_ADDR2NDX(addr) ((((uintptr_t)(addr)) >> 4) & fbt_probetab_mask) +#define FBT_PROBETAB_SIZE 0x8000 /* 32k entries -- 128K total */ + +#ifdef MALLOC_DECLARE +MALLOC_DECLARE(M_FBT); +#endif + +#endif Added: head/sys/cddl/dev/fbt/powerpc/fbt_isa.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/cddl/dev/fbt/powerpc/fbt_isa.c Sat Aug 16 21:42:55 2014 (r270067) @@ -0,0 +1,241 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + * + * Portions Copyright 2006-2008 John Birrell jb@freebsd.org + * Portions Copyright 2013 Justin Hibbits jhibbits@freebsd.org + * + * $FreeBSD$ + * + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#include +#include +#include +#include + +#include "fbt.h" + +#define FBT_PATCHVAL 0x7c810808 +#define FBT_MFLR_R0 0x7c0802a6 +#define FBT_MTLR_R0 0x7c0803a6 +#define FBT_BLR 0x4e800020 +#define FBT_BCTR 0x4e800030 +#define FBT_BRANCH 0x48000000 +#define FBT_BR_MASK 0x03fffffc +#define FBT_IS_JUMP(instr) ((instr & ~FBT_BR_MASK) == FBT_BRANCH) + +#define FBT_ENTRY "entry" +#define FBT_RETURN "return" + +int +fbt_invop(uintptr_t addr, uintptr_t *stack, uintptr_t rval) +{ + struct trapframe *frame = (struct trapframe *)stack; + solaris_cpu_t *cpu = &solaris_cpu[curcpu]; + fbt_probe_t *fbt = fbt_probetab[FBT_ADDR2NDX(addr)]; + uintptr_t tmp; + + for (; fbt != NULL; fbt = fbt->fbtp_hashnext) { + if ((uintptr_t)fbt->fbtp_patchpoint == addr) { + fbt->fbtp_invop_cnt++; + if (fbt->fbtp_roffset == 0) { + cpu->cpu_dtrace_caller = addr; + + dtrace_probe(fbt->fbtp_id, frame->fixreg[3], + frame->fixreg[4], frame->fixreg[5], + frame->fixreg[6], frame->fixreg[7]); + + cpu->cpu_dtrace_caller = 0; + } else { + + dtrace_probe(fbt->fbtp_id, fbt->fbtp_roffset, + rval, 0, 0, 0); + /* + * The caller doesn't have the fbt item, so + * fixup tail calls here. + */ + if (fbt->fbtp_rval == DTRACE_INVOP_JUMP) { + frame->srr0 = (uintptr_t)fbt->fbtp_patchpoint; + tmp = fbt->fbtp_savedval & FBT_BR_MASK; + /* Sign extend. */ + if (tmp & 0x02000000) +#ifdef __powerpc64__ + tmp |= 0xfffffffffc000000ULL; +#else + tmp |= 0xfc000000UL; +#endif + frame->srr0 += tmp; + } + cpu->cpu_dtrace_caller = 0; + } + + return (fbt->fbtp_rval); + } + } + + return (0); +} + +void +fbt_patch_tracepoint(fbt_probe_t *fbt, fbt_patchval_t val) +{ + + *fbt->fbtp_patchpoint = val; + __syncicache(fbt->fbtp_patchpoint, 4); +} + +int +fbt_provide_module_function(linker_file_t lf, int symindx, + linker_symval_t *symval, void *opaque) +{ + char *modname = opaque; + const char *name = symval->name; + fbt_probe_t *fbt, *retfbt; + int j; + uint32_t *instr, *limit; + + /* PowerPC64 uses '.' prefixes on symbol names, ignore it. */ + if (name[0] == '.') + name++; + + if (strncmp(name, "dtrace_", 7) == 0 && + strncmp(name, "dtrace_safe_", 12) != 0) { + /* + * Anything beginning with "dtrace_" may be called + * from probe context unless it explicitly indicates + * that it won't be called from probe context by + * using the prefix "dtrace_safe_". + */ + return (0); + } + + if (name[0] == '_' && name[1] == '_') + return (0); + + instr = (uint32_t *) symval->value; + limit = (uint32_t *) (symval->value + symval->size); + + for (; instr < limit; instr++) + if (*instr == FBT_MFLR_R0) + break; + + if (*instr != FBT_MFLR_R0) + return (0); + + fbt = malloc(sizeof (fbt_probe_t), M_FBT, M_WAITOK | M_ZERO); + fbt->fbtp_name = name; + fbt->fbtp_id = dtrace_probe_create(fbt_id, modname, + name, FBT_ENTRY, 3, fbt); + fbt->fbtp_patchpoint = instr; + fbt->fbtp_ctl = lf; + fbt->fbtp_loadcnt = lf->loadcnt; + fbt->fbtp_savedval = *instr; + fbt->fbtp_patchval = FBT_PATCHVAL; + fbt->fbtp_rval = DTRACE_INVOP_MFLR_R0; + fbt->fbtp_symindx = symindx; + + fbt->fbtp_hashnext = fbt_probetab[FBT_ADDR2NDX(instr)]; + fbt_probetab[FBT_ADDR2NDX(instr)] = fbt; + + lf->fbt_nentries++; + + retfbt = NULL; +again: + if (instr >= limit) + return (0); + + /* + * We (desperately) want to avoid erroneously instrumenting a + * jump table. To determine if we're looking at a true instruction + * sequence or an inline jump table that happens to contain the same + * byte sequences, we resort to some heuristic sleeze: we treat this + * instruction as being contained within a pointer, and see if that + * pointer points to within the body of the function. If it does, we + * refuse to instrument it. + */ + { + uint32_t *ptr; + + ptr = *(uint32_t **)instr; + + if (ptr >= (uint32_t *) symval->value && ptr < limit) { + instr++; + goto again; + } + } + + if (*instr != FBT_MTLR_R0) { + instr++; + goto again; + } + + instr++; + + for (j = 0; j < 12 && instr < limit; j++, instr++) { + if ((*instr == FBT_BCTR) || (*instr == FBT_BLR) || + FBT_IS_JUMP(*instr)) + break; + } + + if (!(*instr == FBT_BCTR || *instr == FBT_BLR || FBT_IS_JUMP(*instr))) + goto again; + + /* + * We have a winner! + */ + fbt = malloc(sizeof (fbt_probe_t), M_FBT, M_WAITOK | M_ZERO); + fbt->fbtp_name = name; + + if (retfbt == NULL) { + fbt->fbtp_id = dtrace_probe_create(fbt_id, modname, + name, FBT_RETURN, 5, fbt); + } else { + retfbt->fbtp_next = fbt; + fbt->fbtp_id = retfbt->fbtp_id; + } + + retfbt = fbt; + fbt->fbtp_patchpoint = instr; + fbt->fbtp_ctl = lf; + fbt->fbtp_loadcnt = lf->loadcnt; + fbt->fbtp_symindx = symindx; + + if (*instr == FBT_BCTR) + fbt->fbtp_rval = DTRACE_INVOP_BCTR; + else if (*instr == FBT_BLR) + fbt->fbtp_rval = DTRACE_INVOP_RET; + else + fbt->fbtp_rval = DTRACE_INVOP_JUMP; + + fbt->fbtp_savedval = *instr; + fbt->fbtp_patchval = FBT_PATCHVAL; + fbt->fbtp_hashnext = fbt_probetab[FBT_ADDR2NDX(instr)]; + fbt_probetab[FBT_ADDR2NDX(instr)] = fbt; + + lf->fbt_nentries++; + + instr += 4; + goto again; +} Added: head/sys/cddl/dev/fbt/powerpc/fbt_isa.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/cddl/dev/fbt/powerpc/fbt_isa.h Sat Aug 16 21:42:55 2014 (r270067) @@ -0,0 +1,30 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + * + * $FreeBSD$ + * + */ + +#ifndef _FBT_ISA_H_ +#define _FBT_ISA_H_ + +typedef uint32_t fbt_patchval_t; + +#endif Added: head/sys/cddl/dev/fbt/x86/fbt_isa.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/cddl/dev/fbt/x86/fbt_isa.c Sat Aug 16 21:42:55 2014 (r270067) @@ -0,0 +1,316 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + * + * Portions Copyright 2006-2008 John Birrell jb@freebsd.org + * + * $FreeBSD$ + * + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#include +#include + +#include + +#include "fbt.h" + +#define FBT_PUSHL_EBP 0x55 +#define FBT_MOVL_ESP_EBP0_V0 0x8b +#define FBT_MOVL_ESP_EBP1_V0 0xec +#define FBT_MOVL_ESP_EBP0_V1 0x89 +#define FBT_MOVL_ESP_EBP1_V1 0xe5 +#define FBT_REX_RSP_RBP 0x48 + +#define FBT_POPL_EBP 0x5d +#define FBT_RET 0xc3 +#define FBT_RET_IMM16 0xc2 +#define FBT_LEAVE 0xc9 + +#ifdef __amd64__ +#define FBT_PATCHVAL 0xcc +#else +#define FBT_PATCHVAL 0xf0 +#endif + +#define FBT_ENTRY "entry" +#define FBT_RETURN "return" + +int +fbt_invop(uintptr_t addr, uintptr_t *stack, uintptr_t rval) +{ + solaris_cpu_t *cpu = &solaris_cpu[curcpu]; + uintptr_t stack0, stack1, stack2, stack3, stack4; + fbt_probe_t *fbt = fbt_probetab[FBT_ADDR2NDX(addr)]; + + for (; fbt != NULL; fbt = fbt->fbtp_hashnext) { + if ((uintptr_t)fbt->fbtp_patchpoint == addr) { + fbt->fbtp_invop_cnt++; + if (fbt->fbtp_roffset == 0) { + int i = 0; + /* + * When accessing the arguments on the stack, + * we must protect against accessing beyond + * the stack. We can safely set NOFAULT here + * -- we know that interrupts are already + * disabled. + */ + DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT); + cpu->cpu_dtrace_caller = stack[i++]; + stack0 = stack[i++]; + stack1 = stack[i++]; + stack2 = stack[i++]; + stack3 = stack[i++]; + stack4 = stack[i++]; + DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT | + CPU_DTRACE_BADADDR); + + dtrace_probe(fbt->fbtp_id, stack0, stack1, + stack2, stack3, stack4); + + cpu->cpu_dtrace_caller = 0; + } else { +#ifdef __amd64__ + /* + * On amd64, we instrument the ret, not the + * leave. We therefore need to set the caller + * to assure that the top frame of a stack() + * action is correct. + */ + DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT); + cpu->cpu_dtrace_caller = stack[0]; + DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT | + CPU_DTRACE_BADADDR); +#endif + + dtrace_probe(fbt->fbtp_id, fbt->fbtp_roffset, + rval, 0, 0, 0); + cpu->cpu_dtrace_caller = 0; + } + + return (fbt->fbtp_rval); + } + } + + return (0); +} + +void +fbt_patch_tracepoint(fbt_probe_t *fbt, fbt_patchval_t val) +{ + + *fbt->fbtp_patchpoint = val; +} + +int +fbt_provide_module_function(linker_file_t lf, int symindx, + linker_symval_t *symval, void *opaque) +{ + char *modname = opaque; + const char *name = symval->name; + fbt_probe_t *fbt, *retfbt; + int j; + int size; + uint8_t *instr, *limit; + + if ((strncmp(name, "dtrace_", 7) == 0 && + strncmp(name, "dtrace_safe_", 12) != 0) || + strcmp(name, "trap_check") == 0) { + /* + * Anything beginning with "dtrace_" may be called + * from probe context unless it explicitly indicates + * that it won't be called from probe context by + * using the prefix "dtrace_safe_". + * + * Additionally, we avoid instrumenting trap_check() to avoid + * the possibility of generating a fault in probe context before + * DTrace's fault handler is called. + */ + return (0); + } + + if (name[0] == '_' && name[1] == '_') + return (0); + + size = symval->size; + + instr = (uint8_t *) symval->value; + limit = (uint8_t *) symval->value + symval->size; + +#ifdef __amd64__ + while (instr < limit) { + if (*instr == FBT_PUSHL_EBP) + break; + + if ((size = dtrace_instr_size(instr)) <= 0) + break; + + instr += size; + } + + if (instr >= limit || *instr != FBT_PUSHL_EBP) { + /* + * We either don't save the frame pointer in this + * function, or we ran into some disassembly + * screw-up. Either way, we bail. + */ + return (0); + } +#else + if (instr[0] != FBT_PUSHL_EBP) + return (0); + + if (!(instr[1] == FBT_MOVL_ESP_EBP0_V0 && + instr[2] == FBT_MOVL_ESP_EBP1_V0) && + !(instr[1] == FBT_MOVL_ESP_EBP0_V1 && + instr[2] == FBT_MOVL_ESP_EBP1_V1)) + return (0); +#endif + + fbt = malloc(sizeof (fbt_probe_t), M_FBT, M_WAITOK | M_ZERO); + fbt->fbtp_name = name; + fbt->fbtp_id = dtrace_probe_create(fbt_id, modname, + name, FBT_ENTRY, 3, fbt); + fbt->fbtp_patchpoint = instr; + fbt->fbtp_ctl = lf; + fbt->fbtp_loadcnt = lf->loadcnt; + fbt->fbtp_rval = DTRACE_INVOP_PUSHL_EBP; + fbt->fbtp_savedval = *instr; + fbt->fbtp_patchval = FBT_PATCHVAL; + fbt->fbtp_symindx = symindx; + + fbt->fbtp_hashnext = fbt_probetab[FBT_ADDR2NDX(instr)]; + fbt_probetab[FBT_ADDR2NDX(instr)] = fbt; + + lf->fbt_nentries++; + + retfbt = NULL; +again: + if (instr >= limit) + return (0); + + /* + * If this disassembly fails, then we've likely walked off into + * a jump table or some other unsuitable area. Bail out of the + * disassembly now. + */ + if ((size = dtrace_instr_size(instr)) <= 0) + return (0); + +#ifdef __amd64__ + /* + * We only instrument "ret" on amd64 -- we don't yet instrument + * ret imm16, largely because the compiler doesn't seem to + * (yet) emit them in the kernel... + */ + if (*instr != FBT_RET) { + instr += size; + goto again; + } +#else + if (!(size == 1 && + (*instr == FBT_POPL_EBP || *instr == FBT_LEAVE) && + (*(instr + 1) == FBT_RET || + *(instr + 1) == FBT_RET_IMM16))) { + instr += size; + goto again; + } +#endif + + /* + * We (desperately) want to avoid erroneously instrumenting a + * jump table, especially given that our markers are pretty + * short: two bytes on x86, and just one byte on amd64. To + * determine if we're looking at a true instruction sequence + * or an inline jump table that happens to contain the same + * byte sequences, we resort to some heuristic sleeze: we + * treat this instruction as being contained within a pointer, + * and see if that pointer points to within the body of the + * function. If it does, we refuse to instrument it. + */ + for (j = 0; j < sizeof (uintptr_t); j++) { + caddr_t check = (caddr_t) instr - j; + uint8_t *ptr; + + if (check < symval->value) + break; + + if (check + sizeof (caddr_t) > (caddr_t)limit) + continue; + + ptr = *(uint8_t **)check; + + if (ptr >= (uint8_t *) symval->value && ptr < limit) { + instr += size; + goto again; + } + } + + /* + * We have a winner! + */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sat Aug 16 21:53:45 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 03B9C2EF; Sat, 16 Aug 2014 21:53:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E259120D4; Sat, 16 Aug 2014 21:53:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7GLrioM086055; Sat, 16 Aug 2014 21:53:44 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7GLrigk086053; Sat, 16 Aug 2014 21:53:44 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201408162153.s7GLrigk086053@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sat, 16 Aug 2014 21:53:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270068 - in head: sbin/ifconfig sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Aug 2014 21:53:45 -0000 Author: melifaro Date: Sat Aug 16 21:53:44 2014 New Revision: 270068 URL: http://svnweb.freebsd.org/changeset/base/270068 Log: * Use standard net/sff8472.h header for sff bits and offsets. * Convert sff_8472_id to 'const char *' to please clang. Pointed by: np Modified: head/sbin/ifconfig/sfp.c head/sys/net/sff8472.h Modified: head/sbin/ifconfig/sfp.c ============================================================================== --- head/sbin/ifconfig/sfp.c Sat Aug 16 21:42:55 2014 (r270067) +++ head/sbin/ifconfig/sfp.c Sat Aug 16 21:53:44 2014 (r270068) @@ -34,6 +34,7 @@ static const char rcsid[] = #include #include +#include #include #include @@ -45,10 +46,6 @@ static const char rcsid[] = #include "ifconfig.h" -/* 2wire addresses */ -#define SFP_ADDR_MSA 0xA0 /* Identification data */ -#define SFP_ADDR_DDM 0xA2 /* digital monitoring interface */ - /* Definitions from Table 3.1 */ #define SFP_MSA_IDENTIFIER 0 /* Type of transceiver (T. 3.2), 1B */ #define SFP_MSA_CONNECTOR 2 /* Connector type (T. 3.3), 1B */ @@ -88,25 +85,6 @@ struct _nv { const char *find_value(struct _nv *x, int value); const char *find_zero_bit(struct _nv *x, int value, int sz); - -/* SFF-8472 Rev. 11.4 table 3.2: Identifier values */ -static struct _nv ids[] = { - { 0x00, "Unknown" }, - { 0x01, "GBIC" }, - { 0x02, "SFF" }, - { 0x03, "SFP/SFP+" }, - { 0x04, "300 pin XBI" }, - { 0x05, "Xenpak" }, - { 0x06, "XFP" }, - { 0x07, "XFF" }, - { 0x08, "XFP-E" }, - { 0x09, "XPak" }, - { 0x0A, "X2" }, - { 0x0B, "DWDM-SFP/DWDM-SFP+" }, - { 0x0C, "QSFP" }, - { 0, NULL, }, -}; - /* SFF-8472 Rev. 11.4 table 3.4: Connector values */ static struct _nv conn[] = { { 0x00, "Unknown" }, @@ -128,72 +106,6 @@ static struct _nv conn[] = { { 0, NULL } }; -const char * -find_value(struct _nv *x, int value) -{ - for (; x->n != NULL; x++) - if (x->v == value) - return (x->n); - return (NULL); -} - -const char * -find_zero_bit(struct _nv *x, int value, int sz) -{ - int v, m; - const char *s; - - v = 1; - for (v = 1, m = 1 << (8 * sz); v < m; v *= 2) { - if ((value & v) == 0) - continue; - if ((s = find_value(x, value & v)) != NULL) { - value &= ~v; - return (s); - } - } - - return (NULL); -} - -static void -get_sfp_identifier(struct i2c_info *ii, char *buf, size_t size) -{ - const char *x; - uint8_t data; - - ii->f(ii, SFP_ADDR_MSA, SFP_MSA_IDENTIFIER, 1, (caddr_t)&data); - - if ((x = find_value(ids, data)) == NULL) { - if (data > 0x80) - x = "Vendor specific"; - else - x = "Reserved"; - } - - snprintf(buf, size, "%s", x); -} - -static void -get_sfp_connector(struct i2c_info *ii, char *buf, size_t size) -{ - const char *x; - uint8_t data; - - ii->f(ii, SFP_ADDR_MSA, SFP_MSA_CONNECTOR, 1, (caddr_t)&data); - - if ((x = find_value(conn, data)) == NULL) { - if (data >= 0x0D && data <= 0x1F) - x = "Unallocated"; - else if (data >= 0x23 && data <= 0x7F) - x = "Unallocated"; - else - x = "Vendor specific"; - } - - snprintf(buf, size, "%s", x); -} - /* SFF-8472 Rev. 11.4 table 3.5: Transceiver codes */ /* 10G Ethernet compliance codes, byte 3 */ static struct _nv eth_10g[] = { @@ -270,6 +182,76 @@ static struct _nv fc_speed[] = { { 0, NULL } }; +const char * +find_value(struct _nv *x, int value) +{ + for (; x->n != NULL; x++) + if (x->v == value) + return (x->n); + return (NULL); +} + +const char * +find_zero_bit(struct _nv *x, int value, int sz) +{ + int v, m; + const char *s; + + v = 1; + for (v = 1, m = 1 << (8 * sz); v < m; v *= 2) { + if ((value & v) == 0) + continue; + if ((s = find_value(x, value & v)) != NULL) { + value &= ~v; + return (s); + } + } + + return (NULL); +} + +static void +get_sfp_identifier(struct i2c_info *ii, char *buf, size_t size) +{ + const char *x; + uint8_t data; + + ii->f(ii, SFF_8472_BASE, SFF_8472_ID, 1, (caddr_t)&data); + + x = NULL; + if (data <= SFF_8472_ID_LAST) { + x = NULL; + //x = sff_8472_id[data]; + } else { + if (data > 0x80) + x = "Vendor specific"; + else + x = "Reserved"; + } + + snprintf(buf, size, "%s", x); +} + +static void +get_sfp_connector(struct i2c_info *ii, char *buf, size_t size) +{ + const char *x; + uint8_t data; + + ii->f(ii, SFF_8472_BASE, SFF_8472_CONNECTOR, 1, (caddr_t)&data); + + if ((x = find_value(conn, data)) == NULL) { + if (data >= 0x0D && data <= 0x1F) + x = "Unallocated"; + else if (data >= 0x23 && data <= 0x7F) + x = "Unallocated"; + else + x = "Vendor specific"; + } + + snprintf(buf, size, "%s", x); +} + static void printf_sfp_transceiver_descr(struct i2c_info *ii, char *buf, size_t size) { @@ -283,7 +265,7 @@ printf_sfp_transceiver_descr(struct i2c_ tech_speed = NULL; /* Read bytes 3-10 at once */ - ii->f(ii, SFP_ADDR_MSA, 3, 8, &xbuf[3]); + ii->f(ii, SFF_8472_BASE, SFF_8472_TRANS_START, 8, &xbuf[3]); /* Check 10G first */ tech_class = find_zero_bit(eth_10g, xbuf[3], 1); @@ -311,11 +293,12 @@ get_sfp_transceiver_class(struct i2c_inf uint8_t code; /* Check 10G Ethernet/IB first */ - ii->f(ii, SFP_ADDR_MSA, SFP_MSA_TRANSCEIVER_CLASS, 1, (caddr_t)&code); + ii->f(ii, SFF_8472_BASE, SFF_8472_TRANS_START, 1, (caddr_t)&code); tech_class = find_zero_bit(eth_10g, code, 1); if (tech_class == NULL) { /* No match. Try Ethernet 1G */ - ii->f(ii, SFP_ADDR_MSA, 6, 1, (caddr_t)&code); + ii->f(ii, SFF_8472_BASE, SFF_8472_TRANS_START + 3, + 1, (caddr_t)&code); tech_class = find_zero_bit(eth_compat, code, 1); } @@ -333,7 +316,7 @@ get_sfp_vendor_name(struct i2c_info *ii, memset(xbuf, 0, sizeof(xbuf)); /* ASCII String, right-padded with 0x20 */ - ii->f(ii, SFP_ADDR_MSA, SFP_MSA_VENDOR_NAME, 16, xbuf); + ii->f(ii, SFF_8472_BASE, SFF_8472_VENDOR_START, 16, xbuf); for (p = &xbuf[16]; *(p - 1) == 0x20; p--) ; *p = '\0'; @@ -348,7 +331,7 @@ get_sfp_vendor_pn(struct i2c_info *ii, c memset(xbuf, 0, sizeof(xbuf)); /* ASCII String, right-padded with 0x20 */ - ii->f(ii, SFP_ADDR_MSA, SFP_MSA_VENDOR_PN, 16, xbuf); + ii->f(ii, SFF_8472_BASE, SFF_8472_PN_START, 16, xbuf); for (p = &xbuf[16]; *(p - 1) == 0x20; p--) ; *p = '\0'; @@ -363,7 +346,7 @@ get_sfp_vendor_sn(struct i2c_info *ii, c memset(xbuf, 0, sizeof(xbuf)); /* ASCII String, right-padded with 0x20 */ - ii->f(ii, SFP_ADDR_MSA, SFP_MSA_VENDOR_SN, 16, xbuf); + ii->f(ii, SFF_8472_BASE, SFF_8472_SN_START, 16, xbuf); for (p = &xbuf[16]; *(p - 1) == 0x20; p--) ; *p = '\0'; @@ -377,7 +360,7 @@ get_sfp_vendor_date(struct i2c_info *ii, memset(xbuf, 0, sizeof(xbuf)); /* Date code, see Table 3.8 for description */ - ii->f(ii, SFP_ADDR_MSA, SFP_MSA_VENDOR_DATE, 6, xbuf); + ii->f(ii, SFF_8472_BASE, SFF_8472_DATE_START, 6, xbuf); snprintf(buf, size, "20%c%c-%c%c-%c%c", xbuf[0], xbuf[1], xbuf[2], xbuf[3], xbuf[4], xbuf[5]); } @@ -407,7 +390,7 @@ get_sfp_temp(struct i2c_info *ii, char * int k; memset(xbuf, 0, sizeof(xbuf)); - ii->f(ii, SFP_ADDR_DDM, SFP_DDM_TEMP, 2, xbuf); + ii->f(ii, SFF_8472_DIAG, SFF_8472_TEMP, 2, xbuf); /* Convert temperature to string according to table 3.13 */ major = (int8_t)xbuf[0]; @@ -441,7 +424,7 @@ get_sfp_rx_power(struct i2c_info *ii, ch char xbuf[2]; memset(xbuf, 0, sizeof(xbuf)); - ii->f(ii, SFP_ADDR_DDM, SFP_DDM_RXPOWER, 2, xbuf); + ii->f(ii, SFF_8472_DIAG, SFF_8472_RX_POWER, 2, xbuf); convert_power(ii, xbuf, buf, size); } @@ -451,7 +434,7 @@ get_sfp_tx_power(struct i2c_info *ii, ch char xbuf[2]; memset(xbuf, 0, sizeof(xbuf)); - ii->f(ii, SFP_ADDR_DDM, SFP_DDM_TXPOWER, 2, xbuf); + ii->f(ii, SFF_8472_DIAG, SFF_8472_TX_POWER, 2, xbuf); convert_power(ii, xbuf, buf, size); } @@ -514,7 +497,7 @@ sfp_status(int s, struct ifreq *ifr, int ii.ifr = ifr; /* Read diagnostic monitoring type */ - ii.f(&ii, SFP_ADDR_MSA, SFP_MSA_DMONTYPE, 1, (caddr_t)&ii.diag_type); + ii.f(&ii, SFF_8472_BASE, SFF_8472_DIAG_TYPE, 1, (caddr_t)&ii.diag_type); /* Transceiver type */ get_sfp_identifier(&ii, buf, sizeof(buf)); @@ -527,8 +510,9 @@ sfp_status(int s, struct ifreq *ifr, int print_sfp_vendor(&ii, buf, sizeof(buf)); if (ii.error == 0) printf("\t%s\n", buf); + /* - * Request current measurements iff they are implemented: + * Request current measurements iff they are provided: * Bit 6 must be set. */ if ((ii.diag_type & 0x40) != 0) { @@ -537,7 +521,5 @@ sfp_status(int s, struct ifreq *ifr, int get_sfp_tx_power(&ii, buf3, sizeof(buf3)); printf("\tTemp: %s RX: %s TX: %s\n", buf, buf2, buf3); } - - close(s); } Modified: head/sys/net/sff8472.h ============================================================================== --- head/sys/net/sff8472.h Sat Aug 16 21:42:55 2014 (r270067) +++ head/sys/net/sff8472.h Sat Aug 16 21:53:44 2014 (r270068) @@ -393,7 +393,7 @@ enum { SFF_8472_ID_LAST = SFF_8472_ID_QSFP }; -static char *sff_8472_id[SFF_8472_ID_LAST + 1] = {"Unknown", +static const char *sff_8472_id[SFF_8472_ID_LAST + 1] = {"Unknown", "GBIC", "SFF", "SFP", From owner-svn-src-head@FreeBSD.ORG Sat Aug 16 22:55:59 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A7507E7D; Sat, 16 Aug 2014 22:55:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7938B2654; Sat, 16 Aug 2014 22:55:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7GMtx3O013348; Sat, 16 Aug 2014 22:55:59 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7GMtxgZ013347; Sat, 16 Aug 2014 22:55:59 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201408162255.s7GMtxgZ013347@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sat, 16 Aug 2014 22:55:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270069 - head/sbin/ifconfig X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Aug 2014 22:55:59 -0000 Author: melifaro Date: Sat Aug 16 22:55:58 2014 New Revision: 270069 URL: http://svnweb.freebsd.org/changeset/base/270069 Log: Clean up unused definitions. Modified: head/sbin/ifconfig/sfp.c Modified: head/sbin/ifconfig/sfp.c ============================================================================== --- head/sbin/ifconfig/sfp.c Sat Aug 16 21:53:44 2014 (r270068) +++ head/sbin/ifconfig/sfp.c Sat Aug 16 22:55:58 2014 (r270069) @@ -46,23 +46,6 @@ static const char rcsid[] = #include "ifconfig.h" -/* Definitions from Table 3.1 */ -#define SFP_MSA_IDENTIFIER 0 /* Type of transceiver (T. 3.2), 1B */ -#define SFP_MSA_CONNECTOR 2 /* Connector type (T. 3.3), 1B */ - -#define SFP_MSA_TRANSCEIVER_CLASS 3 /* Ethernet/Sonet/IB code, 1B */ - -#define SFP_MSA_VENDOR_NAME 20 /* ASCII vendor name, 16B */ -#define SFP_MSA_VENDOR_PN 40 /* ASCII vendor partnum, 16B */ -#define SFP_MSA_VENDOR_SN 68 /* ASCII vendor serialnum, 16B */ -#define SFP_MSA_VENDOR_DATE 84 /* Vendor's date code, 8B */ -#define SFP_MSA_DMONTYPE 92 /* Type of disagnostic monitoring, 1B */ - -/* Definitions from table 3.17 */ -#define SFP_DDM_TEMP 96 /* Module temperature, 2B */ -#define SFP_DDM_TXPOWER 102 /* Measured TX output power, 2B */ -#define SFP_DDM_RXPOWER 104 /* Measured RX input power, 2B */ - struct i2c_info; typedef int (read_i2c)(struct i2c_info *ii, uint8_t addr, uint8_t off, uint8_t len, caddr_t buf); @@ -219,10 +202,9 @@ get_sfp_identifier(struct i2c_info *ii, ii->f(ii, SFF_8472_BASE, SFF_8472_ID, 1, (caddr_t)&data); x = NULL; - if (data <= SFF_8472_ID_LAST) { - x = NULL; - //x = sff_8472_id[data]; - } else { + if (data <= SFF_8472_ID_LAST) + x = sff_8472_id[data]; + else { if (data > 0x80) x = "Vendor specific"; else @@ -267,7 +249,7 @@ printf_sfp_transceiver_descr(struct i2c_ /* Read bytes 3-10 at once */ ii->f(ii, SFF_8472_BASE, SFF_8472_TRANS_START, 8, &xbuf[3]); - /* Check 10G first */ + /* Check 10G ethernet first */ tech_class = find_zero_bit(eth_10g, xbuf[3], 1); if (tech_class == NULL) { /* No match. Try 1G */ @@ -400,6 +382,10 @@ get_sfp_temp(struct i2c_info *ii, char * snprintf(buf, size, "%d.%d C", major, k / 100); } +/* + * Converts value in @xbuf to both milliwats and dBm + * human representation. + */ static void convert_power(struct i2c_info *ii, char *xbuf, char *buf, size_t size) {